vpndetection 5.8.0 → 5.9.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 (62) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vpndetection/api/account_wire_api.rb +1 -1
  3. data/lib/vpndetection/api/api_keys_wire_api.rb +1 -1
  4. data/lib/vpndetection/api/authorization_wire_api.rb +1 -1
  5. data/lib/vpndetection/api/database_wire_api.rb +1 -1
  6. data/lib/vpndetection/api/entitlement_wire_api.rb +1 -1
  7. data/lib/vpndetection/api/lookup_wire_api.rb +1 -1
  8. data/lib/vpndetection/api/organization_wire_api.rb +1 -1
  9. data/lib/vpndetection/api_client.rb +1 -1
  10. data/lib/vpndetection/api_error.rb +1 -1
  11. data/lib/vpndetection/api_model_base.rb +1 -1
  12. data/lib/vpndetection/client.rb +2 -2
  13. data/lib/vpndetection/configuration.rb +1 -1
  14. data/lib/vpndetection/errors.rb +4 -2
  15. data/lib/vpndetection/models/account_create_apikey_request.rb +1 -1
  16. data/lib/vpndetection/models/account_created_apikey.rb +1 -1
  17. data/lib/vpndetection/models/account_org.rb +1 -1
  18. data/lib/vpndetection/models/account_org_ref.rb +1 -1
  19. data/lib/vpndetection/models/account_org_wrap.rb +1 -1
  20. data/lib/vpndetection/models/account_rc.rb +1 -1
  21. data/lib/vpndetection/models/account_revealed_apikey.rb +1 -1
  22. data/lib/vpndetection/models/account_user.rb +1 -1
  23. data/lib/vpndetection/models/apikey_detail.rb +1 -1
  24. data/lib/vpndetection/models/apikey_list.rb +1 -1
  25. data/lib/vpndetection/models/batch_lookup_error.rb +1 -1
  26. data/lib/vpndetection/models/batch_lookup_request.rb +1 -1
  27. data/lib/vpndetection/models/batch_lookup_response.rb +1 -1
  28. data/lib/vpndetection/models/class_detail.rb +1 -1
  29. data/lib/vpndetection/models/client_registration.rb +2 -2
  30. data/lib/vpndetection/models/client_registration_request.rb +1 -1
  31. data/lib/vpndetection/models/database.rb +1 -1
  32. data/lib/vpndetection/models/database_checksums_response.rb +1 -1
  33. data/lib/vpndetection/models/database_format.rb +1 -1
  34. data/lib/vpndetection/models/database_format_size.rb +1 -1
  35. data/lib/vpndetection/models/database_list.rb +1 -1
  36. data/lib/vpndetection/models/database_metadata.rb +1 -1
  37. data/lib/vpndetection/models/database_metadata_column.rb +1 -1
  38. data/lib/vpndetection/models/database_version.rb +1 -1
  39. data/lib/vpndetection/models/db_checksums.rb +1 -1
  40. data/lib/vpndetection/models/device_authorization.rb +1 -1
  41. data/lib/vpndetection/models/download.rb +1 -1
  42. data/lib/vpndetection/models/download_list.rb +1 -1
  43. data/lib/vpndetection/models/entitlement.rb +1 -1
  44. data/lib/vpndetection/models/entitlement_apikey.rb +1 -1
  45. data/lib/vpndetection/models/entitlement_error.rb +1 -1
  46. data/lib/vpndetection/models/entitlement_plan.rb +1 -1
  47. data/lib/vpndetection/models/entitlement_usage.rb +1 -1
  48. data/lib/vpndetection/models/error_envelope.rb +1 -1
  49. data/lib/vpndetection/models/identity.rb +1 -1
  50. data/lib/vpndetection/models/lookup_error.rb +1 -1
  51. data/lib/vpndetection/models/lookup_response.rb +1 -1
  52. data/lib/vpndetection/models/oauth_error.rb +1 -1
  53. data/lib/vpndetection/models/oauth_metadata.rb +1 -1
  54. data/lib/vpndetection/models/proxy_detail.rb +1 -1
  55. data/lib/vpndetection/models/pubproxy_detail.rb +23 -3
  56. data/lib/vpndetection/models/standing.rb +1 -1
  57. data/lib/vpndetection/models/token_response.rb +1 -1
  58. data/lib/vpndetection/models/vpn_detail.rb +1 -1
  59. data/lib/vpndetection/result.rb +5 -3
  60. data/lib/vpndetection/transport.rb +99 -9
  61. data/lib/vpndetection/version.rb +1 -1
  62. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3e3bbf2f5a292ebd5e49932b7d940be34945846e704a62be599a15a3fc08430
