zuora_api 1.1.7 → 1.1.8

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: e37603036a86f2888c98016dbea6af0a743f2e1d
4
- data.tar.gz: 322501fde4618e25d1c20cffa13f4fe51d963c84
3
+ metadata.gz: 51dc4d70182c683d9efefd250e5437cf6bbe3d7f
4
+ data.tar.gz: 16c4584c07330360d07e815161f031681f459d00
5
5
  SHA512:
6
- metadata.gz: 9a254f20f2f7730667956531c6ba7af728e46ba0135cd2f0d1b043af9d589998c583fb60db468337e7a6a0b8f88c9e712833541baf218be618fe101129bab0a6
7
- data.tar.gz: c0b451e6b9634a9737b4824db64dfd679f4b6cba1142ed50110c7596c2fafac911bdca93257778aca2a833fd1b4f02c19e95beaccae15f54eb9274498c7b525c
6
+ metadata.gz: 445f22fb4afc53de2bbdfc589f734da612df3a4d334b199f1e75b1852aa1f2d5f74a5f8c745a81718a27c3b3771558e16fd22b611a186016cb3af0d7432988f6
7
+ data.tar.gz: 4f412e8e5da646b80cd98d24313af276b0cf326c755c11e4a9394d8745fdc4a38ada3fa666604e9297e7e3c7134b479c1a1e84599d95203bb12f4adabf766cf4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zuora_api (1.1.7)
4
+ zuora_api (1.1.8)
5
5
  httparty
6
6
  nokogiri (~> 1.6.8)
7
7
  railties (>= 4.1.0, < 5.1)
@@ -263,15 +263,15 @@ module ZuoraAPI
263
263
  result = "new"
264
264
  while result != "completed" do
265
265
  sleep(2)#sleep 2 seconds
266
- response, fullResponse = self.rest_call(method: :get, body: {}, url: self.aqua_endpoint("batch-query/jobs/#{id}"), debug: false)
267
- result == response["batches"][0]["status"]
266
+ response, fullResponse = self.rest_call(method: :get, body: {}, url: self.aqua_endpoint("batch-query/jobs/#{id}"))
267
+ result = response["batches"][0]["status"]
268
268
  if result == "error"
269
269
  raise "Aqua Error: #{response}"
270
270
  break
271
271
  end
272
272
  end
273
273
  fileId = response["batches"][0]["fileId"]
274
- return self.get_file(file_name: "#{id}.csv", url: self.aqua_endpoint("file/#{fileId}"), headers: {"Authorization" => "ZSession " + self.current_session, 'Content-Type' => "application/json; charset=utf-8"})
274
+ return self.get_file(file_name: "#{fileId}.csv", url: self.aqua_endpoint("file/#{fileId}"), headers: {"Authorization" => "ZSession " + self.current_session, 'Content-Type' => "application/json; charset=utf-8"},file_type: "csv")
275
275
  end
276
276
 
277
277
 
@@ -361,7 +361,7 @@ module ZuoraAPI
361
361
  return self
362
362
  end
363
363
 
364
- def get_file(file_name: 'example.csv', url: nil, headers: {}, count: 3)
364
+ def get_file(file_name: 'example.csv', url: nil, headers: {}, count: 3, file_type: "zip")
365
365
  begin
366
366
  uri = URI.parse(url)
367
367
  filename = File.basename(uri.path)
@@ -387,7 +387,7 @@ module ZuoraAPI
387
387
  raise ex
388
388
 
389
389
  when Net::HTTPOK
390
- temp_file = Tempfile.new([filename.rpartition('.').first, ".zip"], "#{Rails.root}/tmp")
390
+ temp_file = Tempfile.new([filename.rpartition('.').first, ".#{file_type}"], "#{Rails.root}/tmp")
391
391
  temp_file.binmode
392
392
 
393
393
  size, export_progress = [0, 0]
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.1.7"
2
+ VERSION = "1.1.8"
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.1.7
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zuora Strategic Solutions Group