vpndetection 4.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -0
  3. data/lib/vpndetection/api/account_wire_api.rb +16 -16
  4. data/lib/vpndetection/api/api_keys_wire_api.rb +336 -0
  5. data/lib/vpndetection/api/authorization_wire_api.rb +421 -0
  6. data/lib/vpndetection/api/database_wire_api.rb +1 -1
  7. data/lib/vpndetection/api/entitlement_wire_api.rb +79 -0
  8. data/lib/vpndetection/api/lookup_wire_api.rb +3 -3
  9. data/lib/vpndetection/api/organization_wire_api.rb +136 -0
  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/client.rb +41 -0
  14. data/lib/vpndetection/configuration.rb +1 -5
  15. data/lib/vpndetection/models/account_create_apikey_request.rb +177 -0
  16. data/lib/vpndetection/models/account_created_apikey.rb +257 -0
  17. data/lib/vpndetection/models/account_org.rb +183 -0
  18. data/lib/vpndetection/models/account_org_ref.rb +164 -0
  19. data/lib/vpndetection/models/account_org_wrap.rb +190 -0
  20. data/lib/vpndetection/models/account_rc.rb +165 -0
  21. data/lib/vpndetection/models/account_revealed_apikey.rb +191 -0
  22. data/lib/vpndetection/models/account_user.rb +182 -0
  23. data/lib/vpndetection/models/apikey_detail.rb +307 -0
  24. data/lib/vpndetection/models/apikey_list.rb +192 -0
  25. data/lib/vpndetection/models/class_detail.rb +1 -1
  26. data/lib/vpndetection/models/database.rb +1 -1
  27. data/lib/vpndetection/models/database_checksums_response.rb +1 -1
  28. data/lib/vpndetection/models/database_format.rb +1 -1
  29. data/lib/vpndetection/models/database_format_size.rb +2 -2
  30. data/lib/vpndetection/models/database_list.rb +1 -1
  31. data/lib/vpndetection/models/database_metadata.rb +1 -1
  32. data/lib/vpndetection/models/database_metadata_column.rb +1 -1
  33. data/lib/vpndetection/models/database_version.rb +1 -1
  34. data/lib/vpndetection/models/db_checksums.rb +1 -1
  35. data/lib/vpndetection/models/device_authorization.rb +281 -0
  36. data/lib/vpndetection/models/download.rb +2 -2
  37. data/lib/vpndetection/models/download_list.rb +1 -1
  38. data/lib/vpndetection/models/{account_me.rb → entitlement.rb} +7 -7
  39. data/lib/vpndetection/models/{account_apikey.rb → entitlement_apikey.rb} +4 -4
  40. data/lib/vpndetection/models/{account_error.rb → entitlement_error.rb} +4 -4
  41. data/lib/vpndetection/models/{account_plan.rb → entitlement_plan.rb} +4 -4
  42. data/lib/vpndetection/models/{account_usage.rb → entitlement_usage.rb} +4 -4
  43. data/lib/vpndetection/models/error_envelope.rb +1 -1
  44. data/lib/vpndetection/models/identity.rb +245 -0
  45. data/lib/vpndetection/models/lookup_error.rb +1 -1
  46. data/lib/vpndetection/models/lookup_response.rb +1 -1
  47. data/lib/vpndetection/models/oauth_error.rb +173 -0
  48. data/lib/vpndetection/models/oauth_metadata.rb +288 -0
  49. data/lib/vpndetection/models/proxy_detail.rb +1 -1
  50. data/lib/vpndetection/models/standing.rb +1 -1
  51. data/lib/vpndetection/models/token_response.rb +235 -0
  52. data/lib/vpndetection/models/vpn_detail.rb +1 -1
  53. data/lib/vpndetection/transport.rb +25 -0
  54. data/lib/vpndetection/version.rb +1 -1
  55. metadata +25 -6
