zuora_api 1.0.3 → 1.1.0

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: 3519744d15acf7d302117624b6cddc11c9b1b029
4
- data.tar.gz: 0636d89e841e13da8a2736ffd41f17f033527df6
3
+ metadata.gz: e6b91184ce58aa3b39ac125a6f98ea61fa710cbb
4
+ data.tar.gz: 7867a74481cbdc7f340004aa49f0b88a0d8b24ca
5
5
  SHA512:
6
- metadata.gz: f407d285e5e902c94723b152f60978656798826b208c003a37cab039063f96b7d9ade77c434807700ad603dd914a4c75fddf0206e5576ab59eb190a53a7c8614
7
- data.tar.gz: 73582f5e5f6c3cc4701790b46302eefe8f430dbbbb133e5d06bb629e621191505253672debbd348095b1cea3d452978f8b5d41268c9f02cd77867af3a3ad2c66
6
+ metadata.gz: 5880021684c12a0a3ef57046da0fd0cc3199f877464024bc6be8736d6e8db16d75c5c97ed042f47019955c81068762523942b640462df66a57101b78c4452da8
7
+ data.tar.gz: 5184074e1a48ac65786ae50972a501c0dd8f4f35e0a4197594f124f3b27c2e476bc1cc3db6b38e0f7491836b160b6b5167a77db1cd7603847fecafa0f7c229c3
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
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
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, export_progress = [0, 0]
355
- export_size = response.header["Content-Length"].to_i
354
+ size, self.export_progress = [0, 0]
355
+ self.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) / export_size
360
- unless new_progress == export_progress
359
+ new_progress = (size * 100) / self.export_size
360
+ unless new_progress == self.export_progress
361
361
  Rails.logger.debug("Login: #{self.username} Export Downloading %s (%3d%%)" % [filename, new_progress])
362
362
  end
363
- export_progress = new_progress
363
+ self.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,10 +432,6 @@ 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
439
435
  else
440
436
  return zip_file.path
441
437
  end
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.0.3"
2
+ VERSION = "1.1.0"
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.0.3
4
+ version: 1.1.0
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-22 00:00:00.000000000 Z
11
+ date: 2017-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler