Class: Carbon::APIResponse
- Inherits:
-
Object
- Object
- Carbon::APIResponse
- Defined in:
- lib/carbon_ruby_sdk/api_client.rb
Overview
Represents an HTTP response for method that end with *_with_http_info
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
- Object
-
deserialized data.
-
#headers ⇒ Object
readonly
- Hash
-
response headers.
-
#response ⇒ Object
readonly
- Faraday::Response
-
the original Faraday response object.
-
#status_code ⇒ Object
readonly
- Integer
-
response status code.
Instance Method Summary collapse
-
#initialize(data, status_code, headers, response) ⇒ APIResponse
constructor
A new instance of APIResponse.
Constructor Details
#initialize(data, status_code, headers, response) ⇒ APIResponse
Returns a new instance of APIResponse.
428 429 430 431 432 433 |
# File 'lib/carbon_ruby_sdk/api_client.rb', line 428 def initialize(data, status_code, headers, response) @data = data @status_code = status_code @headers = headers @response = response end |
Instance Attribute Details
#data ⇒ Object (readonly)
- Object
-
deserialized data
420 421 422 |
# File 'lib/carbon_ruby_sdk/api_client.rb', line 420 def data @data end |
#headers ⇒ Object (readonly)
- Hash
-
response headers
424 425 426 |
# File 'lib/carbon_ruby_sdk/api_client.rb', line 424 def headers @headers end |
#response ⇒ Object (readonly)
- Faraday::Response
-
the original Faraday response object
426 427 428 |
# File 'lib/carbon_ruby_sdk/api_client.rb', line 426 def response @response end |
#status_code ⇒ Object (readonly)
- Integer
-
response status code
422 423 424 |
# File 'lib/carbon_ruby_sdk/api_client.rb', line 422 def status_code @status_code end |