Class: Epages::ShippingData
- Inherits:
-
Object
- Object
- Epages::ShippingData
- Includes:
- Utils
- Defined in:
- lib/epages/shipping_data.rb
Constant Summary collapse
- KEYS =
%w(shipping_method price).collect(&:to_sym).freeze
Instance Method Summary collapse
-
#initialize(data) ⇒ ShippingData
constructor
A new instance of ShippingData.
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) ⇒ ShippingData
Returns a new instance of ShippingData.
11 12 13 14 |
# File 'lib/epages/shipping_data.rb', line 11 def initialize(data) parse_attribute_as(:shipping_method, data.delete(:shippingMethod), Epages::ShippingMethodInfo) parse_attribute_as(:price, data.delete(:price), Epages::Price) end |