4
- data.tar.gz: 4f2516fc0bfa84939306ab1d164e613aaa6bb1b0ac392b567ea6d57367ea8c52
3
+ metadata.gz: 4b8d521a64e7bfd1680e5e158d30a340602191565c1c6e0332662d546b163caa
4
+ data.tar.gz: 40dce453e2eca0badd693bdf188ab891d9ce43d77dc5dcaccf5b15ba9606cc9a
5
5
  SHA512:
6
- metadata.gz: 113482fcc8b4379c25e9ff82e1e6136fc9048d62a788cdf5d4eec254c9b0b7e050e4e43639599cd2aba37d0fcd7a692acc756944d9eb6c1aa36e47717bc16a40
7
- data.tar.gz: 1986b745e3c5994f63cfcf1191f65edf0fd08debd4364fb57e925d1f3249750aa913d6febbc328dd7075cc6d58d4701bf05fb42f5ce3fbad879959cf0bca94d1
6
+ metadata.gz: 0a52df204a1d0a4fdc8c7bc88c73b37dd26611efbd58708053d72a02f4b01aa1c83d1c2453b13b2e08217e9386e38ecd4042614284fb5e0302032b3e66789f49
7
+ data.tar.gz: be8c767fc9bb2924505c16e89be1db7848fca3b725bcf045e5a5f21903389c4ca613a0dc605d9a2df02a4aafc3b90dabaa6044f3a1b157d646bca7537f419bb2
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -345,9 +345,9 @@ module VPNDetection
345
345
  def batch_answer(ip, body)
346
346
  served = body['results'][ip]
347
347
  failed = body['errors'][ip]
348
- if Transport.lookup_answer?(served)
348
+ if Transport.conforms?(served, 'LookupResponse')
349
349
  Result.new(served)
350
- elsif failed.is_a?(Hash)
350
+ elsif Transport.conforms?(failed, 'BatchLookupError')
351
351
  Error.from_entry(failed['status'], failed['error'])
352
352
  else
353
353
  Error.new(:server_error, "the batch answer carried no readable entry for #{ip}", status: 200)
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -104,9 +104,11 @@ module VPNDetection
104
104
  return nil if value.empty?
105
105
  return Integer(value, 10) if value.match?(/\A\d+\z/)
106
106
 
107
- # The header also permits an HTTP date.
107
+ # The header also permits an HTTP date, naming a real day: `Time.httpdate`
108
+ # reads `31 Nov` as 1 December, and the day it names comes first in all
109
+ # three forms.
108
110
  when_at = Time.httpdate(value) rescue nil
109
- return nil if when_at.nil?
111
+ return nil if when_at.nil? || when_at.day != value[/\d+/].to_i
110
112
 
111
113
  [0, (when_at - Time.now).ceil].max
112
114
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -17,7 +17,7 @@ module VPNDetection
17
17
  class ClientRegistration < ApiModelBase
18
18
  attr_accessor :client_id
19
19
 
20
- # Unix seconds.
20
+ # Unix seconds. 64-bit, since 32 bits run out on 2038-01-19.
21
21
  attr_accessor :client_id_issued_at
22
22
 
