Class: Onlyoffice::DocsIntegrationSdk::DocumentServer::Client::Response

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/onlyoffice/docs_integration_sdk/document_server/client/response.rb

Overview

Response is a class that represents the response from the Document Server.

Since:

  • 0.1.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request:, response:, error: nil) ⇒ void

initialize initializes a new Response instance.

Parameters:

  • request (Net::HTTPRequest) —

    The request that was sent to the Document Server.

  • response (Net::HTTPResponse) —

    The response from the Document Server.

  • error (Object, nil) (defaults to: nil) —

    The error that occurred when sending the request.

Since:

  • 0.1.0



64
65
66
67
68
# File 'lib/onlyoffice/docs_integration_sdk/document_server/client/response.rb', line 64

def initialize(request:, response:, error: nil)
  @request = request
  @response = response
  @error = error
end

Instance Attribute Details

#error ⇒ Object? (readonly)

error is the error that occurred when sending the request.

Returns:

  • (Object, nil)

Since:

  • 0.1.0



50
51
52
# File 'lib/onlyoffice/docs_integration_sdk/document_server/client/response.rb', line 50

def error
  @error
end

#request ⇒ Net::HTTPRequest (readonly)

request is the request that was sent to the Document Server.

Returns:

  • (Net::HTTPRequest)

Since:

  • 0.1.0



38
39
40
# File 'lib/onlyoffice/docs_integration_sdk/document_server/client/response.rb', line 38

def request
  @request
end

#response ⇒ Net::HTTPResponse (readonly)

response is the response from the Document Server.

Returns:

  • (Net::HTTPResponse)

Since:

  • 0.1.0



44
45
46
# File 'lib/onlyoffice/docs_integration_sdk/document_server/client/response.rb', line 44

def response
  @response
end