zuora_api 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zuora_api/login.rb +5 -4
- data/lib/zuora_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c55ec215788feb32e23a15d1b184106afede1d1d
|
4
|
+
data.tar.gz: e0735b673b4d2809d9382fadb6072e8c37d89351
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02fba7b0de2e9ff2e58bbc247726e6c3b60ce5a483a99d0a0c9aebb36b2e741c33370a1f59bd5e6a33224753a8e990533b45a2812bfe220077789a51a0e62c93
|
7
|
+
data.tar.gz: e893da8fd4cf5f9fb04934f2d8181058b94107adee328bee74e8372f694685c888d8b14e09b0751dc3ed1a5e9fcb5fe5c58d988d4ec60cb0e839deda9facc7cf
|
data/lib/zuora_api/login.rb
CHANGED
@@ -284,7 +284,7 @@ module ZuoraAPI
|
|
284
284
|
base = self.url.include?(".com") ? self.url.split(".com")[0].concat(".com") : self.url.split(".eu")[0].concat(".eu")
|
285
285
|
url = object ? "#{base}/apps/api/describe/#{object}" : "#{base}/apps/api/describe/"
|
286
286
|
headers = !self.entity_id.blank? ? {"entityId" => self.entity_id, 'Content-Type' => "text/xml; charset=utf-8"} : {'Content-Type' => "text/xml; charset=utf-8"}
|
287
|
-
response = HTTParty.get(url, :headers => headers , basic_auth: {:username => self.username, :password => self.password})
|
287
|
+
response = HTTParty.get(url, :headers => headers , basic_auth: {:username => self.username, :password => self.password}, :timeout => 120)
|
288
288
|
output_xml = Nokogiri::XML(response.body)
|
289
289
|
des_hash = Hash.new
|
290
290
|
if object == nil
|
@@ -397,6 +397,7 @@ module ZuoraAPI
|
|
397
397
|
filename = !file_name.blank? ? file_name : File.basename(uri.path).rpartition('.').first
|
398
398
|
|
399
399
|
http = Net::HTTP.new(uri.host, uri.port)
|
400
|
+
http.read_timeout = 120 #Seconds
|
400
401
|
http.use_ssl = true if uri.scheme.downcase == 'https'
|
401
402
|
headers = headers.merge({"Authorization" => "ZSession #{self.get_session}"})
|
402
403
|
|
@@ -467,7 +468,7 @@ module ZuoraAPI
|
|
467
468
|
end
|
468
469
|
end
|
469
470
|
end
|
470
|
-
response_query = HTTParty.post(self.url, body: request.to_xml, headers: {'Content-Type' => "application/json; charset=utf-8"})
|
471
|
+
response_query = HTTParty.post(self.url, body: request.to_xml, headers: {'Content-Type' => "application/json; charset=utf-8"}, :timeout => 120)
|
471
472
|
output_xml = Nokogiri::XML(response_query.body)
|
472
473
|
|
473
474
|
return 'Export Creation Unsuccessful : ' + output_xml.xpath('//ns1:Message', 'ns1' =>'http://api.zuora.com/').text if output_xml.xpath('//ns1:Success', 'ns1' =>'http://api.zuora.com/').text != "true"
|
@@ -490,7 +491,7 @@ module ZuoraAPI
|
|
490
491
|
result = 'Waiting'
|
491
492
|
while result != "Completed"
|
492
493
|
sleep 3
|
493
|
-
response_query = HTTParty.post(self.url, body: confirmRequest.to_xml, headers: {'Content-Type' => "application/json; charset=utf-8"})
|
494
|
+
response_query = HTTParty.post(self.url, body: confirmRequest.to_xml, headers: {'Content-Type' => "application/json; charset=utf-8"}, :timeout => 120)
|
494
495
|
output_xml = Nokogiri::XML(response_query.body)
|
495
496
|
result = output_xml.xpath('//ns2:Status', 'ns2' =>'http://object.api.zuora.com/').text
|
496
497
|
return 'Export Creation Unsuccessful : ' + output_xml.xpath('//ns1:Message', 'ns1' =>'http://api.zuora.com/').text if result == "Failed"
|
@@ -540,7 +541,7 @@ module ZuoraAPI
|
|
540
541
|
end
|
541
542
|
end
|
542
543
|
end
|
543
|
-
response_query = HTTParty.post(self.url, body: confirmRequest.to_xml, :headers => {'Content-Type' => "text/xml; charset=utf-8"})
|
544
|
+
response_query = HTTParty.post(self.url, body: confirmRequest.to_xml, :headers => {'Content-Type' => "text/xml; charset=utf-8"}, :timeout => 120)
|
544
545
|
output_xml = Nokogiri::XML(response_query.body)
|
545
546
|
Rails.logger.info('query') {"#{output_xml}"}
|
546
547
|
return output_xml
|
data/lib/zuora_api/version.rb
CHANGED