23
23
  # As the person will see it.
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.16
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module VPNDetection
17
- # The address in Public Proxy IP, open proxies anyone can connect through, over a rolling 90 day window. It covers both ends of a proxy: the address it listens on and the address its traffic leaves from. Every key is present when the object is populated; the object is `{}` when `is_pubproxy` is false.
17
+ # The address in Public Proxy IP, open proxies anyone can connect through, measured over a rolling 90 day window. An address is either end of a proxy, or both: where it listens, and where its traffic leaves from. Every key is present when the object is populated; the object is `{}` when `is_pubproxy` is false.
18
18
  class PubproxyDetail < ApiModelBase
19
19
  # Whether a public proxy listens on this address.
20
20
  attr_accessor :entry
@@ -25,6 +25,12 @@ module VPNDetection
25
25
  # The protocols of the proxies listening on or leaving from this address: `http`, `https` (an HTTP proxy that also tunnels HTTPS), `socks4` or `socks5`. Empty where only the address is known.
26
26
  attr_accessor :protocols
27
27
 
28
+ # How many distinct ports a public proxy listens on at this address; 0 when it is only an exit, or its port is not known.
29
+ attr_accessor :num_ports
30
+
31
+ # How many distinct public proxies' traffic left from this address; 0 when it is only an entry.
32
+ attr_accessor :num_proxies
33
+
28
34
  # The most recent date within the window a proxy on this address was seen.
29
35
  attr_accessor :last_seen
30
36
 
@@ -37,6 +43,8 @@ module VPNDetection
37
43
  :'entry' => :'entry',
38
44
  :'exit' => :'exit',
39
45
  :'protocols' => :'protocols',
46
+ :'num_ports' => :'num_ports',
47
+ :'num_proxies' => :'num_proxies',
40
48
  :'last_seen' => :'last_seen',
41
49
  :'last_usable' => :'last_usable'
42
50
  }
@@ -58,6 +66,8 @@ module VPNDetection
58
66
  :'entry' => :'Boolean',
59
67
  :'exit' => :'Boolean',
60
68
  :'protocols' => :'Array<String>',
69
+ :'num_ports' => :'Integer',
70
+ :'num_proxies' => :'Integer',
61
71
  :'last_seen' => :'Date',
62
72
  :'last_usable' => :'String'
63
73
  }
@@ -99,6 +109,14 @@ module VPNDetection
99
109
  end
100
110
  end
101
111
 
112
+ if attributes.key?(:'num_ports')
113
+ self.num_ports = attributes[:'num_ports']
114
+ end
115
+
116
+ if attributes.key?(:'num_proxies')
117
+ self.num_proxies = attributes[:'num_proxies']
118
+ end
119
+
102
120
  if attributes.key?(:'last_seen')
103
121
  self.last_seen = attributes[:'last_seen']
104
122
  end
@@ -131,6 +149,8 @@ module VPNDetection
131
149
  entry == o.entry &&
132
150
  exit == o.exit &&
133
151
  protocols == o.protocols &&
152
+ num_ports == o.num_ports &&
153
+ num_proxies == o.num_proxies &&
134
154
  last_seen == o.last_seen &&
135
155
  last_usable == o.last_usable
136
156
  end
@@ -144,7 +164,7 @@ module VPNDetection
144
164
  # Calculates hash code according to all attributes.
145
165
  # @return [Integer] Hash code
146
166
  def hash
147
- [entry, exit, protocols, last_seen, last_usable].hash
167
+ [entry, exit, protocols, num_ports, num_proxies, last_seen, last_usable].hash
148
168
  end
149
169
 
150
170
  # Builds the object from hash
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The VPNDetection API: classify any IP address, and download the databases behind the answers. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
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. 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.10.18
6
+ The version of the OpenAPI document: 2026.10.19
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -194,9 +194,11 @@ module VPNDetection
194
194
  @raw['mobproxy']
195
195
  end
196
196
 
