zuora_connect 1.7.30 → 1.7.31

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78bd70e092476545b1989987d07d50c33f9b156b
4
- data.tar.gz: d6e7ddf5c8c8347ac77178be40fd91441cde6dba
3
+ metadata.gz: ca47847ecc0012579c4750339ba233a232543b89
4
+ data.tar.gz: c3821144ce11d78431dd2faacecf549a683b5eb5
5
5
  SHA512:
6
- metadata.gz: 1d676a5d10c6c412fc2157aeaf71c1103c38508a6ba68784998d2aa45a8545cf814c5f1a949c0a03fa6fbbb8371c50c144a613b91e4bdebbefd455098e0502cc
7
- data.tar.gz: 1d9b6d68a4c0d3e32e549bec75af863a2ff278775e0b418ce4231ab06ae6bc5926bfd87faf3fc324c6cf8e17c257114a01f66dda00190d35f84027946768959d
6
+ metadata.gz: e35be2b03104d41d2c570103452b42964fb87d7f3e4803eaadb0a4d474dad5c7b2e01f7ac93b7553b2aa058cbbaa47021b1a5bf4c1eb2b53bf92a279b1191faa
7
+ data.tar.gz: a804166c6e8869748a395d7010ae9fa6e832af25c837d563dc47829b79147a8634c1b287cfb694f1ddded44bdf6ab353473ff252112ff13b74a384c4e889b1f0
@@ -295,6 +295,34 @@ module ZuoraConnect
295
295
  raise
296
296
  end
297
297
  end
298
+
299
+ def update_task(options)
300
+ update_task_count ||= 0
301
+ response = HTTParty.post(ZuoraConnect.configuration.url + "/api/#{self.api_version}/tools/tasks/#{self.id}/update_task",:body => {:access_token => self.username}.merge(options))
302
+ parsed_json = JSON.parse(response.body)
303
+ if response.code == 200
304
+ return parsed_json
305
+ elsif response.code == 400
306
+ raise ZuoraConnect::Exceptions::APIError.new(message: parsed_json['errors'].join(' '), response: response.body, code: response.code)
307
+ else
308
+ raise ZuoraConnect::Exceptions::ConnectCommunicationError.new("Error Communicating with Connect", response.body, response.code)
309
+ end
310
+ rescue Net::ReadTimeout, Net::OpenTimeout, Errno::EPIPE, Errno::ECONNRESET, Errno::ECONNREFUSED, SocketError => ex
311
+ if (update_task_count += 1) < 3
312
+ retry
313
+ else
314
+ raise
315
+ end
316
+ rescue ZuoraConnect::Exceptions::ConnectCommunicationError => ex
317
+ if (update_task_count += 1) < 3
318
+ if ex.code == 401
319
+ self.refresh_oauth
320
+ end
321
+ retry
322
+ else
323
+ raise
324
+ end
325
+ end
298
326
  #### END Task Mathods ####
299
327
 
300
328
  #### START Connect OAUTH methods ####
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "1.7.30"
2
+ VERSION = "1.7.31"
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.7.30
4
+ version: 1.7.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team