Class: SacsRuby::API::FlightsTo

Inherits:
Base
  • Object
show all
Defined in:
lib/sacs_ruby/api/flights_to.rb

Overview

The Flights To API returns 20 of the lowest published fares available for a given destination.

Instance Attribute Summary

Attributes inherited from Base

#opts, #results, #token, #url

Instance Method Summary collapse

Methods inherited from Base

get, #get, #initialize, #valid?

Constructor Details

This class inherits a constructor from SacsRuby::Base

Instance Method Details

#endpoint_urlObject



12
13
14
# File 'lib/sacs_ruby/api/flights_to.rb', line 12

def endpoint_url
  "/v1/shop/flights/cheapest/fares/#{opts.delete(:destination)}"
end

#required_varsObject



8
9
10
# File 'lib/sacs_ruby/api/flights_to.rb', line 8

def required_vars
  %i(destination)
end