zuora_connect 1.4.38 → 1.4.39

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
  SHA1:
3
- metadata.gz: 45e482296bb9bae62769cf55aa5944eecf31755f
4
- data.tar.gz: feaacc1916dc12bbcb2a9dbb3732a49098bc5917
3
+ metadata.gz: a1341072d46fd0a86675d8a57d36fd507579cbb2
4
+ data.tar.gz: ad7245652a2ed7e7c95b19f56570ec10fa3eced7
5
5
  SHA512:
6
- metadata.gz: 587df5f86b403fcb4f25f953887c7d638e9e395aff6d6b8defc5ce90cc8d1b114f008609072bafd5ffda5cc586dd86505041aa01daa1bccf071bb32970df9be8
7
- data.tar.gz: 0ddaa61815730c0d27fe439327c18e84f79b7ef0bbeed0d9e76c79df4dd4d1e5cecfdc52eb2edf0205211178b31ab9dcb57820c58c6ca068ee44a6cc9819cf29
6
+ metadata.gz: 313b528b9b9dd5014e54a70443aa11abf6245a5135b0566b6559c9d0aa64b65bfb52626ffb259ce1e3abd8f1c19f83c1a73d205d38befc137ba64f0cd866bbc7
7
+ data.tar.gz: b19dff046cd01d2a886759d810efa152234e0202eccf5e0be83a5fec0d5cf6b0da205690d0cb797a85d597f545051d963e1b1efede2c0351efbe326f4b998b55
@@ -337,7 +337,21 @@ module ZuoraConnect
337
337
  #This can add a new login
338
338
  #This can change to another existing login
339
339
  def update_logins(options)
340
- return HTTParty.post(ZuoraConnect.configuration.url + "/api/v2/tools/tasks/#{self.id}/logins",:body => {:access_token => self.username}.merge(options))
340
+ count ||= 0
341
+ response = HTTParty.post(ZuoraConnect.configuration.url + "/api/v2/tools/tasks/#{self.id}/logins",:body => {:access_token => self.username}.merge(options))
342
+ if response.code == 200
343
+ return JSON.parse(response.body)
344
+ else
345
+ raise ZuoraConnect::Exceptions::ConnectCommunicationError.new("Error Communicating with Connect", response.body, response.code)
346
+ end
347
+ rescue
348
+ if count < 2 && response.code == 401
349
+ self.refresh_oauth
350
+ count += 1
351
+ retry
352
+ else
353
+ raise
354
+ end
341
355
  end
342
356
 
343
357
  def refresh(session = nil)
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "1.4.38"
2
+ VERSION = "1.4.39"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.38
4
+ version: 1.4.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team