zuora_api 1.11.8 → 1.11.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: 38e28f2bd7870815c491123e4802f8b88db525ecf65264ea8d4e9dd20f502800
4
- data.tar.gz: da319cc2164cbd486f31e726877199a445dcad0311c25b220e139119d6163c8b
3
+ metadata.gz: 16dc8c2867846411498433b6b4815b2db8f2f3981a07595558b14b06e0e15b60
4
+ data.tar.gz: 173b5b0bedf1220f2fb2b708d3faecc5ab22421dd479711dec5b73976d3ab24b
5
5
  SHA512:
6
- metadata.gz: e9181450aead9432c27611750f205042329f3ad2dee61f79d1bb2c0743e3ffb19898c705216392511b90aa115780f6fb3726d63e180df64104b800b0c13a563b
7
- data.tar.gz: e9e578de9dd6be5916c35cbed90f436d4875714ee0b7bad11431a95bae3522c0f74eee53d820cdd33b09929b2cf297225e6484af998d51f201b28313c822bfea
6
+ metadata.gz: b24ff60f7601ef8105b3b3cfd454f8af242dd410d2fdd61eac04b8f8127a29ac286762a60eeb07cd609b38693486a7df24e04d381041203f08ab669b4fd591f0
7
+ data.tar.gz: 90b4d1d49c9276e4f3a1cc9efaf8168575a8f16a66f88722bbbdab03719044a78a2f02887c9cfef7f20c9d31a1c1e4fab9817356d8a0b401532d42234a56e6d8
@@ -6,8 +6,8 @@ require 'zuora_api/exceptions'
6
6
  module ZuoraAPI
7
7
  class Login
8
8
  ENVIRONMENTS = [TEST = 'Test', SANDBOX = 'Sandbox', PRODUCTION = 'Production', PREFORMANCE = 'Preformance', SERVICES = 'Services', UNKNOWN = 'Unknown', STAGING = 'Staging' ]
9
- REGIONS = [EU = 'EU', US = 'US', NA = 'NA' ]
10
- MIN_Endpoints = {'Test': '133.0', 'Sandbox': '133.0', 'Production': '133.0', 'Performance': '133.0', 'Services': '96.0', 'Unknown': '96.0', 'Staging': '133.0'}.freeze
9
+ REGIONS = [EU = 'EU', US = 'US', NA = 'NA', JP = 'JP' ]
10
+ MIN_Endpoints = {'Test': '140.0', 'Sandbox': '140.0', 'Production': '140.0', 'Performance': '140.0', 'Services': '96.0', 'Unknown': '96.0', 'Staging': '140.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
 
@@ -208,7 +208,7 @@ module ZuoraAPI
208
208
  end
209
209
 
210
210
  def self.regions
211
- %w(US EU NA)
211
+ %w(US EU NA JP)
212
212
  end
213
213
 
214
214
  def self.endpoints
@@ -227,7 +227,10 @@ module ZuoraAPI
227
227
  "Production" => "https://na.zuora.com/apps/services/a/",
228
228
  "Performance" => "https://pt1.na.zuora.com/apps/services/a/",
229
229
  "Services" => "https://services347.na.zuora.com/apps/services/a/",
230
- "Test" => "https://test.zuora.com/apps/services/a/"}
230
+ "Test" => "https://test.zuora.com/apps/services/a/"},
231
+ "JP" => {"Sandbox" => "https://sandbox.ap.zuora.com/apps/services/a/",
232
+ "Production" => "https://ap.zuora.com/apps/services/a/",
233
+ "Test" => "https://test.ap.zuora.com/apps/services/a/"}
231
234
  }
232
235
  end
233
236
 
@@ -854,7 +857,7 @@ module ZuoraAPI
854
857
  end
855
858
 
856
859
  #Zuora REST Actions error (Create, Update, Delete, Amend)
857
- if body.class == Array
860
+ if body.class == Array && !body.compact.blank?
858
861
  all_errors = body.select {|obj| !obj['Success'] || !obj['success'] }.map {|obj| obj['Errors'] || obj['errors'] }.compact
859
862
  all_success = body.select {|obj| obj['Success'] || obj['success']}.compact
860
863
 
@@ -888,7 +891,12 @@ module ZuoraAPI
888
891
  self.errors_via_content_type(response: response, type: :json)
889
892
 
890
893
  #All other errors
891
- raise ZuoraAPI::Exceptions::ZuoraAPIError.new(response.body, response) if ![200,201,202].include?(response.code)
894
+ if ![200,201,202].include?(response.code)
895
+ if body == [nil]
896
+ raise ZuoraAPI::Exceptions::ZuoraAPIError.new('No error message. Invalid API request', response)
897
+ end
898
+ raise ZuoraAPI::Exceptions::ZuoraAPIError.new(response.body, response)
899
+ end
892
900
  end
893
901
  end
894
902
 
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.11.8"
2
+ VERSION = "1.11.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.11.8
4
+ version: 1.11.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: 2023-10-07 00:00:00.000000000 Z
11
+ date: 2024-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler