didww-v3 6.2.1 → 7.0.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.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/tests.yml +8 -6
  3. data/.rubocop.yml +0 -110
  4. data/CHANGELOG.md +61 -0
  5. data/FILTERS.md +36 -12
  6. data/Gemfile +0 -2
  7. data/README.md +427 -56
  8. data/didww-v3.gemspec +11 -8
  9. data/docs/resource_relationships.md +35 -15
  10. data/examples/README.md +54 -61
  11. data/examples/capacity_pools.rb +28 -10
  12. data/examples/countries.rb +1 -1
  13. data/examples/did_groups.rb +1 -1
  14. data/examples/did_reservations.rb +35 -37
  15. data/examples/did_sms_routing.rb +91 -0
  16. data/examples/did_trunk_assignment.rb +106 -80
  17. data/examples/emergency_calling_services.rb +3 -3
  18. data/examples/emergency_requirements.rb +3 -3
  19. data/examples/emergency_scenario.rb +11 -11
  20. data/examples/emergency_verifications.rb +7 -5
  21. data/examples/exports.rb +1 -1
  22. data/examples/exports_sms.rb +72 -0
  23. data/examples/identity_address_proofs.rb +118 -0
  24. data/examples/includes.rb +65 -0
  25. data/examples/orders.rb +8 -6
  26. data/examples/orders_all_item_types.rb +63 -125
  27. data/examples/orders_emergency.rb +3 -3
  28. data/examples/{orders_by_sku.rb → orders_sku.rb} +12 -10
  29. data/examples/prices_download.rb +45 -0
  30. data/examples/prices_lookup.rb +43 -0
  31. data/examples/regions.rb +1 -1
  32. data/examples/sample.pdf +14 -0
  33. data/examples/sender_id_verifications.rb +63 -0
  34. data/examples/shared_capacity_groups.rb +44 -35
  35. data/examples/sms_trunk_groups.rb +71 -0
  36. data/examples/sms_trunks.rb +84 -0
  37. data/examples/test_readme.rb +1216 -0
  38. data/examples/trunks.rb +115 -0
  39. data/examples/upload_file.rb +44 -0
  40. data/examples/voice_in_trunk_groups.rb +57 -33
  41. data/examples/voice_in_trunk_sip_registration.rb +4 -1
  42. data/examples/voice_out_trunks.rb +11 -1
  43. data/examples/webhook.rb +51 -0
  44. data/lib/didww/auth/bearer_middleware.rb +74 -0
  45. data/lib/didww/auth/memory_store.rb +40 -0
  46. data/lib/didww/auth/token.rb +45 -0
  47. data/lib/didww/auth/token_provider.rb +215 -0
  48. data/lib/didww/base_middleware.rb +7 -8
  49. data/lib/didww/callback/request_validator.rb +2 -1
  50. data/lib/didww/client.rb +122 -13
  51. data/lib/didww/complex_objects/authentication_methods/generic.rb +6 -0
  52. data/lib/didww/complex_objects/configurations/base.rb +0 -18
  53. data/lib/didww/complex_objects/configurations/pstn_configuration.rb +0 -4
  54. data/lib/didww/complex_objects/configurations/sip_configuration.rb +86 -38
  55. data/lib/didww/complex_objects/emergency_order_item.rb +1 -1
  56. data/lib/didww/complex_objects/export_filters.rb +72 -6
  57. data/lib/didww/complex_objects/generic_order_item.rb +15 -0
  58. data/lib/didww/complex_objects/sms_trunk_configuration.rb +33 -0
  59. data/lib/didww/complex_objects/sms_trunk_configurations/base.rb +26 -0
  60. data/lib/didww/complex_objects/sms_trunk_configurations/generic.rb +32 -0
  61. data/lib/didww/complex_objects/sms_trunk_configurations/http_in.rb +75 -0
  62. data/lib/didww/complex_objects/sms_trunk_configurations/http_out.rb +35 -0
  63. data/lib/didww/complex_objects/sms_trunk_configurations/smpp_esme.rb +37 -0
  64. data/lib/didww/complex_objects/sms_trunk_configurations/smpp_smsc.rb +56 -0
  65. data/lib/didww/complex_objects/sms_trunk_configurations/sms_to_email.rb +27 -0
  66. data/lib/didww/errors.rb +103 -0
  67. data/lib/didww/http.rb +34 -0
  68. data/lib/didww/prices/lookup_result.rb +37 -0
  69. data/lib/didww/prices/price.rb +56 -0
  70. data/lib/didww/prices/price_file.rb +51 -0
  71. data/lib/didww/prices/service.rb +248 -0
  72. data/lib/didww/prices/sms_in_price.rb +43 -0
  73. data/lib/didww/prices/sms_out_price.rb +52 -0
  74. data/lib/didww/prices/voice_in_price.rb +48 -0
  75. data/lib/didww/prices/voice_out_price.rb +88 -0
  76. data/lib/didww/prices.rb +82 -0
  77. data/lib/didww/resource/address_requirement.rb +13 -3
  78. data/lib/didww/resource/base.rb +5 -2
  79. data/lib/didww/resource/concerns/number_types.rb +24 -0
  80. data/lib/didww/resource/did.rb +42 -3
  81. data/lib/didww/resource/did_group.rb +12 -1
  82. data/lib/didww/resource/emergency_calling_service.rb +10 -5
  83. data/lib/didww/resource/emergency_requirement.rb +27 -14
  84. data/lib/didww/resource/encrypted_file.rb +19 -6
  85. data/lib/didww/resource/export.rb +59 -12
  86. data/lib/didww/resource/identity.rb +9 -4
  87. data/lib/didww/resource/order.rb +1 -0
  88. data/lib/didww/resource/proof_type.rb +1 -1
  89. data/lib/didww/resource/sender_id_verification.rb +114 -0
  90. data/lib/didww/resource/sms_trunk.rb +76 -0
  91. data/lib/didww/resource/sms_trunk_group.rb +31 -0
  92. data/lib/didww/resource/sms_trunk_regenerate_credential.rb +16 -0
  93. data/lib/didww/resource/voice_in_trunk.rb +24 -1
  94. data/lib/didww/resource/voice_out_trunk.rb +72 -0
  95. data/lib/didww/types/ip_addresses.rb +1 -1
  96. data/lib/didww/types/strings.rb +1 -1
  97. data/lib/didww/types.rb +3 -1
  98. data/lib/didww/version.rb +1 -1
  99. data/lib/didww.rb +7 -0
  100. metadata +62 -24
  101. data/examples/identities_and_proofs.rb +0 -67
  102. data/examples/voice_in_trunks.rb +0 -108
  103. data/lib/didww/resource/did_group_type.rb +0 -10
  104. data/lib/didww/resource/exclusive_relationship.rb +0 -54
  105. data/lib/didww/resource/pop.rb +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1101871e7a9f40f264d7d9bfc1f3ab0f51c398fcdcc4a4154b9d8c9f061dfe5
4
- data.tar.gz: 4a35ff675a731bb3d886dcbab60d0f112cbad2b8d96f1593b54f1f76c9547581
3
+ metadata.gz: e9aebfd2039e2a6dbdf4fb8398b6b9b7edf698d98c784aaf146f06caca805265
4
+ data.tar.gz: e22a8455b91045ed22af6e6d81b94149380137d4a1b9017d377359e861220ece
5
5
  SHA512:
6
- metadata.gz: 49177d8bca07e63922c22b70501adbfd1000703532a55f4e3fae242dd9d61ddac874cfb0bf9182a36ab337b0dc68e08e017fa74553f8e220e2bc6f9a06e13068
7
- data.tar.gz: da7bda7235b89f0024510a9824ba38ffffeb2fd8ce9de85c33ce319b8d7c3cb1c44f3a5672597496ebcbcb2faf69a9467b228b921ef508537be16467f324a120
6
+ metadata.gz: 427ec159fbbe214f2ac0edae043ccecc37613fc670a92637839b54f2b195eb5e3364e69c7c64d85076f9cd6e660a634b38606319c99578153f6f54114f473f2a
7
+ data.tar.gz: a9696f30325fb0c7da626c0438cf250b2e351ce00da7a56878a39505046610a07b82e84cdb676f2d0e96d65198f5d1025f7853da1f0de48a47e2d21f4fe996b1
@@ -5,18 +5,15 @@ on:
5
5
  branches:
