class Ingenico::Connect::SDK::Domain::Mandates::CreateMandateResponse
@attr [Ingenico::Connect::SDK::Domain::Mandates::MandateResponse] mandate @attr [Ingenico::Connect::SDK::Domain::Mandates::MandateMerchantAction] merchant_action
Attributes
mandate[RW]
merchant_action[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/mandates/create_mandate_response.rb, line 29 def from_hash(hash) super if hash.has_key? 'mandate' raise TypeError, "value '%s' is not a Hash" % [hash['mandate']] unless hash['mandate'].is_a? Hash @mandate = Ingenico::Connect::SDK::Domain::Mandates::MandateResponse.new_from_hash(hash['mandate']) 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::Mandates::MandateMerchantAction.new_from_hash(hash['merchantAction']) 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/mandates/create_mandate_response.rb, line 22 def to_h hash = super hash['mandate'] = @mandate.to_h unless @mandate.nil? hash['merchantAction'] = @merchant_action.to_h unless @merchant_action.nil? hash end