Class: Ingenico::Connect::SDK::Domain::Definitions::AirlinePassenger

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/definitions/airline_passenger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#first_nameObject

String



14
15
16
# File 'lib/ingenico/connect/sdk/domain/definitions/airline_passenger.rb', line 14

def first_name
  @first_name
end

#surnameObject

String



17
18
19
# File 'lib/ingenico/connect/sdk/domain/definitions/airline_passenger.rb', line 17

def surname
  @surname
end

#surname_prefixObject

String



20
21
22
# File 'lib/ingenico/connect/sdk/domain/definitions/airline_passenger.rb', line 20

def surname_prefix
  @surname_prefix
end

#titleObject

String



23
24
25
# File 'lib/ingenico/connect/sdk/domain/definitions/airline_passenger.rb', line 23

def title
  @title
end

Instance Method Details

#from_hash(hash) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/ingenico/connect/sdk/domain/definitions/airline_passenger.rb', line 34

def from_hash(hash)
  super
  if hash.has_key?('firstName')
    @first_name = hash['firstName']
  end
  if hash.has_key?('surname')
    @surname = hash['surname']
  end
  if hash.has_key?('surnamePrefix')
    @surname_prefix = hash['surnamePrefix']
  end
  if hash.has_key?('title')
    @title = hash['title']
  end
end

#to_hObject



25
26
27
28
29
30
31
32
# File 'lib/ingenico/connect/sdk/domain/definitions/airline_passenger.rb', line 25

def to_h
  hash = super
  add_to_hash(hash, 'firstName', @first_name)
  add_to_hash(hash, 'surname', @surname)
  add_to_hash(hash, 'surnamePrefix', @surname_prefix)
  add_to_hash(hash, 'title', @title)
  hash
end