zuora_api 1.6.46 → 1.6.47
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zuora_api/login.rb +1 -1
- data/lib/zuora_api/logins/basic.rb +4 -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: eec7eb752d3972d6842441f105854f0f35341a8f796ec2bb8aa7f971aa9bc9f5
|
4
|
+
data.tar.gz: 215fb416865224e9af8ac9fd362e8194a547d9b73756e19ec4c196b714f7da83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 142cfe0ae0547244a805a09612dc2e7d106d56f2257dead817102ded182002fe1e723e22b811f107dfce361600c727dfa668b8623b6cf619cfe00e40317748fa
|
7
|
+
data.tar.gz: 1fdce3b231d021470d14b72b16870a86a257a32e316eb9adb090cb195f708714fcc34540077831e33f4d5b2b0777f5005ef51e292b27574b8835f1ccaf6547e6
|
data/lib/zuora_api/login.rb
CHANGED
@@ -781,7 +781,7 @@ module ZuoraAPI
|
|
781
781
|
|
782
782
|
raise_errors(type: :JSON, body: output_json, response: response)
|
783
783
|
rescue ZuoraAPI::Exceptions::ZuoraAPIAuthenticationTypeError => ex
|
784
|
-
if self.class.to_s == 'ZuoraAPI::Oauth'
|
784
|
+
if self.class.to_s == 'ZuoraAPI::Oauth' && ex.message.include?("Authentication type is not supported by this Login")
|
785
785
|
self.rest_call(method: method.to_sym, url: url, body: body, debug: debug, errors: errors, z_session: z_session, session_type: :bearer, timeout_retry: timeout_retry, timeout: timeout)
|
786
786
|
else
|
787
787
|
Rails.logger.debug("Rest Call - Session Bad Auth type")
|
@@ -1,15 +1,16 @@
|
|
1
1
|
module ZuoraAPI
|
2
2
|
class Basic < Login
|
3
|
-
attr_accessor :username, :password
|
3
|
+
attr_accessor :username, :password, :session
|
4
4
|
def initialize(username: nil, password: nil, **keyword_args)
|
5
5
|
self.username = username
|
6
6
|
self.password = password
|
7
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIAuthenticationTypeError.new("Request Basic Login but either 'Username' or 'Password' were not passed.") if self.session.blank? && (self.password.blank? && self.username.blank?)
|
7
8
|
super
|
8
9
|
end
|
9
10
|
|
10
|
-
def new_session(
|
11
|
+
def new_session(auth_type: :basic, debug: false)
|
11
12
|
raise ZuoraAPI::Exceptions::ZuoraAPIAuthenticationTypeError.new("Basic Login, does not support Authentication of Type: #{auth_type}") if auth_type != :basic
|
12
|
-
raise ZuoraAPI::Exceptions::ZuoraAPIAuthenticationTypeError.new("Basic Login
|
13
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIAuthenticationTypeError.new("Request Basic Login but either 'Username' or 'Password' were not passed.") if (self.password.blank? && self.username.blank?)
|
13
14
|
|
14
15
|
tries ||= 2
|
15
16
|
request = Nokogiri::XML::Builder.new do |xml|
|
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.6.
|
4
|
+
version: 1.6.47
|
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: 2019-06-
|
11
|
+
date: 2019-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|