class Ingenico::Direct::SDK::Domain::CompletePaymentResponse
@attr [Ingenico::Direct::SDK::Domain::PaymentCreationOutput] creation_output
@attr [Ingenico::Direct::SDK::Domain::MerchantAction] merchant_action
@attr [Ingenico::Direct::SDK::Domain::PaymentResponse] payment
Attributes
creation_output[RW]
merchant_action[RW]
payment[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Direct::SDK::DataObject#from_hash
# File lib/ingenico/direct/sdk/domain/complete_payment_response.rb, line 30 def from_hash(hash) super if hash.key? 'creationOutput' raise TypeError, "value '%s' is not a Hash" % [hash['creationOutput']] unless hash['creationOutput'].is_a? Hash @creation_output = Ingenico::Direct::SDK::Domain::PaymentCreationOutput.new_from_hash(hash['creationOutput']) end if hash.key? 'merchantAction' raise TypeError, "value '%s' is not a Hash" % [hash['merchantAction']] unless hash['merchantAction'].is_a? Hash @merchant_action = Ingenico::Direct::SDK::Domain::MerchantAction.new_from_hash(hash['merchantAction']) end if hash.key? 'payment' raise TypeError, "value '%s' is not a Hash" % [hash['payment']] unless hash['payment'].is_a? Hash @payment = Ingenico::Direct::SDK::Domain::PaymentResponse.new_from_hash(hash['payment']) end end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/complete_payment_response.rb, line 22 def to_h hash = super hash['creationOutput'] = @creation_output.to_h if @creation_output hash['merchantAction'] = @merchant_action.to_h if @merchant_action hash['payment'] = @payment.to_h if @payment hash end