Class: Worldline::Connect::SDK::V1::Domain::AdditionalOrderInputAirlineData

Inherits:
Domain::DataObject
  • Object
show all
Defined in:
lib/worldline/connect/sdk/v1/domain/additional_order_input_airline_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#airline_dataWorldline::Connect::SDK::V1::Domain::AirlineData

Returns the current value of airline_data.

Returns:



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_dataWorldline::Connect::SDK::V1::Domain::LodgingData

Returns the current value of lodging_data.

Returns:



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_hHash

Returns:

  • (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