Class: Worldline::Connect::SDK::V1::Domain::AdditionalOrderInputAirlineData
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::AdditionalOrderInputAirlineData
- Defined in:
- lib/worldline/connect/sdk/v1/domain/additional_order_input_airline_data.rb
Instance Attribute Summary collapse
-
#airline_data ⇒ Worldline::Connect::SDK::V1::Domain::AirlineData
The current value of airline_data.
-
#lodging_data ⇒ Worldline::Connect::SDK::V1::Domain::LodgingData
The current value of lodging_data.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#airline_data ⇒ Worldline::Connect::SDK::V1::Domain::AirlineData
Returns the current value of airline_data.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/additional_order_input_airline_data.rb', line 16 def airline_data @airline_data end |
#lodging_data ⇒ Worldline::Connect::SDK::V1::Domain::LodgingData
Returns the current value of lodging_data.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/additional_order_input_airline_data.rb', line 16 def lodging_data @lodging_data end |
Instance Method Details
#from_hash(hash) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/worldline/connect/sdk/v1/domain/additional_order_input_airline_data.rb', line 30 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 = Worldline::Connect::SDK::V1::Domain::AirlineData.new_from_hash(hash['airlineData']) end if hash.has_key? 'lodgingData' raise TypeError, "value '%s' is not a Hash" % [hash['lodgingData']] unless hash['lodgingData'].is_a? Hash @lodging_data = Worldline::Connect::SDK::V1::Domain::LodgingData.new_from_hash(hash['lodgingData']) end end |
#to_h ⇒ Hash
23 24 25 26 27 28 |
# File 'lib/worldline/connect/sdk/v1/domain/additional_order_input_airline_data.rb', line 23 def to_h hash = super hash['airlineData'] = @airline_data.to_h unless @airline_data.nil? hash['lodgingData'] = @lodging_data.to_h unless @lodging_data.nil? hash end |