Class: Epages::OrdersResponse
- Inherits:
-
Object
- Object
- Epages::OrdersResponse
- Includes:
- Utils
- Defined in:
- lib/epages/orders_response.rb
Constant Summary collapse
- KEYS =
%w(results page results_per_page items).collect(&:to_sym).freeze
Instance Method Summary collapse
-
#initialize(data) ⇒ OrdersResponse
constructor
A new instance of OrdersResponse.
Methods included from Utils
build_shop_from, camelize_keys, camelize_words, options_to_multipart_request, options_to_patch_request, parse_attribute_as, parse_attribute_as_array_of, parse_attributes, symbolize_keys!, to_query_options, underscorize_keys
Constructor Details
#initialize(data) ⇒ OrdersResponse
Returns a new instance of OrdersResponse.
12 13 14 15 |
# File 'lib/epages/orders_response.rb', line 12 def initialize(data) parse_attribute_as_array_of(:items, data.delete(:items), Epages::Order) parse_attributes(data) end |