Class: Amadeus::Namespaces::Shopping::FlightDates

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

Overview

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

Access via the Amadeus::Client object

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

Instance Method Summary collapse

Instance Method Details

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

Find the cheapest flight dates from an origin to a destination.

Examples:

Find the cheapest flight dates from New-York to Madrid

amadeus.shopping.flight_dates.get(origin: 'NYC',
                                  destination: 'MAD')

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 flight is going. BOS, for example.

Returns:

Raises:

  • (Amadeus::Base)

    an exception if the call failed



27
28
29
# File 'lib/amadeus/namespaces/shopping/flight_dates.rb', line 27

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