Class: Google::Apis::QpxExpressV1::SliceInput

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

Criteria a desired slice must satisfy.

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

Returns a new instance of SliceInput.



942
943
944
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 942

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

Instance Attribute Details

#allianceString

Slices with only the carriers in this alliance should be returned; do not use this field with permittedCarrier. Allowed values are ONEWORLD, SKYTEAM, and STAR. Corresponds to the JSON property alliance

Returns:

  • (String)


886
887
888
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 886

def alliance
  @alliance
end

#dateString

Departure date in YYYY-MM-DD format. Corresponds to the JSON property date

Returns:

  • (String)


891
892
893
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 891

def date
  @date
end

#destinationString

Airport or city IATA designator of the destination. Corresponds to the JSON property destination

Returns:

  • (String)


896
897
898
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 896

def destination
  @destination
end

#kindString

Identifies this as a slice input object, representing the criteria a desired slice must satisfy. Value: the fixed string qpxexpress#sliceInput. Corresponds to the JSON property kind

Returns:

  • (String)


902
903
904
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 902

def kind
  @kind
end

#max_connection_durationFixnum

The longest connection between two legs, in minutes, you are willing to accept. Corresponds to the JSON property maxConnectionDuration

Returns:

  • (Fixnum)


907
908
909
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 907

def max_connection_duration
  @max_connection_duration
end

#max_stopsFixnum

The maximum number of stops you are willing to accept in this slice. Corresponds to the JSON property maxStops

Returns:

  • (Fixnum)


912
913
914
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 912

def max_stops
  @max_stops
end

#originString

Airport or city IATA designator of the origin. Corresponds to the JSON property origin

Returns:

  • (String)


917
918
919
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 917

def origin
  @origin
end

#permitted_carrierArray<String>

A list of 2-letter IATA airline designators. Slices with only these carriers should be returned. Corresponds to the JSON property permittedCarrier

Returns:

  • (Array<String>)


923
924
925
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 923

def permitted_carrier
  @permitted_carrier
end

#permitted_departure_timeGoogle::Apis::QpxExpressV1::TimeOfDayRange

Two times in a single day defining a time range. Corresponds to the JSON property permittedDepartureTime



928
929
930
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 928

def permitted_departure_time
  @permitted_departure_time
end

#preferred_cabinString

Prefer solutions that book in this cabin for this slice. Allowed values are COACH, PREMIUM_COACH, BUSINESS, and FIRST. Corresponds to the JSON property preferredCabin

Returns:

  • (String)


934
935
936
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 934

def preferred_cabin
  @preferred_cabin
end

#prohibited_carrierArray<String>

A list of 2-letter IATA airline designators. Exclude slices that use these carriers. Corresponds to the JSON property prohibitedCarrier

Returns:

  • (Array<String>)


940
941
942
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 940

def prohibited_carrier
  @prohibited_carrier
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



947
948
949
950
951
952
953
954
955
956
957
958
959
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 947

def update!(**args)
  @alliance = args[:alliance] if args.key?(:alliance)
  @date = args[:date] if args.key?(:date)
  @destination = args[:destination] if args.key?(:destination)
  @kind = args[:kind] if args.key?(:kind)
  @max_connection_duration = args[:max_connection_duration] if args.key?(:max_connection_duration)
  @max_stops = args[:max_stops] if args.key?(:max_stops)
  @origin = args[:origin] if args.key?(:origin)
  @permitted_carrier = args[:permitted_carrier] if args.key?(:permitted_carrier)
  @permitted_departure_time = args[:permitted_departure_time] if args.key?(:permitted_departure_time)
  @preferred_cabin = args[:preferred_cabin] if args.key?(:preferred_cabin)
  @prohibited_carrier = args[:prohibited_carrier] if args.key?(:prohibited_carrier)
end