6
6
  - master
7
7
 
8
- permissions:
9
- contents: read
10
- pages: write
11
- id-token: write
12
-
13
8
  jobs:
14
9
  test:
15
10
  runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: read
16
13
  strategy:
17
14
  matrix:
18
15
  ruby: [ '3.3', '3.4', '4.0' ]
19
- rails: [ '~> 7.2', '~> 8.0', '~> 8.1' ]
16
+ rails: [ '~> 8.0', '~> 8.1' ]
20
17
  name: Tests with Ruby ${{ matrix.ruby }} Activesupport ${{ matrix.rails }}
21
18
  env:
22
19
  RAILS_VERSION: ${{ matrix.rails }}
@@ -58,6 +55,11 @@ jobs:
58
55
  needs: test
59
56
  if: github.ref == 'refs/heads/master' && github.event_name == 'push'
60
57
  runs-on: ubuntu-latest
58
+ permissions:
59
+ contents: read
60
+ actions: read
61
+ pages: write
62
+ id-token: write
61
63
  environment:
62
64
  name: github-pages
63
65
  url: ${{ steps.deployment.outputs.page_url }}
data/.rubocop.yml CHANGED
@@ -170,10 +170,6 @@ Lint/DeprecatedClassMethods:
170
170
  Lint/EachWithObjectArgument:
171
171
  Enabled: true
172
172
 
173
- # Check for odd code arrangement in an else block.
174
- Lint/ElseLayout:
175
- Enabled: false
176
-
177
173
  # Checks for empty ensure block.
178
174
  Lint/EmptyEnsure:
179
175
  Enabled: true
@@ -206,112 +202,6 @@ Lint/FormatParameterMismatch:
206
202
  Lint/SuppressedException:
207
203
  Enabled: true
208
204
 
209
- # Checks for adjacent string literals on the same line, which could better be
210
- # represented as a single string literal.
211
- Lint/ImplicitStringConcatenation:
212
- Enabled: false
213
-
214
- # Checks for attempts to use `private` or `protected` to set the visibility
215
- # of a class method, which does not work.
216
- Lint/IneffectiveAccessModifier:
217
- Enabled: false
218
-
219
- # Checks for literals used in interpolation.
220
- Lint/LiteralInInterpolation:
221
- Enabled: false
222
-
223
- # This cop checks for uses of *begin...end while/until something*.
224
- Lint/Loop:
225
- Enabled: false
226
-
227
- # Do not use nested method definitions.
228
- Lint/NestedMethodDefinition:
229
- Enabled: false
230
-
231
- # Do not omit the accumulator when calling `next` in a `reduce`/`inject` block.
232
- Lint/NextWithoutAccumulator:
233
- Enabled: false
234
-
235
- # Checks for method calls with a space before the opening parenthesis.
236
- Lint/ParenthesesAsGroupedExpression:
237
- Enabled: false
238
-
239
- # Checks for `rand(1)` calls. Such calls always return `0` and most likely
240
- # a mistake.
241
- Lint/RandOne:
242
- Enabled: false
243
-
244
- # Use parentheses in the method call to avoid confusion about precedence.
245
- Lint/RequireParentheses:
246
- Enabled: false
247
-
248
- # Avoid rescuing the Exception class.
249
- Lint/RescueException:
250
- Enabled: false
251
-
252
- # Checks for the order which exceptions are rescued to avoid rescueing a less specific exception before a more specific exception.
253
- Lint/ShadowedException:
254
- Enabled: false
255
-
256
- # This cop looks for use of the same name as outer local variables
257
- # for block arguments or block local variables.
258
- Lint/ShadowingOuterLocalVariable:
259
- Enabled: false
260
-
261
- # Checks for Object#to_s usage in string interpolation.
262
- Lint/RedundantStringCoercion:
263
- Enabled: false
264
-
265
- # Do not use prefix `_` for a variable that is used.
266
- Lint/UnderscorePrefixedVariableName:
267
- Enabled: false
268
-
269
- # This cop checks for using Fixnum or Bignum constant
270
- Lint/UnifiedInteger:
271
- Enabled: false
272
-
273
- # Checks for rubocop:disable comments that can be removed.
274
- # Note: this cop is not disabled when disabling all cops.
275
- # It must be explicitly disabled.
276
- Lint/RedundantCopDisableDirective:
277
- Enabled: false
278
-
279
- # This cop checks for unneeded usages of splat expansion
280
- Lint/RedundantSplatExpansion:
281
- Enabled: false
282
-
283
205
  # Unreachable code.
