vpndetection 5.22.1 → 5.23.1

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 (77) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/lib/vpndetection/api/account_wire_api.rb +1 -1
  4. data/lib/vpndetection/api/api_keys_wire_api.rb +1 -1
  5. data/lib/vpndetection/api/authorization_wire_api.rb +1 -1
  6. data/lib/vpndetection/api/database_wire_api.rb +1 -1
  7. data/lib/vpndetection/api/entitlement_wire_api.rb +1 -1
  8. data/lib/vpndetection/api/lookup_wire_api.rb +1 -1
  9. data/lib/vpndetection/api/organization_wire_api.rb +1 -1
  10. data/lib/vpndetection/api_client.rb +1 -1
  11. data/lib/vpndetection/api_error.rb +1 -1
  12. data/lib/vpndetection/api_model_base.rb +1 -1
  13. data/lib/vpndetection/cache.rb +4 -3
  14. data/lib/vpndetection/client.rb +5 -6
  15. data/lib/vpndetection/configuration.rb +1 -1
  16. data/lib/vpndetection/middleware/condition.rb +29 -12
  17. data/lib/vpndetection/models/abuse_contact.rb +1 -1
  18. data/lib/vpndetection/models/account_create_apikey_request.rb +1 -1
  19. data/lib/vpndetection/models/account_created_apikey.rb +1 -1
  20. data/lib/vpndetection/models/account_org.rb +1 -1
  21. data/lib/vpndetection/models/account_org_ref.rb +1 -1
  22. data/lib/vpndetection/models/account_org_wrap.rb +1 -1
  23. data/lib/vpndetection/models/account_rc.rb +1 -1
  24. data/lib/vpndetection/models/account_revealed_apikey.rb +1 -1
  25. data/lib/vpndetection/models/account_user.rb +1 -1
  26. data/lib/vpndetection/models/apikey_detail.rb +1 -1
  27. data/lib/vpndetection/models/apikey_list.rb +1 -1
  28. data/lib/vpndetection/models/asn.rb +2 -19
  29. data/lib/vpndetection/models/batch_lookup_error.rb +1 -1
  30. data/lib/vpndetection/models/batch_lookup_request.rb +1 -1
  31. data/lib/vpndetection/models/batch_lookup_response.rb +1 -1
  32. data/lib/vpndetection/models/bit_torrent_detail.rb +1 -1
  33. data/lib/vpndetection/models/bot_detail.rb +1 -1
  34. data/lib/vpndetection/models/carrier_detail.rb +1 -1
  35. data/lib/vpndetection/models/class_detail.rb +1 -1
  36. data/lib/vpndetection/models/client_registration.rb +1 -1
  37. data/lib/vpndetection/models/client_registration_request.rb +1 -1
  38. data/lib/vpndetection/models/company.rb +1 -1
  39. data/lib/vpndetection/models/database.rb +1 -1
  40. data/lib/vpndetection/models/database_checksums_response.rb +1 -1
  41. data/lib/vpndetection/models/database_format.rb +1 -1
  42. data/lib/vpndetection/models/database_format_size.rb +1 -1
  43. data/lib/vpndetection/models/database_list.rb +1 -1
  44. data/lib/vpndetection/models/database_metadata.rb +1 -1
  45. data/lib/vpndetection/models/database_metadata_column.rb +1 -1
  46. data/lib/vpndetection/models/database_version.rb +1 -1
  47. data/lib/vpndetection/models/db_checksums.rb +1 -1
  48. data/lib/vpndetection/models/device_authorization.rb +1 -1
  49. data/lib/vpndetection/models/dns_resolver_detail.rb +1 -1
  50. data/lib/vpndetection/models/download.rb +1 -1
  51. data/lib/vpndetection/models/download_list.rb +1 -1
  52. data/lib/vpndetection/models/entitlement.rb +1 -1
  53. data/lib/vpndetection/models/entitlement_apikey.rb +1 -1
  54. data/lib/vpndetection/models/entitlement_error.rb +1 -1
  55. data/lib/vpndetection/models/entitlement_plan.rb +2 -2
  56. data/lib/vpndetection/models/entitlement_usage.rb +1 -1
  57. data/lib/vpndetection/models/error_envelope.rb +1 -1
  58. data/lib/vpndetection/models/identity.rb +1 -1
  59. data/lib/vpndetection/models/location.rb +1 -1
  60. data/lib/vpndetection/models/lookup_error.rb +1 -1
  61. data/lib/vpndetection/models/lookup_response.rb +2 -2
  62. data/lib/vpndetection/models/oauth_error.rb +1 -1
  63. data/lib/vpndetection/models/oauth_metadata.rb +1 -1
  64. data/lib/vpndetection/models/proxy_detail.rb +1 -1
  65. data/lib/vpndetection/models/pubproxy_detail.rb +1 -1
  66. data/lib/vpndetection/models/satellite_detail.rb +1 -1
  67. data/lib/vpndetection/models/smtp_detail.rb +1 -1
  68. data/lib/vpndetection/models/ssh_detail.rb +1 -1
  69. data/lib/vpndetection/models/standing.rb +1 -1
  70. data/lib/vpndetection/models/token_response.rb +1 -1
  71. data/lib/vpndetection/models/user_agent_verdict.rb +1 -1
  72. data/lib/vpndetection/models/vpn_detail.rb +1 -1
  73. data/lib/vpndetection/models/web_detail.rb +1 -1
  74. data/lib/vpndetection/result.rb +5 -5
  75. data/lib/vpndetection/transport.rb +19 -7
  76. data/lib/vpndetection/version.rb +1 -1
  77. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93b336a33a0b11e6b05b319a3a0acfa80a4db7e99fb26bc7c8b761ab0d854585
