class Ingenico::Connect::SDK::Domain::Payment::AdditionalOrderInput
@attr [Ingenico::Connect::SDK::Domain::Definitions::AirlineData] airline_data
@attr [Ingenico::Connect::SDK::Domain::Payment::Installments] installments @attr [Ingenico::Connect::SDK::Domain::Payment::Level3SummaryData] level3_summary_data
@attr [Ingenico::Connect::SDK::Domain::Payment::LoanRecipient] loan_recipient
@attr [Ingenico::Connect::SDK::Domain::Definitions::LodgingData] lodging_data
@attr [Integer] number_of_installments
@attr [String] order_date
@attr [Ingenico::Connect::SDK::Domain::Payment::OrderTypeInformation] type_information
Attributes
airline_data[RW]
installments[RW]
level3_summary_data[RW]
@deprecated Use Order.shoppingCart.amountBreakdown instead
loan_recipient[RW]
lodging_data[RW]
number_of_installments[RW]
@deprecated Use installments.numberOfInstallments instead
order_date[RW]
type_information[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/additional_order_input.rb, line 61 def from_hash(hash) super if hash.has_key? 'airlineData' raise TypeError, "value '%s' is not a Hash" % [hash['airlineData']] unless hash['airlineData'].is_a? Hash @airline_data = Ingenico::Connect::SDK::Domain::Definitions::AirlineData.new_from_hash(hash['airlineData']) end if hash.has_key? 'installments' raise TypeError, "value '%s' is not a Hash" % [hash['installments']] unless hash['installments'].is_a? Hash @installments = Ingenico::Connect::SDK::Domain::Payment::Installments.new_from_hash(hash['installments']) end if hash.has_key? 'level3SummaryData' raise TypeError, "value '%s' is not a Hash" % [hash['level3SummaryData']] unless hash['level3SummaryData'].is_a? Hash @level3_summary_data = Ingenico::Connect::SDK::Domain::Payment::Level3SummaryData.new_from_hash(hash['level3SummaryData']) end if hash.has_key? 'loanRecipient' raise TypeError, "value '%s' is not a Hash" % [hash['loanRecipient']] unless hash['loanRecipient'].is_a? Hash @loan_recipient = Ingenico::Connect::SDK::Domain::Payment::LoanRecipient.new_from_hash(hash['loanRecipient']) end if hash.has_key? 'lodgingData' raise TypeError, "value '%s' is not a Hash" % [hash['lodgingData']] unless hash['lodgingData'].is_a? Hash @lodging_data = Ingenico::Connect::SDK::Domain::Definitions::LodgingData.new_from_hash(hash['lodgingData']) end if hash.has_key? 'numberOfInstallments' @number_of_installments = hash['numberOfInstallments'] end if hash.has_key? 'orderDate' @order_date = hash['orderDate'] end if hash.has_key? 'typeInformation' raise TypeError, "value '%s' is not a Hash" % [hash['typeInformation']] unless hash['typeInformation'].is_a? Hash @type_information = Ingenico::Connect::SDK::Domain::Payment::OrderTypeInformation.new_from_hash(hash['typeInformation']) 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/additional_order_input.rb, line 48 def to_h hash = super hash['airlineData'] = @airline_data.to_h unless @airline_data.nil? hash['installments'] = @installments.to_h unless @installments.nil? hash['level3SummaryData'] = @level3_summary_data.to_h unless @level3_summary_data.nil? hash['loanRecipient'] = @loan_recipient.to_h unless @loan_recipient.nil? hash['lodgingData'] = @lodging_data.to_h unless @lodging_data.nil? hash['numberOfInstallments'] = @number_of_installments unless @number_of_installments.nil? hash['orderDate'] = @order_date unless @order_date.nil? hash['typeInformation'] = @type_information.to_h unless @type_information.nil? hash end