zuora_api 1.7.7d → 1.7.7e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/lib/zuora_api/login.rb +14 -3
- data/lib/zuora_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1dd5edfe590ad2f7aa070eb4bae913605e0035e16ad02c92ff8a1110714fb70
|
4
|
+
data.tar.gz: 7b1824d0b0046df3e1ae8ab179a04f19df7803595a44cfb2caffa7bbcb620fcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad30e83ace37d5c8a75709cc7ecbf36d30a7aae527f93993e48322914c412b30dd717cb5a48601aff64e1dd51a55907e934488a136256e86942c6e41f61d4540
|
7
|
+
data.tar.gz: '094a9f289fe688ee21c371e7215910b3590c5230144579e82f5db1bfff2559de385381064b0a0cab069757f1d9dae78a9ce018584dc2091297fa54a84708edd7'
|
data/.gitignore
CHANGED
data/lib/zuora_api/login.rb
CHANGED
@@ -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': '105.0', 'Sandbox': '105.0', 'Production': '105.0', '
|
10
|
+
MIN_Endpoints = {'Test': '105.0', 'Sandbox': '105.0', 'Production': '105.0', 'Performance': '105.0', 'Services': '96.0', 'Unknown': '96.0', 'Staging': '105.0'}.freeze
|
11
11
|
XML_SAVE_OPTIONS = Nokogiri::XML::Node::SaveOptions::AS_XML | Nokogiri::XML::Node::SaveOptions::NO_DECLARATION
|
12
12
|
|
13
13
|
CONNECTION_EXCEPTIONS = [
|
@@ -709,10 +709,21 @@ module ZuoraAPI
|
|
709
709
|
|
710
710
|
body = body.dig("results").present? ? body["results"] : body if body.class == Hash
|
711
711
|
if body.class == Hash && (!body["success"] || !body["Success"] || response.code != 200)
|
712
|
-
|
712
|
+
reason_keys = %w(reasons errors)
|
713
|
+
message_keys = %w(message title)
|
714
|
+
messages_array, codes_array = []
|
715
|
+
reason_keys.each do |rsn_key|
|
716
|
+
message_keys.each do |msg_key|
|
717
|
+
messages_array = body.fetch(rsn_key, []).map {|error| error[msg_key]}.compact
|
718
|
+
break if messages_array.present?
|
719
|
+
end
|
720
|
+
codes_array = body.fetch(rsn_key, []).map {|error| error['code']}.compact
|
721
|
+
break if messages_array.present? && codes_array.present?
|
722
|
+
end
|
713
723
|
messages_array = messages_array.push(body.dig("error", 'message')).compact if body.dig('error').class == Hash
|
714
|
-
codes_array = body.fetch("reasons", []).map {|error| error['code']}.compact
|
715
724
|
codes_array = codes_array.push(body.dig("error", 'code')).compact if body.dig('error').class == Hash
|
725
|
+
puts "messages_array #{messages_array}"
|
726
|
+
puts "codes_array #{codes_array}"
|
716
727
|
|
717
728
|
if body['message'] == 'request exceeded limit'
|
718
729
|
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)
|
data/lib/zuora_api/version.rb
CHANGED
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.7.
|
4
|
+
version: 1.7.7e
|
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: 2020-09-
|
11
|
+
date: 2020-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|