lib/ratis/request.rb in ratis-3.4.3 vs lib/ratis/request.rb in ratis-3.5.0
- old
+ new
@@ -4,12 +4,12 @@
extend Savon::Model
def initialize(config = nil)
config = Ratis.config if config.nil?
- raise Errors::ConfigError('It appears that Ratis.configure has not been called') unless config.valid?
-
+ raise Errors::ConfigError('It appears that Ratis.configure has not been called or properly setup') unless config.valid?
+
self.class.client do
wsdl.endpoint = Ratis.config.endpoint
wsdl.namespace = Ratis.config.namespace
http.proxy = Ratis.config.proxy unless Ratis.config.proxy.blank?
http.open_timeout = Ratis.config.timeout unless Ratis.config.timeout.blank?
@@ -19,9 +19,12 @@
end
def self.get(action, params = {})
begin
raise Errors::ConfigError, 'It appears that Ratis.configure has not been called or properly setup' unless Ratis.config.valid?
+
+ # Merge in the Appid as set in the configuration.
+ params.merge!({ 'Appid' => Ratis.config.appid })
# ClassMethods from Savon::Model
# Necessary since calling Ratis.configure doesn't allow changing of values set during Savon initialization
# Savon memoizes the client config
endpoint(Ratis.config.endpoint)