zuora_api 1.10.8 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a45196609ccd1e087973dc354b0aa009b9748f3741d45b9950f0e67a79d9605
4
- data.tar.gz: 0d74f7ab813118713a3a83e10efe894537c164c68248e46d4b8c732cf150a84b
3
+ metadata.gz: 2c3e2e3e17ebf318b524af894ebb8d0fdd6c943724757e0ac7312b4038f315cf
4
+ data.tar.gz: d4572546c89bf71cfd44816af541acd7ccd05f9f78cea673a8d752cf5f5749ab
5
5
  SHA512:
6
- metadata.gz: 1d47aefe0c596d641d082140f8c024103207b42e12c79e112e8bd78c9185fe19d997c1f38164799d144a366be98269f352769ee4da8f697dc2569bf7d189e5de
7
- data.tar.gz: 9be6265246f131049748a0704e42188846e6144a6c8b42a7666fb90c97d767ec37422f271c96ce96d22be025c04320027ce003923fc27c0e525525fdf2989e11
6
+ metadata.gz: b92b7964475c93e2d17ee6a5b015bf8657f8f143b3c69f5e7285eb027a0db86c6b262cf07c442ba25add1ef66ce1d98bd659b33ee296376259d6eee5ec9c21d2
7
+ data.tar.gz: 4fb7b0e5ba49c738e2f8f5c8804b14fbe65a5bde5263cf60324848bc25477b58015987bb0ee01723791d58562b778b3029f67c0f77ce5fd5f47514c48a4de32f
@@ -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
@@ -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': '119.0', 'Sandbox': '119.0', 'Production': '118.0', 'Performance': '119.0', 'Services': '96.0', 'Unknown': '96.0', 'Staging': '119.0'}.freeze
10
+ MIN_Endpoints = {'Test': '120.0', 'Sandbox': '120.0', 'Production': '120.0', 'Performance': '120.0', 'Services': '96.0', 'Unknown': '96.0', 'Staging': '121.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
- Rails.logger.info('Zuora APILimit Reached', ex, exception_args)
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
@@ -652,8 +655,15 @@ module ZuoraAPI
652
655
  error = 'UNEXPECTED_ERROR'
653
656
  if message.present?
654
657
  identifier, new_message = message.scan(/^([\w\d]{16})\: (.*)/).first
655
- error, message = ['UNEXPECTED_ERROR', new_message] if new_message.present?
656
- error, message = ['TRANSACTION_FAILED', new_message.concat(" Please see KC for the Max Timeout Specification https://community.zuora.com/t5/Release-Notifications/Upcoming-Change-for-AQuA-and-Data-Source-Export-January-2021/ba-p/35024")] if new_message.include?("The query exceeded maximum processing time")
658
+ if new_message.present?
659
+ if new_message.include?("The query exceeded maximum processing time")
660
+ error, message = ['TRANSACTION_FAILED', new_message.concat(" Please see KC for the Max Timeout Specification https://community.zuora.com/t5/Release-Notifications/Upcoming-Change-for-AQuA-and-Data-Source-Export-January-2021/ba-p/35024")]
661
+ else
662
+ error, message = ['UNEXPECTED_ERROR', new_message]
663
+ end
664
+ else
665
+ error, message = ['UNEXPECTED_ERROR', message]
666
+ end
657
667
  else
658
668
  message = 'Export failed due to unknown reason. Consult api logs.'
659
669
  end
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.10.8"
2
+ VERSION = "1.11.0"
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.10.8
4
+ version: 1.11.0
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-03-24 00:00:00.000000000 Z
11
+ date: 2022-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -171,9 +171,6 @@ dependencies:
171
171
  - - ">="
172
172
  - !ruby/object:Gem::Version
173
173
  version: 4.1.0
174
- - - "<"
175
- - !ruby/object:Gem::Version
176
- version: '6.2'
177
174
  type: :runtime
178
175
  prerelease: false
179
176
  version_requirements: !ruby/object:Gem::Requirement
@@ -181,9 +178,6 @@ dependencies:
181
178
  - - ">="
182
179
  - !ruby/object:Gem::Version
183
180
  version: 4.1.0
184
- - - "<"
185
- - !ruby/object:Gem::Version
186
- version: '6.2'
187
181
  description: Gem that provides easy integration to Zuora
188
182
  email:
189
183
  - connect@zuora.com