zuora_connect 1.4.38 → 1.4.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/zuora_connect/app_instance_base.rb +15 -1
- data/lib/zuora_connect/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1341072d46fd0a86675d8a57d36fd507579cbb2
|
4
|
+
data.tar.gz: ad7245652a2ed7e7c95b19f56570ec10fa3eced7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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)
|