Class: Amadeus::Namespaces::ReferenceData::Locations::PointOfInterest

Inherits:
Client::Decorator
  • Object
show all
Defined in:
lib/amadeus/namespaces/reference_data/locations/point_of_interest.rb

Overview

A namespaced client for the /v1/reference-data/locations/pois/:location_id endpoints

Access via the Amadeus::Client object

amadeus = Amadeus::Client.new
amadeus.reference_data.locations.point_of_interest('9CB40CB5D0')

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, poi_location_id = nil) ⇒ PointOfInterest

Initialize this namespaced client with an Client instance and an optional Location ID

Parameters:



25
26
27
28
# File 'lib/amadeus/namespaces/reference_data/locations/point_of_interest.rb', line 25

def initialize(client, poi_location_id = nil)
  super(client)
  @poi_location_id = poi_location_id
end

Instance Attribute Details

#poi_location_idObject (readonly)

the Location ID



17
18
19
# File 'lib/amadeus/namespaces/reference_data/locations/point_of_interest.rb', line 17

def poi_location_id
  @poi_location_id
end

Instance Method Details

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

Returns details for a specific poi

Examples:

Retrieve poi information of ‘9CB40CB5D0’

amadeus.reference_data.locations.point_of_interest('9CB40CB5D0').get

Returns:

Raises:

  • (Amadeus::Base)

    an exception if the call failed



37
38
39
# File 'lib/amadeus/namespaces/reference_data/locations/point_of_interest.rb', line 37

def get(params = {})
  client.get("/v1/reference-data/locations/pois/#{@poi_location_id}", params)
end