Class: Tide::API::Response Private
- Inherits:
-
Object
- Object
- Tide::API::Response
- Defined in:
- lib/tide/api/response.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Generic response of a request to Tide’s API
Instance Attribute Summary collapse
-
#payload ⇒ Hash|Array<Hash>
readonly
private
Hash or array of hashes representing each item in the response body.
Instance Method Summary collapse
-
#error? ⇒ Boolean
private
Whether the response contains errors.
-
#initialize(payload, error) ⇒ Response
constructor
private
Instantiates a new API response.
Constructor Details
#initialize(payload, error) ⇒ Response
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Instantiates a new API response
19 20 21 22 |
# File 'lib/tide/api/response.rb', line 19 def initialize(payload, error) @payload = payload @error = error end |
Instance Attribute Details
#payload ⇒ Hash|Array<Hash> (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Hash or array of hashes representing each item in the response body.
12 13 14 |
# File 'lib/tide/api/response.rb', line 12 def payload @payload end |
Instance Method Details
#error? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Whether the response contains errors
28 29 30 |
# File 'lib/tide/api/response.rb', line 28 def error? @error end |