class Ingenico::Direct::SDK::Domain::CancelPaymentResponse
@attr [Ingenico::Direct::SDK::Domain::PaymentResponse] payment
Attributes
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/cancel_payment_response.rb, line 22 def from_hash(hash) super 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/cancel_payment_response.rb, line 16 def to_h hash = super hash['payment'] = @payment.to_h if @payment hash end