zuora_connect 1.4.45 → 1.4.46

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: 88b1f90bd46ac53a6ae738e55e47d4a2c7b5601d
4
- data.tar.gz: e8f526aeb81690f58f39904c7b20d51b3f04dda1
3
+ metadata.gz: 07853b982b04609b71b013a23ec64d3f3c66a0a6
4
+ data.tar.gz: 6bee1abe8815272011aaf8bb07ecd35e5f72ca90
5
5
  SHA512:
6
- metadata.gz: c1b0bcc7e3dff16b6680f7b7640e40a1f92f447f449ea235b12ae53b86adbeb980ac378198ddff4d7062e7bd464a61fe0aea05b4fdf38579d4943baf8935cf4b
7
- data.tar.gz: 6b9c5e13a158b330b31ce74c391a322dcaeda94b01b883d410258d8f19a52a4129e702457e5c9a898e7f05caadab1368269637b10ea6907fbec16adab97753fc
6
+ metadata.gz: 5b35229886c6bd06bfff8704cbcaf4417d4e9b185b77c489f15be2973235be703851288b026b8b1be3a88857f9d0415b9467348b6dabb8f8bad917bf67807f60
7
+ data.tar.gz: 20760599102bdd21cbaef77a5664aff89bfcf971b6dddbaa20cdee8bacac122f85bc243f0f0b3d33e6e3adc2129ee2af2cb4d04dbd999fc143dbd626a9da7b59
@@ -446,6 +446,7 @@ module ZuoraConnect
446
446
 
447
447
  def refresh_oauth
448
448
  count ||= 0
449
+ start = Time.now
449
450
  Rails.logger.debug("[#{self.id}] REFRESHING - OAuth")
450
451
  params = {
451
452
  :grant_type => "refresh_token",
@@ -453,7 +454,11 @@ module ZuoraConnect
453
454
  :refresh_token => self.refresh_token
454
455
  }
455
456
  response = HTTParty.post("#{ZuoraConnect.configuration.url}/oauth/token",:body => params)
457
+ response_time = Time.now - start
458
+ Rails.logger.debug("[#{self.id}] REFRESHING - OAuth in #{response_time.round(2).to_s}")
459
+
456
460
  response_body = JSON.parse(response.body)
461
+
457
462
  if response.code == 200
458
463
  self.refresh_token = response_body["refresh_token"]
459
464
  self.access_token = response_body["access_token"]
@@ -3,7 +3,7 @@ module ZuoraConnect
3
3
  attr_accessor :oauth_client_id, :oauth_client_secret, :oauth_client_redirect_uri,:use_s3, :default_locale,:dev_mode_appinstance ,:dev_mode_admin, :dev_mode_user, :dev_mode_pass, :default_time_zone,:delayed_job,:url, :private_key, :dev_mode_logins,:dev_mode_mode, :dev_mode_options, :mode, :timeout,:dev_mode_secret_access_key,:dev_mode_access_key_id,:aws_region, :s3_bucket_name, :s3_folder_name, :additional_apartment_models
4
4
 
5
5
  def initialize
6
- @timeout = 5.minutes
6
+ @timeout = 30.minutes
7
7
  @default_locale = :en
8
8
  @default_time_zone = Time.zone
9
9
  @url = "https://connect.zuora.com/"
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "1.4.45"
2
+ VERSION = "1.4.46"
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.45
4
+ version: 1.4.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team