zuora_api_oauth_alpha 2.12 → 2.13

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: 9f1b8e481f51714e27641e55da2b0ea1b548928d2d8aa68d681d5806b6f83871
4
- data.tar.gz: b025288e5209e62085eb825176956500a57e558b42a49513eb22df64174fa702
3
+ metadata.gz: d1f5fb3d1cba9978f4cf6c81adad579d3d845d68e51fa05f63b9606d75852790
4
+ data.tar.gz: 1eccb6424ee212122c69b45a427fc838644d14a4fbf221fcf1e309058d8c566e
5
5
  SHA512:
6
- metadata.gz: 67c0f42b36fb2376b41142d143e6d12cbfa449f0c2ea202a851cd4779a235851de55b2470b8eeef525ac2e3c2999bda24120bfd78623a37c4e03cf7b08448fef
7
- data.tar.gz: 562e41cb0edd6fa018f6d60a5b70d3bc2f8316ea66da768a25bcc7aa249001a975254c9e36251f6ada0ef5d91398cbac93e3282052440dc32398ef1e5d23afd2
6
+ metadata.gz: 791e0d0ff28e55190337f352de052338c3da995f5d683c682381d8d3f3690ba472318b7c467600b5305d6cc9dd8047fe63c8a13be53acbdd50a4aeb253810bc3
7
+ data.tar.gz: 0ce1b4fba1a4de2b77511ad7f400f50792641b554d987d17328c917a08c7cb0e6543949d789a776be888a4e3e3cefccc37db7a7b3966e98c69529f67dd9bf21d
@@ -104,6 +104,7 @@ module ZuoraAPI
104
104
  end
105
105
  raise ZuoraAPI::Exceptions::ZuoraAPIAuthenticationTypeError.new(self.current_error) if self.status == 'AuthenticationError'
106
106
  raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new(self.current_error) if self.status != 'Active'
107
+ Rails.logger.debug("Repsonse to get_session: Authtype: #{auth_type} Prefix: #{prefix} session: #{self.current_session.to_s}")
107
108
  return self.authentication_prefix(auth_type) + self.current_session.to_s if prefix
108
109
  return self.current_session.to_s
109
110
  end
@@ -412,7 +413,7 @@ module ZuoraAPI
412
413
  rescue ZuoraAPI::Exceptions::ZuoraAPISessionError => ex
413
414
  if !(tries -= 1).zero? && z_session
414
415
  Rails.logger.debug {"Session Invalid"}
415
- self.new_session(oauth_only ? :bearer : nil)
416
+ self.current_session = self.new_session(oauth_only ? :bearer : nil)
416
417
  retry
417
418
  else
418
419
  if errors.include?(ex.class)
@@ -32,7 +32,6 @@ module ZuoraAPI
32
32
 
33
33
  def new_session(auth_type = :basic)
34
34
  auth_type ||= :basic
35
- puts auth_type
36
35
  Rails.logger.debug("Create new session")
37
36
  raise ZuoraAPI::Exceptions::ZuoraAPIAuthenticationTypeError.new("Basic Login, does not support Authentication of Type: #{auth_type}") if auth_type != :basic
38
37
  begin
@@ -119,19 +118,19 @@ module ZuoraAPI
119
118
  else
120
119
  #If Session only is used for Gem TODO Depercate
121
120
  if (self.password.blank? && @z_session_token.present?)
122
- @z_session_token = @z_session_token
121
+ self.z_session_token = @z_session_token
123
122
  self.username = @output_xml.xpath('//ns1:Username', 'ns1' =>'http://api.zuora.com/').text if self.username.blank?
124
123
 
125
124
  #Username & password combo
126
125
  elsif (self.password.present? && self.username.present?)
127
126
  retrieved_session = @output_xml.xpath('//ns1:Session', 'ns1' =>'http://api.zuora.com/').text
128
127
  raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new("No session found for api call.") if retrieved_session.blank?
129
- @z_session_token = retrieved_session
128
+ self.z_session_token = retrieved_session
130
129
  end
131
130
 
132
131
  self.current_error = nil
133
132
  self.status = 'Active'
134
- return @z_session_token
133
+ return self.z_session_token
135
134
  end
136
135
  rescue Net::ReadTimeout, Net::OpenTimeout, Errno::EPIPE, Errno::ECONNRESET, Errno::ECONNREFUSED, SocketError => ex
137
136
  if !(tries -= 1).zero?
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "2.12"
2
+ VERSION = "2.13"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_api_oauth_alpha
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.12'
4
+ version: '2.13'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zuora Strategic Solutions Group