Class: Worldline::Connect::SDK::V1::Domain::AirlineData

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#agent_numeric_codeString

Returns the current value of agent_numeric_code.

Returns:

  • (String)

    the current value of agent_numeric_code



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def agent_numeric_code
  @agent_numeric_code
end

#codeString

Returns the current value of code.

Returns:

  • (String)

    the current value of code



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def code
  @code
end

#flight_dateString

Returns the current value of flight_date.

Returns:

  • (String)

    the current value of flight_date



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def flight_date
  @flight_date
end

#flight_legsArray<Worldline::Connect::SDK::V1::Domain::AirlineFlightLeg>

Returns the current value of flight_legs.

Returns:



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def flight_legs
  @flight_legs
end

#invoice_numberString

Returns the current value of invoice_number.

Returns:

  • (String)

    the current value of invoice_number



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def invoice_number
  @invoice_number
end

#is_e_tickettrue/false

Returns the current value of is_e_ticket.

Returns:

  • (true/false)

    the current value of is_e_ticket



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def is_e_ticket
  @is_e_ticket
end

#is_registered_customerObject

Deprecated.

Use Order.customer.accountType instead



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def is_registered_customer
  @is_registered_customer
end

#is_restricted_tickettrue/false

Returns the current value of is_restricted_ticket.

Returns:

  • (true/false)

    the current value of is_restricted_ticket



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def is_restricted_ticket
  @is_restricted_ticket
end

#is_third_partytrue/false

Returns the current value of is_third_party.

Returns:

  • (true/false)

    the current value of is_third_party



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def is_third_party
  @is_third_party
end

#issue_dateString

Returns the current value of issue_date.

Returns:

  • (String)

    the current value of issue_date



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def issue_date
  @issue_date
end

#merchant_customer_idString

Returns the current value of merchant_customer_id.

Returns:

  • (String)

    the current value of merchant_customer_id



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def merchant_customer_id
  @merchant_customer_id
end

#nameString

Returns the current value of name.

Returns:

  • (String)

    the current value of name



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def name
  @name
end

#number_in_partyInteger

Returns the current value of number_in_party.

Returns:

  • (Integer)

    the current value of number_in_party



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def number_in_party
  @number_in_party
end

#passenger_nameString

Returns the current value of passenger_name.

Returns:

  • (String)

    the current value of passenger_name



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def passenger_name
  @passenger_name
end

#passengersArray<Worldline::Connect::SDK::V1::Domain::AirlinePassenger>

Returns the current value of passengers.

Returns:



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def passengers
  @passengers
end

#place_of_issueString

Returns the current value of place_of_issue.

Returns:

  • (String)

    the current value of place_of_issue



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def place_of_issue
  @place_of_issue
end

#pnrString

Returns the current value of pnr.

Returns:

  • (String)

    the current value of pnr



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def pnr
  @pnr
end

#point_of_saleString

Returns the current value of point_of_sale.

Returns:

  • (String)

    the current value of point_of_sale



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def point_of_sale
  @point_of_sale
end

#pos_city_codeString

Returns the current value of pos_city_code.

Returns:

  • (String)

    the current value of pos_city_code



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def pos_city_code
  @pos_city_code
end

#ticket_delivery_methodString

Returns the current value of ticket_delivery_method.

Returns:

  • (String)

    the current value of ticket_delivery_method



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def ticket_delivery_method
  @ticket_delivery_method
end

#ticket_numberString

Returns the current value of ticket_number.

Returns:

  • (String)

    the current value of ticket_number



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def ticket_number
  @ticket_number
end

#total_fareInteger

Returns the current value of total_fare.

Returns:

  • (Integer)

    the current value of total_fare



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def total_fare
  @total_fare
end

#total_feeInteger

Returns the current value of total_fee.

Returns:

  • (Integer)

    the current value of total_fee



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def total_fee
  @total_fee
end

#total_taxesInteger

Returns the current value of total_taxes.

Returns:

  • (Integer)

    the current value of total_taxes



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def total_taxes
  @total_taxes
end

#travel_agency_nameString

Returns the current value of travel_agency_name.

Returns:

  • (String)

    the current value of travel_agency_name



39
40
41
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 39

def travel_agency_name
  @travel_agency_name
end

Instance Method Details

#from_hash(hash) ⇒ Object



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 123

