Class: Worldline::Connect::SDK::V1::Domain::CreatePaymentResult
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::CreatePaymentResult
- Defined in:
- lib/worldline/connect/sdk/v1/domain/create_payment_result.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#creation_output ⇒ Worldline::Connect::SDK::V1::Domain::PaymentCreationOutput
The current value of creation_output.
-
#merchant_action ⇒ Worldline::Connect::SDK::V1::Domain::MerchantAction
The current value of merchant_action.
-
#payment ⇒ Worldline::Connect::SDK::V1::Domain::Payment
The current value of payment.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#creation_output ⇒ Worldline::Connect::SDK::V1::Domain::PaymentCreationOutput
Returns the current value of creation_output.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_result.rb', line 18 def creation_output @creation_output end |
#merchant_action ⇒ Worldline::Connect::SDK::V1::Domain::MerchantAction
Returns the current value of merchant_action.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_result.rb', line 18 def merchant_action @merchant_action end |
#payment ⇒ Worldline::Connect::SDK::V1::Domain::Payment
Returns the current value of payment.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/create_payment_result.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/create_payment_result.rb', line 35 def from_hash(hash) super if hash.has_key? 'creationOutput' raise TypeError, "value '%s' is not a Hash" % [hash['creationOutput']] unless hash['creationOutput'].is_a? Hash @creation_output = Worldline::Connect::SDK::V1::Domain::PaymentCreationOutput.new_from_hash(hash['creationOutput']) end if hash.has_key? 'merchantAction' raise TypeError, "value '%s' is not a Hash" % [hash['merchantAction']] unless hash['merchantAction'].is_a? Hash @merchant_action = Worldline::Connect::SDK::V1::Domain::MerchantAction.new_from_hash(hash['merchantAction']) 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/create_payment_result.rb', line 27 def to_h hash = super hash['creationOutput'] = @creation_output.to_h unless @creation_output.nil? hash['merchantAction'] = @merchant_action.to_h unless @merchant_action.nil? hash['payment'] = @payment.to_h unless @payment.nil? hash end |