37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/worldline/connect/sdk/v1/domain/payment_context.rb', line 37
def from_hash(hash)
super
if hash.has_key? 'amountOfMoney'
raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
@amount_of_money = Worldline::Connect::SDK::V1::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
end
if hash.has_key? 'countryCode'
@country_code = hash['countryCode']
end
if hash.has_key? 'isInstallments'
@is_installments = hash['isInstallments']
end
if hash.has_key? 'isRecurring'
@is_recurring = hash['isRecurring']
end
end
|