Class: CyberSource::Ptsv2paymentsTravelInformationTransitAirlineLegs

Inherits:
Object
  • Object
show all
Defined in:
lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Ptsv2paymentsTravelInformationTransitAirlineLegs

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
209
210
211
212
213
214
215
216
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 131

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'carrierCode')
    self.carrier_code = attributes[:'carrierCode']
  end

  if attributes.has_key?(:'flightNumber')
    self.flight_number = attributes[:'flightNumber']
  end

  if attributes.has_key?(:'originatingAirportCode')
    self.originating_airport_code = attributes[:'originatingAirportCode']
  end

  if attributes.has_key?(:'class')
    self._class = attributes[:'class']
  end

  if attributes.has_key?(:'stopoverIndicator')
    self.stopover_indicator = attributes[:'stopoverIndicator']
  end

  if attributes.has_key?(:'departureDate')
    self.departure_date = attributes[:'departureDate']
  end

  if attributes.has_key?(:'destinationAirportCode')
    self.destination_airport_code = attributes[:'destinationAirportCode']
  end

  if attributes.has_key?(:'fareBasis')
    self.fare_basis = attributes[:'fareBasis']
  end

  if attributes.has_key?(:'departTaxAmount')
    self.depart_tax_amount = attributes[:'departTaxAmount']
  end

  if attributes.has_key?(:'conjunctionTicket')
    self.conjunction_ticket = attributes[:'conjunctionTicket']
  end

  if attributes.has_key?(:'exchangeTicketNumber')
    self.exchange_ticket_number = attributes[:'exchangeTicketNumber']
  end

  if attributes.has_key?(:'couponNumber')
    self.coupon_number = attributes[:'couponNumber']
  end

  if attributes.has_key?(:'departureTime')
    self.departure_time = attributes[:'departureTime']
  end

  if attributes.has_key?(:'departureTimeMeridian')
    self.departure_time_meridian = attributes[:'departureTimeMeridian']
  end

  if attributes.has_key?(:'arrivalTime')
    self.arrival_time = attributes[:'arrivalTime']
  end

  if attributes.has_key?(:'arrivalTimeMeridian')
    self.arrival_time_meridian = attributes[:'arrivalTimeMeridian']
  end

  if attributes.has_key?(:'endorsementsRestrictions')
    self.endorsements_restrictions = attributes[:'endorsementsRestrictions']
  end

  if attributes.has_key?(:'totalFareAmount')
    self.total_fare_amount = attributes[:'totalFareAmount']
  end

  if attributes.has_key?(:'feeAmount')
    self.fee_amount = attributes[:'feeAmount']
  end

  if attributes.has_key?(:'taxAmount')
    self.tax_amount = attributes[:'taxAmount']
  end
end

Instance Attribute Details

#_classObject

IATA code for the class of service for this leg of the trip. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.



27
28
29
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 27

def _class
  @_class
end

#arrival_timeObject

Time of arrival for this leg of the trip. The format is military time and HHMM: If not all zeros, then the hours must be ‘00-23` and the minutes must be `00-59` Format: English characters only. Optional request field for travel legs.



60
61
62
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 60

def arrival_time
  @arrival_time
end

#arrival_time_meridianObject

AM or PM for the arrival time for this leg of the trip. Possible values: - ‘A`: 12:00 midnight to 11:59 a.m. - `P`: 12:00 noon to 11:59 p.m. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.



63
64
65
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 63

def arrival_time_meridian
  @arrival_time_meridian
end

#carrier_codeObject

IATA code for the carrier for this leg of the trip. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.



18
19
20
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 18

def carrier_code
  @carrier_code
end

#conjunction_ticketObject

Ticket that contains additional coupons for this leg of the trip on an itinerary that has more than four segments. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.



45
46
47
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 45

def conjunction_ticket
  @conjunction_ticket
end

#coupon_numberObject

Coupon number. Each leg on the ticket requires a separate coupon, and each coupon is identified by the coupon number. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.



51
52
53
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 51

def coupon_number
  @coupon_number
end

#depart_tax_amountObject

Amount of departure tax for this leg of the trip.



42
43
44
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 42

def depart_tax_amount
  @depart_tax_amount
end

#departure_dateObject

Departure date for the first leg of the trip. Format: ‘YYYYMMDD`. Format: English characters only. Optional request field for travel legs.



33
34
35
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 33

def departure_date
  @departure_date
end

#departure_timeObject

Time of departure for this leg of the trip. The format is military time and HHMM: If not all zeros, then the hours must be ‘00-23` and the minutes must be `00-59`. Format: English characters only. Optional request field for travel legs.



54
55
56
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 54

def departure_time
  @departure_time
end

#departure_time_meridianObject

AM or PM for the departure time. Possible values: - A: 12:00 midnight to 11:59 a.m. - P: 12:00 noon to 11:59 p.m Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.



57
58
59
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 57

def departure_time_meridian
  @departure_time_meridian
end

#destination_airport_codeObject

IATA code for the destination airport for this leg of the trip. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.



36
37
38
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 36

def destination_airport_code
  @destination_airport_code
end

#endorsements_restrictionsObject

Notes or notations about endorsements and restrictions for this leg of the trip. Endorsements can be notations added by the travel agency, including mandatory government-required notations such as value added tax. Restrictions are limitations for the ticket based on the type of fare, such as a nonrefundable ticket or a 3-day minimum stay. Format: English characters only. Optional request field for travel legs.



66
67
68
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 66

def endorsements_restrictions
  @endorsements_restrictions
end

#exchange_ticket_numberObject

New ticket number that is issued when the ticket is exchanged for this leg of the trip. Restrictions are limitations for the ticket based on the type of fare, such as a nonrefundable ticket or a 3-day minimum stay. Format: English characters only. Optional request field for travel legs.



48
49
50
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 48

def exchange_ticket_number
  @exchange_ticket_number
end

#fare_basisObject

Code for the fare basis for this leg of the trip. The fare basis is assigned by the carriers and indicates a particular ticket type, such as business class or discounted/nonrefundable. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Format: English characters only. Optional request field for travel legs.auto_rental_regular_mileage_cost



39
40
41
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 39

def fare_basis
  @fare_basis
end

#fee_amountObject

Fee for this leg of the trip, such as an airport fee or country fee. Format: English characters only. Optional request field for travel legs.



72
73
74
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 72

def fee_amount
  @fee_amount
end

#flight_numberObject

Flight number for this leg of the trip. Restrictions are limitations for the ticket based on the type of fare, such as a nonrefundable ticket or a 3-day minimum stay. Format: English characters only. Optional request field for travel legs.



21
22
23
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 21

def flight_number
  @flight_number
end

#originating_airport_codeObject

IATA code for the originating airport for this leg of the trip. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.



24
25
26
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 24

def originating_airport_code
  @originating_airport_code
end

#stopover_indicatorObject

