zuora_api 1.8.23 → 1.9.04

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: e0ab2609485e4d653738cdd84169feac4058531f4caac36e62b88fd8910008cc
4
- data.tar.gz: d86b6df5e09c4eed423b362e0334f5605da724e6a7956bd6c896aeccbc9e3fa5
3
+ metadata.gz: 82842f37be84624d04b03460ed306a2d57b7535209659e206a462554d0574eed
4
+ data.tar.gz: 4347299eb361abdbff3112a0a2281c602321e69ff9f47b8b4e28ad80a1b61b01
5
5
  SHA512:
6
- metadata.gz: 42c8e4f181cb4c64275db13bb0104d47864cd80e3b53a930fd48373b4fa43aa4022bc21162f38fe53dcadeca06ea601e0d7dd25161a5a57678c3008b1239b046
7
- data.tar.gz: 8f06a60bc4263a8529dbb5c6a862668cce4f1bda5b5f33f6df25f67bb49f79c7382cc2192d486a4c09802590e990041ad7a8fa627cd5e88975c9636c6e716eb1
6
+ metadata.gz: 8941d446da4e9482b0eabbf25fa69d8d909abf6886010942bef8493404265b2f6e980fda2e785ab3da270fd9a097374f60c36d89d061962e3b93a664b998ef76
7
+ data.tar.gz: 8ebe54f2b7737436c709980bae385c5a6ad4c91d8397a307bf1492688b1d0a494d3b53e062f813edc5bb3604158c6e91c8b58e9714d26eb791ff1f21bf048bd4
data/README.md CHANGED
@@ -147,11 +147,10 @@ objectype: "ACCOUNT/USER"
147
147
  segmentuuid: A single or array of string or int of a segment uuid(s) that you get from the describe call. The csv holds a column with a bool that represents if that User or Account belongs to that segment.
148
148
 
149
149
  ### License Information
150
- IN THE EVENT YOU ARE AN EXISTING ZUORA CUSTOMER, USE OF THIS SOFTWARE IS GOVERNED
BY THE MIT LICENSE SET FORTH BELOW AND NOT THE MASTER SUBSCRIPTION AGREEMENT OR OTHER COMMERCIAL AGREEMENT ENTERED INTO BETWEEN YOU AND ZUORA (“AGREEMENT”). FOR THE AVOIDANCE OF DOUBT, ZUORA’S OBLIGATIONS WITH RESPECT TO TECHNICAL SUPPORT, UPTIME, INDEMNIFICATION, AND SECURITY SET FORTH IN THE AGREEMENT DO NOT APPLY TO THE USE OF THIS SOFTWARE.
150
+ IN THE EVENT YOU ARE AN EXISTING ZUORA CUSTOMER, USE OF THIS SOFTWARE IS GOVERNED
BYGOVERNEDBY THE MIT LICENSE SET FORTH BELOW AND NOT THE MASTER SUBSCRIPTION AGREEMENT OR OTHER COMMERCIAL AGREEMENT ENTERED INTO BETWEEN YOU AND ZUORA (“AGREEMENT”). FOR THE AVOIDANCE OF DOUBT, ZUORA’S OBLIGATIONS WITH RESPECT TO TECHNICAL SUPPORT, UPTIME, INDEMNIFICATION, AND SECURITY SET FORTH IN THE AGREEMENT DO NOT APPLY TO THE USE OF THIS SOFTWARE.
151
151
 
152
152
  Copyright 2021 Zuora, Inc.
153
153
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
154
154
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
155
155
 
156
156
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
157
-
data/lib/zuora_api.rb CHANGED
@@ -4,6 +4,8 @@ require "zuora_api/logins/basic"
4
4
  require "zuora_api/logins/oauth"
5
5
  require 'zuora_api/exceptions'
6
6
  require "insights_api/login"
7
+ require "ougai"
8
+
7
9
  module ZuoraAPI
8
10
  # Your code goes here...
9
11
  end
@@ -43,7 +43,7 @@ module ZuoraAPI
43
43
  ZuoraAPI::Exceptions::ZuoraAPIReadTimeout,
44
44
  ZuoraAPI::Exceptions::ZuoraUnexpectedError
45
45
  ].freeze