284
206
  Lint/UnreachableCode:
285
207
  Enabled: true
286
-
287
- # This cop checks for unused block arguments.
288
- Lint/UnusedBlockArgument:
289
- Enabled: false
290
-
291
- # This cop checks for unused method arguments.
292
- Lint/UnusedMethodArgument:
293
- Enabled: false
294
-
295
- # Checks for useless access modifiers.
296
- Lint/UselessAccessModifier:
297
- Enabled: false
298
-
299
- # Checks for useless assignment to a local variable.
300
- Lint/UselessAssignment:
301
- Enabled: false
302
-
303
- # Checks for comparison of something with itself.
304
- Lint/BinaryOperatorWithIdenticalOperands:
305
- Enabled: false
306
-
307
- # Checks for useless `else` in `begin..end` without `rescue`.
308
- Lint/UselessElseWithoutRescue:
309
- Enabled: false
310
-
311
- # Checks for useless setter call to a local variable.
312
- Lint/UselessSetterCall:
313
- Enabled: false
314
-
315
- # Possible use of operator/literal/variable in void context.
316
- Lint/Void:
317
- Enabled: false
data/CHANGELOG.md CHANGED
@@ -4,6 +4,67 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [7.0.0] - 2026-11-19
8
+ Support for DIDWW API version **2026-11-19**, which authenticates with short-lived bearer tokens. Users staying on API `2026-04-16` should use 6.x from the [`release-6`](https://github.com/didww/didww-v3-ruby/tree/release-6) branch.
9
+
10
+ ### Breaking Changes
11
+ - Every request is authenticated with `Authorization: Bearer <token>`. The SDK mints the token from `api_key` with `POST /token` on the token service (`https://auth.didww.com`, sandbox `https://auth-sandbox.didww.com`), caches it, and replaces it once when a request is answered 401. The `Api-Key` header is sent only to the token service. `api_key` and `api_mode` are configured as before.
12
+ - `X-DIDWW-API-Version` is no longer sent: the API version is requested in the token. The default API version is now `2026-11-19`.
13
+ - `DIDWW::Client.api_version=` and `with_api_version` raise `ArgumentError` for a value that is not a `YYYY-MM-DD` date, and for a version earlier than `DIDWW::Client::DEFAULT_API_VERSION`.
14
+ - `DIDWW::Client.with_api_version` applies to the calling thread only.
15
+ - Resource `DidGroupType` and `DIDWW::Client.did_group_types` removed. The `did_group_type` relationship is removed from `DidGroup`, `AddressRequirement`, `EmergencyRequirement` and `EmergencyCallingService`; use the new `number_type` attribute and filter.
16
+ - Resource `Pop` and `DIDWW::Client.pops` removed. `VoiceInTrunk#pop` is now a string attribute (`VoiceInTrunk::POP_*`, `VoiceInTrunk::POPS`) and can no longer be included.
17
+ - `Export#download` streams through Faraday into a binary `Tempfile`, rewound. HTTP errors raise `JsonApiClient::Errors` (`NotFound`, `NotAuthorized`, ...) instead of `Down` errors. Redirects are not followed: any status other than 200 raises, a 3xx or 204 as `UnexpectedStatus`. A `url` that is not on the scheme, host and port of the API base URL or of the canonical API URL of `api_mode` raises `ArgumentError` before any request, as the download sends the API bearer token.
18
+ - Runtime dependency `faraday` raised to `~> 2.5`, and `faraday-net_http >= 3.0` added.
19
+ - `EmergencyCallingService#renew_date` is the `"YYYY-MM-DD"` string the API sends, like the other date-only fields, instead of a `Time` at midnight in the local time zone.
20
+ - `SipConfiguration#codec_ids` is replaced by `codecs`, the codec names in priority order (`SipConfiguration::CODEC_*`, `SipConfiguration::CODECS`). The codec id hash `CODECS` and `DEFAULT_CODEC_IDS` of the trunk configurations are removed.
21
+
22
+ ### Added
23
+ - Configuration: `DIDWW::Client.scope` (`nil`, `:read`, `:full`), `token_store`, `logger` (default `Logger.new($stderr, level: :warn)`) and `customize_faraday`, which customizes the token service, prices, export download and file upload connections.
24
+ - Environment overrides `DIDWW_AUTH_URL`, `DIDWW_API_VIN_URL`, `DIDWW_API_VOUT_URL` and `DIDWW_API_SMS_URL`, next to the existing `DIDWW_API_URL`.
25
+ - `DIDWW::Auth::MemoryStore`, the default token cache. Any store responding to `read`, `write(key, value, expires_in:)` and `delete`, such as `Rails.cache`, can replace it to share tokens between processes.
26
+ - One token per audience (`api.didww.com`, `api-vin.didww.com`, `api-vout.didww.com`, `api-sms.didww.com`), minted on first use. Concurrent requests in one process share a single mint.
27
+ - Token service errors: `DIDWW::Auth::InvalidClient`, `InvalidRequest`, `RateLimited` (with the token service's `retry_after`, at least 1; further mints raise without a request until it passes, plus a random delay of up to a fifth of it (at least up to 1 s), with the seconds left in `retry_after`), `ServerError` and `ConnectionError` (after 4 attempts with jittered exponential backoff; a TLS failure is not retried), and `InvalidGrant`. All SDK errors inherit from `DIDWW::Error`.
28
+ - Every token is requested with `expires_in: 3600`, the longest lifetime the token service grants, so a process mints each token as rarely as possible; a token is cached for the lifetime granted.
29
+ - A granted scope or API version that differs from the requested one is logged as a warning. Each mint, including a failed one, publishes the `ActiveSupport::Notifications` event `mint_token.didww`; neither includes the token or the API key.
30
+ - Prices: `DIDWW::Client.voice_in_prices`, `voice_out_prices`, `sms_out_a2p_prices`, `sms_out_p2p_prices`, `sms_out_otp_prices` and `sms_in_prices`, each a `DIDWW::Prices::Service` with:
31
+ - `lookup(**filters)`, returning a `DIDWW::Prices::LookupResult` of `VoiceInPrice`, `VoiceOutPrice`, `SmsOutPrice` or `SmsInPrice`, with filters checked before the request;
32
+ - `head`, `download(to:)` and `fetch(path)` for the gzipped price files, which are written unchanged; a downloaded file is dated with its `Last-Modified`, and `fetch` sends the modification time of the file at the path as `If-Modified-Since`;
33
+ - `DIDWW::Prices.each_row(path)` to read a downloaded file;
34
+ - errors `DIDWW::Prices::BadRequest`, `NotAuthorized`, `AccessDenied`, `PricePlanNotAssigned`, `PriceNotFound`, `NotAcceptable`, `TooManyRequests`, `ServiceUnavailable`, `UnexpectedStatus` and `ConnectionError`.
35
+ - New resource `SmsTrunk` (`/v3/sms_trunks`) with configurations `sms_to_email`, `http_in`, `http_out`, `smpp_esme` and `smpp_smsc` under `DIDWW::ComplexObject::SmsTrunkConfiguration`, plus `Generic` for unknown types. Generated credentials are read-only and redacted in `#inspect`, as are `http_in` headers and every value of a `Generic` configuration. `#host` returns the submit URL of an `http_out` trunk.
36
+ - New resource `SmsTrunkGroup` (`/v3/sms_trunk_groups`) with `#sms_trunks_count`.
37
+ - New resource `SenderIdVerification` (`/v3/sender_id_verifications`): list, read, and update of `name` and `sms_trunk`, with `STATUSES` and `SENDER_TYPES`. `SmsTrunk#sender_id_verifications`.
38
+ - New resource `SmsTrunkRegenerateCredential` (`/v3/sms_trunk_regenerate_credentials`) and `SmsTrunk#regenerate_credentials`.
39
+ - `Did`: `sms_trunk` and `sms_trunk_group` relationships. They are mutually exclusive, like `voice_in_trunk` and `voice_in_trunk_group`.
40
+ - `number_type` attribute and `NUMBER_TYPE_*` / `NUMBER_TYPES` constants on `DidGroup`, `AddressRequirement`, `EmergencyRequirement` and `EmergencyCallingService`.
41
+ - `DidGroup#is_demo`.
42
+ - `Identity#company_website`.
43
+ - `Export` types `sms_in` and `sms_out` (`EXPORT_TYPE_SMS_IN`, `EXPORT_TYPE_SMS_OUT`). `ExportFilters` gains the keys of every export type, including `sms_trunk_id` and `sender_id_verification_id`, sent as `sms_trunk.id` and `sender_id_verification.id`, and `TRUNK_TYPES` and `SERVICE_TYPES`.
44
+ - `SipConfiguration#ice_mode`, `#rtcp_mux_mode` and `#rtcp_feedback_mode` (`ICE_MODES`, `RTCP_MUX_MODES`, `RTCP_FEEDBACK_MODES`).
45
+ - `VoiceOutTrunk#codecs` (`VoiceOutTrunk::CODEC_*`, `VoiceOutTrunk::CODECS`), `#ice_mode`, `#rtcp_mux_mode` and `#rtcp_feedback_mode`.
46
+ - `DIDWW::TooManyRequests`, raised by resource calls and `Export#download` for a 429: a `JsonApiClient::Errors::TooManyRequests` whose `retry_after` is the `Retry-After` delay in seconds (`nil` when it is missing or an HTTP date). `EncryptedFile::UploadError` carries the `status` of the response and, on a 429, `retry_after`. Nothing is retried automatically.
47
+ - `DIDWW::ComplexObject::GenericOrderItem`, the order item of any other charge (`generic_order_items`). It is returned only.
48
+ - Runtime dependency `csv`, which is no longer a default gem from Ruby 3.4.
49
+
50
+ ### Changed
51
+ - `EncryptedFile.upload` posts through the SDK's Faraday connection, so it gets the bearer token, the User-Agent and `customize_faraday`. Its path is relative to the API base URL, so a `DIDWW_API_URL` override must end with `/`.
52
+ - `#inspect` of an authentication method of a type this gem does not know (`AuthenticationMethod::Generic`) redacts every value, as for SMS trunk configurations.
53
+ - `ExportFilters` reads the dotted keys of a server response back into `voice_out_trunk_id`, `sms_trunk_id` and `sender_id_verification_id`. `year`, `month` and `day`, returned for exports created at earlier API versions, are read-only.
54
+ - `VoiceInTrunk::POP_*`, `ExportFilters::TRUNK_TYPE_*` and the values of `ProofType#entity_type` and of the export filters `service_type`, `trunk_type` and `status` are lowercase, as the API sends them.
55
+ - A price file downloaded to a path is written to a temp file `.didww-<16 hex digits>.tmp` in its directory and synced to disk before it replaces the path, so a long file name no longer fails.
56
+ - The examples follow the example set shared by the DIDWW SDKs, 41 scripts listed in `examples/README.md`: `orders_by_sku.rb` is renamed `orders_sku.rb`, `identities_and_proofs.rb` becomes `identity_address_proofs.rb` with the full proof flow, `voice_in_trunks.rb` is folded into `trunks.rb`, and `upload_file.rb`, `includes.rb`, `webhook.rb` and `test_readme.rb` are added. `test_readme.rb` runs the README snippets against the sandbox; the snippets that could not run as written are corrected.
57
+ - CI now exercises Ruby 3.3 / 3.4 / 4.0 against activesupport 8.0 / 8.1. Rails 7.2 reached end of life on 2026-08-09 and was dropped from the matrix; the `activesupport >= 7.2` runtime floor is unchanged.
58
+
59
+ ### Removed
60
+ - Resources `DidGroupType` and `Pop`, and the `DIDWW::Client.did_group_types` and `DIDWW::Client.pops` accessors.
61
+ - Runtime dependencies `down` and `http`.
62
+
63
+ ### Fixed
64
+ - After a `Did` is saved, the in-memory DID keeps the `voice_in_trunk` (or `voice_in_trunk_group`) just assigned. Applying the server response used to clear it, because the response also carries the other relationship of the pair, as null.
65
+ - `DIDWW::Callback::RequestValidator` works when only `didww/callback/request_validator` is required, as the README shows; `validate` raised `NoMethodError` (`blank?`) or `NameError` (`URI`) without the rest of the gem.
66
+ - An order item of another charge, such as a Sender ID verification, is read as `GenericOrderItem`. It stayed a plain Hash, so `order.items.map(&:type)` raised `NoMethodError`.
67
+
7
68
  ## [6.2.1] - 2026-10-07
8
69
  ### Changed
9
70
  - `DIDWW::Callback::RequestValidator` is keyed with the callback secret enabled in the DIDWW User Panel (**APIs → DIDWW API 3 → Callback Secrets**); its constructor argument is renamed to `callback_secret`. The argument is positional, so existing code keeps working, and the signature algorithm is unchanged.
data/FILTERS.md CHANGED
@@ -1,17 +1,17 @@
1
- # DIDWW 2026-04-16 — Server-side filter reference
1
+ # DIDWW 2026-11-19 — Server-side filter reference
2
2
 
3
- This is the canonical list of `filter[KEY]` query parameters accepted by each list endpoint of the DIDWW API at version `2026-04-16` — the default API version targeted by this SDK.
3
+ This is the canonical list of `filter[KEY]` query parameters accepted by each list endpoint of the DIDWW API at version `2026-11-19` — the default API version targeted by this SDK.
4
4
 
5
5
  The SDK passes filters through as untyped string→string maps (e.g. `DIDWW::Client.regions.where(iso: "US")`), so this document is the authoritative source for which keys actually do something on the server.
6
6
 
7
- Every key listed here was verified live against the DIDWW API at version `2026-04-16`.
7
+ Keys that already existed at version `2026-04-16` were verified live against the DIDWW API at that version. Keys added at version `2026-11-19` are taken from its published OpenAPI document.
8
8
 
9
9
  Pass values URL-encoded as strings. Where the server accepts arrays, comma-separate the values.
10
10
 
11
11
  ## AddressRequirement — `GET /v3/address_requirements`
12
12
 
13
13
  - `filter[country.id]`
14
- - `filter[did_group_type.id]`
14
+ - `filter[number_type]`
15
15
 
16
16
  ## Address — `GET /v3/addresses`
17
17
 
@@ -51,7 +51,7 @@ Pass values URL-encoded as strings. Where the server accepts arrays, comma-separ
51
51
  - `filter[did_group.features]`
52
52
  - `filter[did_group.id]`
53
53
  - `filter[did_group.needs_registration]`
54
- - `filter[did_group_type.id]`
54
+ - `filter[did_group.number_type]`
55
55
  - `filter[nanpa_prefix.id]`
56
56
  - `filter[number_contains]`
57
57
  - `filter[region.id]`
@@ -84,21 +84,18 @@ Pass values URL-encoded as strings. Where the server accepts arrays, comma-separ
84
84
  - `filter[available_dids_enabled]`
85
85
  - `filter[city.id]`
86
86
  - `filter[country.id]`
87
- - `filter[did_group_type.id]`
88
87
  - `filter[features]`
89
88
  - `filter[is_available]`
89
+ - `filter[is_demo]`
90
90
  - `filter[is_metered]`
91
91
  - `filter[meta.total_count_gteq]`
92
92
  - `filter[nanpa_prefix.id]`
93
93
  - `filter[nanpa_prefix.npanxx]`
94
94
  - `filter[needs_registration]`
95
+ - `filter[number_type]`
95
96
  - `filter[prefix]`
96
97
  - `filter[region.id]`
97
98
 
98
- ## DidGroupType — `GET /v3/did_group_types`
99
-
100
- - `filter[name]`
101
-
102
99
  ## DidHistory — `GET /v3/did_history`
103
100
 
104
101
  - `filter[action]`
@@ -130,6 +127,8 @@ Pass values URL-encoded as strings. Where the server accepts arrays, comma-separ
130
127
  - `filter[order.reference]`
131
128
  - `filter[region.id]`
132
129
  - `filter[shared_capacity_group.id]`
130
+ - `filter[sms_trunk.id]`
131
+ - `filter[sms_trunk_group.id]`
133
132
  - `filter[terminated]`
134
133
  - `filter[voice_in_trunk.id]`
135
134
  - `filter[voice_in_trunk_group.id]`
@@ -139,16 +138,16 @@ Pass values URL-encoded as strings. Where the server accepts arrays, comma-separ
139
138
 
140
139
  - `filter[address.id]`
141
140
  - `filter[country.id]`
142
- - `filter[did_group_type.id]`
143
141
  - `filter[identity.id]`
144
142
  - `filter[name]`
143
+ - `filter[number_type]`
145
144
  - `filter[reference]`
146
145
  - `filter[status]`
147
146
 
148
147
  ## EmergencyRequirement — `GET /v3/emergency_requirements`
149
148
 
150
149
  - `filter[country.id]`
151
- - `filter[did_group_type.id]`
150
+ - `filter[number_type]`
152
151
 
153
152
  ## EmergencyVerification — `GET /v3/emergency_verifications`
154
153
 
@@ -158,7 +157,11 @@ Pass values URL-encoded as strings. Where the server accepts arrays, comma-separ
158
157
 
159
158
  ## Export — `GET /v3/exports`
160
159
 
160
+ - `filter[created_at_gteq]`
161
+ - `filter[created_at_lteq]`
162
+ - `filter[export_type]`
161
163
  - `filter[external_reference_id]`
164
+ - `filter[status]`
162
165
 
163
166
  ## Identity — `GET /v3/identities`
164
167
 
@@ -167,6 +170,8 @@ Pass values URL-encoded as strings. Where the server accepts arrays, comma-separ
167
170
  - `filter[company_name_contains]`
168
171
  - `filter[company_reg_number]`
169
172
  - `filter[company_reg_number_contains]`
173
+ - `filter[company_website]`
174
+ - `filter[company_website_contains]`
170
175
  - `filter[country.id]`
171
176
  - `filter[description]`
172
177
  - `filter[description_contains]`
@@ -221,12 +226,31 @@ Pass values URL-encoded as strings. Where the server accepts arrays, comma-separ
221
226
  - `filter[iso]`
222
227
  - `filter[name]`
223
228
 
229
+ ## SenderIdVerification — `GET /v3/sender_id_verifications`
230
+
231
+ - `filter[name]` — contains
232
+ - `filter[reference]`
233
+ - `filter[sender_type]` — one of `SenderIdVerification::SENDER_TYPES`
234
+ - `filter[sms_trunk.id]` — comma-separate several
235
+ - `filter[status]` — one of `SenderIdVerification::STATUSES`
236
+
224
237
  ## SharedCapacityGroup — `GET /v3/shared_capacity_groups`
225
238
 
226
239
  - `filter[capacity_pool.id]`
227
240
  - `filter[external_reference_id]`
228
241
  - `filter[name]`
229
242
 
243
+ ## SmsTrunkGroup — `GET /v3/sms_trunk_groups`
244
+
245
+ - `filter[external_reference_id]`
246
+ - `filter[name]`
247
+
248
+ ## SmsTrunk — `GET /v3/sms_trunks`
249
+
250
+ - `filter[configuration.type]` — `sms_to_email`, `http_in`, `http_out`, `smpp_esme` or `smpp_smsc`; comma-separate several
251
+ - `filter[external_reference_id]`
252
+ - `filter[name]`
253
+
230
254
  ## SupportingDocumentTemplate — `GET /v3/supporting_document_templates`
231
255
 
232
256
  - `filter[name]`
data/Gemfile CHANGED
@@ -13,8 +13,6 @@ end
13
13
  gem 'rake', '~> 13.0'
14
14
  gem 'rspec', '~> 3.0'
15
15
  gem 'pry'
16
- gem 'debug'
17
- gem 'awesome_print'
18
16
  gem 'http_logger'
19
17
  gem 'rubocop', '~> 1.50'
20
18
  gem 'rubocop-performance'