class Ingenico::Direct::SDK::Domain::AirlinePassenger

@attr [String] first_name @attr [String] surname @attr [String] surname_prefix @attr [String] title

Attributes

first_name[RW]
surname[RW]
surname_prefix[RW]
title[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/direct/sdk/domain/airline_passenger.rb, line 30
def from_hash(hash)
  super
  @first_name = hash['firstName'] if hash.key? 'firstName'
  @surname = hash['surname'] if hash.key? 'surname'
  @surname_prefix = hash['surnamePrefix'] if hash.key? 'surnamePrefix'
  @title = hash['title'] if hash.key? 'title'
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/airline_passenger.rb, line 21
def to_h
  hash = super
  hash['firstName'] = @first_name unless @first_name.nil?
  hash['surname'] = @surname unless @surname.nil?
  hash['surnamePrefix'] = @surname_prefix unless @surname_prefix.nil?
  hash['title'] = @title unless @title.nil?
  hash
end