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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff05150108e2fbba1a069083c46b53d4b43d95d95d4cfb4bcd82d10881e80091
4
- data.tar.gz: b8543c688b33ee85357716df5e1f93b7cafef3702074914355aa30960b8726dd
3
+ metadata.gz: 1377cfe445b9ff82e0504e86ef89413c815b4250152769ec11bf6b7b8804cdd9
4
+ data.tar.gz: 9882ca98957ecf177985037124f9e77722fe9c1eeea430f8c5f632fc4327162c
5
5
  SHA512:
6
- metadata.gz: 9b2a8309a4a1c88a13be63df6eb96c08d27e25076b379c740b7eddd1898a60f46249388e7279d98e67fd72469e49f1a6abdc5c7f3a62aa32905909c100de46ad
7
- data.tar.gz: 0a706abfa46ed54f332f903a2af7c118dfda2aaa6f61a280b9c2f989fb19790484aefcabed72bbcdc9b5ab37a2befb46913d2771ab6a924095c34ec80a8a595c
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.
@@ -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 < Net::ReadTimeout
242
+ class ZuoraAPIReadTimeout < Timeout::Error
228
243
  attr_reader :code, :response, :request
229
244
  attr_writer :default_message
230
245