class Ingenico::Connect::SDK::Domain::Payment::CancelApprovalPaymentResponse
@attr [Ingenico::Connect::SDK::Domain::Payment::Payment] payment
Attributes
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/cancel_approval_payment_response.rb, line 24 def from_hash(hash) super 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/cancel_approval_payment_response.rb, line 18 def to_h hash = super hash['payment'] = @payment.to_h unless @payment.nil? hash end