@@ -0,0 +1,192 @@
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.15
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 ApikeyList < ApiModelBase
18
+ attr_accessor :rc
19
+
20
+ attr_accessor :keys
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'rc' => :'rc',
26
+ :'keys' => :'keys'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'rc' => :'String',
44
+ :'keys' => :'Array<ApikeyDetail>'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::ApikeyList` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::ApikeyList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'rc')
71
+ self.rc = attributes[:'rc']
72
+ else
73
+ self.rc = nil
74
+ end
75
+
76
+ if attributes.key?(:'keys')
77
+ if (value = attributes[:'keys']).is_a?(Array)
78
+ self.keys = value
79
+ end
80
+ else
81
+ self.keys = nil
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
+ invalid_properties = Array.new
90
+ if @rc.nil?
91
+ invalid_properties.push('invalid value for "rc", rc cannot be nil.')
92
+ end
93
+
94
+ if @keys.nil?
95
+ invalid_properties.push('invalid value for "keys", keys cannot be nil.')
96
+ end
97
+
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ return false if @rc.nil?
106
+ return false if @keys.nil?
107
+ true
108
+ end
109
+
110
+ # Custom attribute writer method with validation
111
+ # @param [Object] rc Value to be assigned
112
+ def rc=(rc)
113
+ if rc.nil?
114
+ fail ArgumentError, 'rc cannot be nil'
115
+ end
116
+
117
+ @rc = rc
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] keys Value to be assigned
122
+ def keys=(keys)
123
+ if keys.nil?
124
+ fail ArgumentError, 'keys cannot be nil'
125
+ end
126
+
127
+ @keys = keys
128
+ end
129
+
130
+ # Checks equality by comparing each attribute.
131
+ # @param [Object] Object to be compared
132
+ def ==(o)
133
+ return true if self.equal?(o)
134
+ self.class == o.class &&
135
+ rc == o.rc &&
136
+ keys == o.keys
137
+ end
138
+
139
+ # @see the `==` method
140
+ # @param [Object] Object to be compared
141
+ def eql?(o)
142
+ self == o
143
+ end
144
+
145
+ # Calculates hash code according to all attributes.
146
+ # @return [Integer] Hash code
147
+ def hash
148
+ [rc, keys].hash
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def self.build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ attributes = attributes.transform_keys(&:to_sym)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
161
+ elsif type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
166
+ end
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
169
+ end
170
+ end
171
+ new(transformed_hash)
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ if value.nil?
181
+ is_nullable = self.class.openapi_nullable.include?(attr)
182
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
+ end
184
+
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ end
191
+
192
+ 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.09.13
6
+ The version of the OpenAPI document: 2026.09.15
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.09.13
6
+ The version of the OpenAPI document: 2026.09.15
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.09.13
6
+ The version of the OpenAPI document: 2026.09.15
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.09.13
6
+ The version of the OpenAPI document: 2026.09.15
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.09.13
6
+ The version of the OpenAPI document: 2026.09.15
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 DatabaseFormatSize < ApiModelBase
18
18
  attr_accessor :format
19
19
 
20
- # Size of the published file, or null when it has not been published yet
20
+ # Size of the published file, or null when it has not been published yet. int64 because it is not hypothetical: resproxy_ip_14d's MMDB is 4.58 GB, so a 32-bit field cannot carry the catalogue and `list` throws for every caller rather than for that one entry.
21
21
  attr_accessor :bytes
22
22
 
23
23
  class EnumAttributeValidator
@@ -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.09.13
6
+ The version of the OpenAPI document: 2026.09.15
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.09.13
6
+ The version of the OpenAPI document: 2026.09.15
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.09.13
6
+ The version of the OpenAPI document: 2026.09.15
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.09.13
6
+ The version of the OpenAPI document: 2026.09.15
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.09.13
6
+ The version of the OpenAPI document: 2026.09.15
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -0,0 +1,281 @@
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.15
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 DeviceAuthorization < ApiModelBase
18
+ # Yours. Poll with it; never show it to anyone.
19
+ attr_accessor :device_code
20
+
21
+ # Short and typable. This is what the person confirms.
22
+ attr_accessor :user_code
23
+
24
+ attr_accessor :verification_uri
25
+
26
+ # The same page with the code already filled in.
27
+ attr_accessor :verification_uri_complete
28
+
29
+ attr_accessor :expires_in
30
+
31
+ # Seconds between polls.
32
+ attr_accessor :interval
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'device_code' => :'device_code',
38
+ :'user_code' => :'user_code',
39
+ :'verification_uri' => :'verification_uri',
40
+ :'verification_uri_complete' => :'verification_uri_complete',
41
+ :'expires_in' => :'expires_in',
42
+ :'interval' => :'interval'
43
+ }
44
+ end
45
+
46
+ # Returns attribute mapping this model knows about
47
+ def self.acceptable_attribute_map
48
+ attribute_map
49
+ end
50
+
51
+ # Returns all the JSON keys this model knows about
52
+ def self.acceptable_attributes
53
+ acceptable_attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.openapi_types
58
+ {
59
+ :'device_code' => :'String',
60
+ :'user_code' => :'String',
61
+ :'verification_uri' => :'String',
62
+ :'verification_uri_complete' => :'String',
63
+ :'expires_in' => :'Integer',
64
+ :'interval' => :'Integer'
65
+ }
66
+ end
67
+
68
+ # List of attributes with nullable: true
69
+ def self.openapi_nullable
70
+ Set.new([
71
+ ])
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ if (!attributes.is_a?(Hash))
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::DeviceAuthorization` initialize method"
79
+ end
80
+
81
+ # check to see if the attribute exists and convert string to symbol for hash key
82
+ acceptable_attribute_map = self.class.acceptable_attribute_map
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!acceptable_attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::DeviceAuthorization`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'device_code')
91
+ self.device_code = attributes[:'device_code']
92
+ else
93
+ self.device_code = nil
94
+ end
95
+
96
+ if attributes.key?(:'user_code')
97
+ self.user_code = attributes[:'user_code']
98
+ else
99
+ self.user_code = nil
100
+ end
101
+
102
+ if attributes.key?(:'verification_uri')
103
+ self.verification_uri = attributes[:'verification_uri']
104
+ else
105
+ self.verification_uri = nil
106
+ end
107
+
108
+ if attributes.key?(:'verification_uri_complete')
109
+ self.verification_uri_complete = attributes[:'verification_uri_complete']
110
+ end
111
+
112
+ if attributes.key?(:'expires_in')
113
+ self.expires_in = attributes[:'expires_in']
114
+ else
115
+ self.expires_in = nil
116
+ end
117
+
118
+ if attributes.key?(:'interval')
119
+ self.interval = attributes[:'interval']
120
+ else
121
+ self.interval = nil
122
+ end
123
+ end
124
+
125
+ # Show invalid properties with the reasons. Usually used together with valid?
126
+ # @return Array for valid properties with the reasons
127
+ def list_invalid_properties
128
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
129
+ invalid_properties = Array.new
130
+ if @device_code.nil?
131
+ invalid_properties.push('invalid value for "device_code", device_code cannot be nil.')
132
+ end
133
+
134
+ if @user_code.nil?
135
+ invalid_properties.push('invalid value for "user_code", user_code cannot be nil.')
136
+ end
137
+
138
+ if @verification_uri.nil?
139
+ invalid_properties.push('invalid value for "verification_uri", verification_uri cannot be nil.')
140
+ end
141
+
142
+ if @expires_in.nil?
143
+ invalid_properties.push('invalid value for "expires_in", expires_in cannot be nil.')
144
+ end
145
+
146
+ if @interval.nil?
147
+ invalid_properties.push('invalid value for "interval", interval cannot be nil.')
148
+ end
149
+
150
+ invalid_properties
151
+ end
152
+
153
+ # Check to see if the all the properties in the model are valid
154
+ # @return true if the model is valid
155
+ def valid?
156
+ warn '[DEPRECATED] the `valid?` method is obsolete'
157
+ return false if @device_code.nil?
158
+ return false if @user_code.nil?
159
+ return false if @verification_uri.nil?
160
+ return false if @expires_in.nil?
161
+ return false if @interval.nil?
162
+ true
163
+ end
164
+
165
+ # Custom attribute writer method with validation
166
+ # @param [Object] device_code Value to be assigned
167
+ def device_code=(device_code)
168
+ if device_code.nil?
169
+ fail ArgumentError, 'device_code cannot be nil'
170
+ end
171
+
172
+ @device_code = device_code
173
+ end
174
+
175
+ # Custom attribute writer method with validation
176
+ # @param [Object] user_code Value to be assigned
177
+ def user_code=(user_code)
178
+ if user_code.nil?
179
+ fail ArgumentError, 'user_code cannot be nil'
180
+ end
181
+
182
+ @user_code = user_code
183
+ end
184
+
185
+ # Custom attribute writer method with validation
186
+ # @param [Object] verification_uri Value to be assigned
187
+ def verification_uri=(verification_uri)
188
+ if verification_uri.nil?
189
+ fail ArgumentError, 'verification_uri cannot be nil'
190
+ end
191
+
192
+ @verification_uri = verification_uri
193
+ end
194
+
195
+ # Custom attribute writer method with validation
196
+ # @param [Object] expires_in Value to be assigned
197
+ def expires_in=(expires_in)
198
+ if expires_in.nil?
199
+ fail ArgumentError, 'expires_in cannot be nil'
200
+ end
201
+
202
+ @expires_in = expires_in
203
+ end
204
+
205
+ # Custom attribute writer method with validation
206
+ # @param [Object] interval Value to be assigned
207
+ def interval=(interval)
208
+ if interval.nil?
209
+ fail ArgumentError, 'interval cannot be nil'
210
+ end
211
+
212
+ @interval = interval
213
+ end
214
+
215
+ # Checks equality by comparing each attribute.
216
+ # @param [Object] Object to be compared
217
+ def ==(o)
218
+ return true if self.equal?(o)
219
+ self.class == o.class &&
220
+ device_code == o.device_code &&
221
+ user_code == o.user_code &&
222
+ verification_uri == o.verification_uri &&
223
+ verification_uri_complete == o.verification_uri_complete &&
224
+ expires_in == o.expires_in &&
225
+ interval == o.interval
226
+ end
227
+
228
+ # @see the `==` method
229
+ # @param [Object] Object to be compared
230
+ def eql?(o)
231
+ self == o
232
+ end
233
+
234
+ # Calculates hash code according to all attributes.
235
+ # @return [Integer] Hash code
236
+ def hash
237
+ [device_code, user_code, verification_uri, verification_uri_complete, expires_in, interval].hash
238
+ end
239
+
240
+ # Builds the object from hash
241
+ # @param [Hash] attributes Model attributes in the form of hash
242
+ # @return [Object] Returns the model itself
243
+ def self.build_from_hash(attributes)
244
+ return nil unless attributes.is_a?(Hash)
245
+ attributes = attributes.transform_keys(&:to_sym)
246
+ transformed_hash = {}
247
+ openapi_types.each_pair do |key, type|
248
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
249
+ transformed_hash["#{key}"] = nil
250
+ elsif type =~ /\AArray<(.*)>/i
251
+ # check to ensure the input is an array given that the attribute
252
+ # is documented as an array but the input is not
253
+ if attributes[attribute_map[key]].is_a?(Array)
254
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
255
+ end
256
+ elsif !attributes[attribute_map[key]].nil?
257
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
258
+ end
259
+ end
260
+ new(transformed_hash)
261
+ end
262
+
263
+ # Returns the object in the form of hash
264
+ # @return [Hash] Returns the object in the form of hash
265
+ def to_hash
266
+ hash = {}
267
+ self.class.attribute_map.each_pair do |attr, param|
268
+ value = self.send(attr)
269
+ if value.nil?
270
+ is_nullable = self.class.openapi_nullable.include?(attr)
271
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
272
+ end
273
+
274
+ hash[param] = _to_hash(value)
275
+ end
276
+ hash
277
+ end
278
+
279
+ end
280
+
281
+ 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.09.13
6
+ The version of the OpenAPI document: 2026.09.15
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 evaluation sample rather than the database itself.
26
26
  attr_accessor :sample
27
27
 
28
- # Object size at redirect time, NOT bytes delivered: the transfer is a presigned redirect straight to object storage, so we never observe it.
28
+ # Object size at redirect time, NOT bytes delivered: the transfer is a presigned redirect straight to object storage, so we never observe it. int64 for the same reason as DatabaseFormatSize.bytes - it is the size of the same object.
29
29
  attr_accessor :bytes
30
30
 
31
31
  attr_accessor :http_status
@@ -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.09.13
6
+ The version of the OpenAPI document: 2026.09.15
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.09.13
6
+ The version of the OpenAPI document: 2026.09.15
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
- class AccountMe < ApiModelBase
17
+ class Entitlement < ApiModelBase
18
18
  # The organization the key belongs to.
19
19
  attr_accessor :org_id
20
20
 
@@ -48,9 +48,9 @@ module VPNDetection
48
48
  def self.openapi_types
49
49
  {
50
50
  :'org_id' => :'String',
51
- :'apikey' => :'AccountApikey',
52
- :'plan' => :'AccountPlan',
53
- :'usage' => :'AccountUsage'
51
+ :'apikey' => :'EntitlementApikey',
52
+ :'plan' => :'EntitlementPlan',
53
+ :'usage' => :'EntitlementUsage'
54
54
  }
55
55
  end
56
56
 
@@ -64,14 +64,14 @@ module VPNDetection
64
64
  # @param [Hash] attributes Model attributes in the form of hash
65
65
  def initialize(attributes = {})
66
66
  if (!attributes.is_a?(Hash))
67
- fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::AccountMe` initialize method"
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::Entitlement` initialize method"
68
68
  end
69
69
 
70
70
  # check to see if the attribute exists and convert string to symbol for hash key
71
71
  acceptable_attribute_map = self.class.acceptable_attribute_map
72
72
  attributes = attributes.each_with_object({}) { |(k, v), h|
73
73
  if (!acceptable_attribute_map.key?(k.to_sym))
74
- fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::AccountMe`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::Entitlement`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
75
75
  end
76
76
  h[k.to_sym] = v
77
77
  }