Class: Amadeus::Namespaces::Shopping::HotelOffer

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

Overview

A namespaced client for the /v2/shopping/hotel-offers/:offer_id endpoints

Access via the Amadeus::Client object

amadeus = Amadeus::Client.new
amadeus.shopping.hotel_offer('XXXX')

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, offer_id) ⇒ HotelOffer

Initialize this namespaced client with an Client instance and an Offer ID

Parameters:



24
25
26
27
# File 'lib/amadeus/namespaces/shopping/hotel_offer.rb', line 24

def initialize(client, offer_id)
  super(client)
  @offer_id = offer_id
end

Instance Attribute Details

#offer_idObject (readonly)

the Offer ID



16
17
18
# File 'lib/amadeus/namespaces/shopping/hotel_offer.rb', line 16

def offer_id
  @offer_id
end

Instance Method Details

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

Return all available details of a specific hotel offer

Examples:

amadeus.shopping.hotel_offer('XXXX').get

Returns:

Raises:

  • (Amadeus::Base)

    an exception if the call failed



36
37
38
# File 'lib/amadeus/namespaces/shopping/hotel_offer.rb', line 36

def get(params = {})
  client.get("/v2/shopping/hotel-offers/#{@offer_id}", params)
end