4
- data.tar.gz: f563eaba0e2128d8a58a132bbb87f40de81d9ae15ee05cc69d39ed708ccd02fc
3
+ metadata.gz: 6d54e00ca9224596c6b831d14c6cab7668dc5180227e6838dfdcde339b255937
4
+ data.tar.gz: ff9fd907fa47afd2d6b507e1daf26019bd18a037f37ef7022fd4db8437b6b5d1
5
5
  SHA512:
6
- metadata.gz: 727dd2f5e5c98b15752658ccf6d6cbd4062dade648d8031ebd333cf49adb21a7ca6a201bbcc98b2bc8f31c256addf6bec18d2b4f10c622e18578fb3f625d0461
7
- data.tar.gz: acf92ab25d763f6abe8f993a118a97d503a2ea60cae040902efcd2c35267e2a736a331abb8c4897d1d37e097b6fc7a607143651558f8d5fdb1c77a5349d79630
6
+ metadata.gz: d9c0e24deee843ac364de1cff2b66c4d230ff2d960d637a9cf2c36b81ac580209ee1dec63f13e452e9212d17486e4373bfb72ab2e9425e5596ef8fcf17abe1e8
7
+ data.tar.gz: 5baecf879ad3b0906d2c3501016a2ba5a9fe18afbd418924111e385dd6c3ee3b0270d182aabfacb642dfe2c87a5a33cbb5a490981d41f6f7633557871b34e287
data/README.md CHANGED
@@ -23,7 +23,7 @@ Requires Ruby 3.3 or newer, and libcurl at runtime, which the `curl` package bri
23
23
 
24
24
  ## Usage
25
25
 
