Class: SnapTrade::APIResponse
- Inherits:
-
Object
- Object
- SnapTrade::APIResponse
- Defined in:
- lib/snaptrade/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.
429 430 431 432 433 434 |
# File 'lib/snaptrade/api_client.rb', line 429 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
421 422 423 |
# File 'lib/snaptrade/api_client.rb', line 421 def data @data end |
#headers ⇒ Object (readonly)
- Hash
-
response headers
425 426 427 |
# File 'lib/snaptrade/api_client.rb', line 425 def headers @headers end |
#response ⇒ Object (readonly)
- Faraday::Response
-
the original Faraday response object
427 428 429 |
# File 'lib/snaptrade/api_client.rb', line 427 def response @response end |
#status_code ⇒ Object (readonly)
- Integer
-
response status code
423 424 425 |
# File 'lib/snaptrade/api_client.rb', line 423 def status_code @status_code end |