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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e27195761fb93a098cc9bf06a94d4c0d97a951bc
4
- data.tar.gz: a0208b0e8e1f336b7560583e31a6fc0a4f2142d9
3
+ metadata.gz: c55ec215788feb32e23a15d1b184106afede1d1d
4
+ data.tar.gz: e0735b673b4d2809d9382fadb6072e8c37d89351
5
5
  SHA512:
6
- metadata.gz: 1e242679093a82e90eb24d7706a05f5c854238a4d13b80199a7a1bb1cc7ee5e4bb84f594e3731d19e6510e9bd81c5a4bfa8602e5f1fcbeaa2ca48446279d1a29
7
- data.tar.gz: 7624e7f945adc9f63657848469b66d1fa568c45cedfaf2ce2a481b02b38047bfb88df39502bc1424037f414c90762add8f720c84124c7ec5dc9d1ef9fb8799cd
6
+ metadata.gz: 02fba7b0de2e9ff2e58bbc247726e6c3b60ce5a483a99d0a0c9aebb36b2e741c33370a1f59bd5e6a33224753a8e990533b45a2812bfe220077789a51a0e62c93
7
+ data.tar.gz: e893da8fd4cf5f9fb04934f2d8181058b94107adee328bee74e8372f694685c888d8b14e09b0751dc3ed1a5e9fcb5fe5c58d988d4ec60cb0e839deda9facc7cf
@@ -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
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.3.1"
2
+ VERSION = "1.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zuora Strategic Solutions Group