Class: Carbon::APIResponse

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#dataObject (readonly)

Object

deserialized data



420
421
422
# File 'lib/carbon_ruby_sdk/api_client.rb', line 420

def data
  @data
end

#headersObject (readonly)

Hash

response headers



424
425
426
# File 'lib/carbon_ruby_sdk/api_client.rb', line 424

def headers
  @headers
end

#responseObject (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_codeObject (readonly)

Integer

response status code



422
423
424
# File 'lib/carbon_ruby_sdk/api_client.rb', line 422

def status_code
  @status_code
end