castle-rb 9.2.0 → 9.3.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/CHANGELOG.md +5 -1
- data/README.md +1 -0
- data/lib/castle/api.rb +1 -2
- data/lib/castle/core/process_response.rb +1 -0
- data/lib/castle/errors.rb +3 -0
- data/lib/castle/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45354835d85251395bc9830ccdcccbe04db16d6e19134babbd36ff110e587758
|
|
4
|
+
data.tar.gz: 9560b565f2042f57f6a5cb85e54860b2ef5f950c9b1d63c4371420d41dc7ff7a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4471bf9db7d73a0434db57dc27a0f5d265f5d9ff62f0046bf9755636bd57b6ab0676169c579cd67bb5ba29a8719a9ddc93ccd0169ffdaa5e65e44a3dfb6083d3
|
|
7
|
+
data.tar.gz: 7725515e779e546a4ce763aad5a4bd8001aa0cf755a07963bb44643726c115d271a1210529d48d90f5feef50a6f63b8194f9bf6349e5338dccc11a93693fddc3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.3.0
|
|
4
|
+
|
|
5
|
+
- Add `Castle::PaymentRequiredError` for HTTP 402 responses.
|
|
6
|
+
|
|
3
7
|
## 9.2.0
|
|
4
8
|
|
|
5
9
|
**Changes:**
|
|
@@ -25,7 +29,7 @@
|
|
|
25
29
|
- Bump Bundler 2.6.9 → 2.7.2
|
|
26
30
|
- Bump json 2.19.5 → 2.19.7
|
|
27
31
|
|
|
28
|
-
##
|
|
32
|
+
## Unreleased
|
|
29
33
|
|
|
30
34
|
- Bump dependencies (rack 3.1.19 → 3.2.6, rake, rspec-\*, timecop, simplecov-html, diff-lcs)
|
|
31
35
|
- Bump Ruby to 3.4.9 (zlib CVE-2026-27820)
|
data/README.md
CHANGED
|
@@ -293,6 +293,7 @@ All exceptions inherit from `Castle::Error`. The most useful ones:
|
|
|
293
293
|
| `Castle::InvalidRequestTokenError` | The `request_token` is missing or invalid. |
|
|
294
294
|
| `Castle::InvalidParametersError` | 422 response with validation details. |
|
|
295
295
|
| `Castle::RateLimitError` | 429 response — back off and retry. |
|
|
296
|
+
| `Castle::PaymentRequiredError` | 402 response. |
|
|
296
297
|
| `Castle::UnauthorizedError` | 401 — bad API secret. |
|
|
297
298
|
| `Castle::InternalServerError` | 5xx response from Castle. |
|
|
298
299
|
| `Castle::WebhookVerificationError` | Webhook signature did not match. |
|
data/lib/castle/api.rb
CHANGED
|
@@ -43,9 +43,8 @@ module Castle
|
|
|
43
43
|
# @note We need to initialize the error, as the original error is a cause for this
|
|
44
44
|
# custom exception. If we would do it the default Ruby way, the original error
|
|
45
45
|
# would get converted into a string
|
|
46
|
-
# rubocop:disable Style/RaiseArgs
|
|
46
|
+
# rubocop:disable-next Style/RaiseArgs
|
|
47
47
|
raise Castle::RequestError.new(e)
|
|
48
|
-
# rubocop:enable Style/RaiseArgs
|
|
49
48
|
end
|
|
50
49
|
end
|
|
51
50
|
end
|
data/lib/castle/errors.rb
CHANGED
data/lib/castle/version.rb
CHANGED