46
-
46
+
47
47
  attr_accessor :region, :url, :wsdl_number, :current_session, :bearer_token, :oauth_session_expires_at, :environment, :status, :errors, :current_error, :user_info, :tenant_id, :tenant_name, :entity_id, :timeout_sleep, :hostname, :zconnect_provider
48
48
 
49
49
  def initialize(url: nil, entity_id: nil, session: nil, status: nil, bearer_token: nil, oauth_session_expires_at: nil, **keyword_args)
@@ -299,7 +299,7 @@ module ZuoraAPI
299
299
  update_environment
300
300
  endpoint = url
301
301
  url_postfix = {"US" => ".", "EU" => ".eu.", "NA" => ".na."}[self.region]
302
-
302
+
303
303
  case self.environment
304
304
  when 'Test'
305
305
  endpoint = "https://rest.test#{url_postfix}zuora.com"
@@ -351,7 +351,7 @@ module ZuoraAPI
351
351
  retries -= 1
352
352
  sleep(self.timeout_sleep)
353
353
  retry
354
-
354
+
355
355
  rescue *(CONNECTION_EXCEPTIONS + CONNECTION_READ_EXCEPTIONS) => ex
356
356
  self.log(location: "BasicLogin", exception: ex, message: "Timed out", level: :error)
357
357
 
@@ -402,18 +402,18 @@ module ZuoraAPI
402
402
  end
403
403
 
404
404
  def soap_call(
405
- ns1: 'ns1',
406
- ns2: 'ns2',
405
+ ns1: 'ns1',
406
+ ns2: 'ns2',
407
407
  batch_size: nil,
408
408
  headers: {},
409
- single_transaction: false,
410
- debug: false,
411
- zuora_track_id: nil,
412
- errors: [ZuoraAPI::Exceptions::ZuoraAPISessionError].concat(ZUORA_API_ERRORS),
413
- z_session: true,
414
- timeout_retry: false,
409
+ single_transaction: false,
410
+ debug: false,
411
+ zuora_track_id: nil,
412
+ errors: [ZuoraAPI::Exceptions::ZuoraAPISessionError].concat(ZUORA_API_ERRORS),
413
+ z_session: true,
414
+ timeout_retry: false,
415
415
  timeout: 130,
416
- timeout_sleep_interval: self.timeout_sleep,
416
+ timeout_sleep_interval: self.timeout_sleep,
417
417
  output_exception_messages: true,
418
418
  skip_session: false,
419
419
  **keyword_args)
@@ -484,17 +484,17 @@ module ZuoraAPI
484
484
 
485
485
  retry
486
486
  end
487
-
487
+
488
488
  raise ex if errors.include?(ex.class)
489
-
489
+
490
490
  return output_xml, input_xml, response
491
-
491
+
492
492
  rescue *ZUORA_API_ERRORS => ex
493
493
  raise ex if errors.include?(ex.class)
494
-
494
+
495
495
  response = ex.response unless response
496
496
  return output_xml, input_xml, response
497
-
497
+
498
498
  rescue *CONNECTION_EXCEPTIONS => ex
499
499
  if !tries.zero?
500
500
  tries -= 1
@@ -504,8 +504,8 @@ module ZuoraAPI
504
504
  end
505
505
 
506
506
  self.log(location: "SOAP Call", exception: ex, message: "Timed out", level: :error) if output_exception_messages
507
- raise ex
508
-
507
+ raise ex
508
+
509
509
  rescue *CONNECTION_READ_EXCEPTIONS => ex
510
510
  if !tries.zero?
511
511
  tries -= 1
@@ -524,11 +524,13 @@ module ZuoraAPI
524
524
 
525
525
  rescue => ex
526
526
  raise ex
527
- ensure
528
- self.error_logger(ex) if defined?(ex) && Rails.logger.class.to_s == "Ougai::Logger"
527
+ ensure
528
+ self.error_logger(ex) if defined?(ex)
529
529
  end
530
530
 
531
531
  def error_logger(ex)
532
+ return unless Rails.logger.is_a? Ougai::Logger
533
+
532
534
  exception_args = Rails.logger.with_fields.merge(self.exception_args(ex))
533
535
  case ex
534
536
  when ZuoraAPI::Exceptions::ZuoraAPIUnkownError, ZuoraAPI::Exceptions::ZuoraDataIntegrity
@@ -544,10 +546,10 @@ module ZuoraAPI
544
546
 
545
547
  def log(location: "Rest Call", exception: nil, message: "Timed out will retry after #{self.timeout_sleep} seconds", level: :info )
