Class: Ingenico::Direct::SDK::Domain::CompletePaymentRequest
- Inherits:
-
Ingenico::Direct::SDK::DataObject
- Object
- Ingenico::Direct::SDK::DataObject
- Ingenico::Direct::SDK::Domain::CompletePaymentRequest
- Defined in:
- lib/ingenico/direct/sdk/domain/complete_payment_request.rb
Instance Attribute Summary collapse
-
#card_payment_method_specific_input ⇒ Ingenico::Direct::SDK::Domain::CompletePaymentCardPaymentMethodSpecificInput
The current value of card_payment_method_specific_input.
-
#order ⇒ Ingenico::Direct::SDK::Domain::Order
The current value of order.
Instance Method Summary collapse
Methods inherited from Ingenico::Direct::SDK::DataObject
Instance Attribute Details
#card_payment_method_specific_input ⇒ Ingenico::Direct::SDK::Domain::CompletePaymentCardPaymentMethodSpecificInput
Returns the current value of card_payment_method_specific_input.
14 15 16 |
# File 'lib/ingenico/direct/sdk/domain/complete_payment_request.rb', line 14 def card_payment_method_specific_input @card_payment_method_specific_input end |
#order ⇒ Ingenico::Direct::SDK::Domain::Order
Returns the current value of order.
14 15 16 |
# File 'lib/ingenico/direct/sdk/domain/complete_payment_request.rb', line 14 def order @order end |
Instance Method Details
#from_hash(hash) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/ingenico/direct/sdk/domain/complete_payment_request.rb', line 26 def from_hash(hash) super if hash.key? 'cardPaymentMethodSpecificInput' raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificInput']] unless hash['cardPaymentMethodSpecificInput'].is_a? Hash @card_payment_method_specific_input = Ingenico::Direct::SDK::Domain::CompletePaymentCardPaymentMethodSpecificInput.new_from_hash(hash['cardPaymentMethodSpecificInput']) end if hash.key? 'order' raise TypeError, "value '%s' is not a Hash" % [hash['order']] unless hash['order'].is_a? Hash @order = Ingenico::Direct::SDK::Domain::Order.new_from_hash(hash['order']) end end |
#to_h ⇒ Hash
19 20 21 22 23 24 |
# File 'lib/ingenico/direct/sdk/domain/complete_payment_request.rb', line 19 def to_h hash = super hash['cardPaymentMethodSpecificInput'] = @card_payment_method_specific_input.to_h if @card_payment_method_specific_input hash['order'] = @order.to_h if @order hash end |