Class: Amadeus::Namespaces::Shopping::FlightOffers

Inherits:
Client::Decorator
  • Object
show all
Defined in:
lib/amadeus/namespaces/shopping/flight_offers.rb

Overview

A namespaced client for the /v1/shopping/flight-offers endpoints

Access via the Amadeus::Client object

amadeus = Amadeus::Client.new
amadeus.shopping.flight_offers

Instance Method Summary collapse

Instance Method Details

#get(params = {}) ⇒ Amadeus::Response

Find the cheapest bookable flights.

Examples:

Find the cheapest destination from London to Paris for Xmas

amadeus.shopping.flight_offers.get(
  origin: 'LHR',
  destination: 'LAX',
  departureDate: '2017-12-24'
)

Parameters:

  • params (Hash) (defaults to: {})

    a customizable set of options

Options Hash (params):

  • :origin (String)

    City/Airport IATA code from which the flight will depart. BOS, for example.

  • :destination (String)

    City/Airport IATA code to which the traveler is going. PAR, for example

Returns:

Raises:

  • (Amadeus::Base)

    an exception if the call failed



30
31
32
# File 'lib/amadeus/namespaces/shopping/flight_offers.rb', line 30

def get(params = {})
  client.get('/v1/shopping/flight-offers', params)
end