Class: Epages::PriceInfo
- Inherits:
-
Object
- Object
- Epages::PriceInfo
- Includes:
- Utils
- Defined in:
- lib/epages/price_info.rb
Constant Summary collapse
- KEYS =
%w(quantity price deposit_price eco_participation_price price_with_deposits manufacturer_price base_price).collect(&:to_sym).freeze
Instance Method Summary collapse
-
#initialize(data) ⇒ PriceInfo
constructor
A new instance of PriceInfo.
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) ⇒ PriceInfo
Returns a new instance of PriceInfo.
12 13 14 15 16 |
# File 'lib/epages/price_info.rb', line 12 def initialize(data) parse_attribute_as(:quantity, data.delete(:quantity)) parse_attribute_as(:base_price, data.delete(:basePrice), Epages::BasePrice) parse_attributes(data, Epages::Price) end |