zuora_connect 1.5.05 → 1.5.06

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: 38ebbf8e4e71e1ce0ae67c1aca670320ea0d6e86
4
- data.tar.gz: ac04a93240de4a8f3ee9bda2900272f6cd7020e5
3
+ metadata.gz: d61345c4f3cb5961fbabacd154ca3ad82c3ed0c9
4
+ data.tar.gz: b9a6d51bb10890b9ddc7b3766107e8381d8f75f0
5
5
  SHA512:
6
- metadata.gz: 0b571056ef4af2e385cb2f7aa53b26d4fd3e20d5177df7d6e72168ce2fb4eb291e1b00fe40c97b112e9fcc3484e9a9c4d5a38efe437c6cf53b0b7ed5f008d8a4
7
- data.tar.gz: 51d6b3e43835c5d82e16cb85a952fd5a200d9f99762954c0658f168cb0bf3fe05757f033448fee7112c59d0123ec2b109ee09fdcec2872c02b53870a20defa49
6
+ metadata.gz: c5de3f67c4de4cd712bda849e54ad0029c41a847d9f8192d48fed4cd79100b9e4235a5e235edba7a533c4a6830083f52cc4abd515bea861341fc7a6bcc21db4d
7
+ data.tar.gz: 8fb5568176ae360adeebd6c03fabdaa171c0a5d7c7aee815d4876864dc73fb4bb95e852099b2c245a81095de025fcae13726b9021eabdb7886322834612e73f6
@@ -538,7 +538,7 @@ module ZuoraConnect
538
538
  self.refresh_token = response_body["refresh_token"]
539
539
  self.access_token = response_body["access_token"]
540
540
  self.oauth_expires_at = Time.at(response_body["created_at"].to_i) + response_body["expires_in"].seconds
541
- self.save
541
+ self.save(:validate => false)
542
542
  else
543
543
  Rails.logger.fatal("REFRESHING - OAuth Failed - Code #{response.code}")
544
544
  raise ZuoraConnect::Exceptions::ConnectCommunicationError.new("Error Refreshing Access Token", response.body, response.code)
@@ -592,6 +592,5 @@ module ZuoraConnect
592
592
  ActiveRecord::Base.connection.execute('SELECT "shared_extensions".refresh_aggregate_table(\'%s\', \'%s\', %s, \'Table\');' % [aggregate_name, table_name, ActiveRecord::Base.connection.quote(where_clause)])
593
593
  ActiveRecord::Base.connection.execute('SELECT "shared_extensions".refresh_aggregate_table(\'%s\', \'%s\', %s, \'Index\');' % [aggregate_name, table_name, ActiveRecord::Base.connection.quote(where_clause)]) if index_table
594
594
  end
595
-
596
595
  end
597
596
  end
@@ -87,15 +87,16 @@ module ZuoraConnect
87
87
  @appinstance = ZuoraConnect::AppInstance.where(:id => values["appInstance"].to_i).first
88
88
  if @appinstance.blank?
89
89
  Apartment::Tenant.switch!("public")
90
+ @appinstance = ZuoraConnect::AppInstance.new(:api_token => values[:api_token],:id => values["appInstance"].to_i, :access_token => values["access_token"].blank? ? values["user"] : values["access_token"], :token => values["refresh_token"] , :refresh_token => values["refresh_token"].blank? ? values["key"] : values["refresh_token"], :oauth_expires_at => values["expires"])
91
+ @appinstance.save(:validate => false)
90
92
  Apartment::Tenant.create(values["appInstance"].to_s)
91
- @appinstance = ZuoraConnect::AppInstance.create!(:api_token => values[:api_token],:id => values["appInstance"].to_i, :access_token => values["access_token"].blank? ? values["user"] : values["access_token"], :token => values["refresh_token"] , :refresh_token => values["refresh_token"].blank? ? values["key"] : values["refresh_token"], :oauth_expires_at => values["expires"])
92
93
  end
93
94
  Rails.logger.debug("[#{@appinstance.id}] App Params: #{values.inspect}}") if Rails.env != "production"
94
95
  @appinstance.access_token = values["access_token"] if !values["access_token"].blank? && @appinstance.access_token != values["access_token"]
95
96
  @appinstance.refresh_token = values["refresh_token"] if !values["refresh_token"].blank? && @appinstance.refresh_token != values["refresh_token"]
96
97
  @appinstance.oauth_expires_at = values["expires"] if !values["expires"].blank?
97
98
  @appinstance.api_token = values["api_token"] if !values["api_token"].blank? && @appinstance.api_token != values["api_token"]
98
- @appinstance.save
99
+ @appinstance.save(:validate => false)
99
100
  end
100
101
 
101
102
  def setup_instance_via_session
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "1.5.05"
2
+ VERSION = "1.5.06"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.05
4
+ version: 1.5.06
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-20 00:00:00.000000000 Z
11
+ date: 2017-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apartment