197
- # Detail for `is_pubproxy`: entry, exit, protocols, last_seen and
198
- # last_usable, the last an empty string when no request through a proxy on
199
- # the address was answered. Max only.
197
+ # Detail for `is_pubproxy`: entry, exit, protocols, num_ports,
198
+ # num_proxies, last_seen and last_usable. num_ports is 0 when the address
199
+ # is only an exit and num_proxies 0 when it is only an entry; last_usable is
200
+ # an empty string when no request through a proxy on the address was
201
+ # answered. Max only.
200
202
  def pubproxy
201
203
  @raw['pubproxy']
202
204
  end
@@ -86,11 +86,18 @@ module VPNDetection
86
86
  # the spec requires. The generated reader raised a RuntimeError, a
87
87
  # JSON::ParserError or an ArgumentError for those, none of them retried, and
88
88
  # handed an empty or non-object body back as nil, as if it were the answer.
89
+ #
90
+ # Every member present is checked against the type the spec gives it, at any
91
+ # depth, before the answer is handed back: the generated reader converts with
92
+ # `to_i`, so `"version":"x"` came back as 0 and `"version":"3"` as 3, and it
93
+ # skips a list member sent as null, so `"versions": null` came back as nil
94
+ # (5.9.0, measured 2026-10-20).
89
95
  def deserialize(response, return_type)
90
96
  data = super
91
- return data unless data.nil?
97
+ raise Error.new(:server_error, "the API answered with no #{return_type}", status: response.code) if data.nil?
92
98
 
93
- raise Error.new(:server_error, "the API answered with no #{return_type}", status: response.code)
99
+ Transport.check_type!(JSON.parse(response.body.to_s), return_type.to_s, 'the answer')
100
+ data
94
101
  rescue Error
95
102
  raise
96
103
  rescue StandardError => e
@@ -182,6 +189,7 @@ module VPNDetection
182
189
 
183
190
  body = parse_object(response)
184
191
  begin
192
+ check_type!(body, 'Entitlement', 'the answer')
185
193
  Entitlement.build_from_hash(body)
186
194
  rescue StandardError => e
