Class: Google::Apis::QpxExpressV1::LegInfo

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/qpx_express_v1/classes.rb,
generated/google/apis/qpx_express_v1/representations.rb,
generated/google/apis/qpx_express_v1/representations.rb

Overview

Information about a leg. (A leg is the smallest unit of travel, in the case of a flight a takeoff immediately followed by a landing at two set points on a particular carrier with a particular flight number.)

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ LegInfo

Returns a new instance of LegInfo.



514
515
516
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 514

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#aircraftString

The aircraft (or bus, ferry, railcar, etc) travelling between the two points of this leg. Corresponds to the JSON property aircraft

Returns:

  • (String)


420
421
422
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 420

def aircraft
  @aircraft
end

#arrival_timeString

The scheduled time of arrival at the destination of the leg, local to the point of arrival. Corresponds to the JSON property arrivalTime

Returns:

  • (String)


426
427
428
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 426

def arrival_time
  @arrival_time
end

#change_planeBoolean Also known as: change_plane?

Whether you have to change planes following this leg. Only applies to the next leg. Corresponds to the JSON property changePlane

Returns:

  • (Boolean)


432
433
434
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 432

def change_plane
  @change_plane
end

#connection_durationFixnum

Duration of a connection following this leg, in minutes. Corresponds to the JSON property connectionDuration

Returns:

  • (Fixnum)


438
439
440
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 438

def connection_duration
  @connection_duration
end

#departure_timeString

The scheduled departure time of the leg, local to the point of departure. Corresponds to the JSON property departureTime

Returns:

  • (String)


443
444
445
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 443

def departure_time
  @departure_time
end

#destinationString

The leg destination as a city and airport. Corresponds to the JSON property destination

Returns:

  • (String)


448
449
450
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 448

def destination
  @destination
end

#destination_terminalString

The terminal the flight is scheduled to arrive at. Corresponds to the JSON property destinationTerminal

Returns:

  • (String)


453
454
455
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 453

def destination_terminal
  @destination_terminal
end

#durationFixnum

The scheduled travelling time from the origin to the destination. Corresponds to the JSON property duration

Returns:

  • (Fixnum)


458
459
460
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 458

def duration
  @duration
end

#idString

An identifier that uniquely identifies this leg in the solution. Corresponds to the JSON property id

Returns:

  • (String)


463
464
465
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 463

def id
  @id
end

#kindString

Identifies this as a leg object. A leg is the smallest unit of travel, in the case of a flight a takeoff immediately followed by a landing at two set points on a particular carrier with a particular flight number. Value: the fixed string qpxexpress#legInfo. Corresponds to the JSON property kind

Returns:

  • (String)


471
472
473
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 471

def kind
  @kind
end

#mealString

A simple, general description of the meal(s) served on the flight, for example: "Hot meal". Corresponds to the JSON property meal

Returns:

  • (String)


477
478
479
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 477

def meal
  @meal
end

#mileageFixnum

The number of miles in this leg. Corresponds to the JSON property mileage

Returns:

  • (Fixnum)


482
483
484
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 482

def mileage
  @mileage
end

#on_time_performanceFixnum

In percent, the published on time performance on this leg. Corresponds to the JSON property onTimePerformance

Returns:

  • (Fixnum)


487
488
489
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 487

def on_time_performance
  @on_time_performance
end

#operating_disclosureString

Department of Transportation disclosure information on the actual operator of a flight in a code share. (A code share refers to a marketing agreement between two carriers, where one carrier will list in its schedules (and take bookings for) flights that are actually operated by another carrier.) Corresponds to the JSON property operatingDisclosure

Returns:

  • (String)


495
496
497
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 495

def operating_disclosure
  @operating_disclosure
end

#originString

The leg origin as a city and airport. Corresponds to the JSON property origin

Returns:

  • (String)


500
501
502
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 500

def origin
  @origin
end

#origin_terminalString

The terminal the flight is scheduled to depart from. Corresponds to the JSON property originTerminal

Returns:

  • (String)


505
506
507
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 505

def origin_terminal
  @origin_terminal
end

#secureBoolean Also known as: secure?

Whether passenger information must be furnished to the United States Transportation Security Administration (TSA) prior to departure. Corresponds to the JSON property secure

Returns:

  • (Boolean)


511
512
513
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 511

def secure
  @secure
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 519

def update!(**args)
  @aircraft = args[:aircraft] if args.key?(:aircraft)
  @arrival_time = args[:arrival_time] if args.key?(:arrival_time)
  @change_plane = args[:change_plane] if args.key?(:change_plane)
  @connection_duration = args[:connection_duration] if args.key?(:connection_duration)
  @departure_time = args[:departure_time] if args.key?(:departure_time)
  @destination = args[:destination] if args.key?(:destination)
  @destination_terminal = args[:destination_terminal] if args.key?(:destination_terminal)
  @duration = args[:duration] if args.key?(:duration)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @meal = args[:meal] if args.key?(:meal)
  @mileage = args[:mileage] if args.key?(:mileage)
  @on_time_performance = args[:on_time_performance] if args.key?(:on_time_performance)
  @operating_disclosure = args[:operating_disclosure] if args.key?(:operating_disclosure)
  @origin = args[:origin] if args.key?(:origin)
  @origin_terminal = args[:origin_terminal] if args.key?(:origin_terminal)
  @secure = args[:secure] if args.key?(:secure)
end