Class: HotelsPro::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/hotels_pro/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
# File 'lib/hotels_pro/configuration.rb', line 5

def initialize
  @environment = "test"
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



3
4
5
# File 'lib/hotels_pro/configuration.rb', line 3

def api_key
  @api_key
end

#environmentObject

Returns the value of attribute environment.



3
4
5
# File 'lib/hotels_pro/configuration.rb', line 3

def environment
  @environment
end

#loggerObject

Returns the value of attribute logger.



3
4
5
# File 'lib/hotels_pro/configuration.rb', line 3

def logger
  @logger
end

#only_stubsObject

Returns the value of attribute only_stubs.



3
4
5
# File 'lib/hotels_pro/configuration.rb', line 3

def only_stubs
  @only_stubs
end

Instance Method Details

#api_urlObject



9
10
11
12
# File 'lib/hotels_pro/configuration.rb', line 9

def api_url
  env = ("" if environment == "live") || "_test"
  "http://api.hotelspro.com/4.1#{env}/hotel/b2bHotelJSON.php"
end