def from_hash(hash)
  super
  if hash.has_key? 'agentNumericCode'
    @agent_numeric_code = hash['agentNumericCode']
  end
  if hash.has_key? 'code'
    @code = hash['code']
  end
  if hash.has_key? 'flightDate'
    @flight_date = hash['flightDate']
  end
  if hash.has_key? 'flightLegs'
    raise TypeError, "value '%s' is not an Array" % [hash['flightLegs']] unless hash['flightLegs'].is_a? Array
    @flight_legs = []
    hash['flightLegs'].each do |e|
      @flight_legs << Worldline::Connect::SDK::V1::Domain::AirlineFlightLeg.new_from_hash(e)
    end
  end
  if hash.has_key? 'invoiceNumber'
    @invoice_number = hash['invoiceNumber']
  end
  if hash.has_key? 'isETicket'
    @is_e_ticket = hash['isETicket']
  end
  if hash.has_key? 'isRegisteredCustomer'
    @is_registered_customer = hash['isRegisteredCustomer']
  end
  if hash.has_key? 'isRestrictedTicket'
    @is_restricted_ticket = hash['isRestrictedTicket']
  end
  if hash.has_key? 'isThirdParty'
    @is_third_party = hash['isThirdParty']
  end
  if hash.has_key? 'issueDate'
    @issue_date = hash['issueDate']
  end
  if hash.has_key? 'merchantCustomerId'
    @merchant_customer_id = hash['merchantCustomerId']
  end
  if hash.has_key? 'name'
    @name = hash['name']
  end
  if hash.has_key? 'numberInParty'
    @number_in_party = hash['numberInParty']
  end
  if hash.has_key? 'passengerName'
    @passenger_name = hash['passengerName']
  end
  if hash.has_key? 'passengers'
    raise TypeError, "value '%s' is not an Array" % [hash['passengers']] unless hash['passengers'].is_a? Array
    @passengers = []
    hash['passengers'].each do |e|
      @passengers << Worldline::Connect::SDK::V1::Domain::AirlinePassenger.new_from_hash(e)
    end
  end
  if hash.has_key? 'placeOfIssue'
    @place_of_issue = hash['placeOfIssue']
  end
  if hash.has_key? 'pnr'
    @pnr = hash['pnr']
  end
  if hash.has_key? 'pointOfSale'
    @point_of_sale = hash['pointOfSale']
  end
  if hash.has_key? 'posCityCode'
    @pos_city_code = hash['posCityCode']
  end
  if hash.has_key? 'ticketDeliveryMethod'
    @ticket_delivery_method = hash['ticketDeliveryMethod']
  end
  if hash.has_key? 'ticketNumber'
    @ticket_number = hash['ticketNumber']
  end
  if hash.has_key? 'totalFare'
    @total_fare = hash['totalFare']
  end
  if hash.has_key? 'totalFee'
    @total_fee = hash['totalFee']
  end
  if hash.has_key? 'totalTaxes'
    @total_taxes = hash['totalTaxes']
  end
  if hash.has_key? 'travelAgencyName'
    @travel_agency_name = hash['travelAgencyName']
  end
end

#to_hHash

Returns:

  • (Hash)


93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/worldline/connect/sdk/v1/domain/airline_data.rb', line 93

def to_h
  hash = super
  hash['agentNumericCode'] = @agent_numeric_code unless @agent_numeric_code.nil?
  hash['code'] = @code unless @code.nil?
  hash['flightDate'] = @flight_date unless @flight_date.nil?
  hash['flightLegs'] = @flight_legs.collect{|val| val.to_h} unless @flight_legs.nil?
  hash['invoiceNumber'] = @invoice_number unless @invoice_number.nil?
  hash['isETicket'] = @is_e_ticket unless @is_e_ticket.nil?
  hash['isRegisteredCustomer'] = @is_registered_customer unless @is_registered_customer.nil?
  hash['isRestrictedTicket'] = @is_restricted_ticket unless @is_restricted_ticket.nil?
  hash['isThirdParty'] = @is_third_party unless @is_third_party.nil?
  hash['issueDate'] = @issue_date unless @issue_date.nil?
  hash['merchantCustomerId'] = @merchant_customer_id unless @merchant_customer_id.nil?
  hash['name'] = @name unless @name.nil?
  hash['numberInParty'] = @number_in_party unless @number_in_party.nil?
  hash['passengerName'] = @passenger_name unless @passenger_name.nil?
  hash['passengers'] = @passengers.collect{|val| val.to_h} unless @passengers.nil?
  hash['placeOfIssue'] = @place_of_issue unless @place_of_issue.nil?
  hash['pnr'] = @pnr unless @pnr.nil?
  hash['pointOfSale'] = @point_of_sale unless @point_of_sale.nil?
  hash['posCityCode'] = @pos_city_code unless @pos_city_code.nil?
  hash['ticketDeliveryMethod'] = @ticket_delivery_method unless @ticket_delivery_method.nil?
  hash['ticketNumber'] = @ticket_number unless @ticket_number.nil?
  hash['totalFare'] = @total_fare unless @total_fare.nil?
  hash['totalFee'] = @total_fee unless @total_fee.nil?
  hash['totalTaxes'] = @total_taxes unless @total_taxes.nil?
  hash['travelAgencyName'] = @travel_agency_name unless @travel_agency_name.nil?
  hash
end