546
548
  level = :debug if ![:debug, :info, :warn, :error, :fatal].include?(level)
547
- if Rails.logger.class.to_s == "Ougai::Logger"
548
- Rails.logger.send(level.to_sym, "#{location} - #{message}", exception)
549
+ if Rails.logger.is_a? Ougai::Logger
550
+ Rails.logger.send(level.to_sym, "#{location} - #{message}", exception)
549
551
  else
550
- Rails.logger.send(level.to_sym, "#{location} - #{exception.class} #{message}")
552
+ Rails.logger.send(level.to_sym, "#{location} - #{exception.class} #{message}")
551
553
  end
552
554
  end
553
555
 
@@ -555,27 +557,27 @@ module ZuoraAPI
555
557
  args = {}
556
558
  if defined?(ex.response) && ex.response.present?
557
559
  args.merge!({
560
+ url: {full: ex.response.request.path.to_s},
558
561
  request: {
559
- path: ex.response.request.path.to_s,
560
562
  method: ex.response.request.http_method.to_s.split("Net::HTTP::").last.upcase,
561
563
  params: ex.response.request.raw_body.to_s,
562
- headers: ex.response.request.options[:headers].map{|k,v| [k.to_s, k.to_s.downcase.strip == "authorization" ? "VALUE FILTERED" : v]}.to_h.to_s,
564
+ headers: ex.response.request.options[:headers].map{|k,v| [k.to_s, k.to_s.downcase.strip == "authorization" ? "VALUE FILTERED" : v]}.to_h,
563
565
  },
564
566
  response: {
565
567
  status: ex.response.code,
566
568
  params: ex.response.body.to_s,
567
- headers: ex.response.headers.to_s,
569
+ headers: ex.response.headers,
568
570
  },
569
571
  zuora_trace_id: ex.response.headers["zuora-request-id"],
570
572
  zuora_track_id: ex.response.request.options[:headers]["Zuora-Track-Id"],
571
573
  })
572
574
  elsif defined?(ex.request) && ex.request.present?
573
575
  args.merge!({
576
+ url: {full: ex.request.path.to_s},
574
577
  request: {
575
- path: ex.request.path.to_s,
576
578
  method: ex.request.http_method.to_s.split("Net::HTTP::").last.upcase,
577
579
  params: ex.request.options[:body],
578
- headers: ex.request.options[:headers].map{|k,v| [k.to_s, k.to_s.downcase.strip == "authorization" ? "VALUE FILTERED" : v]}.to_h.to_s
580
+ headers: ex.request.options[:headers].map{|k,v| [k.to_s, k.to_s.downcase.strip == "authorization" ? "VALUE FILTERED" : v]}.to_h
579
581
  }
580
582
  })
