class Ingenico::Connect::SDK::Domain::Payment::Installments
@attr [Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney] amount_of_money_per_installment
@attr [String] frequency_of_installments
@attr [String] interest_rate
@attr [Integer] number_of_installments
Attributes
amount_of_money_per_installment[RW]
frequency_of_installments[RW]
interest_rate[RW]
number_of_installments[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/installments.rb, line 36 def from_hash(hash) super if hash.has_key? 'amountOfMoneyPerInstallment' raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoneyPerInstallment']] unless hash['amountOfMoneyPerInstallment'].is_a? Hash @amount_of_money_per_installment = Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney.new_from_hash(hash['amountOfMoneyPerInstallment']) end if hash.has_key? 'frequencyOfInstallments' @frequency_of_installments = hash['frequencyOfInstallments'] end if hash.has_key? 'interestRate' @interest_rate = hash['interestRate'] end if hash.has_key? 'numberOfInstallments' @number_of_installments = hash['numberOfInstallments'] 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/installments.rb, line 27 def to_h hash = super hash['amountOfMoneyPerInstallment'] = @amount_of_money_per_installment.to_h unless @amount_of_money_per_installment.nil? hash['frequencyOfInstallments'] = @frequency_of_installments unless @frequency_of_installments.nil? hash['interestRate'] = @interest_rate unless @interest_rate.nil? hash['numberOfInstallments'] = @number_of_installments unless @number_of_installments.nil? hash end