zuora_api 1.9.0 → 1.9.05

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: 2c377d99b1a4c4a64d1b46d45b19e42136da2e0faba049e7a45621b3daaa41ad
4
- data.tar.gz: e00b3a6e9628aed4086190a3be983bd7998196812df9d53010c274f882a36749
3
+ metadata.gz: 5452aee1cc74ec9a6780ddbf5a63c2b0916e483c69ca44ef401316fe64fe8785
4
+ data.tar.gz: fe7189452d77301133c1703b74699a56d8ac05f31b886387b28abb1d659dcc71
5
5
  SHA512:
6
- metadata.gz: 14c76c2a211f55a38d79940436241c3fa9203a2c1a960415a3a2287950adb6059461571703530d4754e803833f3ffc98e42182c50588498a51070a0a6984cadb
7
- data.tar.gz: a2176a640fb0f77bbc0893f5161c30c822a9a8cc1147b33e6f088ce60240666a19853f82e5d85ecf676273c9a9ecc59c7aaee006f0aa63c8fd52b8fdc60ee2d1
6
+ metadata.gz: 057de8a5dfe3faf340cd993314b2eba4e2bec90dc5adccb803e611748531fc5f7ca1b6fc468f24d60694a23041a07883b30972ea38935c7f07d92c3f32ab5682
7
+ data.tar.gz: b1331df530a20c776ca934f50f370504f844723595b2c24d31923edadde33bb87975a32633dac8d7815da067ad4b47f8c2ffe01a688480b1c1ce767de3650e70
@@ -144,7 +144,8 @@ module ZuoraAPI
144
144
  "Services" => "https://reporting-svc08.svc.auw2.zuora.com/api/rest/v1/"},
145
145
  "EU" => {"Sandbox" => "https://zconnect.sandbox.eu.zuora.com/api/rest/v1/",
146
146
  "Production" => "https://zconnect.eu.zuora.com/api/rest/v1/",
147
- "Services"=> "https://reporting-sbx0000.sbx.aec1.zuora.com/api/rest/v1/"},
147
+ "Services"=> "https://reporting-sbx0000.sbx.aec1.zuora.com/api/rest/v1/",
148
+ "Test" => "https://zconnect-services0002.test.eu.zuora.com/api/rest/v1/"},
148
149
  "NA" => {"Sandbox" => "https://zconnect.sandbox.na.zuora.com/api/rest/v1/",
149
150
  "Production" => "https://zconnect.na.zuora.com/api/rest/v1/",
150
151
  "Services"=> ""}
@@ -557,27 +558,27 @@ module ZuoraAPI
557
558
  args = {}
558
559
  if defined?(ex.response) && ex.response.present?
559
560
  args.merge!({
561
+ url: {full: ex.response.request.path.to_s},
560
562
  request: {
561
- path: ex.response.request.path.to_s,
562
563
  method: ex.response.request.http_method.to_s.split("Net::HTTP::").last.upcase,
563
564
  params: ex.response.request.raw_body.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.to_s,
565
+ headers: ex.response.request.options[:headers].map{|k,v| [k.to_s, k.to_s.downcase.strip == "authorization" ? "VALUE FILTERED" : v]}.to_h,
565
566
  },
566
567
  response: {
567
568
  status: ex.response.code,
568
569
  params: ex.response.body.to_s,
569
- headers: ex.response.headers.to_s,
570
+ headers: ex.response.headers,
570
571
  },
571
572
  zuora_trace_id: ex.response.headers["zuora-request-id"],
572
573
  zuora_track_id: ex.response.request.options[:headers]["Zuora-Track-Id"],
573
574
  })
574
575
  elsif defined?(ex.request) && ex.request.present?
575
576
  args.merge!({
577
+ url: {full: ex.request.path.to_s},
576
578
  request: {
577
- path: ex.request.path.to_s,
578
579
  method: ex.request.http_method.to_s.split("Net::HTTP::").last.upcase,
579
580
  params: ex.request.options[:body],
580
- headers: ex.request.options[:headers].map{|k,v| [k.to_s, k.to_s.downcase.strip == "authorization" ? "VALUE FILTERED" : v]}.to_h.to_s
581
+ headers: ex.request.options[:headers].map{|k,v| [k.to_s, k.to_s.downcase.strip == "authorization" ? "VALUE FILTERED" : v]}.to_h
581
582
  }
582
583
  })
583
584
  args.merge!({
@@ -643,10 +644,11 @@ module ZuoraAPI
643
644
  result = body.xpath('//ns2:Status', 'ns2' => 'http://object.api.zuora.com/').text
644
645
  if result == 'Failed'
645
646
  message = body.xpath('//ns2:StatusReason', 'ns2' => 'http://object.api.zuora.com/').text
646
- error = 'FATAL_ERROR'
647
+ error = 'UNEXPECTED_ERROR'
647
648
  if message.present?
648
649
  identifier, new_message = message.scan(/^([\w\d]{16})\: (.*)/).first
649
650
  error, message = ['UNEXPECTED_ERROR', new_message] if new_message.present?
651
+ 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")
650
652
  else
651
653
  message = 'Export failed due to unknown reason. Consult api logs.'
652
654
  end
@@ -1268,7 +1270,7 @@ module ZuoraAPI
1268
1270
 
1269
1271
  #Make sure directory exists
1270
1272
  require 'fileutils'
1271
- FileUtils.mkdir_p(file_path) unless File.exists?(file_path)
1273
+ FileUtils.mkdir_p(file_path) unless File.exist?(file_path)
1272
1274
 
1273
1275
  status_code = nil
1274
1276
  uri = URI.parse(url)
@@ -1409,7 +1411,6 @@ module ZuoraAPI
1409
1411
  end
1410
1412
  end
1411
1413
  end
1412
-
1413
1414
  id = output_xml.xpath('//ns1:Id', 'ns1' =>'http://api.zuora.com/').text
1414
1415
 
1415
1416
  result = 'Waiting'
@@ -1453,7 +1454,6 @@ module ZuoraAPI
1453
1454
  retry
1454
1455
  end
1455
1456
  raise ex
1456
-
1457
1457
  rescue *(CONNECTION_EXCEPTIONS + CONNECTION_READ_EXCEPTIONS) => ex
1458
1458
  if !(tries -= 1).zero?
1459
1459
  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.9.0"
2
+ VERSION = "1.9.05"
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.9.0
4
+ version: 1.9.05
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-04-06 00:00:00.000000000 Z
11
+ date: 2021-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler