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