Class: Google::Apis::QpxExpressV1::TripOptionsRequest

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

A QPX Express search request, which will yield one or more solutions.

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

Returns a new instance of TripOptionsRequest.



1173
1174
1175
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 1173

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

Instance Attribute Details

#max_priceString

Do not return solutions that cost more than this price. The alphabetical part of the price is in ISO 4217. The format, in regex, is [A-Z]3\d+(.\d+)? Example: $102.07 Corresponds to the JSON property maxPrice

Returns:

  • (String)


1132
1133
1134
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 1132

def max_price
  @max_price
end

#passengersGoogle::Apis::QpxExpressV1::PassengerCounts

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



1139
1140
1141
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 1139

def passengers
  @passengers
end

#refundableBoolean Also known as: refundable?

Return only solutions with refundable fares. Corresponds to the JSON property refundable

Returns:

  • (Boolean)


1144
1145
1146
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 1144

def refundable
  @refundable
end

#sale_countryString

IATA country code representing the point of sale. This determines the " equivalent amount paid" currency for the ticket. Corresponds to the JSON property saleCountry

Returns:

  • (String)


1151
1152
1153
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 1151

def sale_country
  @sale_country
end

#sliceArray<Google::Apis::QpxExpressV1::SliceInput>

The slices that make up the itinerary of this trip. A slice represents a traveler's intent, the portion of a low-fare search corresponding to a traveler's request to get between two points. One-way journeys are generally expressed using one slice, round-trips using two. An example of a one slice trip with three segments might be BOS-SYD, SYD-LAX, LAX-BOS if the traveler only stopped in SYD and LAX just long enough to change planes. Corresponds to the JSON property slice



1161
1162
1163
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 1161

def slice
  @slice
end

#solutionsFixnum

The number of solutions to return, maximum 500. Corresponds to the JSON property solutions

Returns:

  • (Fixnum)


1166
1167
1168
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 1166

def solutions
  @solutions
end

#ticketing_countryString

IATA country code representing the point of ticketing. Corresponds to the JSON property ticketingCountry

Returns:

  • (String)


1171
1172
1173
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 1171

def ticketing_country
  @ticketing_country
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1178
1179
1180
1181
1182
1183
1184
1185
1186
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 1178

def update!(**args)
  @max_price = args[:max_price] if args.key?(:max_price)
  @passengers = args[:passengers] if args.key?(:passengers)
  @refundable = args[:refundable] if args.key?(:refundable)
  @sale_country = args[:sale_country] if args.key?(:sale_country)
  @slice = args[:slice] if args.key?(:slice)
  @solutions = args[:solutions] if args.key?(:solutions)
  @ticketing_country = args[:ticketing_country] if args.key?(:ticketing_country)
end