Module: HomeAway::API::Domain::Quote
- Included in:
- Client
- Defined in:
- lib/homeaway/api/domain/quote.rb
Instance Method Summary collapse
-
#quote(listing_id, unit_id, adults_count, arrival_date, departure_date, opts = {}) ⇒ HomeAway::API::Response
(also: #book_stay)
Generates an up to date quote and booking url.
Instance Method Details
#quote(listing_id, unit_id, adults_count, arrival_date, departure_date, opts = {}) ⇒ HomeAway::API::Response Also known as: book_stay
Generates an up to date quote and booking url
analogous to calling a GET on API url /public/bookStay
Headers:
-
X-HomeAway-DisplayLocale: If a locale is not specified in a query param, it will be searched for in the X-HomeAway-DisplayLocale Header. If it is not supplied in either area the default locale of the user will be selected if it exists. Otherwise the Accept-Language Header will be used.
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/homeaway/api/domain/quote.rb', line 37 def quote(listing_id, unit_id, adults_count, arrival_date, departure_date, opts={}) params = { 'listingId' => listing_id.to_s, 'unitId' => unit_id.to_s, 'departureDate' => HomeAway::API::Util::Validators.date(departure_date), 'adultsCount' => HomeAway::API::Util::Validators.integer(adults_count), 'arrivalDate' => HomeAway::API::Util::Validators.date(arrival_date), 'locale' => 'en' }.merge(HomeAway::API::Util::Validators.query_keys(opts)) get '/public/quote', params end |