class Ingenico::Direct::SDK::Domain::CompletePaymentRequest
@attr [Ingenico::Direct::SDK::Domain::CompletePaymentCardPaymentMethodSpecificInput] card_payment_method_specific_input
@attr [Ingenico::Direct::SDK::Domain::Order] order
Attributes
card_payment_method_specific_input[RW]
order[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_request.rb, line 26 def from_hash(hash) super if hash.key? 'cardPaymentMethodSpecificInput' raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificInput']] unless hash['cardPaymentMethodSpecificInput'].is_a? Hash @card_payment_method_specific_input = Ingenico::Direct::SDK::Domain::CompletePaymentCardPaymentMethodSpecificInput.new_from_hash(hash['cardPaymentMethodSpecificInput']) end if hash.key? 'order' raise TypeError, "value '%s' is not a Hash" % [hash['order']] unless hash['order'].is_a? Hash @order = Ingenico::Direct::SDK::Domain::Order.new_from_hash(hash['order']) 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_request.rb, line 19 def to_h hash = super hash['cardPaymentMethodSpecificInput'] = @card_payment_method_specific_input.to_h if @card_payment_method_specific_input hash['order'] = @order.to_h if @order hash end