lib/expedia/http_service.rb in expedia-0.0.2 vs lib/expedia/http_service.rb in expedia-0.0.3
- old
+ new
@@ -2,11 +2,11 @@
require 'expedia/http_service/response'
module Expedia
module HTTPService
- API_SERVER = 'api.ean.com'
+ API_SERVER = 'api.eancdn.com'
RESERVATION_SERVER = 'book.api.ean.com'
DEVELOPMENT_SERVER = 'dev.api.ean.com'
class << self
@@ -17,10 +17,10 @@
# @option options :reservation_api use the RESERVATION API instead of the REGULAR API
# @option options :use_ssl force https, even if not needed
#
# @return a complete server address with protocol
def server(options = {})
- if Expedia.cid == 55505
+ if Expedia.cid.to_i == 55505 && !options[:reservation_api]
server = DEVELOPMENT_SERVER
else
server = options[:reservation_api] ? RESERVATION_SERVER : API_SERVER
end
"#{options[:use_ssl] ? "https" : "http"}://#{server}"