blastramp 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
@@ -18,16 +18,16 @@ module Blastramp
|
|
18
18
|
soap.body = {
|
19
19
|
'VendorCode' => session.vendor_code,
|
20
20
|
'VendorAccessKey' => session.vendor_access_key,
|
21
|
-
'Batch' =>
|
21
|
+
'Batch' => {'Order' => orders[0].soap_data}
|
22
22
|
}
|
23
23
|
end
|
24
|
-
if (response.to_hash[:result] == 'SUCCESS')
|
24
|
+
if (response.to_hash[:result] == 'SUCCESS' && response.to_hash[:orderids])
|
25
25
|
response.to_hash[:orderids][:string]
|
26
26
|
elsif (response.to_hash[:error] == 'Failed to Authenticate.')
|
27
27
|
raise(AuthenticationFailure.new)
|
28
28
|
else
|
29
29
|
raise "Blastramp: An unknown error occured"
|
30
30
|
end
|
31
|
-
end
|
31
|
+
end
|
32
32
|
end
|
33
33
|
end
|
data/lib/blastramp/version.rb
CHANGED
@@ -17,7 +17,7 @@ describe Blastramp::OrderUpload do
|
|
17
17
|
savon.expects('OrderUpload').with(
|
18
18
|
'VendorCode' => 'ABC',
|
19
19
|
'VendorAccessKey' => 'TWX45IX2R9G35394',
|
20
|
-
'Batch' =>
|
20
|
+
'Batch' => {'Order' => order.soap_data}).returns(:success)
|
21
21
|
subject.submit
|
22
22
|
end
|
23
23
|
|