581
583
  args.merge!({
@@ -612,14 +614,14 @@ module ZuoraAPI
612
614
  when 429
613
615
  raise ZuoraAPI::Exceptions::ZuoraAPIRequestLimit.new("The total number of concurrent requests has exceeded the limit allowed by the system. Please resubmit your request later.", response)
614
616
  when 401
615
-
617
+
616
618
  else
617
619
  if body.class == Hash
618
620
  case request_path
619
621
  when /^\/v1\/connections$/
620
- response_headers = response.headers.to_h
622
+ response_headers = response.headers.to_h
621
623
  raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new("Missing cookies for authentication call", response) if response_headers['set-cookie'].blank?
622
- z_session_cookie = response_headers.fetch('set-cookie', []).select{|x| x.match(/^ZSession=.*/) }.first
624
+ z_session_cookie = response_headers.fetch('set-cookie', []).select{|x| x.match(/^ZSession=.*/) }.first
623
625
  raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new("Missing ZSession cookie for authentication call", response) if z_session_cookie.blank?
624
626
  end
625
627
  end
@@ -629,7 +631,7 @@ module ZuoraAPI
629
631
  when :SOAP
630
632
  error, success, message = get_soap_error_and_message(body)
631
633
 
632
- if body.xpath('//fns:LoginFault', 'fns' =>'http://fault.api.zuora.com/').present?
634
+ if body.xpath('//fns:LoginFault', 'fns' =>'http://fault.api.zuora.com/').present?
633
635
  raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new(message, response)
634
636
  end
635
637
 
@@ -641,10 +643,11 @@ module ZuoraAPI
641
643
  result = body.xpath('//ns2:Status', 'ns2' => 'http://object.api.zuora.com/').text
642
644
  if result == 'Failed'
643
645
  message = body.xpath('//ns2:StatusReason', 'ns2' => 'http://object.api.zuora.com/').text
644
- error = 'FATAL_ERROR'
646
+ error = 'UNEXPECTED_ERROR'
645
647
  if message.present?
646
648
  identifier, new_message = message.scan(/^([\w\d]{16})\: (.*)/).first
647
649
  error, message = ['UNEXPECTED_ERROR', new_message] if new_message.present?
650
+ 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")
648
651
  else
649
652
  message = 'Export failed due to unknown reason. Consult api logs.'
650
653
  end
@@ -666,19 +669,19 @@ module ZuoraAPI
666
669
  end
667
670
 
668
671
  self.errors_via_content_type(response: response, type: :xml)
669
-
672
+
670
673
  when :JSON
671
674
  case request_path
672
675
  when /^\/query\/jobs.*/ #DataQuery Paths
673
676
  return if body.class != Hash
674
677
  case match_string
675
- when /^GET::200::\/query\/jobs\/([a-zA-Z0-9\-_]+)$/ #Get DQ job, Capture of the id is present if needed in future error responses.
678
+ when /^GET::200::\/query\/jobs\/([a-zA-Z0-9\-_]+)$/ #Get DQ job, Capture of the id is present if needed in future error responses.
676
679
  if body.dig('data', "errorCode") == "LINK_10000005"
677
680
  raise ZuoraAPI::Exceptions::ZuoraAPITemporaryError.new(body.dig('data', "errorMessage"), response)
678
- elsif (body.dig('data', "errorMessage").present? || body.dig('data', "queryStatus") == "failed")
681
+ elsif (body.dig('data', "errorMessage").present? || body.dig('data', "queryStatus") == "failed")
679
682
  raise ZuoraAPI::Exceptions::ZuoraAPIError.new(body.dig('data', "errorMessage"), response)
680
683
  end
681
- when /^GET::404::\/query\/jobs\/([a-zA-Z0-9\-_]+)$/ #Get DQ job not found, capture of the id is present if needed in future error responses.
684
+ when /^GET::404::\/query\/jobs\/([a-zA-Z0-9\-_]+)$/ #Get DQ job not found, capture of the id is present if needed in future error responses.
682
685
  raise ZuoraAPI::Exceptions::ZuoraAPIError.new(body.dig('message'), response) if body.dig('message').present?
683
686
  when /^POST::400::\/query\/jobs$/ #Create DQ job
684
687
  raise ZuoraAPI::Exceptions::ZuoraAPIError.new(body.dig('message'), response) if body.dig('message').present?
@@ -741,7 +744,7 @@ module ZuoraAPI
741
744
  end
742
745
 
743
746
  #Oauth Tokens - User deactivated
744
- if body['path'] == '/oauth/token'
747
+ if body['path'] == '/oauth/token'
745
748
  if body['status'] == 403 && response.code == 403
746
749
  raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new("Forbidden", response)
747
750
  elsif body['status'] == 400 && response.code == 400 && body['message'].include?("Invalid client id")
@@ -752,7 +755,7 @@ module ZuoraAPI
752
755
  if body['error'] == 'Unauthorized' && body['status'] == 401
753
756
  if body['message'].present?
754
757
  raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new(body['message'], response)
755
- else
758
+ else
756
759
  raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new("#{messages_array.join(', ')}", response)
757
760
  end
758
761
  end
@@ -777,7 +780,7 @@ module ZuoraAPI
777
780
  end
778
781
  #Internal Server Error
779
782
  if codes_array.map{|code| code.to_s.slice(6,7).to_i}.include?(60)
780
- if messages_array.uniq.size == 1
783
+ if messages_array.uniq.size == 1
781
784
  if messages_array.first.match(/^Transaction declined.*|^There is an invoice pending tax.*|^The Zuora GetTax call to Avalara.*|^The tax calculation call to Zuora Connect returned the following error: Status Code: 4.*/)
782
785
  raise ZuoraAPI::Exceptions::ZuoraAPIError.new(messages_array.first, response)
783
786
  end
@@ -850,17 +853,17 @@ module ZuoraAPI
850
853
  self.errors_via_content_type(response: response, type: :json)
851
854
 
852
855
  #All other errors
853
- raise ZuoraAPI::Exceptions::ZuoraAPIError.new(response.body, response) if ![200,201].include?(response.code)
856
+ raise ZuoraAPI::Exceptions::ZuoraAPIError.new(response.body, response) if ![200,201].include?(response.code)
854
857
  end
855
858
  end
856
859
 
857
860
  def errors_via_content_type(response: nil, type: :xml)
858
861
  response_content_types = response.headers.transform_keys(&:downcase).fetch('content-type', []).first || ""
859
-
862
+
860
863
  if response_content_types.include?('application/json') && type != :json
861
864
  output_json = JSON.parse(response.body)
862
865
  self.raise_errors(type: :JSON, body: output_json, response: response)
863
-
866
+
864
867
  elsif (response_content_types.include?('application/xml') || response_content_types.include?('text/xml') || response_content_types.include?('application/soap+xml')) and type != :xml
865
868
  output_xml = Nokogiri::XML(response.body)
866
869
  self.raise_errors(type: :SOAP, body: output_xml, response: response)
@@ -880,10 +883,10 @@ module ZuoraAPI
880
883
  when /Service Unavailable/
881
884
  raise ZuoraAPI::Exceptions::ZuoraAPIConnectionTimeout.new(error_message, response)
882
885
  when /Client sent a bad request./, /Bad Request/, /403 Forbidden/
883
- raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(error_message, response)
886
+ raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(error_message, response)
884
887
  when /414 Request-URI Too Large/
885
888
  raise ZuoraAPI::Exceptions::ZuoraAPIError.new("Request URL is too long", response)
886
- else
889
+ else
887
890
  raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(error_message, response)
888
891
  end
889
892
  end
@@ -893,7 +896,7 @@ module ZuoraAPI
893
896
 
894
897
  raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(response.body, response) if response.code == 500
895
898
  end
896
-
899
+
897
900
 
898
901
  def get_soap_error_and_message(body)
899
902
  error = body.xpath('//fns:FaultCode', 'fns' =>'http://fault.api.zuora.com/').text
@@ -973,7 +976,7 @@ module ZuoraAPI
973
976
  raise ZuoraAPI::Exceptions::ZuoraAPIError.new(message, response, errors, success)
974
977
  end
975
978
  raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(message, response, errors, success)
976
- else
979
+ else
977
980
  raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new("Z:#{error}::#{message}", response, errors, success)
978
981
  end
979
982
  end
@@ -1093,7 +1096,7 @@ module ZuoraAPI
1093
1096
  session_type: :basic,
1094
1097
  timeout_retry: false,
1095
1098
  timeout: 130,
1096
- timeout_sleep_interval: self.timeout_sleep,
1099
+ timeout_sleep_interval: self.timeout_sleep,
1097
1100
  multipart: false,
1098
1101
  stream_body: false,
1099
1102
  output_exception_messages: true,
@@ -1152,7 +1155,7 @@ module ZuoraAPI
1152
1155
  end
1153
1156
  Rails.logger.debug("Rest Call - Session Bad Auth type")
1154
1157
  raise ex
1155
-
1158
+
1156
1159
  rescue ZuoraAPI::Exceptions::ZuoraAPISessionError => ex
1157
1160
  if !tries.zero? && z_session
1158
1161
  tries -= 1
@@ -1169,13 +1172,13 @@ module ZuoraAPI
1169
1172
 
1170
1173
  raise ex if errors.include?(ex.class)
1171
1174
  return [output_json, response]
1172
-
1175
+
1173
1176
  rescue *ZUORA_API_ERRORS => ex
1174
1177
  raise ex if errors.include?(ex.class)
1175
-
1178
+
1176
1179
  response = ex.response unless response
1177
1180
  return [output_json, response]
1178
-
1181
+
1179
1182
  rescue ZuoraAPI::Exceptions::BadEntityError => ex
1180
1183
  raise ex
1181
1184
  rescue *CONNECTION_EXCEPTIONS => ex
@@ -1187,8 +1190,8 @@ module ZuoraAPI
1187
1190
  end
1188
1191
 
1189
1192
  self.log(location: "Rest Call", exception: ex, message: "Timed out", level: :error) if output_exception_messages
1190
- raise ex
1191
-
1193
+ raise ex
1194
+
1192
1195
  rescue *CONNECTION_READ_EXCEPTIONS => ex
1193
1196
 
1194
1197
  if !tries.zero?
@@ -1201,15 +1204,15 @@ module ZuoraAPI
1201
1204
  retry
1202
1205
  end
1203
1206
  end
1204
-
1207
+
1205
1208
  self.log(location: "Rest Call", exception: ex, message: "Timed out", level: :error) if output_exception_messages
1206
1209
  ex = ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read/write timeout from 'https://#{rest_domain(endpoint: url)}'", nil, request) if ex.is_a?(Timeout::Error) && !ex.instance_of?(ZuoraAPI::Exceptions::ZuoraAPIReadTimeout)
1207
1210
  raise ex
1208
1211
 
1209
1212
  rescue => ex
1210
1213
  raise ex
1211
- ensure
1212
- self.error_logger(ex) if defined?(ex) && Rails.logger.class.to_s == "Ougai::Logger"
1214
+ ensure
1215
+ self.error_logger(ex) if defined?(ex)
1213
1216
  end
1214
1217
 
1215
1218
  def update_create_tenant
@@ -1266,7 +1269,7 @@ module ZuoraAPI
1266
1269
 
1267
1270
  #Make sure directory exists
1268
1271
  require 'fileutils'
1269
- FileUtils.mkdir_p(file_path) unless File.exists?(file_path)
1272
+ FileUtils.mkdir_p(file_path) unless File.exist?(file_path)
1270
1273
 
1271
1274
  status_code = nil
1272
1275
  uri = URI.parse(url)
@@ -1407,7 +1410,6 @@ module ZuoraAPI
1407
1410
  end
1408
1411
  end
1409
1412
  end
1410
-
1411
1413
  id = output_xml.xpath('//ns1:Id', 'ns1' =>'http://api.zuora.com/').text
1412
1414
 
1413
1415
  result = 'Waiting'
@@ -1451,7 +1453,6 @@ module ZuoraAPI
1451
1453
  retry
1452
1454
  end
1453
1455
  raise ex
1454
-
1455
1456
  rescue *(CONNECTION_EXCEPTIONS + CONNECTION_READ_EXCEPTIONS) => ex
1456
1457
  if !(tries -= 1).zero?
1457
1458
  Rails.logger.info("Trace ID: #{z_track_id} Timed out will retry after 5 seconds")
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.8.23"
2
+ VERSION = "1.9.04"
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.8.23
4
+ version: 1.9.04
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: 2021-03-12 00:00:00.000000000 Z
11
+ date: 2021-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec_junit_formatter
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: webmock
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -70,16 +84,30 @@ dependencies:
70
84
  name: simplecov
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - "~>"
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov-cobertura
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
74
102
  - !ruby/object:Gem::Version
75
- version: 0.18.5
103
+ version: '0'
76
104
  type: :development
77
105
  prerelease: false
78
106
  version_requirements: !ruby/object:Gem::Requirement
79
107
  requirements:
80
- - - "~>"
108
+ - - ">="
81
109
  - !ruby/object:Gem::Version
82
- version: 0.18.5
110
+ version: '0'
83
111
  - !ruby/object:Gem::Dependency
84
112
  name: ougai
85
113
  requirement: !ruby/object:Gem::Requirement
@@ -145,7 +173,7 @@ dependencies:
145
173
  version: 4.1.0
146
174
  - - "<"
147
175
  - !ruby/object:Gem::Version
148
- version: '6.1'
176
+ version: '6.2'
149
177
  type: :runtime
150
178
  prerelease: false
151
179
  version_requirements: !ruby/object:Gem::Requirement
@@ -155,7 +183,7 @@ dependencies:
155
183
  version: 4.1.0
156
184
  - - "<"
157
185
  - !ruby/object:Gem::Version
158
- version: '6.1'
186
+ version: '6.2'
159
187
  description: Gem that provides easy integration to Zuora
160
188
  email:
161
189
  - connect@zuora.com
@@ -191,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
219
  - !ruby/object:Gem::Version
192
220
  version: '0'
193
221
  requirements: []
194
- rubygems_version: 3.1.4
222
+ rubygems_version: 3.2.15
195
223
  signing_key:
196
224
  specification_version: 4
197
225
  summary: Gem that provides easy integration to Zuora