Code that indicates whether a stopover is allowed on this leg of the trip. Possible values: - ‘O` (capital letter “O”) (default): Stopover allowed - `X` (capital letter “X”): Stopover not allowed Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field for travel legs.



30
31
32
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 30

def stopover_indicator
  @stopover_indicator
end

#tax_amountObject

Tax for this leg of the trip. Format: English characters only. Optional request field for travel legs.



75
76
77
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 75

def tax_amount
  @tax_amount
end

#total_fare_amountObject

Total fare for this leg of the trip. Format: English characters only. Optional request field for travel legs.



69
70
71
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 69

def total_fare_amount
  @total_fare_amount
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 78

def self.attribute_map
  {
    :'carrier_code' => :'carrierCode',
    :'flight_number' => :'flightNumber',
    :'originating_airport_code' => :'originatingAirportCode',
    :'_class' => :'class',
    :'stopover_indicator' => :'stopoverIndicator',
    :'departure_date' => :'departureDate',
    :'destination_airport_code' => :'destinationAirportCode',
    :'fare_basis' => :'fareBasis',
    :'depart_tax_amount' => :'departTaxAmount',
    :'conjunction_ticket' => :'conjunctionTicket',
    :'exchange_ticket_number' => :'exchangeTicketNumber',
    :'coupon_number' => :'couponNumber',
    :'departure_time' => :'departureTime',
    :'departure_time_meridian' => :'departureTimeMeridian',
    :'arrival_time' => :'arrivalTime',
    :'arrival_time_meridian' => :'arrivalTimeMeridian',
    :'endorsements_restrictions' => :'endorsementsRestrictions',
    :'total_fare_amount' => :'totalFareAmount',
    :'fee_amount' => :'feeAmount',
    :'tax_amount' => :'taxAmount'
  }
end

.swagger_typesObject

Attribute type mapping.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 104

def self.swagger_types
  {
    :'carrier_code' => :'String',
    :'flight_number' => :'String',
    :'originating_airport_code' => :'String',
    :'_class' => :'String',
    :'stopover_indicator' => :'Integer',
    :'departure_date' => :'Integer',
    :'destination_airport_code' => :'String',
    :'fare_basis' => :'String',
    :'depart_tax_amount' => :'String',
    :'conjunction_ticket' => :'String',
    :'exchange_ticket_number' => :'String',
    :'coupon_number' => :'String',
    :'departure_time' => :'Integer',
    :'departure_time_meridian' => :'String',
    :'arrival_time' => :'Integer',
    :'arrival_time_meridian' => :'String',
    :'endorsements_restrictions' => :'String',
    :'total_fare_amount' => :'String',
    :'fee_amount' => :'String',
    :'tax_amount' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 473

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      carrier_code == o.carrier_code &&
      flight_number == o.flight_number &&
      originating_airport_code == o.originating_airport_code &&
      _class == o._class &&
      stopover_indicator == o.stopover_indicator &&
      departure_date == o.departure_date &&
      destination_airport_code == o.destination_airport_code &&
      fare_basis == o.fare_basis &&
      depart_tax_amount == o.depart_tax_amount &&
      conjunction_ticket == o.conjunction_ticket &&
      exchange_ticket_number == o.exchange_ticket_number &&
      coupon_number == o.coupon_number &&
      departure_time == o.departure_time &&
      departure_time_meridian == o.departure_time_meridian &&
      arrival_time == o.arrival_time &&
      arrival_time_meridian == o.arrival_time_meridian &&
      endorsements_restrictions == o.endorsements_restrictions &&
      total_fare_amount == o.total_fare_amount &&
      fee_amount == o.fee_amount &&
      tax_amount == o.tax_amount
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 534

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = CyberSource.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



600
601
602
603
604
605
606
607
608
609
610
611
612
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 600

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 513

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


500
501
502
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 500

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



506
507
508
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 506

def hash
  [carrier_code, flight_number, originating_airport_code, _class, stopover_indicator, departure_date, destination_airport_code, fare_basis, depart_tax_amount, conjunction_ticket, exchange_ticket_number, coupon_number, departure_time, departure_time_meridian, arrival_time, arrival_time_meridian, endorsements_restrictions, total_fare_amount, fee_amount, tax_amount].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 220

def list_invalid_properties
  invalid_properties = Array.new
  if !@carrier_code.nil? && @carrier_code.to_s.length > 4
    invalid_properties.push('invalid value for "carrier_code", the character length must be smaller than or equal to 4.')
  end

  if !@flight_number.nil? && @flight_number.to_s.length > 6
    invalid_properties.push('invalid value for "flight_number", the character length must be smaller than or equal to 6.')
  end

  if !@originating_airport_code.nil? && @originating_airport_code.to_s.length > 5
    invalid_properties.push('invalid value for "originating_airport_code", the character length must be smaller than or equal to 5.')
  end

  if !@_class.nil? && @_class.to_s.length > 3
    invalid_properties.push('invalid value for "_class", the character length must be smaller than or equal to 3.')
  end

  if !@destination_airport_code.nil? && @destination_airport_code.to_s.length > 3
    invalid_properties.push('invalid value for "destination_airport_code", the character length must be smaller than or equal to 3.')
  end

  if !@fare_basis.nil? && @fare_basis.to_s.length > 15
    invalid_properties.push('invalid value for "fare_basis", the character length must be smaller than or equal to 15.')
  end

  if !@depart_tax_amount.nil? && @depart_tax_amount.to_s.length > 12
    invalid_properties.push('invalid value for "depart_tax_amount", the character length must be smaller than or equal to 12.')
  end

  if !@conjunction_ticket.nil? && @conjunction_ticket.to_s.length > 25
    invalid_properties.push('invalid value for "conjunction_ticket", the character length must be smaller than or equal to 25.')
  end

  if !@exchange_ticket_number.nil? && @exchange_ticket_number.to_s.length > 25
    invalid_properties.push('invalid value for "exchange_ticket_number", the character length must be smaller than or equal to 25.')
  end

  if !@coupon_number.nil? && @coupon_number.to_s.length > 1
    invalid_properties.push('invalid value for "coupon_number", the character length must be smaller than or equal to 1.')
  end

  if !@departure_time_meridian.nil? && @departure_time_meridian.to_s.length > 1
    invalid_properties.push('invalid value for "departure_time_meridian", the character length must be smaller than or equal to 1.')
  end

  if !@arrival_time_meridian.nil? && @arrival_time_meridian.to_s.length > 1
    invalid_properties.push('invalid value for "arrival_time_meridian", the character length must be smaller than or equal to 1.')
  end

  if !@endorsements_restrictions.nil? && @endorsements_restrictions.to_s.length > 20
    invalid_properties.push('invalid value for "endorsements_restrictions", the character length must be smaller than or equal to 20.')
  end

  if !@total_fare_amount.nil? && @total_fare_amount.to_s.length > 15
    invalid_properties.push('invalid value for "total_fare_amount", the character length must be smaller than or equal to 15.')
  end

  if !@fee_amount.nil? && @fee_amount.to_s.length > 12
    invalid_properties.push('invalid value for "fee_amount", the character length must be smaller than or equal to 12.')
  end

  if !@tax_amount.nil? && @tax_amount.to_s.length > 12
    invalid_properties.push('invalid value for "tax_amount", the character length must be smaller than or equal to 12.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



580
581
582
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 580

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



586
587
588
589
590
591
592
593
594
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 586

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



574
575
576
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 574

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_legs.rb', line 291

def valid?
  return false if !@carrier_code.nil? && @carrier_code.to_s.length > 4
  return false if !@flight_number.nil? && @flight_number.to_s.length > 6
  return false if !@originating_airport_code.nil? && @originating_airport_code.to_s.length > 5
  return false if !@_class.nil? && @_class.to_s.length > 3
  return false if !@destination_airport_code.nil? && @destination_airport_code.to_s.length > 3
  return false if !@fare_basis.nil? && @fare_basis.to_s.length > 15
  return false if !@depart_tax_amount.nil? && @depart_tax_amount.to_s.length > 12
  return false if !@conjunction_ticket.nil? && @conjunction_ticket.to_s.length > 25
  return false if !@exchange_ticket_number.nil? && @exchange_ticket_number.to_s.length > 25
  return false if !@coupon_number.nil? && @coupon_number.to_s.length > 1
  return false if !@departure_time_meridian.nil? && @departure_time_meridian.to_s.length > 1
  return false if !@arrival_time_meridian.nil? && @arrival_time_meridian.to_s.length > 1
  return false if !@endorsements_restrictions.nil? && @endorsements_restrictions.to_s.length > 20
  return false if !@total_fare_amount.nil? && @total_fare_amount.to_s.length > 15
  return false if !@fee_amount.nil? && @fee_amount.to_s.length > 12
  return false if !@tax_amount.nil? && @tax_amount.to_s.length > 12
  true
end