class Ingenico::Direct::SDK::Domain::AdditionalOrderInput
@attr [Ingenico::Direct::SDK::Domain::AirlineData] airline_data
@attr [Ingenico::Direct::SDK::Domain::LoanRecipient] loan_recipient
@attr [Ingenico::Direct::SDK::Domain::LodgingData] lodging_data
@attr [Ingenico::Direct::SDK::Domain::OrderTypeInformation] type_information
Attributes
airline_data[RW]
loan_recipient[RW]
lodging_data[RW]
type_information[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Direct::SDK::DataObject#from_hash
# File lib/ingenico/direct/sdk/domain/additional_order_input.rb, line 34 def from_hash(hash) super if hash.key? 'airlineData' raise TypeError, "value '%s' is not a Hash" % [hash['airlineData']] unless hash['airlineData'].is_a? Hash @airline_data = Ingenico::Direct::SDK::Domain::AirlineData.new_from_hash(hash['airlineData']) end if hash.key? 'loanRecipient' raise TypeError, "value '%s' is not a Hash" % [hash['loanRecipient']] unless hash['loanRecipient'].is_a? Hash @loan_recipient = Ingenico::Direct::SDK::Domain::LoanRecipient.new_from_hash(hash['loanRecipient']) end if hash.key? 'lodgingData' raise TypeError, "value '%s' is not a Hash" % [hash['lodgingData']] unless hash['lodgingData'].is_a? Hash @lodging_data = Ingenico::Direct::SDK::Domain::LodgingData.new_from_hash(hash['lodgingData']) end if hash.key? 'typeInformation' raise TypeError, "value '%s' is not a Hash" % [hash['typeInformation']] unless hash['typeInformation'].is_a? Hash @type_information = Ingenico::Direct::SDK::Domain::OrderTypeInformation.new_from_hash(hash['typeInformation']) end end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/additional_order_input.rb, line 25 def to_h hash = super hash['airlineData'] = @airline_data.to_h if @airline_data hash['loanRecipient'] = @loan_recipient.to_h if @loan_recipient hash['lodgingData'] = @lodging_data.to_h if @lodging_data hash['typeInformation'] = @type_information.to_h if @type_information hash end