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 +4 -4
- data/.DS_Store +0 -0
- data/lib/zuora_api/login.rb +11 -7
- data/lib/zuora_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38fc1647c028388104b7a6ba6578a22e2cb9dc85
|
4
|
+
data.tar.gz: aef15a183f55d343b8931d39de1facb82500ad00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35ddaaaee823cffaeb21faa7e9e17cb4ba067ab5c7e1b2ef15708e5a039b46a6179f765dae26715d62a7b0a6bead58fa459dd42aa3d90a28b5ac3f5ac238fa98
|
7
|
+
data.tar.gz: 5af9ea10e679470306b9d14161be39cdaa910865883719d18a266ab3ee1f0ea0b37aaa1a25f4899e0267655f9df25956e1e2a7c89b06dece0fae6bceee178cb7
|
data/.DS_Store
CHANGED
Binary file
|
data/lib/zuora_api/login.rb
CHANGED
@@ -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
|
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,
|
355
|
-
|
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) /
|
360
|
-
unless new_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
|
-
|
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
|
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
|
data/lib/zuora_api/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|