zuora_api 1.1.0 → 1.1.4

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: e6b91184ce58aa3b39ac125a6f98ea61fa710cbb
4
- data.tar.gz: 7867a74481cbdc7f340004aa49f0b88a0d8b24ca
3
+ metadata.gz: 38fc1647c028388104b7a6ba6578a22e2cb9dc85
4
+ data.tar.gz: aef15a183f55d343b8931d39de1facb82500ad00
5
5
  SHA512:
6
- metadata.gz: 5880021684c12a0a3ef57046da0fd0cc3199f877464024bc6be8736d6e8db16d75c5c97ed042f47019955c81068762523942b640462df66a57101b78c4452da8
7
- data.tar.gz: 5184074e1a48ac65786ae50972a501c0dd8f4f35e0a4197594f124f3b27c2e476bc1cc3db6b38e0f7491836b160b6b5167a77db1cd7603847fecafa0f7c229c3
6
+ metadata.gz: 35ddaaaee823cffaeb21faa7e9e17cb4ba067ab5c7e1b2ef15708e5a039b46a6179f765dae26715d62a7b0a6bead58fa459dd42aa3d90a28b5ac3f5ac238fa98
7
+ data.tar.gz: 5af9ea10e679470306b9d14161be39cdaa910865883719d18a266ab3ee1f0ea0b37aaa1a25f4899e0267655f9df25956e1e2a7c89b06dece0fae6bceee178cb7
data/.DS_Store CHANGED
Binary file
@@ -5,7 +5,7 @@ module ZuoraAPI
5
5
  class Login
6
6
  ENVIRONMENTS = [SANDBOX = 'Sandbox', PRODUCTION = 'Production', PREFORMANCE = 'Preformance', SERVICES = 'Services', UNKNOWN = 'Unknown' ]
7
7
 
8
- attr_accessor :username, :password, :url, :wsdl_number, :status, :current_session, :environment, :status, :errors, :current_error, :user_info, :tenant_id, :tenant_name, :entity_id, :export_progress, :export_size
8
+ attr_accessor :username, :password, :url, :wsdl_number, :status, :current_session, :environment, :status, :errors, :current_error, :user_info, :tenant_id, :tenant_name, :entity_id
9
9
 
10
10
  def initialize(username: nil, password: nil, url: nil, entity_id: nil, session: nil, **keyword_args)
11
11
  @username = username
@@ -351,16 +351,16 @@ module ZuoraAPI
351
351
  temp_file = Tempfile.new([filename.rpartition('.').first, ".zip"], "#{Rails.root}/tmp")
352
352
  temp_file.binmode
353
353
 
354
- size, self.export_progress = [0, 0]
355
- self.export_size = response.header["Content-Length"].to_i
354
+ size, export_progress = [0, 0]
355
+ export_size = response.header["Content-Length"].to_i
356
356
  response.read_body do |chunk|
357
357
  temp_file << chunk.force_encoding("UTF-8")
358
358
  size += chunk.size
359
- new_progress = (size * 100) / self.export_size
360
- unless new_progress == self.export_progress
359
+ new_progress = (size * 100) / export_size
360
+ unless new_progress == export_progress
361
361
  Rails.logger.debug("Login: #{self.username} Export Downloading %s (%3d%%)" % [filename, new_progress])
362
362
  end
363
- self.export_progress = new_progress
363
+ export_progress = new_progress
364
364
  end
365
365
 
366
366
  temp_file.close
@@ -388,7 +388,7 @@ module ZuoraAPI
388
388
  xml['ns1'].create do
389
389
  xml['ns1'].zObjects('xsi:type' => "ns2:Export") do
390
390
  xml['ns2'].Format 'csv'
391
- xml['ns2'].Zip "#{zip}"
391
+ xml['ns2'].Zip zip
392
392
  xml['ns2'].Name 'googman'
393
393
  xml['ns2'].Query query
394
394
  xml['ns2'].Encrypted encrypted
@@ -432,6 +432,10 @@ module ZuoraAPI
432
432
  location = extract_zip(zip_file.path, "#{file_id}")
433
433
  File.delete(zip_file.path)
434
434
  return location
435
+ elsif !zip
436
+ file = get_file(:file_name => "#{file_id}.gpg" ,:url => "#{self.fileURL}#{file_id}?file-id=#{file_id}", headers: {"Authorization" => "ZSession " + self.current_session})
437
+ puts file.path
438
+ return file.path
435
439
  else
436
440
  return zip_file.path
437
441
  end
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.4"
3
3
  end
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.1.0
4
+ version: 1.1.4
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: 2017-02-01 00:00:00.000000000 Z
11
+ date: 2017-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler