lib/expedia/http_service.rb in expedia-0.0.6 vs lib/expedia/http_service.rb in expedia-0.0.7
- old
+ new
@@ -3,11 +3,11 @@
module Expedia
module HTTPService
API_SERVER = 'api.eancdn.com'
- # The development api server is not reliable. Ofthen gives 400...
+ # The development api server is not reliable. Often gives 400...
# DEVELOPMENT_API_SERVER = 'dev.api.ean.com'
DEVELOPMENT_API_SERVER = 'api.ean.com'
RESERVATION_SERVER = 'book.api.ean.com'
class << self
@@ -91,11 +91,12 @@
end
# Common Parameters required for every Call to Expedia Server.
# @return [Hash] of all common parameters.
def common_parameters
- { :cid => Expedia.cid, :sig => signature, :apiKey => Expedia.api_key, :minorRev => Expedia.minor_rev,
- :_type => 'json', :locale => Expedia.locale, :currencyCode => Expedia.currency_code }
+ params = { :cid => Expedia.cid, :apiKey => Expedia.api_key, :minorRev => Expedia.minor_rev, :_type => 'json', :locale => Expedia.locale, :currencyCode => Expedia.currency_code }
+ params.merge!(:sig => signature) if Expedia.use_signature
+ return params
end
end
end