Class: Google::Apis::QpxExpressV1::FareInfo

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

Complete information about a fare used in the solution to a low-fare search query. In the airline industry a fare is a price an airline charges for one- way travel between two points. A fare typically contains a carrier code, two city codes, a price, and a fare basis. (A fare basis is a one-to-eight character alphanumeric code used to identify a fare.)

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

Returns a new instance of FareInfo.



312
313
314
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 312

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

Instance Attribute Details

#basis_codeString

Corresponds to the JSON property basisCode

Returns:

  • (String)


278
279
280
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 278

def basis_code
  @basis_code
end

#carrierString

The carrier of the aircraft or other vehicle commuting between two points. Corresponds to the JSON property carrier

Returns:

  • (String)


283
284
285
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 283

def carrier
  @carrier
end

#destinationString

The city code of the city the trip ends at. Corresponds to the JSON property destination

Returns:

  • (String)


288
289
290
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 288

def destination
  @destination
end

#idString

A unique identifier of the fare. Corresponds to the JSON property id

Returns:

  • (String)


293
294
295
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 293

def id
  @id
end

#kindString

Identifies this as a fare object. Value: the fixed string qpxexpress#fareInfo. Corresponds to the JSON property kind

Returns:

  • (String)


298
299
300
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 298

def kind
  @kind
end

#originString

The city code of the city the trip begins at. Corresponds to the JSON property origin

Returns:

  • (String)


303
304
305
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 303

def origin
  @origin
end

#privateBoolean Also known as: private?

Whether this is a private fare, for example one offered only to select customers rather than the general public. Corresponds to the JSON property private

Returns:

  • (Boolean)


309
310
311
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 309

def private
  @private
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



317
318
319
320
321
322
323
324
325
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 317

def update!(**args)
  @basis_code = args[:basis_code] if args.key?(:basis_code)
  @carrier = args[:carrier] if args.key?(:carrier)
  @destination = args[:destination] if args.key?(:destination)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @origin = args[:origin] if args.key?(:origin)
  @private = args[:private] if args.key?(:private)
end