Class: Ingenico::Connect::SDK::Domain::Payment::CancelPaymentResponse
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Payment::CancelPaymentResponse
- Defined in:
- lib/ingenico/connect/sdk/domain/payment/cancel_payment_response.rb
Instance Attribute Summary collapse
-
#card_payment_method_specific_output ⇒ Ingenico::Connect::SDK::Domain::Payment::CancelPaymentCardPaymentMethodSpecificOutput
The current value of card_payment_method_specific_output.
-
#mobile_payment_method_specific_output ⇒ Ingenico::Connect::SDK::Domain::Payment::CancelPaymentMobilePaymentMethodSpecificOutput
The current value of mobile_payment_method_specific_output.
-
#payment ⇒ Ingenico::Connect::SDK::Domain::Payment::Payment
The current value of payment.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#card_payment_method_specific_output ⇒ Ingenico::Connect::SDK::Domain::Payment::CancelPaymentCardPaymentMethodSpecificOutput
Returns the current value of card_payment_method_specific_output.
17 18 19 |
# File 'lib/ingenico/connect/sdk/domain/payment/cancel_payment_response.rb', line 17 def card_payment_method_specific_output @card_payment_method_specific_output end |
#mobile_payment_method_specific_output ⇒ Ingenico::Connect::SDK::Domain::Payment::CancelPaymentMobilePaymentMethodSpecificOutput
Returns the current value of mobile_payment_method_specific_output.
17 18 19 |
# File 'lib/ingenico/connect/sdk/domain/payment/cancel_payment_response.rb', line 17 def mobile_payment_method_specific_output @mobile_payment_method_specific_output end |
#payment ⇒ Ingenico::Connect::SDK::Domain::Payment::Payment
Returns the current value of payment.
17 18 19 |
# File 'lib/ingenico/connect/sdk/domain/payment/cancel_payment_response.rb', line 17 def payment @payment end |
Instance Method Details
#from_hash(hash) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/ingenico/connect/sdk/domain/payment/cancel_payment_response.rb', line 34 def from_hash(hash) super if hash.has_key? 'cardPaymentMethodSpecificOutput' raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificOutput']] unless hash['cardPaymentMethodSpecificOutput'].is_a? Hash @card_payment_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::CancelPaymentCardPaymentMethodSpecificOutput.new_from_hash(hash['cardPaymentMethodSpecificOutput']) end if hash.has_key? 'mobilePaymentMethodSpecificOutput' raise TypeError, "value '%s' is not a Hash" % [hash['mobilePaymentMethodSpecificOutput']] unless hash['mobilePaymentMethodSpecificOutput'].is_a? Hash @mobile_payment_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::CancelPaymentMobilePaymentMethodSpecificOutput.new_from_hash(hash['mobilePaymentMethodSpecificOutput']) end if hash.has_key? 'payment' raise TypeError, "value '%s' is not a Hash" % [hash['payment']] unless hash['payment'].is_a? Hash @payment = Ingenico::Connect::SDK::Domain::Payment::Payment.new_from_hash(hash['payment']) end end |
#to_h ⇒ Hash
26 27 28 29 30 31 32 |
# File 'lib/ingenico/connect/sdk/domain/payment/cancel_payment_response.rb', line 26 def to_h hash = super hash['cardPaymentMethodSpecificOutput'] = @card_payment_method_specific_output.to_h unless @card_payment_method_specific_output.nil? hash['mobilePaymentMethodSpecificOutput'] = @mobile_payment_method_specific_output.to_h unless @mobile_payment_method_specific_output.nil? hash['payment'] = @payment.to_h unless @payment.nil? hash end |