recurly 4.81.0 → 4.82.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 +4 -4
- data/.bumpversion.cfg +1 -1
- data/CHANGELOG.md +8 -0
- data/GETTING_STARTED.md +1 -1
- data/lib/recurly/errors/api_errors.rb +18 -48
- data/lib/recurly/errors.rb +15 -2
- data/lib/recurly/http/response.rb +3 -3
- data/lib/recurly/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f18ba4644a7a18b9af8bf1d8e2105b618e4b72c60ffece627e9ce0ac5c975df3
|
|
4
|
+
data.tar.gz: af4b805af51738af015cc8b3b75366b626e06c8cb4216b63e13c61b1c4da5d80
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4b775860b96876758f1f5d80bde246d290816a2ac5363543c33092de01dfc11feb9c8392bac719fd62a7e86950565f0f33bc4af931683f8dfad859607984e504
|
|
7
|
+
data.tar.gz: 283ad6f4743597ffd73bfec1bef644896c9d557fe255b0cf270ed1838a393ae5de245be001f8dc0d5b7d489675dab409966c7eff9383e2a3b16eedb9c2bad9d5
|
data/.bumpversion.cfg
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.82.0](https://github.com/recurly/recurly-client-ruby/tree/4.82.0) (2026-09-15)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.81.0...4.82.0)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
3
11
|
## [4.81.0](https://github.com/recurly/recurly-client-ruby/tree/4.81.0) (2026-09-09)
|
|
4
12
|
|
|
5
13
|
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.80.0...4.81.0)
|
data/GETTING_STARTED.md
CHANGED
|
@@ -5,7 +5,7 @@ This repository houses the official ruby client for Recurly's V3 API.
|
|
|
5
5
|
In your Gemfile, add `recurly` as a dependency.
|
|
6
6
|
|
|
7
7
|
```ruby
|
|
8
|
-
gem 'recurly', '~> 4.
|
|
8
|
+
gem 'recurly', '~> 4.82'
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
> *Note*: We try to follow [semantic versioning](https://semver.org/) and will only apply breaking changes to major versions.
|
|
@@ -4,87 +4,57 @@
|
|
|
4
4
|
# need and we will usher them to the appropriate places.
|
|
5
5
|
module Recurly
|
|
6
6
|
module Errors
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
class APIError
|
|
8
|
+
self.error_map = {
|
|
9
|
+
"500" => "InternalServerError",
|
|
10
|
+
"502" => "BadGatewayError",
|
|
11
|
+
"503" => "ServiceUnavailableError",
|
|
12
|
+
"504" => "TimeoutError",
|
|
13
|
+
"304" => "NotModifiedError",
|
|
14
|
+
"400" => "BadRequestError",
|
|
15
|
+
"401" => "UnauthorizedError",
|
|
16
|
+
"402" => "PaymentRequiredError",
|
|
17
|
+
"403" => "ForbiddenError",
|
|
18
|
+
"404" => "NotFoundError",
|
|
19
|
+
"406" => "NotAcceptableError",
|
|
20
|
+
"412" => "PreconditionFailedError",
|
|
21
|
+
"422" => "UnprocessableEntityError",
|
|
22
|
+
"429" => "TooManyRequestsError",
|
|
23
|
+
}.freeze
|
|
24
|
+
end
|
|
23
25
|
|
|
24
26
|
class ResponseError < Errors::APIError; end
|
|
25
|
-
|
|
26
27
|
class ServerError < ResponseError; end
|
|
27
|
-
|
|
28
28
|
class InternalServerError < ServerError; end
|
|
29
|
-
|
|
30
29
|
class ServiceNotAvailableError < InternalServerError; end
|
|
31
|
-
|
|
32
30
|
class TaxServiceError < InternalServerError; end
|
|
33
|
-
|
|
34
31
|
class BadGatewayError < ServerError; end
|
|
35
|
-
|
|
36
32
|
class ServiceUnavailableError < ServerError; end
|
|
37
|
-
|
|
38
33
|
class TimeoutError < ServerError; end
|
|
39
|
-
|
|
40
34
|
class RedirectionError < ResponseError; end
|
|
41
|
-
|
|
42
35
|
class NotModifiedError < ResponseError; end
|
|
43
|
-
|
|
44
36
|
class ClientError < Errors::APIError; end
|
|
45
|
-
|
|
46
37
|
class BadRequestError < ClientError; end
|
|
47
|
-
|
|
48
38
|
class InvalidContentTypeError < BadRequestError; end
|
|
49
|
-
|
|
50
39
|
class UnauthorizedError < ClientError; end
|
|
51
|
-
|
|
52
40
|
class PaymentRequiredError < ClientError; end
|
|
53
|
-
|
|
54
41
|
class ForbiddenError < ClientError; end
|
|
55
|
-
|
|
56
42
|
class InvalidApiKeyError < ForbiddenError; end
|
|
57
|
-
|
|
58
43
|
class InvalidPermissionsError < ForbiddenError; end
|
|
59
|
-
|
|
60
44
|
class NotFoundError < ClientError; end
|
|
61
|
-
|
|
62
45
|
class NotAcceptableError < ClientError; end
|
|
63
|
-
|
|
64
46
|
class UnknownApiVersionError < NotAcceptableError; end
|
|
65
|
-
|
|
66
47
|
class UnavailableInApiVersionError < NotAcceptableError; end
|
|
67
|
-
|
|
68
48
|
class InvalidApiVersionError < NotAcceptableError; end
|
|
69
|
-
|
|
70
49
|
class PreconditionFailedError < ClientError; end
|
|
71
|
-
|
|
72
50
|
class UnprocessableEntityError < ClientError; end
|
|
73
|
-
|
|
74
51
|
class ValidationError < UnprocessableEntityError; end
|
|
75
|
-
|
|
76
52
|
class MissingFeatureError < UnprocessableEntityError; end
|
|
77
|
-
|
|
78
53
|
class TransactionError < UnprocessableEntityError; end
|
|
79
|
-
|
|
80
54
|
class SimultaneousRequestError < UnprocessableEntityError; end
|
|
81
|
-
|
|
82
55
|
class ImmutableSubscriptionError < UnprocessableEntityError; end
|
|
83
|
-
|
|
84
56
|
class InvalidTokenError < UnprocessableEntityError; end
|
|
85
|
-
|
|
86
57
|
class TooManyRequestsError < ClientError; end
|
|
87
|
-
|
|
88
58
|
class RateLimitedError < TooManyRequestsError; end
|
|
89
59
|
end
|
|
90
60
|
end
|
data/lib/recurly/errors.rb
CHANGED
|
@@ -5,6 +5,19 @@ module Recurly
|
|
|
5
5
|
# @return [Recurly::Resources::Error] The {Recurly::Resources::Error} object
|
|
6
6
|
attr_reader :recurly_error
|
|
7
7
|
|
|
8
|
+
class << self
|
|
9
|
+
private
|
|
10
|
+
|
|
11
|
+
# @param map [Hash] Maps response status codes (String) to error class names (String).
|
|
12
|
+
attr_writer :error_map
|
|
13
|
+
|
|
14
|
+
# Maps a response status code (String) to an error class name (String).
|
|
15
|
+
# Set by the generated errors/api_errors.rb file via .error_map=.
|
|
16
|
+
def error_map
|
|
17
|
+
@error_map || raise("error_map must be set by the generated api_errors.rb file")
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
8
21
|
# Looks up an Error class by name
|
|
9
22
|
# @example
|
|
10
23
|
# Errors.error_class('BadRequestError')
|
|
@@ -23,8 +36,8 @@ module Recurly
|
|
|
23
36
|
# @param response [Net::Response]
|
|
24
37
|
# @return [Errors::APIError]
|
|
25
38
|
def self.from_response(response)
|
|
26
|
-
if
|
|
27
|
-
Recurly::Errors.const_get(
|
|
39
|
+
if error_map.has_key?(response.code)
|
|
40
|
+
Recurly::Errors.const_get(error_map[response.code])
|
|
28
41
|
else
|
|
29
42
|
Recurly::Errors::APIError
|
|
30
43
|
end
|
|
@@ -36,9 +36,9 @@ module Recurly
|
|
|
36
36
|
@headers[name.to_s.downcase]
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
-
# The status code as a String. +Errors::APIError.from_response+
|
|
40
|
-
#
|
|
41
|
-
#
|
|
39
|
+
# The status code as a String. +Errors::APIError.from_response+ looks up
|
|
40
|
+
# the string status, so the object handed to it must expose a string
|
|
41
|
+
# +#code+.
|
|
42
42
|
# @return [String]
|
|
43
43
|
def code
|
|
44
44
|
@status_code.to_s
|
data/lib/recurly/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: recurly
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.82.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Recurly
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|
|
@@ -409,7 +409,7 @@ metadata:
|
|
|
409
409
|
changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
|
|
410
410
|
documentation_uri: https://recurly.github.io/recurly-client-ruby/
|
|
411
411
|
homepage_uri: https://github.com/recurly/recurly-client-ruby
|
|
412
|
-
source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.
|
|
412
|
+
source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.82.0
|
|
413
413
|
post_install_message:
|
|
414
414
|
rdoc_options: []
|
|
415
415
|
require_paths:
|