zuora_connect 2.0.20 → 2.0.21
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dca2a6f20596cad7780bcd4f3e27667a27b24182d30efae68fef5b2f72938688
|
4
|
+
data.tar.gz: 31cab27334ae5fb241c6e16532c17c038569b66047e101cf99f81ee1648d2c3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ff8344bbf327f39307b42eef358cd1e6a4e183778e730f26a1d7c18b2a39ae5e047ef80ce94f4bc635d00bc6c7f50596f49b995bcfc98c86f64fcaec29ecb9f
|
7
|
+
data.tar.gz: 9efcf0b1a1b761bd12cdc171d87c752fa8f44de4abc07489515f16312098226282ab9f7defe06fce23d47aa096311a827d72f5841be7d8cafdde4a43ded6356a
|
@@ -184,7 +184,7 @@ module ZuoraConnect
|
|
184
184
|
rescue ZuoraConnect::Exceptions::MissMatch => ex
|
185
185
|
self.delete_app_instance
|
186
186
|
session = {}
|
187
|
-
ZuoraConnect.logger.error(ex, self.default_ougai_items.merge({
|
187
|
+
ZuoraConnect.logger.error(ex, self.default_ougai_items.merge({app_instance_id_new: self.task_data['id']}))
|
188
188
|
retry
|
189
189
|
rescue => ex
|
190
190
|
if recoverable_session
|
@@ -167,7 +167,16 @@ module ZuoraConnect
|
|
167
167
|
@appinstance = ZuoraConnect::AppInstance.find(appinstances.to_h.keys.first)
|
168
168
|
|
169
169
|
#Add user/update
|
170
|
-
|
170
|
+
begin
|
171
|
+
@zuora_user = ZuoraConnect::ZuoraUser.where(:zuora_user_id => zuora_user_id).first
|
172
|
+
rescue ActiveRecord::StatementInvalid => ex
|
173
|
+
if ex.message.include?("PG::UndefinedTable") && ex.message.include?("zuora_users")
|
174
|
+
self.apartment_switch(nil,true)
|
175
|
+
retry
|
176
|
+
else
|
177
|
+
raise
|
178
|
+
end
|
179
|
+
end
|
171
180
|
if @zuora_user.present?
|
172
181
|
ZuoraConnect.logger.debug("Current zuora user #{zuora_user_id}")
|
173
182
|
if @zuora_user.updated_at < Time.now - 1.day
|
@@ -283,12 +292,16 @@ module ZuoraConnect
|
|
283
292
|
end
|
284
293
|
|
285
294
|
rescue ZuoraAPI::Exceptions::ZuoraAPIAuthenticationTypeError => ex
|
286
|
-
output_xml, input_xml = zuora_client.soap_call(errors: [], z_session: false) do |xml|
|
295
|
+
output_xml, input_xml, response = zuora_client.soap_call(errors: [], z_session: false) do |xml|
|
287
296
|
xml['api'].getUserInfo
|
288
297
|
end
|
289
298
|
final_error = output_xml.xpath('//fns:FaultCode', 'fns' =>'http://fault.api.zuora.com/').text
|
290
299
|
session.clear
|
291
|
-
|
300
|
+
if final_error.blank?
|
301
|
+
ZuoraConnect.logger.warn("UI Authorization Error", ex, zuora: zuora_details.merge({:error => response.body}))
|
302
|
+
elsif final_error != "INVALID_SESSION"
|
303
|
+
ZuoraConnect.logger.warn("UI Authorization Error", ex, zuora: zuora_details.merge({:error => final_error}))
|
304
|
+
end
|
292
305
|
redirect_to "https://#{zuora_host}/apps/newlogin.do?retURL=#{request.fullpath}"
|
293
306
|
return
|
294
307
|
rescue => ex
|
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: 2.0.
|
4
|
+
version: 2.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connect Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apartment
|