26
- **No API key needed to start.** Unlimited, the free plan, answers `ip`, `is_vpn`, Tor and relay detection, `is_anycast`, `is_bot` (whether an automated client, such as a search engine's crawler, uses the address), `hostname` (the reverse DNS name), country-level `location` and `asn` with the AS's country and RPKI status, with no daily or monthly cap, with a key or without one.
26
+ **No API key needed to start.** Unlimited, the free plan, answers `ip`, `is_vpn`, Tor and relay detection, `is_anycast`, `hostname` (the reverse DNS name), country-level `location` and `asn` with the AS's country and RPKI status, with no daily or monthly cap, with a key or without one.
27
27
 
28
28
  ```ruby
29
29
  require 'vpndetection'
@@ -38,7 +38,7 @@ result.asn['name'] # who runs the announcing network
38
38
 
39
39
  ### With an API key
40
40
 
41
- A paid plan answers every field: `is_hosting`, `is_cdn` and the four proxy flags as well, the carrier and satellite flags, the five service flags (SSH, SMTP, web, DNS resolver and BitTorrent), city-level `location`, the `company` and the `abuse` contact, `bot` (whose bot uses the address, what it does and whether its operator vouches for the address), and the provider (its ID and its name), confidence and last-seen detail behind each flag. Its quotas differ only in how many lookups they include, and a free account tries every field. Create a key in the [console](https://app.vpndetection.io), then pass it in:
41
+ A paid plan answers every field: `is_hosting`, `is_cdn`, `is_bot` (whether an automated client, such as a search engine's crawler, uses the address) and the four proxy flags as well, the AS's `type`, the carrier and satellite flags, the five service flags (SSH, SMTP, web, DNS resolver and BitTorrent), city-level `location`, the `company` and the `abuse` contact, `bot` (whose bot uses the address, what it does and whether its operator vouches for the address), and the provider (its ID and its name), confidence and last-seen detail behind each flag. Its quotas differ only in how many lookups they include, and a free account tries every field. Create a key in the [console](https://app.vpndetection.io), then pass it in:
42
42
 
43
43
  ```ruby
44
44
  client = VPNDetection::Client.new(api_key: ENV['VPNDETECTION_API_KEY'])
@@ -130,7 +130,7 @@ client = VPNDetection::Client.new(cache_max_size: 50_000, cache_ttl: 6 * 60 * 60
130
130
  client_no_cache = VPNDetection::Client.new(cache: false)
131
131
  ```
132
132
 
133
- An answer with `trial_expired` or `cap_reached` true is cached for a minute at most, so a renewed trial or a raised cap reaches you within a minute.
133
+ An answer with `trial_expired` or `cap_reached` true is cached for a minute at most, because it can change as soon as the organization's trial, plan or cap does.
134
134
 
135
135
  ### Private and reserved addresses
136
136
 
@@ -179,7 +179,7 @@ client = VPNDetection::Client.new(timeout: 10, retries: 4)
179
179
  result = client.lookup('45.83.91.1', timeout: 2, retries: 0)
180
180
  ```
181
181
 
182
- `timeout` is in seconds and bounds each attempt, body included, so a call that is retried can take longer in total. It defaults to 30 seconds, and 0 means no bound; before 5.2.0 the default was 10, so pass `timeout: 10` to keep that bound. The client's values are defaults: `lookup`, `lookup_batch`, `my_ip` and `my_entitlement` each take `timeout:` and `retries:` for that call alone, and every `client.oauth` method and every `client.database` call that is not a transfer takes `timeout:` (from 5.3.0). A database download bounds only its connection with it, because a whole transfer can take minutes. A negative value, anything that isn't a number, and anything past 2147483.647 seconds (the longest curl holds) raise `ArgumentError` where you pass them, before any request. So does a `retries` that isn't an Integer from 0 (from 5.11.3), and a `concurrency` that isn't an Integer from 1 given to `Client.new`, which `lookup_batch` refuses as `:bad_request` (from 5.11.4).
182
+ `timeout` is in seconds and bounds each attempt, body included, so a call that is retried can take longer in total. It defaults to 30 seconds, and 0 means no bound; before 5.2.0 the default was 10, so pass `timeout: 10` to keep that bound. The client's values are defaults: `lookup`, `lookup_batch`, `my_ip` and `my_entitlement` each take `timeout:` and `retries:` for that call alone, and every `client.oauth` method and every `client.database` call that is not a transfer takes `timeout:` (from 5.3.0). A database download bounds only its connection with it, because a whole transfer can take minutes. A negative value, anything that isn't a number, and anything past 2147483 seconds (the longest curl holds) raise `ArgumentError` where you pass them, before any request. So does a `retries` that isn't an Integer from 0 (from 5.11.3), and a `concurrency` that isn't an Integer from 1 given to `Client.new`, which `lookup_batch` refuses as `:bad_request` (from 5.11.4).
183
183
 
184
184
  ### Database downloads
185
185
 
@@ -259,7 +259,7 @@ Each redirect URI must be https on a public host name, or http on a loopback add
259
259
 
260
260
  ### Absent is not false
261
261
 
262
- Unlimited leaves out `is_hosting`, `is_cdn`, the four proxy flags, the carrier, satellite and service flags, `company` and `abuse`, and of the detail behind each flag it answers only Tor's and relay's; a free-plan key's answer carries `trial_expired`, true once its trial is spent, and a paid key's carries `cap_reached`, true once its organization's overage cap is reached and the answer has Unlimited's. A field is present when your plan includes it and `nil` when it does not. `nil` means "not in your plan"; `false` means "we checked, and no".
262
+ Unlimited leaves out `is_hosting`, `is_cdn`, `is_bot`, the four proxy flags, the carrier, satellite and service flags, the AS's `type` (`result.asn['type']`), `company` and `abuse`, and of the detail behind each flag it answers only Tor's and relay's; a free-plan key's answer carries `trial_expired`, true once its trial is spent, and a paid key's carries `cap_reached`, true once its organization's overage cap is reached and the answer has Unlimited's. A field is present when your plan includes it and `nil` when it does not. `nil` means "not in your plan"; `false` means "we checked, and no".
263
263
 
264
264
  ```ruby
265
265
  result.hosting? # false when absent, for when you only want the flag
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -10,9 +10,10 @@ module VPNDetection
10
10
  # serve one of them the other's shape. Errors are never stored and bogons
11
11
  # never reach it.
12
12
  #
13
- # A reduced answer, a spent trial's or a reached cap's, ends with the trial's
14
- # renewal or a raised cap, so it stays a minute at most rather than the TTL. It
15
- # is still cached, or a busy process would send every repeat to the API.
13
+ # A reduced answer, a spent trial's or a reached cap's, can change as soon as
14
+ # the organization's trial, plan or cap does, so it stays a minute at most
15
+ # rather than the TTL. It is still cached, or a busy process would send every
16
+ # repeat to the API.
16
17
  class Cache
17
18
  # The longest a spent trial's or a reached cap's answer is held, in seconds.
18
19
  REDUCED_TTL = 60
@@ -40,10 +40,9 @@ module VPNDetection
40
40
  # phase with it.
41
41
  # @raise [ArgumentError] for an `api_key` with a control character in it.
42
42
  # @raise [ArgumentError] for a `timeout`, here or on any call, that is
43
- # negative, not a finite number, or past 2147483.647 seconds (2**31 - 1 ms),
44
- # the longest curl holds, for a `retries`, here or on any call, that is
45
- # not an Integer from 0, and for a `concurrency` that is not an Integer
46
- # from 1.
43
+ # negative, not a finite number, or past 2147483 seconds, the longest curl
44
+ # holds, for a `retries`, here or on any call, that is not an Integer from
45
+ # 0, and for a `concurrency` that is not an Integer from 1.
47
46
  # @param transport [Transport, nil] override the HTTP layer, mostly for tests.
48
47
  def initialize(api_key: nil, base_url: DEFAULT_BASE_URL, cache: true,
49
48
  cache_max_size: DEFAULT_CACHE_MAX_SIZE, cache_ttl: DEFAULT_CACHE_TTL,
@@ -156,8 +155,8 @@ module VPNDetection
156
155
  #
157
156
  # Usage counts against the ALLOWANCE WINDOW - on a paid plan the
158
157
  # anniversary of the subscription, not the calendar month and not the
159
- # billing period, and on the free plan the UTC day - and it is the same
160
- # number a lookup is gated on. It can lag by a few seconds, because
158
+ # billing period, and on the free plan its trial's window - and it is the
159
+ # same number a lookup is gated on. It can lag by a few seconds, because
161
160
  # requests are counted in memory and flushed in aggregate.
162
161
  #
163
162
  # Deliberately NOT cached: the whole point is what has been spent, and a
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -24,6 +24,9 @@ module VPNDetection
24
24
  module Condition
25
25
  BOUND_KEYS = %w[gte gt lte lt].freeze
26
26
 
27
+ # The objects every plan answers whose members a plan can still leave out.
28
+ PARTLY_PAID = %w[asn].freeze
29
+
27
30
  module_function
28
31
 
29
32
  # Whether an answer satisfies the condition, and should therefore be
@@ -32,26 +35,23 @@ module VPNDetection
32
35
  Array(wrap(condition)).any? { |one| matches_object?(one, result.raw) }
33
36
  end
34
37
 
35
- # The top-level members a condition names that this answer did not carry.
38
+ # The members a condition names that this answer did not carry: a top-level
39
+ # member, or the AS's paid one, `asn.type`, by its path.
36
40
  #
37
41
  # A field your plan does not include is absent rather than false, so a
38
42
  # condition naming one can never match and the block would silently never
39
43
  # fire. Gating is per top-level member, which is why only the first path
40
44
  # segment is checked: a detail object present but empty is a real answer
41
- # meaning the flag is false, not a plan gap.
45
+ # meaning the flag is false, not a plan gap. `asn` is the one object every
46
+ # plan gets that also holds a paid member (`type`), so it is read member by
47
+ # member, and a populated one carries every other.
42
48
  #
43
- # A locally answered bogon needs no special case: it is synthesized in the
44
- # widest shape, so every member is present and nothing reads as missing.
49
+ # A locally answered bogon is synthesized in the widest shape, but it
50
+ # carries no user agent verdict, which only a sent agent earns: the core
51
+ # never asks this of a bogon's answer (report_missing returns first).
45
52
  def missing_members(condition, result)
46
53
  missing = []
47
- wrap(condition).each do |one|
48
- one.each do |member, want|
49
- name = member.to_s
50
- next if constraint_count(want).zero? || missing.include?(name)
51
-
52
- missing << name unless result.raw.key?(name)
53
- end
54
- end
54
+ wrap(condition).each { |one| collect_missing(one, result.raw, '', missing) }
55
55
  missing
56
56
  end
57
57
 
@@ -89,6 +89,23 @@ module VPNDetection
89
89
  condition.is_a?(Array) ? condition : [condition]
90
90
  end
91
91
 
92
+ def collect_missing(condition, value, prefix, missing)
93
+ condition.each do |member, want|
94
+ next if constraint_count(want).zero?
95
+
96
+ name = member.to_s
97
+ path = "#{prefix}#{name}"
98
+ unless value.key?(name)
99
+ missing << path unless missing.include?(path)
100
+ next
101
+ end
102
+ got = value[name]
103
+ next unless prefix.empty? && PARTLY_PAID.include?(name) && want.is_a?(Hash) && !bound?(want)
104
+
105
+ collect_missing(want, got, "#{path}.", missing) if got.is_a?(Hash) && !got.empty?
106
+ end
107
+ end
108
+
92
109
  def matches_object?(condition, value)
93
110
  condition.all? do |member, want|
94
111
  next true if constraint_count(want).zero?
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -25,7 +25,7 @@ module VPNDetection
25
25
  # The AS operator's own registrable domain.
26
26
  attr_accessor :domain
27
27
 
28
- # The kind of network the AS runs: isp, hosting, education, government or business.
28
+ # The kind of network the AS runs: isp, hosting, education, government or business. On a paid plan.
29
29
  attr_accessor :type
30
30
 
31
31
  # The announced BGP prefix that covers the address, the most specific when several do.
@@ -115,8 +115,6 @@ module VPNDetection
115
115
 
116
116
  if attributes.key?(:'type')
117
117
  self.type = attributes[:'type']
118
- else
119
- self.type = nil
120
118
  end
121
119
 
122
120
  if attributes.key?(:'prefix')
@@ -155,10 +153,6 @@ module VPNDetection
155
153
  invalid_properties.push('invalid value for "domain", domain cannot be nil.')
156
154
  end
157
155
 
158
- if @type.nil?
159
- invalid_properties.push('invalid value for "type", type cannot be nil.')
160
- end
161
-
162
156
  if @prefix.nil?
163
157
  invalid_properties.push('invalid value for "prefix", prefix cannot be nil.')
164
158
  end
@@ -181,7 +175,6 @@ module VPNDetection
181
175
  return false if @asn.nil?
182
176
  return false if @name.nil?
183
177
  return false if @domain.nil?
184
- return false if @type.nil?
185
178
  return false if @prefix.nil?
186
179
  return false if @country.nil?
187
180
  return false if @rpki_status.nil?
@@ -218,16 +211,6 @@ module VPNDetection
218
211
  @domain = domain
219
212
  end
220
213
 
221
- # Custom attribute writer method with validation
222
- # @param [Object] type Value to be assigned
223
- def type=(type)
224
- if type.nil?
225
- fail ArgumentError, 'type cannot be nil'
226
- end
227
-
228
- @type = type
229
- end
230
-
231
214
  # Custom attribute writer method with validation
232
215
  # @param [Object] prefix Value to be assigned
233
216
  def prefix=(prefix)
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module VPNDetection
17
17
  class EntitlementPlan < ApiModelBase
18
- # The plan the organization is on, as an identifier that is never renamed or reused: `free` for the free plan, or a paid plan's key. Compare against it and show `name`. On `free`, usage counts its trial, the lookups answered with every field. The Data plan is a key per quota, `data_1` to `data_7`, each named Data.
18
+ # The plan the organization is on, as an identifier that is never renamed or reused: `free` for the free plan, or a paid plan's key. Compare against it and show `name`. On `free`, usage counts its trial, the lookups answered with every field. The Data plan is a key per quota (`data_1`, `data_2` and on), each named Data.
19
19
  attr_accessor :key
20
20
 
21
21
  # The plan's name, as the site and console show it: `Unlimited` for the free plan. Show this rather than a name built from `key`: a plan's name can change, and its key never does.
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -37,7 +37,7 @@ module VPNDetection
37
37
  # Whether the address belongs to a CDN. On a paid plan.
38
38
  attr_accessor :is_cdn
39
39
 
40
- # Whether an automated client uses the address, such as a search engine's or an AI company's crawler, an uptime monitor, an internet scanner or a webhook sender. `bot` says whose, what it does and whether its operator vouches for the address. Every answer, with or without a key.
40
+ # Whether an automated client uses the address, such as a search engine's or an AI company's crawler, an uptime monitor, an internet scanner or a webhook sender. `bot` says whose, what it does and whether its operator vouches for the address. On a paid plan.
41
41
  attr_accessor :is_bot
42
42
 
43
43
  # Whether the address was seen in a residential proxy pool. On a paid plan.
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. The Data plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.25
6
+ The version of the OpenAPI document: 2026.11.27
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -34,8 +34,8 @@ module VPNDetection
34
34
 
35
35
  # Where the address is, and the AS announcing it: every answer carries both,
36
36
  # with or without a key, each member present, an empty string or AS 0 where
37
- # nothing is known. The location's finer members, from `region` down, are a
38
- # paid plan's, and absent on an answer without them.
37
+ # nothing is known. The location's finer members, from `region` down, and the
38
+ # AS's `type` are a paid plan's, and absent on an answer without them.
39
39
  LOCATION = %w[
40
40
  continent continent_name country country_name timezone currency_code currency_name currency_symbol
41
41
  flag_emoji flag_unicode region region_code city postal_code latitude longitude accuracy_radius
@@ -140,8 +140,7 @@ module VPNDetection
140
140
 
141
141
  # Whether an automated client uses the address, such as a search engine's
142
142
  # or an AI company's crawler, an uptime monitor, an internet scanner or a
143
- # webhook sender, or nil when your plan does not include it. Every answer,
144
- # with or without a key.
143
+ # webhook sender, or nil when your plan does not include it. On a paid plan.
145
144
  def is_bot
146
145
  @raw['is_bot']
147
146
  end
@@ -399,7 +398,8 @@ module VPNDetection
399
398
  # The AS announcing the address: asn, name, domain, type, prefix, the
400
399
  # country its registry assigned it to and the announcement's RPKI status, as
401
400
  # a wire hash (`result.asn['name']`), with asn 0 where none does. Every
402
- # answer, with or without a key.
401
+ # answer, with or without a key; `type` on a paid plan, and absent without
402
+ # one.
403
403
  def asn
404
404
  @raw['asn']
405
405
  end
@@ -17,10 +17,12 @@ module VPNDetection
17
17
  ENTITLEMENT_PATH = '/api/v1/entitlement'
18
18
  BATCH_PATH = '/batch'
19
19
 
20
- # The longest `timeout` curl holds, in seconds: 2**31 - 1 ms, about 24.8 days.
21
- # libcurl refuses a longer one, and any negative, and Ethon ignores the
22
- # refusal, so the call would run with no bound at all.
23
- LONGEST_TIMEOUT = 2_147_483.647
20
+ # The longest `timeout` curl holds, in whole seconds: INT_MAX / 1000, about
21
+ # 24.8 days. libcurl refuses a longer one, and any negative, and Ethon ignores
22
+ # the refusal, so the call would run with no bound at all. Not 2**31 - 1 ms:
23
+ # Typhoeus rounds a fraction UP to a whole second, so 2147483.001 reached
24
+ # libcurl as 2147484 and failed every call with a raw Ethon::Errors::SetOption.
25
+ LONGEST_TIMEOUT = 2_147_483
24
26
 
25
27
  # `timeout`, once it is a bound curl can hold: seconds, 0 for none. Refused
26
28
  # where it is set, because nothing downstream refuses it: a negative ran with
@@ -344,7 +346,7 @@ module VPNDetection
344
346
  'BitTorrentDetail' => [],
345
347
  'Location' => %i[continent continent_name country country_name timezone currency_code currency_name
346
348
  currency_symbol flag_emoji flag_unicode],
347
- 'Asn' => %i[asn name domain type prefix country rpki_status],
349
+ 'Asn' => %i[asn name domain prefix country rpki_status],
348
350
  'Company' => %i[name domain],
349
351
  'AbuseContact' => %i[email],
350
352
  'UserAgentVerdict' => %i[agent kind verdict],
@@ -367,6 +369,13 @@ module VPNDetection
367
369
  created],
368
370
  }.freeze
369
371
 
372
+ # The members the spec stopped requiring in 2026.11.26, because Unlimited's answer leaves
373
+ # them out: absent reads as absent, as any member a plan leaves out does. A served null
374
+ # is still refused, as it was while they were required.
375
+ NEVER_NULL = {
376
+ 'Asn' => %i[type],
377
+ }.freeze
378
+
370
379
  # RFC 3339's full-date, the spec's `date`, and its date-time, the spec's
371
380
  # `date-time`, its `T` and `Z` in either case, as RFC 3339 allows: through
372
381
  # 5.11.1 a lowercase one failed the call. Anything else reached the
@@ -423,11 +432,14 @@ module VPNDetection
423
432
  end
424
433
 
425
434
  # A member absent or null reads as absent, unless the spec requires it and
426
- # does not make it nullable.
435
+ # does not make it nullable, or {NEVER_NULL} lists it and the answer carries it null.
427
436
  def self.check_member!(model, attr, member, value, where)
428
437
  key = model.attribute_map[attr].to_s
429
438
  return check_type!(value[key], member.to_s, "#{where}.#{key}") unless value[key].nil?
430
- return true unless REQUIRED.fetch(model.name.split('::').last).include?(attr)
439
+
440
+ name = model.name.split('::').last
441
+ null_refused = value.key?(key) && NEVER_NULL.fetch(name, []).include?(attr)
442
+ return true unless REQUIRED.fetch(name).include?(attr) || null_refused
431
443
  return true if model.openapi_nullable.include?(attr)
432
444
 
433
445
  raise TypeError, "#{where}.#{key} is #{value.key?(key) ? 'null' : 'missing'}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VPNDetection
4
- VERSION = '5.22.1'
4
+ VERSION = '5.23.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vpndetection
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.22.1
4
+ version: 5.23.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mslm Dev