187
195
  raise Error.new(:server_error, "could not read the answer as Entitlement: #{e.message}",
@@ -194,15 +202,21 @@ module VPNDetection
194
202
  raise Error.from_status(response.code, response.headers, response.body) unless response.success?
195
203
 
196
204
  body = parse_object(response)
197
- return Result.new(body) if lookup_answer?(body)
198
-
199
- raise Error.new(:server_error, 'the answer carried no ip and is_vpn', status: response.code)
205
+ begin
206
+ check_type!(body, 'LookupResponse', 'the answer')
207
+ rescue TypeError => e
208
+ raise Error.new(:server_error, "could not read the answer as LookupResponse: #{e.message}",
209
+ status: response.code)
210
+ end
211
+ Result.new(body)
200
212
  end
201
213
 
202
- # Whether a parsed body is a lookup's answer: every plan's carries `ip` and
203
- # `is_vpn`, so one without them is a 2xx the call cannot read.
204
- def self.lookup_answer?(body)
205
- body.is_a?(Hash) && body['ip'].is_a?(String) && [true, false].include?(body['is_vpn'])
214
+ # Whether a parsed value is the generated `type`: a batch entry that is not
215
+ # is that address's error alone.
216
+ def self.conforms?(value, type)
217
+ check_type!(value, type, 'the entry')
218
+ rescue TypeError
219
+ false
206
220
  end
207
221
 
208
222
  # The two maps of a batch answer, each present even when empty. An answer
@@ -269,5 +283,81 @@ module VPNDetection
269
283
  end
270
284
 
271
285
  private_class_method :transport_failure?, :parse_object, :oauth_refusal
286
+
287
+ # The members the spec requires of each answer a lookup, a batch, the
288
+ # entitlement or a database call reads. One that is not nullable must be
289
+ # there and not null. Every plan's lookup carries `ip` and `is_vpn`, and a
290
+ # detail's members are as optional as the plan makes them.
291
+ # test/client_test.rb holds this to spec/openapi.yaml.
292
+ REQUIRED = {
293
+ 'LookupResponse' => %i[ip is_vpn],
294
+ 'VpnDetail' => [],
295
+ 'ClassDetail' => [],
296
+ 'ProxyDetail' => [],
297
+ 'PubproxyDetail' => [],
298
+ 'BatchLookupError' => %i[status error],
299
+ 'Entitlement' => %i[org_id apikey plan usage],
300
+ 'EntitlementApikey' => %i[id expires allowed_cidrs],
301
+ 'EntitlementPlan' => %i[key tier],
302
+ 'EntitlementUsage' => %i[requests quota hard_limit window_start window_end],
303
+ 'DatabaseList' => %i[databases],
304
+ 'Database' => %i[base name summary license_type starts expires renews_at notice_due_at in_term standing
305
+ versions],
306
+ 'DatabaseVersion' => %i[id version formats],
307
+ 'DatabaseFormatSize' => %i[format bytes],
308
+ 'DatabaseMetadata' => %i[id updated entries schema],
309
+ 'DatabaseMetadataColumn' => %i[name type],
310
+ 'DatabaseChecksumsResponse' => %i[id format checksums],
311
+ 'DbChecksums' => %i[md5 sha1 sha256 sha512],
312
+ 'DownloadList' => %i[downloads],
313
+ 'Download' => %i[dataset_id format outcome sample bytes http_status apikey_id client_ip user_agent created],
314
+ }.freeze
315
+
316
+ # True when the parsed `value` has the generated `type`, a model's members
317
+ # recursively; raises TypeError naming where it does not. No list entry or
318
+ # map value the spec describes may be null: through 5.9.0 one came back as
319
+ # nil, or as 0 in `size`, and a lookup's `"is_hosting": "yes"` came back as
320
+ # the answer.
321
+ def self.check_type!(value, type, where)
322
+ raise TypeError, "#{where} is null" if value.nil?
323
+
324
+ typed =
325
+ case type
326
+ when 'String', 'Date', 'Time' then value.is_a?(String)
327
+ when 'Integer' then value.is_a?(Integer)
328
+ when 'Float' then value.is_a?(Numeric)
329
+ when 'Boolean' then [true, false].include?(value)
330
+ when 'Object' then true
331
+ when /\AArray<(?<inner>.+)>\z/
332
+ inner = Regexp.last_match(:inner)
333
+ value.is_a?(Array) && value.each_with_index.all? { |v, i| check_type!(v, inner, "#{where}[#{i}]") }
334
+ when /\AHash<String, ?(?<inner>.+)>\z/
335
+ inner = Regexp.last_match(:inner)
336
+ value.is_a?(Hash) && value.all? { |k, v| check_type!(v, inner, "#{where}.#{k}") }
337
+ else
338
+ model = VPNDetection.const_get(type)
339
+ if model.respond_to?(:openapi_types)
340
+ value.is_a?(Hash) && model.openapi_types.all? { |attr, member| check_member!(model, attr, member, value, where) }
341
+ else
342
+ value.is_a?(String) # an enum
343
+ end
344
+ end
345
+ return true if typed
346
+
347
+ raise TypeError, "#{where} is not a #{type}"
348
+ end
349
+
350
+ # A member absent or null reads as absent, unless the spec requires it and
351
+ # does not make it nullable.
352
+ def self.check_member!(model, attr, member, value, where)
353
+ key = model.attribute_map[attr].to_s
354
+ return check_type!(value[key], member.to_s, "#{where}.#{key}") unless value[key].nil?
355
+ return true unless REQUIRED.fetch(model.name.split('::').last).include?(attr)
356
+ return true if model.openapi_nullable.include?(attr)
357
+
358
+ raise TypeError, "#{where}.#{key} is #{value.key?(key) ? 'null' : 'missing'}"
359
+ end
360
+
361
+ private_class_method :check_member!
272
362
  end
273
363
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VPNDetection
4
- VERSION = '5.8.0'
4
+ VERSION = '5.9.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.8.0
4
+ version: 5.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mslm Dev