aria_sdk 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/aria_sdk/aria_core_soap_client.rb +10 -8
- metadata +1 -1
@@ -9,14 +9,15 @@ class AriaCoreSoapClient
|
|
9
9
|
self.client_no = client_no
|
10
10
|
self.auth_key = auth_key
|
11
11
|
|
12
|
-
|
13
|
-
"https://secure.ariasystems.net/api/Advanced/wsdl/#{version}/complete-doc_literal_wrapped.wsdl"
|
12
|
+
if prod
|
13
|
+
wsdl = "https://secure.ariasystems.net/api/Advanced/wsdl/#{version}/complete-doc_literal_wrapped.wsdl"
|
14
14
|
else
|
15
|
-
"https://secure.future.stage.ariasystems.net/api/Advanced/wsdl/#{version}/complete-doc_literal_wrapped.wsdl"
|
15
|
+
wsdl = "https://secure.future.stage.ariasystems.net/api/Advanced/wsdl/#{version}/complete-doc_literal_wrapped.wsdl"
|
16
16
|
end
|
17
17
|
|
18
|
-
@client = Savon.client(wsdl: wsdl)
|
19
|
-
|
18
|
+
@client = Savon.client(wsdl: wsdl) do
|
19
|
+
convert_request_keys_to :none
|
20
|
+
end
|
20
21
|
end
|
21
22
|
|
22
23
|
def call(api_name, message = {})
|
@@ -28,14 +29,15 @@ class AriaCoreSoapClient
|
|
28
29
|
}
|
29
30
|
|
30
31
|
message.merge!(defaults)
|
32
|
+
response = @client.call(api_name.to_sym, message: message)
|
31
33
|
|
32
|
-
response = @client.call(api_name.to_sym, message: message )
|
34
|
+
#response = @client.call(api_name.to_sym, message: message )
|
33
35
|
response_name = api_name << '_response_element'
|
34
36
|
|
35
37
|
body = response.body[response_name.to_sym]
|
36
38
|
|
37
|
-
raise body[:error_msg] unless body[:error_code] == 0
|
39
|
+
raise body[:error_msg] unless body[:error_code] == "0"
|
38
40
|
return body
|
39
41
|
end
|
40
42
|
|
41
|
-
end
|
43
|
+
end
|