Class: Amadeus::Namespaces::Safety::SafetyRatedLocation

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

Overview

amadeus.safety.safety_rated_location(‘Q930400801’).get()

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, safe_location_id = nil) ⇒ SafetyRatedLocation

Returns a new instance of SafetyRatedLocation.

Parameters:



14
15
16
17
# File 'lib/amadeus/namespaces/safety/safety_rated_location.rb', line 14

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

Instance Attribute Details

#safe_location_idObject (readonly)

Returns the value of attribute safe_location_id.



8
9
10
# File 'lib/amadeus/namespaces/safety/safety_rated_location.rb', line 8

def safe_location_id
  @safe_location_id
end

Instance Method Details

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

Returns details for a specific place

Examples:

Retrieve safety information of ‘Q930402753’

amadeus.safety.safety_rated_location('Q930402753').get

Returns:

Raises:

  • (Amadeus::Base)

    an exception if the call failed



26
27
28
# File 'lib/amadeus/namespaces/safety/safety_rated_location.rb', line 26

def get(params = {})
  client.get("/v1/safety/safety-rated-locations/#{@safe_location_id}", params)
end