Class: Ingenico::Direct::SDK::Domain::AdditionalOrderInput
- Inherits:
-
Ingenico::Direct::SDK::DataObject
- Object
- Ingenico::Direct::SDK::DataObject
- Ingenico::Direct::SDK::Domain::AdditionalOrderInput
- Defined in:
- lib/ingenico/direct/sdk/domain/additional_order_input.rb
Instance Attribute Summary collapse
-
#airline_data ⇒ Ingenico::Direct::SDK::Domain::AirlineData
The current value of airline_data.
-
#loan_recipient ⇒ Ingenico::Direct::SDK::Domain::LoanRecipient
The current value of loan_recipient.
-
#lodging_data ⇒ Ingenico::Direct::SDK::Domain::LodgingData
The current value of lodging_data.
-
#type_information ⇒ Ingenico::Direct::SDK::Domain::OrderTypeInformation
The current value of type_information.
Instance Method Summary collapse
Methods inherited from Ingenico::Direct::SDK::DataObject
Instance Attribute Details
#airline_data ⇒ Ingenico::Direct::SDK::Domain::AirlineData
Returns the current value of airline_data.
18 19 20 |
# File 'lib/ingenico/direct/sdk/domain/additional_order_input.rb', line 18 def airline_data @airline_data end |
#loan_recipient ⇒ Ingenico::Direct::SDK::Domain::LoanRecipient
Returns the current value of loan_recipient.
18 19 20 |
# File 'lib/ingenico/direct/sdk/domain/additional_order_input.rb', line 18 def loan_recipient @loan_recipient end |
#lodging_data ⇒ Ingenico::Direct::SDK::Domain::LodgingData
Returns the current value of lodging_data.
18 19 20 |
# File 'lib/ingenico/direct/sdk/domain/additional_order_input.rb', line 18 def lodging_data @lodging_data end |
#type_information ⇒ Ingenico::Direct::SDK::Domain::OrderTypeInformation
Returns the current value of type_information.
18 19 20 |
# File 'lib/ingenico/direct/sdk/domain/additional_order_input.rb', line 18 def type_information @type_information end |
Instance Method Details
#from_hash(hash) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# 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 ⇒ Hash
25 26 27 28 29 30 31 32 |
# 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 |