Class: Epages::CustomersResponse

Inherits:
Object
  • Object
show all
Includes:
Utils
Defined in:
lib/epages/customers_response.rb

Constant Summary collapse

KEYS =
%w(results page results_per_page items).collect(&:to_sym).freeze

Instance Method Summary collapse

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) ⇒ CustomersResponse

Returns a new instance of CustomersResponse.



12
13
14
15
# File 'lib/epages/customers_response.rb', line 12

def initialize(data)
  parse_attribute_as_array_of(:items, data.delete(:items), Epages::Customer)
  parse_attributes(data)
end