zuora_api 1.10.6 → 1.10.9
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/lib/zuora_api/exceptions.rb +1 -0
- data/lib/zuora_api/login.rb +6 -3
- data/lib/zuora_api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c2a845512e7b0a92e7df9140569bbd71b12db189e0b8399e3e4e7ee5b35eda16
|
|
4
|
+
data.tar.gz: 3ddd1693bb6efb40f5e1e4c0f1e437e325163ed260c316e40ade3608aca76b8c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e2e8b020a6a0a72283eef2230d5519538c4239559fe946d54a79bbc3e21b276fce2c7701a9e6bf10472fb78460e096e16c82e48b94da39334706a6bae5c4b2dc
|
|
7
|
+
data.tar.gz: a8787fa1982733ff473758e5b1d6a949683684cadcbf1eb516d19096dbfbaf73991b552fcd8e7e6b4a43f8d66fdf07ae5f0dbabae32c24f8dcece1eefec58510
|
data/lib/zuora_api/exceptions.rb
CHANGED
|
@@ -112,6 +112,7 @@ module ZuoraAPI
|
|
|
112
112
|
class ZuoraAPIRequestLimit < Error
|
|
113
113
|
attr_reader :code, :response
|
|
114
114
|
attr_writer :default_message
|
|
115
|
+
attr_accessor :logged
|
|
115
116
|
|
|
116
117
|
def initialize(message = nil,response=nil, errors = [], successes = [], *args)
|
|
117
118
|
@code = response.class.to_s == "HTTParty::Response" ? response.code : nil
|
data/lib/zuora_api/login.rb
CHANGED
|
@@ -7,7 +7,7 @@ module ZuoraAPI
|
|
|
7
7
|
class Login
|
|
8
8
|
ENVIRONMENTS = [TEST = 'Test', SANDBOX = 'Sandbox', PRODUCTION = 'Production', PREFORMANCE = 'Preformance', SERVICES = 'Services', UNKNOWN = 'Unknown', STAGING = 'Staging' ]
|
|
9
9
|
REGIONS = [EU = 'EU', US = 'US', NA = 'NA' ]
|
|
10
|
-
MIN_Endpoints = {'Test': '
|
|
10
|
+
MIN_Endpoints = {'Test': '119.0', 'Sandbox': '119.0', 'Production': '118.0', 'Performance': '119.0', 'Services': '96.0', 'Unknown': '96.0', 'Staging': '119.0'}.freeze
|
|
11
11
|
XML_SAVE_OPTIONS = Nokogiri::XML::Node::SaveOptions::AS_XML | Nokogiri::XML::Node::SaveOptions::NO_DECLARATION
|
|
12
12
|
USER_AGENT = "Zuora#{ENV['Z_APPLICATION_NAME']&.capitalize}/#{ENV['Z_APPLICATION_VERSION']&.delete('v')}"
|
|
13
13
|
|
|
@@ -542,7 +542,10 @@ module ZuoraAPI
|
|
|
542
542
|
when ZuoraAPI::Exceptions::ZuoraAPIUnkownError, ZuoraAPI::Exceptions::ZuoraDataIntegrity
|
|
543
543
|
Rails.logger.error('Zuora Unknown/Integrity Error', ex, exception_args)
|
|
544
544
|
when ZuoraAPI::Exceptions::ZuoraAPIRequestLimit
|
|
545
|
-
|
|
545
|
+
if ex.logged.nil? || !ex.logged
|
|
546
|
+
ex.logged = true
|
|
547
|
+
Rails.logger.info('Zuora APILimit Reached', ex, exception_args)
|
|
548
|
+
end
|
|
546
549
|
when *(ZuoraAPI::Login::ZUORA_API_ERRORS-ZuoraAPI::Login::ZUORA_SERVER_ERRORS)
|
|
547
550
|
#Rails.logger.debug('Zuora API Error', ex, self.exception_args(ex))
|
|
548
551
|
when *ZuoraAPI::Login::ZUORA_SERVER_ERRORS
|
|
@@ -966,7 +969,7 @@ module ZuoraAPI
|
|
|
966
969
|
raise ZuoraAPI::Exceptions::ZuoraAPIUnkownError.new(message, response, errors, success)
|
|
967
970
|
end
|
|
968
971
|
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(message, response, errors, success)
|
|
969
|
-
when /^INVALID_VERSION/, /invalid/, /^DUPLICATE_VALUE/, /^REQUEST_REJECTED/, /INVALID_ID/, /MAX_RECORDS_EXCEEDED/, /INVALID_FIELD/, /MALFORMED_QUERY/, /NO_PERMISSION/, /PDF_QUERY_ERROR/, /MISSING_REQUIRED_VALUE/, /INVALID_TYPE/, /TRANSACTION_FAILED/, /API_DISABLED/, /CANNOT_DELETE/, /ACCOUNTING_PERIOD_CLOSED/
|
|
972
|
+
when /^EXTENSION_ERROR/, /^INVALID_VERSION/, /invalid/, /^DUPLICATE_VALUE/, /^REQUEST_REJECTED/, /INVALID_ID/, /MAX_RECORDS_EXCEEDED/, /INVALID_FIELD/, /MALFORMED_QUERY/, /NO_PERMISSION/, /PDF_QUERY_ERROR/, /MISSING_REQUIRED_VALUE/, /INVALID_TYPE/, /TRANSACTION_FAILED/, /API_DISABLED/, /CANNOT_DELETE/, /ACCOUNTING_PERIOD_CLOSED/
|
|
970
973
|
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(message, response, errors, success)
|
|
971
974
|
when /.*UNEXPECTED_ERROR/
|
|
972
975
|
raise ZuoraAPI::Exceptions::ZuoraUnexpectedError.new(message, response, errors, success)
|
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.10.
|
|
4
|
+
version: 1.10.9
|
|
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: 2022-
|
|
11
|
+
date: 2022-04-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
219
219
|
- !ruby/object:Gem::Version
|
|
220
220
|
version: '0'
|
|
221
221
|
requirements: []
|
|
222
|
-
rubygems_version: 3.
|
|
222
|
+
rubygems_version: 3.3.7
|
|
223
223
|
signing_key:
|
|
224
224
|
specification_version: 4
|
|
225
225
|
summary: Gem that provides easy integration to Zuora
|