Class: Google::Apis::QpxExpressV1::PassengerCounts

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

The number and type of passengers. Unfortunately the definition of an infant, child, adult, and senior citizen varies across carriers and reservation systems.

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) ⇒ PassengerCounts

Returns a new instance of PassengerCounts.


577
578
579
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 577

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

Instance Attribute Details

#adult_countFixnum

The number of passengers that are adults. Corresponds to the JSON property adultCount

Returns:

  • (Fixnum)

549
550
551
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 549

def adult_count
  @adult_count
end

#child_countFixnum

The number of passengers that are children. Corresponds to the JSON property childCount

Returns:

  • (Fixnum)

554
555
556
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 554

def child_count
  @child_count
end

#infant_in_lap_countFixnum

The number of passengers that are infants travelling in the lap of an adult. Corresponds to the JSON property infantInLapCount

Returns:

  • (Fixnum)

559
560
561
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 559

def infant_in_lap_count
  @infant_in_lap_count
end

#infant_in_seat_countFixnum

The number of passengers that are infants each assigned a seat. Corresponds to the JSON property infantInSeatCount

Returns:

  • (Fixnum)

564
565
566
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 564

def infant_in_seat_count
  @infant_in_seat_count
end

#kindString

Identifies this as a passenger count object, representing the number of passengers. Value: the fixed string qpxexpress#passengerCounts. Corresponds to the JSON property kind

Returns:

  • (String)

570
571
572
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 570

def kind
  @kind
end

#senior_countFixnum

The number of passengers that are senior citizens. Corresponds to the JSON property seniorCount

Returns:

  • (Fixnum)

575
576
577
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 575

def senior_count
  @senior_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


582
583
584
585
586
587
588
589
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 582

def update!(**args)
  @adult_count = args[:adult_count] if args.key?(:adult_count)
  @child_count = args[:child_count] if args.key?(:child_count)
  @infant_in_lap_count = args[:infant_in_lap_count] if args.key?(:infant_in_lap_count)
  @infant_in_seat_count = args[:infant_in_seat_count] if args.key?(:infant_in_seat_count)
  @kind = args[:kind] if args.key?(:kind)
  @senior_count = args[:senior_count] if args.key?(:senior_count)
end