class Ingenico::Connect::SDK::Domain::Payment::CreatePaymentResult
@attr [Ingenico::Connect::SDK::Domain::Payment::PaymentCreationOutput] creation_output
@attr [Ingenico::Connect::SDK::Domain::Payment::MerchantAction] merchant_action
@attr [Ingenico::Connect::SDK::Domain::Payment::Payment] payment
Attributes
creation_output[RW]
merchant_action[RW]
payment[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Connect::SDK::DataObject#from_hash
# File lib/ingenico/connect/sdk/domain/payment/create_payment_result.rb, line 34 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 = Ingenico::Connect::SDK::Domain::Payment::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 = Ingenico::Connect::SDK::Domain::Payment::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 = Ingenico::Connect::SDK::Domain::Payment::Payment.new_from_hash(hash['payment']) end end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/payment/create_payment_result.rb, line 26 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