didww-otp_verification 1.2.0 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ff9c9fc68b3da5a2d330d5ddc3ef599f65feb79674fe93d302c393dabe6d5b3
4
- data.tar.gz: 639dc28bfb09c2af89e98ec9845c0a5fb422d09b21e9e717b30cd6f28039b387
3
+ metadata.gz: 2d642797b509a6a3a07315a163ac283086e3877a7d6304f88fb968995ad16f09
4
+ data.tar.gz: 6656b36bd906929a5397887573d1d1b40ed29fb3cecbe8add71ec5cc2355934d
5
5
  SHA512:
6
- metadata.gz: 7de05b4e0d44499d58f885db44190a09c199a014091efbce7060c2127fccd23c3ef2981832a298ed5ab52720a5de135e6f32b7eb4ffd1f859da77854c0bddb99
7
- data.tar.gz: dca7699a26fc3dee4e717470be7d778cd0591acffb282ec70be84e8b880c963023cec1a8ae54f80f199238bac3913f97eb7a6d5223dfe15b79115ed08bb7f337
6
+ metadata.gz: c994241bc5f386def42788c2bc6d7b6fbad3050784de09a396252046343df7fa16cd8c6066df35a2168cbb101fffec56f2dded64d2a5d7ff82204e5c40e1683a
7
+ data.tar.gz: 8e3313f28b2c2327b5e73d31ba4b24d574981f89a4878089e584924dbc395035e1b86ea24c0a3d7622b68733e2bf1da8f26db6ea50e6c86828bf1f659a46cea0
data/CHANGELOG.md CHANGED
@@ -6,6 +6,18 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Version
6
6
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html): from 1.0.0 onwards a breaking change
7
7
  to the public surface requires a major version.
8
8
 
9
+ ## [1.3.0] — 2026-11
10
+
11
+ ### Added
12
+
13
+ - **`destination_prefix_rate_limited` error code**, raised as `RateLimitedError`
14
+ (429) from `start_verification` when there are too many verifications to a
15
+ number range. `#retry_after` carries the `Retry-After` wait in seconds; do not
16
+ retry it automatically.
17
+ - **`channel_blocked` error code.** A start can be refused with a 422 carrying it
18
+ when the account can't use the requested delivery method. Contact DIDWW
19
+ support.
20
+
9
21
  ## [1.2.0] — 2026-10
10
22
 
11
23
  ### Added
data/README.md CHANGED
@@ -449,7 +449,7 @@ Non-2xx responses raise a typed error under `DIDWW::OTPVerification::Error`:
449
449
  | `BalanceInsufficientError` | 402 | `balance_insufficient` |
450
450
  | `NotFoundError` | 404 | `not_found` |
451
451
  | `ValidationError` | 400 / 422 | `parameter_missing` / per-field codes |
452
- | `RateLimitedError` | 429 | `destination_in_cooldown`, `rate_limit_*`, `volume_limit_reached` |
452
+ | `RateLimitedError` | 429 | `destination_in_cooldown`, `rate_limit_*`, `volume_limit_reached`, `destination_prefix_rate_limited` |
453
453
  | `ServerError` | 5xx | `internal_error` |
454
454
 
455
455
  Every error carries the API's coded envelope: `#errors` is an array of
@@ -473,6 +473,9 @@ rescue DIDWW::OTPVerification::ValidationError => e
473
473
  end
474
474
  ```
475
475
 
476
+ `channel_blocked` (422): the account can't use the requested delivery method.
477
+ No verification is created; contact DIDWW support.
478
+
476
479
  ## Retries
477
480
 
478
481
  The SDK does **not** auto-retry. If you add `faraday-retry`, exclude `POST`
@@ -490,6 +493,9 @@ A 429 raises `RateLimitedError`, and its code says which limit was hit:
490
493
  - `volume_limit_reached`: the application reached its daily or monthly
491
494
  verification limit. `Retry-After` can be long (days) — surface it to the
492
495
  user instead of retrying. Contact support to raise the limit.
496
+ - `destination_prefix_rate_limited`: too many verifications to this number range;
497
+ try again later. Wait `Retry-After` before starting another one, and show the
498
+ user "Too many verification requests right now. Please try again later."
493
499
 
494
500
  `#retry_after` gives the wait in seconds (`nil` if the `Retry-After` header is
495
501
  missing or unparseable) — wait that long before trying again yourself; never
@@ -50,8 +50,9 @@ module DIDWW
50
50
 
51
51
  # 429 Too Many Requests. +code+ says which limit was hit:
52
52
  # +destination_in_cooldown+ (this destination was requested too recently),
53
- # a +rate_limit_*+ request limit, or +volume_limit_reached+ (a daily or
54
- # monthly limit; +retry_after+ can be days).
53
+ # a +rate_limit_*+ request limit, +volume_limit_reached+ (a daily or
54
+ # monthly limit; +retry_after+ can be days), or +destination_prefix_rate_limited+
55
+ # (too many verifications to this number range; wait +retry_after+).
55
56
  # Never auto-retry this.
56
57
  class RateLimitedError < APIError
57
58
  # @return [Integer, nil] seconds to wait, from the Retry-After header.
@@ -1,5 +1,5 @@
1
1
  module DIDWW
2
2
  module OTPVerification
3
- VERSION = "1.2.0"
3
+ VERSION = "1.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: didww-otp_verification
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DIDWW