zuora_api 1.7.66 → 1.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +20 -0
- data/README.md +9 -0
- data/lib/zuora_api/exceptions.rb +18 -3
- data/lib/zuora_api/login.rb +451 -386
- data/lib/zuora_api/logins/basic.rb +10 -101
- data/lib/zuora_api/logins/oauth.rb +28 -86
- data/lib/zuora_api/version.rb +1 -1
- data/lib/zuora_api.rb +2 -0
- metadata +50 -23
- data/.gitignore +0 -10
- data/.gitlab-ci.yml +0 -63
- data/.rspec +0 -2
- data/.travis.yml +0 -5
- data/CHANGELOG.md +0 -105
- data/Gemfile +0 -4
- data/Gemfile.lock +0 -117
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/zuora_api.gemspec +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1377cfe445b9ff82e0504e86ef89413c815b4250152769ec11bf6b7b8804cdd9
|
4
|
+
data.tar.gz: 9882ca98957ecf177985037124f9e77722fe9c1eeea430f8c5f632fc4327162c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5043d898c8ec80517f01bd65daf031880aa4ab91e14669eedece02be8dab5c7b895abeb8d48330c89a9159875f8a9418adb2db2b3017bfe5b698100bb3035183
|
7
|
+
data.tar.gz: 85ca8f78f0807ed8c7533e612a0816dcbdf52ec71131c1c122cc110e89898c0dfbe69d560e5130e50f438bced5235331ee4590af12912248319bddfae52cc376
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2021 Zuora, Inc.
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -145,3 +145,12 @@ Both do the same thing except one returns a url(data_export_insights) to downloa
|
|
145
145
|
objectype: "ACCOUNT/USER"
|
146
146
|
|
147
147
|
segmentuuid: A single or array of string or int of a segment uuid(s) that you get from the describe call. The csv holds a column with a bool that represents if that User or Account belongs to that segment.
|
148
|
+
|
149
|
+
### License Information
|
150
|
+
IN THE EVENT YOU ARE AN EXISTING ZUORA CUSTOMER, USE OF THIS SOFTWARE IS GOVERNEDBY THE MIT LICENSE SET FORTH BELOW AND NOT THE MASTER SUBSCRIPTION AGREEMENT OR OTHER COMMERCIAL AGREEMENT ENTERED INTO BETWEEN YOU AND ZUORA (“AGREEMENT”). FOR THE AVOIDANCE OF DOUBT, ZUORA’S OBLIGATIONS WITH RESPECT TO TECHNICAL SUPPORT, UPTIME, INDEMNIFICATION, AND SECURITY SET FORTH IN THE AGREEMENT DO NOT APPLY TO THE USE OF THIS SOFTWARE.
|
151
|
+
|
152
|
+
Copyright 2021 Zuora, Inc.
|
153
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
154
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
155
|
+
|
156
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/zuora_api/exceptions.rb
CHANGED
@@ -40,6 +40,19 @@ module ZuoraAPI
|
|
40
40
|
def to_s
|
41
41
|
@message || @default_message
|
42
42
|
end
|
43
|
+
|
44
|
+
def parse_message(message)
|
45
|
+
case message
|
46
|
+
when /^Invalid Oauth Client Id$/, /^Unable to generate token.$/
|
47
|
+
@message = "Invalid login, please check client ID and Client Secret or URL endpoint"
|
48
|
+
when /^Forbidden$/
|
49
|
+
@message = "The user associated to OAuth credential set has been deactivated."
|
50
|
+
when /^Invalid login. User name and password do not match.$/
|
51
|
+
@message = "Invalid login, please check username and password or URL endpoint"
|
52
|
+
else
|
53
|
+
@message = message
|
54
|
+
end
|
55
|
+
end
|
43
56
|
end
|
44
57
|
|
45
58
|
class BadEntityError < Error
|
@@ -99,6 +112,7 @@ module ZuoraAPI
|
|
99
112
|
class ZuoraAPIRequestLimit < Error
|
100
113
|
attr_reader :code, :response
|
101
114
|
attr_writer :default_message
|
115
|
+
attr_accessor :logged
|
102
116
|
|
103
117
|
def initialize(message = nil,response=nil, errors = [], successes = [], *args)
|
104
118
|
@code = response.class.to_s == "HTTParty::Response" ? response.code : nil
|
@@ -177,14 +191,15 @@ module ZuoraAPI
|
|
177
191
|
end
|
178
192
|
|
179
193
|
class ZuoraAPITemporaryError < Error
|
180
|
-
attr_reader :code, :response
|
194
|
+
attr_reader :code, :response, :errors
|
181
195
|
attr_writer :default_message
|
182
196
|
|
183
|
-
def initialize(message = nil,response=nil, errors = [], successes = [], *args)
|
197
|
+
def initialize(message = nil, response = nil, errors = [], successes = [], *args)
|
184
198
|
@code = response.class.to_s == "HTTParty::Response" ? response.code : nil
|
185
199
|
@message = parse_message(message)
|
186
200
|
@response = response
|
187
201
|
@default_message = "There is a temporary error with zuora system."
|
202
|
+
@errors = errors
|
188
203
|
end
|
189
204
|
|
190
205
|
def to_s
|
@@ -224,7 +239,7 @@ module ZuoraAPI
|
|
224
239
|
end
|
225
240
|
end
|
226
241
|
|
227
|
-
class ZuoraAPIReadTimeout <
|
242
|
+
class ZuoraAPIReadTimeout < Timeout::Error
|
228
243
|
attr_reader :code, :response, :request
|
229
244
|
attr_writer :default_message
|
230
245
|
|