zuora_api 1.10.7 → 1.10.10

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: 1254bfcee1d31076161691839cd1d7058cf71a578afb21c0735550b1ee948d11
4
- data.tar.gz: 7995e4b153fdbe849c247d5a8ea43c32dd1b9136ff5317255d9a4620311e1ed9
3
+ metadata.gz: d3d55746dfb36b13817266ec288a42fa0797502acfe5286cd467500abf80f6b7
4
+ data.tar.gz: fdc13e4da4dbf6f7a4ed75259d1713cf72055aca3d07127d009640cf1bd80205
5
5
  SHA512:
6
- metadata.gz: fc8dbd200eb990418dd283b47fc110d503d02d5db3e312e383ce65e98f4ab49bce304ed4b1fc27a1914b1077bb0992490d0e7313a79a2a1da1d11bd59e7461a2
7
- data.tar.gz: 23dc9bf50a1b47f7edbb9b50b69f97efa598f86405b439a13448dd0159fa747d6b16b32c22c9842f5427bac4c2eace24f04b9c2c6e59a11f3bbf9707ba90919e
6
+ metadata.gz: 0b6d4b06b61a73dd347c64c03b0f63d5d88bf24ab30b3cccf18fb586bedb8b3b5e15273f8ac609631d52fa07c0aefb3dba8f1ffdc52299e140aae5a5b5923870
7
+ data.tar.gz: 665cf923322a43271ecfd94bfc396efa84e6243bd570550964e972e823dc2b51e089dfec0a29fe8e328257eb44113b5355e5ef020d2fc26de75f037618452fba
@@ -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
@@ -966,7 +976,7 @@ module ZuoraAPI
966
976
  raise ZuoraAPI::Exceptions::ZuoraAPIUnkownError.new(message, response, errors, success)
967
977
  end
968
978
  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/
979
+ 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
980
  raise ZuoraAPI::Exceptions::ZuoraAPIError.new(message, response, errors, success)
971
981
  when /.*UNEXPECTED_ERROR/
972
982
  raise ZuoraAPI::Exceptions::ZuoraUnexpectedError.new(message, response, errors, success)
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.10.7"
2
+ VERSION = "1.10.10"
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.7
4
+ version: 1.10.10
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-23 00:00:00.000000000 Z
11
+ date: 2022-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler