Class: Ingenico::Connect::SDK::Domain::Payment::CompletePaymentRequest
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Payment::CompletePaymentRequest
- Defined in:
- lib/ingenico/connect/sdk/domain/payment/complete_payment_request.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#card_payment_method_specific_input ⇒ Object
16 17 18 |
# File 'lib/ingenico/connect/sdk/domain/payment/complete_payment_request.rb', line 16 def card_payment_method_specific_input @card_payment_method_specific_input end |
#order ⇒ Object
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/payment/complete_payment_request.rb', line 19 def order @order end |
Instance Method Details
#from_hash(hash) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ingenico/connect/sdk/domain/payment/complete_payment_request.rb', line 28 def from_hash(hash) super if hash.has_key?('cardPaymentMethodSpecificInput') if !(hash['cardPaymentMethodSpecificInput'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificInput']] end @card_payment_method_specific_input = Ingenico::Connect::SDK::Domain::Payment::CompletePaymentCardPaymentMethodSpecificInput.new_from_hash(hash['cardPaymentMethodSpecificInput']) end if hash.has_key?('order') if !(hash['order'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['order']] end @order = Ingenico::Connect::SDK::Domain::Payment::Order.new_from_hash(hash['order']) end end |
#to_h ⇒ Object
21 22 23 24 25 26 |
# File 'lib/ingenico/connect/sdk/domain/payment/complete_payment_request.rb', line 21 def to_h hash = super add_to_hash(hash, 'cardPaymentMethodSpecificInput', @card_payment_method_specific_input) add_to_hash(hash, 'order', @order) hash end |