vpndetection 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/vpndetection/api/database_wire_api.rb +8 -18
- data/lib/vpndetection/api/lookup_wire_api.rb +57 -0
- data/lib/vpndetection/models/database.rb +14 -20
- data/lib/vpndetection/models/database_format.rb +40 -0
- data/lib/vpndetection/models/database_format_size.rb +6 -8
- data/lib/vpndetection/models/database_version.rb +2 -24
- data/lib/vpndetection/models/license_type.rb +41 -0
- data/lib/vpndetection/models/standing.rb +41 -0
- data/lib/vpndetection/version.rb +1 -1
- metadata +4 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d80c8ce32eeb125e13622a5edae6ea738396941432e2d1d666872b5d1f1caff5
|
|
4
|
+
data.tar.gz: b895a219283c89c84690405ad7bd7719175d7e4303885e05de9325a1f273c785
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 579cb6d0adcd24b1e83b8bcca8d9aefcde2c5f2ff99a0534cf447a397a133942bdeab4c41245cc541c9e46e6c193601e850a02a70c1e0e29ba79d6dcd0d77f82
|
|
7
|
+
data.tar.gz: efb8371a1b228608ebc835bf15fd7942004b9aabca5668c6cc0d471e26ddcce5367e9daa2e376bb57934ed67e509aad521754981481c94d65c335ef42a673807
|
|
@@ -22,7 +22,7 @@ module VPNDetection
|
|
|
22
22
|
# Checksums
|
|
23
23
|
# Checksums for one published file, so a download can be verified after it lands.
|
|
24
24
|
# @param id [String]
|
|
25
|
-
# @param format [
|
|
25
|
+
# @param format [DatabaseFormat]
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
|
27
27
|
# @return [DatabaseChecksumsResponse]
|
|
28
28
|
def database_checksum(id, format, opts = {})
|
|
@@ -33,7 +33,7 @@ module VPNDetection
|
|
|
33
33
|
# Checksums
|
|
34
34
|
# Checksums for one published file, so a download can be verified after it lands.
|
|
35
35
|
# @param id [String]
|
|
36
|
-
# @param format [
|
|
36
|
+
# @param format [DatabaseFormat]
|
|
37
37
|
# @param [Hash] opts the optional parameters
|
|
38
38
|
# @return [Array<(DatabaseChecksumsResponse, Integer, Hash)>] DatabaseChecksumsResponse data, response status code and response headers
|
|
39
39
|
def database_checksum_with_http_info(id, format, opts = {})
|
|
@@ -48,11 +48,6 @@ module VPNDetection
|
|
|
48
48
|
if @api_client.config.client_side_validation && format.nil?
|
|
49
49
|
fail ArgumentError, "Missing the required parameter 'format' when calling DatabaseWireApi.database_checksum"
|
|
50
50
|
end
|
|
51
|
-
# verify enum value
|
|
52
|
-
allowable_values = ["csvgz", "mmdb"]
|
|
53
|
-
if @api_client.config.client_side_validation && !allowable_values.include?(format)
|
|
54
|
-
fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}"
|
|
55
|
-
end
|
|
56
51
|
# resource path
|
|
57
52
|
local_var_path = '/api/v1/database/checksum'
|
|
58
53
|
|
|
@@ -96,7 +91,7 @@ module VPNDetection
|
|
|
96
91
|
end
|
|
97
92
|
|
|
98
93
|
# Metadata
|
|
99
|
-
# Poll this to decide whether today's build is worth fetching: it carries `updated` and `entries` without downloading anything. No `format` parameter - one document describes every format the
|
|
94
|
+
# Poll this to decide whether today's build is worth fetching: it carries `updated` and `entries` without downloading anything. No `format` parameter - one document describes every format the database is built in.
|
|
100
95
|
# @param id [String]
|
|
101
96
|
# @param [Hash] opts the optional parameters
|
|
102
97
|
# @return [DatabaseMetadata]
|
|
@@ -106,7 +101,7 @@ module VPNDetection
|
|
|
106
101
|
end
|
|
107
102
|
|
|
108
103
|
# Metadata
|
|
109
|
-
# Poll this to decide whether today's build is worth fetching: it carries `updated` and `entries` without downloading anything. No `format` parameter - one document describes every format the
|
|
104
|
+
# Poll this to decide whether today's build is worth fetching: it carries `updated` and `entries` without downloading anything. No `format` parameter - one document describes every format the database is built in.
|
|
110
105
|
# @param id [String]
|
|
111
106
|
# @param [Hash] opts the optional parameters
|
|
112
107
|
# @return [Array<(DatabaseMetadata, Integer, Hash)>] DatabaseMetadata data, response status code and response headers
|
|
@@ -162,7 +157,7 @@ module VPNDetection
|
|
|
162
157
|
# Download
|
|
163
158
|
# Answers `302` with a time-limited URL pointing straight at object storage. Follow the redirect; the link authorizes the START of a transfer, so one already running is not interrupted when it lapses.
|
|
164
159
|
# @param id [String] Dataset id, e.g. vpn_ip_extended_v1
|
|
165
|
-
# @param format [
|
|
160
|
+
# @param format [DatabaseFormat] Not every database is built in every format. The `_provider` catalogues are keyed by provider id rather than by IP range, so no MMDB exists for them.
|
|
166
161
|
# @param [Hash] opts the optional parameters
|
|
167
162
|
# @return [nil]
|
|
168
163
|
def download_database(id, format, opts = {})
|
|
@@ -173,7 +168,7 @@ module VPNDetection
|
|
|
173
168
|
# Download
|
|
174
169
|
# Answers `302` with a time-limited URL pointing straight at object storage. Follow the redirect; the link authorizes the START of a transfer, so one already running is not interrupted when it lapses.
|
|
175
170
|
# @param id [String] Dataset id, e.g. vpn_ip_extended_v1
|
|
176
|
-
# @param format [
|
|
171
|
+
# @param format [DatabaseFormat] Not every database is built in every format. The `_provider` catalogues are keyed by provider id rather than by IP range, so no MMDB exists for them.
|
|
177
172
|
# @param [Hash] opts the optional parameters
|
|
178
173
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
179
174
|
def download_database_with_http_info(id, format, opts = {})
|
|
@@ -188,11 +183,6 @@ module VPNDetection
|
|
|
188
183
|
if @api_client.config.client_side_validation && format.nil?
|
|
189
184
|
fail ArgumentError, "Missing the required parameter 'format' when calling DatabaseWireApi.download_database"
|
|
190
185
|
end
|
|
191
|
-
# verify enum value
|
|
192
|
-
allowable_values = ["csvgz", "mmdb"]
|
|
193
|
-
if @api_client.config.client_side_validation && !allowable_values.include?(format)
|
|
194
|
-
fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}"
|
|
195
|
-
end
|
|
196
186
|
# resource path
|
|
197
187
|
local_var_path = '/api/v1/database/download'
|
|
198
188
|
|
|
@@ -236,7 +226,7 @@ module VPNDetection
|
|
|
236
226
|
end
|
|
237
227
|
|
|
238
228
|
# List
|
|
239
|
-
# Every
|
|
229
|
+
# Every database this organization holds a licence for, with the term and the license_type right beside each one.
|
|
240
230
|
# @param [Hash] opts the optional parameters
|
|
241
231
|
# @return [DatabaseList]
|
|
242
232
|
def list_databases(opts = {})
|
|
@@ -245,7 +235,7 @@ module VPNDetection
|
|
|
245
235
|
end
|
|
246
236
|
|
|
247
237
|
# List
|
|
248
|
-
# Every
|
|
238
|
+
# Every database this organization holds a licence for, with the term and the license_type right beside each one.
|
|
249
239
|
# @param [Hash] opts the optional parameters
|
|
250
240
|
# @return [Array<(DatabaseList, Integer, Hash)>] DatabaseList data, response status code and response headers
|
|
251
241
|
def list_databases_with_http_info(opts = {})
|
|
@@ -81,5 +81,62 @@ module VPNDetection
|
|
|
81
81
|
end
|
|
82
82
|
return data, status_code, headers
|
|
83
83
|
end
|
|
84
|
+
|
|
85
|
+
# Lookup your own address
|
|
86
|
+
# Answers what is known about the address this request came from, which is the same answer `GET /{ip}` gives for that address: the plan behind the presented key decides which fields come back, and the request counts against the same allowance. The address is the one our edge observed, so a request through a proxy or a VPN reports the exit it left through rather than the machine that made it. That is usually the point of asking.
|
|
87
|
+
# @param [Hash] opts the optional parameters
|
|
88
|
+
# @return [LookupResponse]
|
|
89
|
+
def lookup_my_ip(opts = {})
|
|
90
|
+
data, _status_code, _headers = lookup_my_ip_with_http_info(opts)
|
|
91
|
+
data
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Lookup your own address
|
|
95
|
+
# Answers what is known about the address this request came from, which is the same answer `GET /{ip}` gives for that address: the plan behind the presented key decides which fields come back, and the request counts against the same allowance. The address is the one our edge observed, so a request through a proxy or a VPN reports the exit it left through rather than the machine that made it. That is usually the point of asking.
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @return [Array<(LookupResponse, Integer, Hash)>] LookupResponse data, response status code and response headers
|
|
98
|
+
def lookup_my_ip_with_http_info(opts = {})
|
|
99
|
+
if @api_client.config.debugging
|
|
100
|
+
@api_client.config.logger.debug 'Calling API: LookupWireApi.lookup_my_ip ...'
|
|
101
|
+
end
|
|
102
|
+
# resource path
|
|
103
|
+
local_var_path = '/myip'
|
|
104
|
+
|
|
105
|
+
# query parameters
|
|
106
|
+
query_params = opts[:query_params] || {}
|
|
107
|
+
|
|
108
|
+
# header parameters
|
|
109
|
+
header_params = opts[:header_params] || {}
|
|
110
|
+
# HTTP header 'Accept' (if needed)
|
|
111
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
112
|
+
|
|
113
|
+
# form parameters
|
|
114
|
+
form_params = opts[:form_params] || {}
|
|
115
|
+
|
|
116
|
+
# http body (model)
|
|
117
|
+
post_body = opts[:debug_body]
|
|
118
|
+
|
|
119
|
+
# return_type
|
|
120
|
+
return_type = opts[:debug_return_type] || 'LookupResponse'
|
|
121
|
+
|
|
122
|
+
# auth_names
|
|
123
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyQuery', 'bearerAuth', 'apiKeyHeader']
|
|
124
|
+
|
|
125
|
+
new_options = opts.merge(
|
|
126
|
+
:operation => :"LookupWireApi.lookup_my_ip",
|
|
127
|
+
:header_params => header_params,
|
|
128
|
+
:query_params => query_params,
|
|
129
|
+
:form_params => form_params,
|
|
130
|
+
:body => post_body,
|
|
131
|
+
:auth_names => auth_names,
|
|
132
|
+
:return_type => return_type
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
136
|
+
if @api_client.config.debugging
|
|
137
|
+
@api_client.config.logger.debug "API called: LookupWireApi#lookup_my_ip\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
138
|
+
end
|
|
139
|
+
return data, status_code, headers
|
|
140
|
+
end
|
|
84
141
|
end
|
|
85
142
|
end
|
|
@@ -14,16 +14,15 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VPNDetection
|
|
17
|
-
# One
|
|
17
|
+
# One database FAMILY your organization is licensed for. A license covers the family, while a download names a specific version, so the ids you pass to the download and checksum endpoints come from `versions`.
|
|
18
18
|
class Database < ApiModelBase
|
|
19
|
-
# The
|
|
19
|
+
# The database family, e.g. `vpn_ip`. What the license is held against.
|
|
20
20
|
attr_accessor :base
|
|
21
21
|
|
|
22
22
|
attr_accessor :name
|
|
23
23
|
|
|
24
24
|
attr_accessor :summary
|
|
25
25
|
|
|
26
|
-
# What your license permits you to do with the data.
|
|
27
26
|
attr_accessor :license_type
|
|
28
27
|
|
|
29
28
|
attr_accessor :starts
|
|
@@ -40,7 +39,6 @@ module VPNDetection
|
|
|
40
39
|
# False when the license has lapsed; downloads are refused.
|
|
41
40
|
attr_accessor :in_term
|
|
42
41
|
|
|
43
|
-
# `licensed` is a live grant, `expired` one whose term has ended, and `unlicensed` a dataset published but never bought.
|
|
44
42
|
attr_accessor :standing
|
|
45
43
|
|
|
46
44
|
# Every published version of this family. The `id` here is what the download and checksum endpoints take.
|
|
@@ -101,13 +99,13 @@ module VPNDetection
|
|
|
101
99
|
:'base' => :'String',
|
|
102
100
|
:'name' => :'String',
|
|
103
101
|
:'summary' => :'String',
|
|
104
|
-
:'license_type' => :'
|
|
102
|
+
:'license_type' => :'LicenseType',
|
|
105
103
|
:'starts' => :'Time',
|
|
106
104
|
:'expires' => :'Time',
|
|
107
105
|
:'renews_at' => :'Time',
|
|
108
106
|
:'notice_due_at' => :'Time',
|
|
109
107
|
:'in_term' => :'Boolean',
|
|
110
|
-
:'standing' => :'
|
|
108
|
+
:'standing' => :'Standing',
|
|
111
109
|
:'versions' => :'Array<DatabaseVersion>'
|
|
112
110
|
}
|
|
113
111
|
end
|
|
@@ -251,12 +249,8 @@ module VPNDetection
|
|
|
251
249
|
return false if @name.nil?
|
|
252
250
|
return false if @summary.nil?
|
|
253
251
|
return false if @license_type.nil?
|
|
254
|
-
license_type_validator = EnumAttributeValidator.new('String', ["evaluation", "standard", "redistribute"])
|
|
255
|
-
return false unless license_type_validator.valid?(@license_type)
|
|
256
252
|
return false if @in_term.nil?
|
|
257
253
|
return false if @standing.nil?
|
|
258
|
-
standing_validator = EnumAttributeValidator.new('String', ["expired", "licensed", "unlicensed"])
|
|
259
|
-
return false unless standing_validator.valid?(@standing)
|
|
260
254
|
return false if @versions.nil?
|
|
261
255
|
true
|
|
262
256
|
end
|
|
@@ -291,13 +285,13 @@ module VPNDetection
|
|
|
291
285
|
@summary = summary
|
|
292
286
|
end
|
|
293
287
|
|
|
294
|
-
# Custom attribute writer method
|
|
295
|
-
# @param [Object] license_type
|
|
288
|
+
# Custom attribute writer method with validation
|
|
289
|
+
# @param [Object] license_type Value to be assigned
|
|
296
290
|
def license_type=(license_type)
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
fail ArgumentError, "invalid value for \"license_type\", must be one of #{validator.allowable_values}."
|
|
291
|
+
if license_type.nil?
|
|
292
|
+
fail ArgumentError, 'license_type cannot be nil'
|
|
300
293
|
end
|
|
294
|
+
|
|
301
295
|
@license_type = license_type
|
|
302
296
|
end
|
|
303
297
|
|
|
@@ -311,13 +305,13 @@ module VPNDetection
|
|
|
311
305
|
@in_term = in_term
|
|
312
306
|
end
|
|
313
307
|
|
|
314
|
-
# Custom attribute writer method
|
|
315
|
-
# @param [Object] standing
|
|
308
|
+
# Custom attribute writer method with validation
|
|
309
|
+
# @param [Object] standing Value to be assigned
|
|
316
310
|
def standing=(standing)
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
fail ArgumentError, "invalid value for \"standing\", must be one of #{validator.allowable_values}."
|
|
311
|
+
if standing.nil?
|
|
312
|
+
fail ArgumentError, 'standing cannot be nil'
|
|
320
313
|
end
|
|
314
|
+
|
|
321
315
|
@standing = standing
|
|
322
316
|
end
|
|
323
317
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#VPNDetection API
|
|
3
|
+
|
|
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
|
+
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
|
+
Contact: support@vpndetection.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module VPNDetection
|
|
17
|
+
class DatabaseFormat
|
|
18
|
+
CSVGZ = "csvgz".freeze
|
|
19
|
+
MMDB = "mmdb".freeze
|
|
20
|
+
|
|
21
|
+
def self.all_vars
|
|
22
|
+
@all_vars ||= [CSVGZ, MMDB].freeze
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Builds the enum from string
|
|
26
|
+
# @param [String] The enum value in the form of the string
|
|
27
|
+
# @return [String] The enum value
|
|
28
|
+
def self.build_from_hash(value)
|
|
29
|
+
new.build_from_hash(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Builds the enum from string
|
|
33
|
+
# @param [String] The enum value in the form of the string
|
|
34
|
+
# @return [String] The enum value
|
|
35
|
+
def build_from_hash(value)
|
|
36
|
+
return value if DatabaseFormat.all_vars.include?(value)
|
|
37
|
+
raise "Invalid ENUM value #{value} for class #DatabaseFormat"
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -63,7 +63,7 @@ module VPNDetection
|
|
|
63
63
|
# Attribute type mapping.
|
|
64
64
|
def self.openapi_types
|
|
65
65
|
{
|
|
66
|
-
:'format' => :'
|
|
66
|
+
:'format' => :'DatabaseFormat',
|
|
67
67
|
:'bytes' => :'Integer'
|
|
68
68
|
}
|
|
69
69
|
end
|
|
@@ -121,18 +121,16 @@ module VPNDetection
|
|
|
121
121
|
def valid?
|
|
122
122
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
123
123
|
return false if @format.nil?
|
|
124
|
-
format_validator = EnumAttributeValidator.new('String', ["csvgz", "mmdb"])
|
|
125
|
-
return false unless format_validator.valid?(@format)
|
|
126
124
|
true
|
|
127
125
|
end
|
|
128
126
|
|
|
129
|
-
# Custom attribute writer method
|
|
130
|
-
# @param [Object] format
|
|
127
|
+
# Custom attribute writer method with validation
|
|
128
|
+
# @param [Object] format Value to be assigned
|
|
131
129
|
def format=(format)
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
fail ArgumentError, "invalid value for \"format\", must be one of #{validator.allowable_values}."
|
|
130
|
+
if format.nil?
|
|
131
|
+
fail ArgumentError, 'format cannot be nil'
|
|
135
132
|
end
|
|
133
|
+
|
|
136
134
|
@format = format
|
|
137
135
|
end
|
|
138
136
|
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module VPNDetection
|
|
17
17
|
class DatabaseVersion < ApiModelBase
|
|
18
|
-
# The versioned
|
|
18
|
+
# The versioned database id, e.g. `vpn_ip_v1`. Pass this to download.
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
21
21
|
attr_accessor :version
|
|
@@ -27,28 +27,6 @@ module VPNDetection
|
|
|
27
27
|
# The formats an evaluation sample is published in, if any.
|
|
28
28
|
attr_accessor :sample_formats
|
|
29
29
|
|
|
30
|
-
class EnumAttributeValidator
|
|
31
|
-
attr_reader :datatype
|
|
32
|
-
attr_reader :allowable_values
|
|
33
|
-
|
|
34
|
-
def initialize(datatype, allowable_values)
|
|
35
|
-
@allowable_values = allowable_values.map do |value|
|
|
36
|
-
case datatype.to_s
|
|
37
|
-
when /Integer/i
|
|
38
|
-
value.to_i
|
|
39
|
-
when /Float/i
|
|
40
|
-
value.to_f
|
|
41
|
-
else
|
|
42
|
-
value
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def valid?(value)
|
|
48
|
-
!value || allowable_values.include?(value)
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
|
|
52
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
31
|
def self.attribute_map
|
|
54
32
|
{
|
|
@@ -77,7 +55,7 @@ module VPNDetection
|
|
|
77
55
|
:'version' => :'Integer',
|
|
78
56
|
:'summary' => :'String',
|
|
79
57
|
:'formats' => :'Array<DatabaseFormatSize>',
|
|
80
|
-
:'sample_formats' => :'Array<
|
|
58
|
+
:'sample_formats' => :'Array<DatabaseFormat>'
|
|
81
59
|
}
|
|
82
60
|
end
|
|
83
61
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#VPNDetection API
|
|
3
|
+
|
|
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
|
+
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
|
+
Contact: support@vpndetection.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module VPNDetection
|
|
17
|
+
class LicenseType
|
|
18
|
+
EVALUATION = "evaluation".freeze
|
|
19
|
+
STANDARD = "standard".freeze
|
|
20
|
+
REDISTRIBUTE = "redistribute".freeze
|
|
21
|
+
|
|
22
|
+
def self.all_vars
|
|
23
|
+
@all_vars ||= [EVALUATION, STANDARD, REDISTRIBUTE].freeze
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Builds the enum from string
|
|
27
|
+
# @param [String] The enum value in the form of the string
|
|
28
|
+
# @return [String] The enum value
|
|
29
|
+
def self.build_from_hash(value)
|
|
30
|
+
new.build_from_hash(value)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Builds the enum from string
|
|
34
|
+
# @param [String] The enum value in the form of the string
|
|
35
|
+
# @return [String] The enum value
|
|
36
|
+
def build_from_hash(value)
|
|
37
|
+
return value if LicenseType.all_vars.include?(value)
|
|
38
|
+
raise "Invalid ENUM value #{value} for class #LicenseType"
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#VPNDetection API
|
|
3
|
+
|
|
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
|
+
|
|
6
|
+
The version of the OpenAPI document: 2026.09.13
|
|
7
|
+
Contact: support@vpndetection.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module VPNDetection
|
|
17
|
+
class Standing
|
|
18
|
+
EXPIRED = "expired".freeze
|
|
19
|
+
LICENSED = "licensed".freeze
|
|
20
|
+
UNLICENSED = "unlicensed".freeze
|
|
21
|
+
|
|
22
|
+
def self.all_vars
|
|
23
|
+
@all_vars ||= [EXPIRED, LICENSED, UNLICENSED].freeze
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Builds the enum from string
|
|
27
|
+
# @param [String] The enum value in the form of the string
|
|
28
|
+
# @return [String] The enum value
|
|
29
|
+
def self.build_from_hash(value)
|
|
30
|
+
new.build_from_hash(value)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Builds the enum from string
|
|
34
|
+
# @param [String] The enum value in the form of the string
|
|
35
|
+
# @return [String] The enum value
|
|
36
|
+
def build_from_hash(value)
|
|
37
|
+
return value if Standing.all_vars.include?(value)
|
|
38
|
+
raise "Invalid ENUM value #{value} for class #Standing"
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
data/lib/vpndetection/version.rb
CHANGED
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:
|
|
4
|
+
version: 3.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mslm Dev
|
|
@@ -63,6 +63,7 @@ files:
|
|
|
63
63
|
- lib/vpndetection/models/class_detail.rb
|
|
64
64
|
- lib/vpndetection/models/database.rb
|
|
65
65
|
- lib/vpndetection/models/database_checksums_response.rb
|
|
66
|
+
- lib/vpndetection/models/database_format.rb
|
|
66
67
|
- lib/vpndetection/models/database_format_size.rb
|
|
67
68
|
- lib/vpndetection/models/database_list.rb
|
|
68
69
|
- lib/vpndetection/models/database_metadata.rb
|
|
@@ -72,9 +73,11 @@ files:
|
|
|
72
73
|
- lib/vpndetection/models/download.rb
|
|
73
74
|
- lib/vpndetection/models/download_list.rb
|
|
74
75
|
- lib/vpndetection/models/error_envelope.rb
|
|
76
|
+
- lib/vpndetection/models/license_type.rb
|
|
75
77
|
- lib/vpndetection/models/lookup_error.rb
|
|
76
78
|
- lib/vpndetection/models/lookup_response.rb
|
|
77
79
|
- lib/vpndetection/models/proxy_detail.rb
|
|
80
|
+
- lib/vpndetection/models/standing.rb
|
|
78
81
|
- lib/vpndetection/models/vpn_detail.rb
|
|
79
82
|
- lib/vpndetection/result.rb
|
|
80
83
|
- lib/vpndetection/retries.rb
|