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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64499316826e0e5e29b2de560f181dc611b35dbc
4
- data.tar.gz: 4f19fc6a5379d8343871165f79abf45903888d1d
3
+ metadata.gz: d47d656016783801cd54d232ca5e9ab8e64cf4ea
4
+ data.tar.gz: 0bcab79dc371b242b927f5ede0f10c494819f0be
5
5
  SHA512:
6
- metadata.gz: e808536e534f65d1261678ef0acc5795cf44229e656f103fb95e978737546252736d4e0a2035cb7b9eee0f752ecf91e07fc2d2b495300180db0b276e66db84a7
7
- data.tar.gz: d1e2433c8035d0c968f139248ee75a1e6e852279980c591ad288d6fb7ac5b8c6e37732ffb03b2730cf17487fcf57a51fc729bd549ceb92949c84a65da6479acb
6
+ metadata.gz: b65c05cda34dd4d8a260bbb318087e61ba9d433311c57ec0e4f7120de14f13fc7001b3ea36e9bbd982ab9d1c5bddbb984464345d61ac7d8ec9d803be295adb46
7
+ data.tar.gz: 5c7e68c48a562c7c351c3160d34f01b5de41106059d3b256d97646383d6e81e4d88af944a640892cb5ede6958801d10a08cca99a04cb0ccd74278d2ff4b2604f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zuora_api (1.3.97)
4
+ zuora_api (1.3.98)
5
5
  httparty
6
6
  nokogiri (~> 1.6.8)
7
7
  railties (>= 4.1.0, < 5.1)
@@ -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
- raise ex
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
- raise ex
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
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.3.97"
2
+ VERSION = "1.3.98"
3
3
  end
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.97
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 00:00:00.000000000 Z
11
+ date: 2017-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler