zuora_api 1.3.99997 → 1.3.99998
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 +4 -4
- data/lib/zuora_api/exceptions.rb +4 -2
- data/lib/zuora_api/login.rb +6 -2
- 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: e9a7469833b4db086c33bbf5470e718c01b9d677
|
|
4
|
+
data.tar.gz: 9492b8bd10418291c77f137c46b3c1818a8006ad
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25357dce0d2ee90ab4de5f09371727d8ef2f744d13b99667e833354311bd2729eb40b036ecbe9a3582d93ecd581be471e83076e076e1b3139672862c68409dce
|
|
7
|
+
data.tar.gz: ed681f2044cd0f39903bbbeac926126656e8eac665713268624bc7f2c6e85b233bad94e179b2d6915e82deb2eca4ddf29de25b2101392c60f432314b66d8afc0
|
data/lib/zuora_api/exceptions.rb
CHANGED
|
@@ -18,14 +18,16 @@ module ZuoraAPI
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
class ZuoraAPIError < Error
|
|
21
|
-
attr_reader :code, :response
|
|
21
|
+
attr_reader :code, :response, :errors, :successes
|
|
22
22
|
attr_writer :default_message
|
|
23
23
|
|
|
24
|
-
def initialize(message = nil,response=nil, code =nil)
|
|
24
|
+
def initialize(message = nil,response=nil, code =nil, errors = [], successes = [])
|
|
25
25
|
@code = code
|
|
26
26
|
@message = message
|
|
27
27
|
@response = response
|
|
28
28
|
@default_message = "Error communicating with Zuora."
|
|
29
|
+
@errors = errors
|
|
30
|
+
@successes = successes
|
|
29
31
|
end
|
|
30
32
|
|
|
31
33
|
def to_s
|
data/lib/zuora_api/login.rb
CHANGED
|
@@ -345,8 +345,12 @@ module ZuoraAPI
|
|
|
345
345
|
end
|
|
346
346
|
|
|
347
347
|
#Zuora REST Actions error (Create, Update, Delete)
|
|
348
|
-
if body.class == Array
|
|
349
|
-
|
|
348
|
+
if body.class == Array
|
|
349
|
+
all_errors = body.select {|obj| !obj['Success']}.map {|obj| obj['Errors']}
|
|
350
|
+
all_success = body.select {|obj| obj['Success']}
|
|
351
|
+
if all_errors.size > 0
|
|
352
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIError.new("There were #{all_errors.size} failures and #{all_success.size} successes.", nil, nil, all_errors, all_success )
|
|
353
|
+
end
|
|
350
354
|
end
|
|
351
355
|
|
|
352
356
|
#All other errors
|
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.3.
|
|
4
|
+
version: 1.3.99998
|
|
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-10-
|
|
11
|
+
date: 2017-10-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|