zuora_api 1.3.97 → 1.3.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/zuora_api/login.rb +13 -5
- data/lib/zuora_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d47d656016783801cd54d232ca5e9ab8e64cf4ea
|
4
|
+
data.tar.gz: 0bcab79dc371b242b927f5ede0f10c494819f0be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b65c05cda34dd4d8a260bbb318087e61ba9d433311c57ec0e4f7120de14f13fc7001b3ea36e9bbd982ab9d1c5bddbb984464345d61ac7d8ec9d803be295adb46
|
7
|
+
data.tar.gz: 5c7e68c48a562c7c351c3160d34f01b5de41106059d3b256d97646383d6e81e4d88af944a640892cb5ede6958801d10a08cca99a04cb0ccd74278d2ff4b2604f
|
data/Gemfile.lock
CHANGED
data/lib/zuora_api/login.rb
CHANGED
@@ -187,7 +187,7 @@ module ZuoraAPI
|
|
187
187
|
return self.current_session
|
188
188
|
end
|
189
189
|
|
190
|
-
def soap_call(ns1: 'ns1', ns2: 'ns2', batch_size: nil, single_transaction: false,debug: true, **keyword_args)
|
190
|
+
def soap_call(ns1: 'ns1', ns2: 'ns2', batch_size: nil, single_transaction: false,debug: true, z_session: true, **keyword_args)
|
191
191
|
tries ||= 2
|
192
192
|
xml = Nokogiri::XML::Builder.new do |xml|
|
193
193
|
xml['SOAP-ENV'].Envelope('xmlns:SOAP-ENV' => "http://schemas.xmlsoap.org/soap/envelope/",
|
@@ -230,12 +230,16 @@ module ZuoraAPI
|
|
230
230
|
raise ZuoraAPI::Exceptions::ZuoraAPIError.new("#{output_xml.xpath('//fns:FaultCode', 'fns' =>'http://fault.api.zuora.com/').text}::#{output_xml.xpath('//fns:FaultMessage', 'fns' =>'http://fault.api.zuora.com/').text}") if !output_xml.xpath('//fns:FaultCode', 'fns' =>'http://fault.api.zuora.com/').text.blank?
|
231
231
|
raise ZuoraAPI::Exceptions::ZuoraAPIError.new("#{output_xml.xpath('//faultcode').text}::#{output_xml.xpath('//faultstring').text}") if !output_xml.xpath('//faultcode').text.blank?
|
232
232
|
rescue ZuoraAPI::Exceptions::ZuoraAPISessionError => ex
|
233
|
-
if !(tries -= 1).zero?
|
233
|
+
if !(tries -= 1).zero? && z_session
|
234
234
|
Rails.logger.debug {"Session Invalid"}
|
235
235
|
self.new_session
|
236
236
|
retry
|
237
237
|
else
|
238
|
-
|
238
|
+
if debug
|
239
|
+
raise ex
|
240
|
+
else
|
241
|
+
return [output_json, response]
|
242
|
+
end
|
239
243
|
end
|
240
244
|
rescue ZuoraAPI::Exceptions::ZuoraAPIError, ZuoraAPI::Exceptions::ZuoraAPIRequestLimit, ZuoraAPI::Exceptions::ZuoraAPILockCompetition => ex
|
241
245
|
if debug
|
@@ -348,12 +352,16 @@ module ZuoraAPI
|
|
348
352
|
#Zuora All Other API Errors
|
349
353
|
raise ZuoraAPI::Exceptions::ZuoraAPIError.new("#{response.message}") if response.code != 200
|
350
354
|
rescue ZuoraAPI::Exceptions::ZuoraAPISessionError => ex
|
351
|
-
if !(tries -= 1).zero?
|
355
|
+
if !(tries -= 1).zero? && z_session
|
352
356
|
Rails.logger.debug {"Session Invalid"}
|
353
357
|
self.new_session
|
354
358
|
retry
|
355
359
|
else
|
356
|
-
|
360
|
+
if debug
|
361
|
+
raise ex
|
362
|
+
else
|
363
|
+
return [output_json, response]
|
364
|
+
end
|
357
365
|
end
|
358
366
|
rescue ZuoraAPI::Exceptions::ZuoraAPIError, ZuoraAPI::Exceptions::ZuoraAPIRequestLimit => ex
|
359
367
|
if debug
|
data/lib/zuora_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zuora_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.98
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zuora Strategic Solutions Group
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|