Class: BigCommerce::ManagementAPI::Endpoint::Response
- Inherits:
-
Object
- Object
- BigCommerce::ManagementAPI::Endpoint::Response
- Includes:
- Enumerable
- Defined in:
- lib/big_commerce/management_api/endpoint.rb
Overview
May go in its own file
Defined Under Namespace
Classes: Meta
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#meta ⇒ Object
readonly
Returns the value of attribute meta.
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(headers, result = nil, meta = nil) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(headers, result = nil, meta = nil) ⇒ Response
Returns a new instance of Response.
135 136 137 138 139 |
# File 'lib/big_commerce/management_api/endpoint.rb', line 135 def initialize(headers, result = nil, = nil) @result = result || [] @headers = ResponseHeaders.new(headers) @meta = Meta.new() if end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
133 134 135 |
# File 'lib/big_commerce/management_api/endpoint.rb', line 133 def headers @headers end |
#meta ⇒ Object (readonly)
Returns the value of attribute meta.
133 134 135 |
# File 'lib/big_commerce/management_api/endpoint.rb', line 133 def @meta end |
Instance Method Details
#each(&block) ⇒ Object
141 142 143 |
# File 'lib/big_commerce/management_api/endpoint.rb', line 141 def each(&block) @result.each(&block) end |