zuora_api 1.6.46 → 1.6.47

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed89e1d32a7fcf2297c9c984fe32a34cdae89434767c75ea3ebaf4fa542af0e0
4
- data.tar.gz: 438a7a77d0774f54515872405bb438f08f34092f05044c94bae060e00722cea6
3
+ metadata.gz: eec7eb752d3972d6842441f105854f0f35341a8f796ec2bb8aa7f971aa9bc9f5
4
+ data.tar.gz: 215fb416865224e9af8ac9fd362e8194a547d9b73756e19ec4c196b714f7da83
5
5
  SHA512:
6
- metadata.gz: 075d2ae70c22bd9bb58965b7f859b46b9a1629e293c89df7db7a753c617f1fe7e446adbc532202a34ec94f4368f09bc45e12bd8f6ee025519ab5abc9be90846f
7
- data.tar.gz: ec045b66e6dbcccb5d7dd437f4af8a108391147058093c8213dc53cd864b881156adea4d7e8ae6697f7dc1340e5593cbcad21bb094c3e5780cf3c236bf405636
6
+ metadata.gz: 142cfe0ae0547244a805a09612dc2e7d106d56f2257dead817102ded182002fe1e723e22b811f107dfce361600c727dfa668b8623b6cf619cfe00e40317748fa
7
+ data.tar.gz: 1fdce3b231d021470d14b72b16870a86a257a32e316eb9adb090cb195f708714fcc34540077831e33f4d5b2b0777f5005ef51e292b27574b8835f1ccaf6547e6
@@ -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( auth_type: :basic, debug: false)
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 requires username and password to be set.") if auth_type == :basic && (self.password.blank? && self.username.blank?)
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|
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.6.46"
2
+ VERSION = "1.6.47"
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.6.46
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-02 00:00:00.000000000 Z
11
+ date: 2019-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler