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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fcb6e038e5c1315ddf4ea11a1de626cac3eff0f6116309902a13fe2dd4d7d8a
4
- data.tar.gz: 593fca5091812565ae93b3f592fc07b30014d97c45aab72af066887d1183c7ef
3
+ metadata.gz: f18ba4644a7a18b9af8bf1d8e2105b618e4b72c60ffece627e9ce0ac5c975df3
4
+ data.tar.gz: af4b805af51738af015cc8b3b75366b626e06c8cb4216b63e13c61b1c4da5d80
5
5
  SHA512:
6
- metadata.gz: 0710a16b6de8151e608d13c410fd0aa11dcce94e29f32a255133b5b8f07a6823810f1cba9c72cee2a6fe49638f8377ae665b3c4e2bc26697995eb04be5fea245
7
- data.tar.gz: 55750c7429a93977fecc70e63f440d2932e340eedc55738cde3ba231110208517cac63f38e6bc774ae1d2e57516cef64f4d2782723b2e5074988381893df6c99
6
+ metadata.gz: 4b775860b96876758f1f5d80bde246d290816a2ac5363543c33092de01dfc11feb9c8392bac719fd62a7e86950565f0f33bc4af931683f8dfad859607984e504
7
+ data.tar.gz: 283ad6f4743597ffd73bfec1bef644896c9d557fe255b0cf270ed1838a393ae5de245be001f8dc0d5b7d489675dab409966c7eff9383e2a3b16eedb9c2bad9d5
data/.bumpversion.cfg CHANGED
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 4.81.0
2
+ current_version = 4.82.0
3
3
  parse = (?P<major>\d+)
4
4
  \.(?P<minor>\d+)
5
5
  \.(?P<patch>\d+)
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.81'
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
- ERROR_MAP = {
8
- "500" => "InternalServerError",
9
- "502" => "BadGatewayError",
10
- "503" => "ServiceUnavailableError",
11
- "504" => "TimeoutError",
12
- "304" => "NotModifiedError",
13
- "400" => "BadRequestError",
14
- "401" => "UnauthorizedError",
15
- "402" => "PaymentRequiredError",
16
- "403" => "ForbiddenError",
17
- "404" => "NotFoundError",
18
- "406" => "NotAcceptableError",
19
- "412" => "PreconditionFailedError",
20
- "422" => "UnprocessableEntityError",
21
- "429" => "TooManyRequestsError",
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
@@ -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 Recurly::Errors::ERROR_MAP.has_key?(response.code)
27
- Recurly::Errors.const_get(Recurly::Errors::ERROR_MAP[response.code])
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+ keys
40
- # +ERROR_MAP+ on the string status, so the object handed to it must expose
41
- # a string +#code+.
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
@@ -1,3 +1,3 @@
1
1
  module Recurly
2
- VERSION = "4.81.0"
2
+ VERSION = "4.82.0"
3
3
  end
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.81.0
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-09 00:00:00.000000000 Z
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.81.0
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: