zuora_api 1.7.35 → 1.7.36
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/lib/zuora_api/login.rb +11 -2
- data/lib/zuora_api/logins/oauth.rb +6 -1
- 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: de4cd3a83d428594730e08aa2c72dbcfc7628f1275250b7b9b5f852e7522e582
|
4
|
+
data.tar.gz: d8d6044bcafb851997c10cc864e3b3a5e460f6ec394638501a15255487edb7a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15f8dd8a1c8f79750914c2feae1b5cd310e42cb9253f1990a5c159f80b234e3f2ff13f279ec96d11d444d7bee446fb0c06e86106c4339414f97b2bcc5173de03
|
7
|
+
data.tar.gz: ca6bfcb6ca6d152c5175352feb5ac25dc8b4b44c205072fcdf408168c11986c7964c5168e536b088c8d7d413bbe474293297b3b9ccf99a4babdc53ff98fd9e15
|
data/lib/zuora_api/login.rb
CHANGED
@@ -605,7 +605,12 @@ module ZuoraAPI
|
|
605
605
|
end
|
606
606
|
#Authentication failed
|
607
607
|
if (codes_array.map{|code| code.to_s.slice(6,7).to_i}.include?(11) || response.code == 401) && !codes_array.include?(422)
|
608
|
-
|
608
|
+
new_message = messages_array.join(', ')
|
609
|
+
if new_message.present?
|
610
|
+
raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new(new_message, response)
|
611
|
+
else
|
612
|
+
raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new(body['message'], response)
|
613
|
+
end
|
609
614
|
end
|
610
615
|
|
611
616
|
#Zuora REST Create Amendment error #Authentication failed
|
@@ -678,7 +683,11 @@ module ZuoraAPI
|
|
678
683
|
|
679
684
|
#All other errors
|
680
685
|
if response.code == 500
|
681
|
-
|
686
|
+
if body.class == Hash && body['message'].present?
|
687
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(body['message'], response)
|
688
|
+
else
|
689
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new('Zuora API Internal Server Error', response)
|
690
|
+
end
|
682
691
|
elsif ![200,201].include?(response.code)
|
683
692
|
raise ZuoraAPI::Exceptions::ZuoraAPIError.new("#{response.message}", response)
|
684
693
|
end
|
@@ -34,7 +34,12 @@ module ZuoraAPI
|
|
34
34
|
headers = self.entity_id.present? ? {"Zuora-Entity-Ids" => self.entity_id } : {}
|
35
35
|
headers['Zuora-Track-Id'] = zuora_track_id if zuora_track_id.present?
|
36
36
|
output_json, response = self.rest_call(:url => self.rest_endpoint("connections"), :session_type => :bearer, :headers => headers)
|
37
|
-
|
37
|
+
begin
|
38
|
+
self.current_session = response.headers.to_h['set-cookie'][0].split(';')[0].split('=',2)[1].gsub('%3D', '=')
|
39
|
+
rescue NoMethodError => ex
|
40
|
+
Rails.logger.fatal("Failure Parsing Cookie Headers", response.headers.to_s)
|
41
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIAuthenticationTypeError.new("Failure Parsing Cookie Headers")
|
42
|
+
end
|
38
43
|
rescue ZuoraAPI::Exceptions::ZuoraAPISessionError => ex
|
39
44
|
if !tries.zero?
|
40
45
|
tries -= 1
|
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.36
|
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-01-
|
11
|
+
date: 2020-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|