recurly 4.81.0 → 4.83.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: '09c8470217eb077c386fd7513a2d8ba3d6cafb98cad49b165b727cd2987e3071'
4
+ data.tar.gz: 166e4643fdf7c8914769bb50f2f53fc4062e922d2b658281b154aa875356926a
5
5
  SHA512:
6
- metadata.gz: 0710a16b6de8151e608d13c410fd0aa11dcce94e29f32a255133b5b8f07a6823810f1cba9c72cee2a6fe49638f8377ae665b3c4e2bc26697995eb04be5fea245
7
- data.tar.gz: 55750c7429a93977fecc70e63f440d2932e340eedc55738cde3ba231110208517cac63f38e6bc774ae1d2e57516cef64f4d2782723b2e5074988381893df6c99
6
+ metadata.gz: fa09b974d0e2b6fe5b59a4ebd2db4d890d3dc8f4cc79d2f50b04d64dee722be789bd3672e2169f9f9e5b0edd1755420e62d47505232ba0e7967ee5fc1b8407f6
7
+ data.tar.gz: 6a3a6c05c662445a9814b1c946b038cb8b7ac45c7cf30fe939423883bc0f507516f3bd9c058609badf5ce5cd15414aa0592fa3862fcc44f9f6e4732a85a882ac
data/.bumpversion.cfg CHANGED
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 4.81.0
2
+ current_version = 4.83.0
3
3
  parse = (?P<major>\d+)
4
4
  \.(?P<minor>\d+)
5
5
  \.(?P<patch>\d+)
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.83.0](https://github.com/recurly/recurly-client-ruby/tree/4.83.0) (2026-09-18)
4
+
5
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.82.0...4.83.0)
6
+
7
+
8
+ **Merged Pull Requests**
9
+
10
+ - Generated Latest Changes for v2021-02-25 [#971](https://github.com/recurly/recurly-client-ruby/pull/971) ([recurly-integrations](https://github.com/recurly-integrations))
11
+
12
+
13
+
14
+ ## [4.82.0](https://github.com/recurly/recurly-client-ruby/tree/4.82.0) (2026-09-15)
15
+
16
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.81.0...4.82.0)
17
+
18
+
19
+
20
+
21
+
3
22
  ## [4.81.0](https://github.com/recurly/recurly-client-ruby/tree/4.81.0) (2026-09-09)
4
23
 
5
24
  [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.83'
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.83.0"
3
3
  end
data/openapi/api.yaml CHANGED
@@ -9717,7 +9717,8 @@ paths:
9717
9717
  schema:
9718
9718
  "$ref": "#/components/schemas/Error"
9719
9719
  '422':
9720
- description: Invalid request parameters.
9720
+ description: Invalid request parameters. Check that redeem_by_interval_unit
9721
+ and redeem_by_interval_amount are consistent with the coupon type.
9721
9722
  content:
9722
9723
  application/json:
9723
9724
  schema:
@@ -10292,7 +10293,8 @@ paths:
10292
10293
  schema:
10293
10294
  "$ref": "#/components/schemas/Error"
10294
10295
  '422':
10295
- description: Invalid request parameters
10296
+ description: Invalid request parameters. Check that redeem_by_interval_unit
10297
+ and redeem_by_interval_amount are consistent with the coupon type.
10296
10298
  content:
10297
10299
  application/json:
10298
10300
  schema:
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.83.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-18 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.83.0
413
413
  post_install_message:
414
414
  rdoc_options: []
415
415
  require_paths: