zuora_api 1.7.65e → 1.7.65f
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/zuora_api/exceptions.rb +3 -2
- data/lib/zuora_api/login.rb +14 -8
- data/lib/zuora_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7d938d4f3650b7d013c75dd8331ff79d18892c3608f4a37e2709e5053203d4e
|
4
|
+
data.tar.gz: 97d6019971a7d1fe835e4dad6c58aa3768851dbd2193708811927baaafa864b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6926089bf23d4762906a3f292f42b8e66a7b6ec7c55e0fab3e38b78785f8fdb0e18e669e98227b13d0dc3e467476606e0634297ab1ca4535e8f09fa95faff9a
|
7
|
+
data.tar.gz: 6803980d193339f1eba377d6591716660cca17a21fb9b873f112d6308883314336fb308d97fd222d2009e2772a24c595dc4751428d502a900ccd3cc3f8e05e12
|
data/Gemfile.lock
CHANGED
data/lib/zuora_api/exceptions.rb
CHANGED
@@ -225,13 +225,14 @@ module ZuoraAPI
|
|
225
225
|
end
|
226
226
|
|
227
227
|
class ZuoraAPIReadTimeout < Net::ReadTimeout
|
228
|
-
attr_reader :code, :response
|
228
|
+
attr_reader :code, :response, :request
|
229
229
|
attr_writer :default_message
|
230
230
|
|
231
|
-
def initialize(message = nil,response=nil, errors = [], successes = [], *args)
|
231
|
+
def initialize(message = nil, response = nil, request = nil, errors = [], successes = [], *args)
|
232
232
|
@code = response.class.to_s == "HTTParty::Response" ? response.code : nil
|
233
233
|
@message = message
|
234
234
|
@response = response
|
235
|
+
@request = request
|
235
236
|
@default_message = "Authentication type is not supported by this Login"
|
236
237
|
end
|
237
238
|
|
data/lib/zuora_api/login.rb
CHANGED
@@ -474,12 +474,16 @@ module ZuoraAPI
|
|
474
474
|
headers = { 'Content-Type' => "text/xml; charset=utf-8", 'Accept' => 'text/xml'}
|
475
475
|
headers['Zuora-Track-Id'] = zuora_track_id if zuora_track_id.present?
|
476
476
|
|
477
|
-
|
477
|
+
request = HTTParty::Request.new(
|
478
|
+
Net::HTTP::Post,
|
478
479
|
self.url,
|
479
|
-
:
|
480
|
-
:
|
481
|
-
:
|
480
|
+
body: xml.doc.to_xml(:save_with => XML_SAVE_OPTIONS).strip,
|
481
|
+
headers: headers,
|
482
|
+
timeout: timeout,
|
482
483
|
)
|
484
|
+
|
485
|
+
response = request.perform
|
486
|
+
|
483
487
|
output_xml = Nokogiri::XML(response.body)
|
484
488
|
Rails.logger.debug("Response SOAP XML: #{output_xml.to_xml(:save_with => XML_SAVE_OPTIONS).strip}") if debug
|
485
489
|
|
@@ -544,7 +548,7 @@ module ZuoraAPI
|
|
544
548
|
Rails.logger.error("SOAP Call - #{ex.class} Timed out will retry after #{timeout_sleep_interval} seconds")
|
545
549
|
end
|
546
550
|
end
|
547
|
-
raise ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read timeout from #{url}") if ex.instance_of?(Net::ReadTimeout)
|
551
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read timeout from #{url}", nil, request) if ex.instance_of?(Net::ReadTimeout)
|
548
552
|
raise ex
|
549
553
|
rescue => ex
|
550
554
|
raise ex
|
@@ -1023,7 +1027,7 @@ module ZuoraAPI
|
|
1023
1027
|
modified_headers = {'Content-Type' => "application/json; charset=utf-8"}.merge(authentication_headers).merge(headers)
|
1024
1028
|
|
1025
1029
|
begin
|
1026
|
-
|
1030
|
+
request = HTTParty::Request.new(
|
1027
1031
|
"Net::HTTP::#{method.to_s.capitalize}".constantize,
|
1028
1032
|
url,
|
1029
1033
|
body: body,
|
@@ -1031,7 +1035,9 @@ module ZuoraAPI
|
|
1031
1035
|
timeout: timeout,
|
1032
1036
|
multipart: multipart,
|
1033
1037
|
stream_body: stream_body
|
1034
|
-
)
|
1038
|
+
)
|
1039
|
+
|
1040
|
+
response = request.perform(&block)
|
1035
1041
|
|
1036
1042
|
Rails.logger.debug("Response Code: #{response.code}") if debug
|
1037
1043
|
begin
|
@@ -1115,7 +1121,7 @@ module ZuoraAPI
|
|
1115
1121
|
Rails.logger.error("Rest Call - #{ex.class} Timed out will retry after #{timeout_sleep_interval} seconds")
|
1116
1122
|
end
|
1117
1123
|
end
|
1118
|
-
raise ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read timeout from #{url}") if ex.instance_of?(Net::ReadTimeout)
|
1124
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read timeout from #{url}", nil, request) if ex.instance_of?(Net::ReadTimeout)
|
1119
1125
|
raise ex
|
1120
1126
|
rescue => ex
|
1121
1127
|
raise ex
|
data/lib/zuora_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zuora_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.65f
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zuora Strategic Solutions Group
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|