zuora_api 1.7.63 → 1.7.64
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/Gemfile.lock +1 -1
- data/lib/zuora_api/login.rb +17 -13
- 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: 340446bc0ceb955e7c27ed8460d8752f9e1a7183b00cfce6e5c6d8bec906aa1c
|
|
4
|
+
data.tar.gz: 74f68adcdc9e0b5e83bf586149b38b66b692bdc50a9554172b3f7ba03c36c7d2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e33bb4f39c96629690aa3606e1b768af0390c484126db0828af456122b0b3dac78fc4e6d453a3f8631a3147eba89b031e00993130e355f394dfe20a655713f48
|
|
7
|
+
data.tar.gz: cf81fe9fc35668007a47bdf2c06195f409e6af0f8b60c181baea4f45db29b9860aca9827b7096c6d584ddc51328d9724ec56df2746f4aeb0496150404c0b5990
|
data/Gemfile.lock
CHANGED
data/lib/zuora_api/login.rb
CHANGED
|
@@ -201,7 +201,7 @@ module ZuoraAPI
|
|
|
201
201
|
"Production" => "https://zconnect.na.zuora.com/api/rest/v1/",
|
|
202
202
|
"Services"=> ""}
|
|
203
203
|
}
|
|
204
|
-
return map[
|
|
204
|
+
return map[self.region][self.environment].insert(-1, path)
|
|
205
205
|
end
|
|
206
206
|
|
|
207
207
|
# There are two ways to call this method. The first way is best.
|
|
@@ -656,14 +656,15 @@ module ZuoraAPI
|
|
|
656
656
|
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(body.dig('message'), response) if body.dig('message').present?
|
|
657
657
|
end
|
|
658
658
|
when /^\/api\/rest\/v1\/reports.*/ #Reporting Paths
|
|
659
|
-
|
|
660
|
-
|
|
659
|
+
reporting_message = response.parsed_response.dig("ZanResponse", "response", "message") || body.dig("message")
|
|
660
|
+
if reporting_message&.include?("com.zuora.rest.RestUsageException: The user does not have permissions for this API.")
|
|
661
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(reporting_message, response)
|
|
662
|
+
elsif reporting_message&.include?("500 Internal Server Error")
|
|
663
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new("Internal Server Error. The Reporting API is down. Contact Support.")
|
|
661
664
|
end
|
|
662
665
|
case match_string
|
|
663
|
-
when /^GET::400::\/api\/rest\/v1\/reports\/([a-zA-Z0-9\-_]+)\/report-details$/ # Get report, capture of the id is present if needed in future error responses.
|
|
664
|
-
|
|
665
|
-
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(response.parsed_response.dig("ZanResponse", "response", "message"), response)
|
|
666
|
-
end
|
|
666
|
+
when /^GET::400::\/api\/rest\/v1\/reports\/([a-zA-Z0-9\-_]+)\/report-details$/ # Get report, capture of the id is present if needed in future error responses.
|
|
667
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(reporting_message, response) if reporting_message.present?
|
|
667
668
|
end
|
|
668
669
|
end
|
|
669
670
|
|
|
@@ -1010,14 +1011,17 @@ module ZuoraAPI
|
|
|
1010
1011
|
)
|
|
1011
1012
|
tries ||= 2
|
|
1012
1013
|
|
|
1013
|
-
if self.entity_id.present?
|
|
1014
|
-
headers["Zuora-Entity-Ids"] = self.entity_id if headers.dig("Zuora-Entity-Ids").nil?
|
|
1015
|
-
headers.delete_if { |key, value| ["entityId", "entityName"].include?(key.to_s) }
|
|
1016
|
-
end
|
|
1017
|
-
|
|
1018
1014
|
raise "Method not supported, supported methods include: :get, :post, :put, :delete, :patch, :head, :options" if ![:get, :post, :put, :delete, :patch, :head, :options].include?(method)
|
|
1019
1015
|
|
|
1020
|
-
authentication_headers =
|
|
1016
|
+
authentication_headers = {}
|
|
1017
|
+
if z_session
|
|
1018
|
+
authentication_headers = {"Authorization" => self.get_session(prefix: true, auth_type: session_type) }
|
|
1019
|
+
if self.entity_id.present?
|
|
1020
|
+
authentication_headers["Zuora-Entity-Ids"] = self.entity_id if headers.dig("Zuora-Entity-Ids").nil?
|
|
1021
|
+
authentication_headers.delete_if { |key, value| ["entityId", "entityName"].include?(key.to_s) }
|
|
1022
|
+
end
|
|
1023
|
+
end
|
|
1024
|
+
|
|
1021
1025
|
modified_headers = {'Content-Type' => "application/json; charset=utf-8"}.merge(authentication_headers).merge(headers)
|
|
1022
1026
|
|
|
1023
1027
|
begin
|
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.64
|
|
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-04-
|
|
11
|
+
date: 2020-04-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|