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