Class: Worldline::Connect::SDK::V1::Domain::CancelPaymentResponse
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::CancelPaymentResponse
- Defined in:
- lib/worldline/connect/sdk/v1/domain/cancel_payment_response.rb
Instance Attribute Summary collapse
-
#card_payment_method_specific_output ⇒ Worldline::Connect::SDK::V1::Domain::CancelPaymentCardPaymentMethodSpecificOutput
The current value of card_payment_method_specific_output.
-
#mobile_payment_method_specific_output ⇒ Worldline::Connect::SDK::V1::Domain::CancelPaymentMobilePaymentMethodSpecificOutput
The current value of mobile_payment_method_specific_output.
-
#payment ⇒ Worldline::Connect::SDK::V1::Domain::Payment
The current value of payment.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#card_payment_method_specific_output ⇒ Worldline::Connect::SDK::V1::Domain::CancelPaymentCardPaymentMethodSpecificOutput
Returns the current value of card_payment_method_specific_output.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/cancel_payment_response.rb', line 18 def card_payment_method_specific_output @card_payment_method_specific_output end |
#mobile_payment_method_specific_output ⇒ Worldline::Connect::SDK::V1::Domain::CancelPaymentMobilePaymentMethodSpecificOutput
Returns the current value of mobile_payment_method_specific_output.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/cancel_payment_response.rb', line 18 def mobile_payment_method_specific_output @mobile_payment_method_specific_output end |
#payment ⇒ Worldline::Connect::SDK::V1::Domain::Payment
Returns the current value of payment.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/cancel_payment_response.rb', line 18 def payment @payment end |
Instance Method Details
#from_hash(hash) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/worldline/connect/sdk/v1/domain/cancel_payment_response.rb', line 35 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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::Payment.new_from_hash(hash['payment']) end end |
#to_h ⇒ Hash
27 28 29 30 31 32 33 |
# File 'lib/worldline/connect/sdk/v1/domain/cancel_payment_response.rb', line 27 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 |