vpndetection 4.0.1 → 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 +4 -4
  14. data/lib/vpndetection/configuration.rb +1 -1
  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 +5 -5
  54. data/lib/vpndetection/version.rb +1 -1
  55. metadata +25 -6
@@ -0,0 +1,421 @@
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 'cgi'
14
+
15
+ module VPNDetection
16
+ class AuthorizationWireApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Authorize
23
+ # The browser entry point for the authorization-code flow. This is a redirect target, not something to call from code. An unknown `client_id` or an unregistered `redirect_uri` is shown to the USER and never redirected, because sending an error to an address we have not verified belongs to you is how an open redirector works. Everything else comes back to your `redirect_uri` with `error`, your `state`, and `iss`.
24
+ # @param client_id [String]
25
+ # @param redirect_uri [String]
26
+ # @param response_type [String]
27
+ # @param code_challenge [String]
28
+ # @param [Hash] opts the optional parameters
29
+ # @option opts [String] :code_challenge_method S256 only. `plain` is refused rather than downgraded.
30
+ # @option opts [String] :scope
31
+ # @option opts [String] :state Returned unchanged. Use it to bind the response to your request.
32
+ # @option opts [String] :resource RFC 8707. What the token is FOR, so it cannot be replayed elsewhere.
33
+ # @return [nil]
34
+ def oauth_authorize(client_id, redirect_uri, response_type, code_challenge, opts = {})
35
+ oauth_authorize_with_http_info(client_id, redirect_uri, response_type, code_challenge, opts)
36
+ nil
37
+ end
38
+
39
+ # Authorize
40
+ # The browser entry point for the authorization-code flow. This is a redirect target, not something to call from code. An unknown `client_id` or an unregistered `redirect_uri` is shown to the USER and never redirected, because sending an error to an address we have not verified belongs to you is how an open redirector works. Everything else comes back to your `redirect_uri` with `error`, your `state`, and `iss`.
41
+ # @param client_id [String]
42
+ # @param redirect_uri [String]
43
+ # @param response_type [String]
44
+ # @param code_challenge [String]
45
+ # @param [Hash] opts the optional parameters
46
+ # @option opts [String] :code_challenge_method S256 only. `plain` is refused rather than downgraded.
47
+ # @option opts [String] :scope
48
+ # @option opts [String] :state Returned unchanged. Use it to bind the response to your request.
49
+ # @option opts [String] :resource RFC 8707. What the token is FOR, so it cannot be replayed elsewhere.
50
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
51
+ def oauth_authorize_with_http_info(client_id, redirect_uri, response_type, code_challenge, opts = {})
52
+ if @api_client.config.debugging
53
+ @api_client.config.logger.debug 'Calling API: AuthorizationWireApi.oauth_authorize ...'
54
+ end
55
+ # verify the required parameter 'client_id' is set
56
+ if @api_client.config.client_side_validation && client_id.nil?
57
+ fail ArgumentError, "Missing the required parameter 'client_id' when calling AuthorizationWireApi.oauth_authorize"
58
+ end
59
+ # verify the required parameter 'redirect_uri' is set
60
+ if @api_client.config.client_side_validation && redirect_uri.nil?
61
+ fail ArgumentError, "Missing the required parameter 'redirect_uri' when calling AuthorizationWireApi.oauth_authorize"
62
+ end
63
+ # verify the required parameter 'response_type' is set
64
+ if @api_client.config.client_side_validation && response_type.nil?
65
+ fail ArgumentError, "Missing the required parameter 'response_type' when calling AuthorizationWireApi.oauth_authorize"
66
+ end
67
+ # verify enum value
68
+ allowable_values = ["code"]
69
+ if @api_client.config.client_side_validation && !allowable_values.include?(response_type)
70
+ fail ArgumentError, "invalid value for \"response_type\", must be one of #{allowable_values}"
71
+ end
72
+ # verify the required parameter 'code_challenge' is set
73
+ if @api_client.config.client_side_validation && code_challenge.nil?
74
+ fail ArgumentError, "Missing the required parameter 'code_challenge' when calling AuthorizationWireApi.oauth_authorize"
75
+ end
76
+ allowable_values = ["S256"]
77
+ if @api_client.config.client_side_validation && opts[:'code_challenge_method'] && !allowable_values.include?(opts[:'code_challenge_method'])
78
+ fail ArgumentError, "invalid value for \"code_challenge_method\", must be one of #{allowable_values}"
79
+ end
80
+ # resource path
81
+ local_var_path = '/oauth/authorize'
82
+
83
+ # query parameters
84
+ query_params = opts[:query_params] || {}
85
+ query_params[:'client_id'] = client_id
86
+ query_params[:'redirect_uri'] = redirect_uri
87
+ query_params[:'response_type'] = response_type
88
+ query_params[:'code_challenge'] = code_challenge
89
+ query_params[:'code_challenge_method'] = opts[:'code_challenge_method'] if !opts[:'code_challenge_method'].nil?
90
+ query_params[:'scope'] = opts[:'scope'] if !opts[:'scope'].nil?
91
+ query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
92
+ query_params[:'resource'] = opts[:'resource'] if !opts[:'resource'].nil?
93
+
94
+ # header parameters
95
+ header_params = opts[:header_params] || {}
96
+
97
+ # form parameters
98
+ form_params = opts[:form_params] || {}
99
+
100
+ # http body (model)
101
+ post_body = opts[:debug_body]
102
+
103
+ # return_type
104
+ return_type = opts[:debug_return_type]
105
+
106
+ # auth_names
107
+ auth_names = opts[:debug_auth_names] || []
108
+
109
+ new_options = opts.merge(
110
+ :operation => :"AuthorizationWireApi.oauth_authorize",
111
+ :header_params => header_params,
112
+ :query_params => query_params,
113
+ :form_params => form_params,
114
+ :body => post_body,
115
+ :auth_names => auth_names,
116
+ :return_type => return_type
117
+ )
118
+
119
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
120
+ if @api_client.config.debugging
121
+ @api_client.config.logger.debug "API called: AuthorizationWireApi#oauth_authorize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
122
+ end
123
+ return data, status_code, headers
124
+ end
125
+
126
+ # Device authorization
127
+ # Starts the device flow. Show the `user_code` to the person and send them to `verification_uri`; `verification_uri_complete` has the code already embedded, which is what to open if you can open a browser at all. Then poll `/oauth/token`, no faster than `interval` seconds.
128
+ # @param client_id [String]
129
+ # @param [Hash] opts the optional parameters
130
+ # @option opts [String] :scope Space-delimited. Anything your client is not registered for is dropped rather than refused.
131
+ # @option opts [String] :resource RFC 8707: what the token is for.
132
+ # @return [DeviceAuthorization]
133
+ def oauth_device_authorization(client_id, opts = {})
134
+ data, _status_code, _headers = oauth_device_authorization_with_http_info(client_id, opts)
135
+ data
136
+ end
137
+
138
+ # Device authorization
139
+ # Starts the device flow. Show the &#x60;user_code&#x60; to the person and send them to &#x60;verification_uri&#x60;; &#x60;verification_uri_complete&#x60; has the code already embedded, which is what to open if you can open a browser at all. Then poll &#x60;/oauth/token&#x60;, no faster than &#x60;interval&#x60; seconds.
140
+ # @param client_id [String]
141
+ # @param [Hash] opts the optional parameters
142
+ # @option opts [String] :scope Space-delimited. Anything your client is not registered for is dropped rather than refused.
143
+ # @option opts [String] :resource RFC 8707: what the token is for.
144
+ # @return [Array<(DeviceAuthorization, Integer, Hash)>] DeviceAuthorization data, response status code and response headers
145
+ def oauth_device_authorization_with_http_info(client_id, opts = {})
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug 'Calling API: AuthorizationWireApi.oauth_device_authorization ...'
148
+ end
149
+ # verify the required parameter 'client_id' is set
150
+ if @api_client.config.client_side_validation && client_id.nil?
151
+ fail ArgumentError, "Missing the required parameter 'client_id' when calling AuthorizationWireApi.oauth_device_authorization"
152
+ end
153
+ # resource path
154
+ local_var_path = '/oauth/device_authorization'
155
+
156
+ # query parameters
157
+ query_params = opts[:query_params] || {}
158
+
159
+ # header parameters
160
+ header_params = opts[:header_params] || {}
161
+ # HTTP header 'Accept' (if needed)
162
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
163
+ # HTTP header 'Content-Type'
164
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
165
+ if !content_type.nil?
166
+ header_params['Content-Type'] = content_type
167
+ end
168
+
169
+ # form parameters
170
+ form_params = opts[:form_params] || {}
171
+ form_params['client_id'] = client_id
172
+ form_params['scope'] = opts[:'scope'] if !opts[:'scope'].nil?
173
+ form_params['resource'] = opts[:'resource'] if !opts[:'resource'].nil?
174
+
175
+ # http body (model)
176
+ post_body = opts[:debug_body]
177
+
178
+ # return_type
179
+ return_type = opts[:debug_return_type] || 'DeviceAuthorization'
180
+
181
+ # auth_names
182
+ auth_names = opts[:debug_auth_names] || []
183
+
184
+ new_options = opts.merge(
185
+ :operation => :"AuthorizationWireApi.oauth_device_authorization",
186
+ :header_params => header_params,
187
+ :query_params => query_params,
188
+ :form_params => form_params,
189
+ :body => post_body,
190
+ :auth_names => auth_names,
191
+ :return_type => return_type
192
+ )
193
+
194
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug "API called: AuthorizationWireApi#oauth_device_authorization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
197
+ end
198
+ return data, status_code, headers
199
+ end
200
+
201
+ # Discovery
202
+ # RFC 8414 authorization server metadata: the endpoints, the grant types and the scopes this server supports. Read this rather than hardcoding endpoints. It is also served at `/.well-known/openid-configuration`, identically, because several clients probe that path first.
203
+ # @param [Hash] opts the optional parameters
204
+ # @return [OauthMetadata]
205
+ def oauth_metadata(opts = {})
206
+ data, _status_code, _headers = oauth_metadata_with_http_info(opts)
207
+ data
208
+ end
209
+
210
+ # Discovery
211
+ # RFC 8414 authorization server metadata: the endpoints, the grant types and the scopes this server supports. Read this rather than hardcoding endpoints. It is also served at &#x60;/.well-known/openid-configuration&#x60;, identically, because several clients probe that path first.
212
+ # @param [Hash] opts the optional parameters
213
+ # @return [Array<(OauthMetadata, Integer, Hash)>] OauthMetadata data, response status code and response headers
214
+ def oauth_metadata_with_http_info(opts = {})
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug 'Calling API: AuthorizationWireApi.oauth_metadata ...'
217
+ end
218
+ # resource path
219
+ local_var_path = '/.well-known/oauth-authorization-server'
220
+
221
+ # query parameters
222
+ query_params = opts[:query_params] || {}
223
+
224
+ # header parameters
225
+ header_params = opts[:header_params] || {}
226
+ # HTTP header 'Accept' (if needed)
227
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
228
+
229
+ # form parameters
230
+ form_params = opts[:form_params] || {}
231
+
232
+ # http body (model)
233
+ post_body = opts[:debug_body]
234
+
235
+ # return_type
236
+ return_type = opts[:debug_return_type] || 'OauthMetadata'
237
+
238
+ # auth_names
239
+ auth_names = opts[:debug_auth_names] || []
240
+
241
+ new_options = opts.merge(
242
+ :operation => :"AuthorizationWireApi.oauth_metadata",
243
+ :header_params => header_params,
244
+ :query_params => query_params,
245
+ :form_params => form_params,
246
+ :body => post_body,
247
+ :auth_names => auth_names,
248
+ :return_type => return_type
249
+ )
250
+
251
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
252
+ if @api_client.config.debugging
253
+ @api_client.config.logger.debug "API called: AuthorizationWireApi#oauth_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
254
+ end
255
+ return data, status_code, headers
256
+ end
257
+
258
+ # Revoke
259
+ # RFC 7009. Always answers 200, including for a token that was never valid - an endpoint that distinguished the two would be a way to test whether a stolen string is a live credential. Revoking a REFRESH token ends the whole authorization and takes its access tokens with it. Revoking an access token affects only that token.
260
+ # @param token [String]
261
+ # @param [Hash] opts the optional parameters
262
+ # @option opts [String] :client_id
263
+ # @return [Object]
264
+ def oauth_revoke(token, opts = {})
265
+ data, _status_code, _headers = oauth_revoke_with_http_info(token, opts)
266
+ data
267
+ end
268
+
269
+ # Revoke
270
+ # RFC 7009. Always answers 200, including for a token that was never valid - an endpoint that distinguished the two would be a way to test whether a stolen string is a live credential. Revoking a REFRESH token ends the whole authorization and takes its access tokens with it. Revoking an access token affects only that token.
271
+ # @param token [String]
272
+ # @param [Hash] opts the optional parameters
273
+ # @option opts [String] :client_id
274
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
275
+ def oauth_revoke_with_http_info(token, opts = {})
276
+ if @api_client.config.debugging
277
+ @api_client.config.logger.debug 'Calling API: AuthorizationWireApi.oauth_revoke ...'
278
+ end
279
+ # verify the required parameter 'token' is set
280
+ if @api_client.config.client_side_validation && token.nil?
281
+ fail ArgumentError, "Missing the required parameter 'token' when calling AuthorizationWireApi.oauth_revoke"
282
+ end
283
+ # resource path
284
+ local_var_path = '/oauth/revoke'
285
+
286
+ # query parameters
287
+ query_params = opts[:query_params] || {}
288
+
289
+ # header parameters
290
+ header_params = opts[:header_params] || {}
291
+ # HTTP header 'Accept' (if needed)
292
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
293
+ # HTTP header 'Content-Type'
294
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
295
+ if !content_type.nil?
296
+ header_params['Content-Type'] = content_type
297
+ end
298
+
299
+ # form parameters
300
+ form_params = opts[:form_params] || {}
301
+ form_params['token'] = token
302
+ form_params['client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil?
303
+
304
+ # http body (model)
305
+ post_body = opts[:debug_body]
306
+
307
+ # return_type
308
+ return_type = opts[:debug_return_type] || 'Object'
309
+
310
+ # auth_names
311
+ auth_names = opts[:debug_auth_names] || []
312
+
313
+ new_options = opts.merge(
314
+ :operation => :"AuthorizationWireApi.oauth_revoke",
315
+ :header_params => header_params,
316
+ :query_params => query_params,
317
+ :form_params => form_params,
318
+ :body => post_body,
319
+ :auth_names => auth_names,
320
+ :return_type => return_type
321
+ )
322
+
323
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
324
+ if @api_client.config.debugging
325
+ @api_client.config.logger.debug "API called: AuthorizationWireApi#oauth_revoke\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
326
+ end
327
+ return data, status_code, headers
328
+ end
329
+
330
+ # Token
331
+ # Three grant types. `urn:ietf:params:oauth:grant-type:device_code` polls a device authorization. Until the person approves it answers `authorization_pending`; poll faster than `interval` and it answers `slow_down`, which means widen your interval and keep it widened. `authorization_code` exchanges a code from `/oauth/authorize`, with the `code_verifier` matching the challenge you sent. `refresh_token` exchanges a refresh token. The presented token is consumed whatever happens next, so store the new one before using it.
332
+ # @param grant_type [String]
333
+ # @param client_id [String]
334
+ # @param [Hash] opts the optional parameters
335
+ # @option opts [String] :device_code
336
+ # @option opts [String] :code
337
+ # @option opts [String] :code_verifier
338
+ # @option opts [String] :redirect_uri
339
+ # @option opts [String] :refresh_token
340
+ # @return [TokenResponse]
341
+ def oauth_token(grant_type, client_id, opts = {})
342
+ data, _status_code, _headers = oauth_token_with_http_info(grant_type, client_id, opts)
343
+ data
344
+ end
345
+
346
+ # Token
347
+ # Three grant types. &#x60;urn:ietf:params:oauth:grant-type:device_code&#x60; polls a device authorization. Until the person approves it answers &#x60;authorization_pending&#x60;; poll faster than &#x60;interval&#x60; and it answers &#x60;slow_down&#x60;, which means widen your interval and keep it widened. &#x60;authorization_code&#x60; exchanges a code from &#x60;/oauth/authorize&#x60;, with the &#x60;code_verifier&#x60; matching the challenge you sent. &#x60;refresh_token&#x60; exchanges a refresh token. The presented token is consumed whatever happens next, so store the new one before using it.
348
+ # @param grant_type [String]
349
+ # @param client_id [String]
350
+ # @param [Hash] opts the optional parameters
351
+ # @option opts [String] :device_code
352
+ # @option opts [String] :code
353
+ # @option opts [String] :code_verifier
354
+ # @option opts [String] :redirect_uri
355
+ # @option opts [String] :refresh_token
356
+ # @return [Array<(TokenResponse, Integer, Hash)>] TokenResponse data, response status code and response headers
357
+ def oauth_token_with_http_info(grant_type, client_id, opts = {})
358
+ if @api_client.config.debugging
359
+ @api_client.config.logger.debug 'Calling API: AuthorizationWireApi.oauth_token ...'
360
+ end
361
+ # verify the required parameter 'grant_type' is set
362
+ if @api_client.config.client_side_validation && grant_type.nil?
363
+ fail ArgumentError, "Missing the required parameter 'grant_type' when calling AuthorizationWireApi.oauth_token"
364
+ end
365
+ # verify the required parameter 'client_id' is set
366
+ if @api_client.config.client_side_validation && client_id.nil?
367
+ fail ArgumentError, "Missing the required parameter 'client_id' when calling AuthorizationWireApi.oauth_token"
368
+ end
369
+ # resource path
370
+ local_var_path = '/oauth/token'
371
+
372
+ # query parameters
373
+ query_params = opts[:query_params] || {}
374
+
375
+ # header parameters
376
+ header_params = opts[:header_params] || {}
377
+ # HTTP header 'Accept' (if needed)
378
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
379
+ # HTTP header 'Content-Type'
380
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
381
+ if !content_type.nil?
382
+ header_params['Content-Type'] = content_type
383
+ end
384
+
385
+ # form parameters
386
+ form_params = opts[:form_params] || {}
387
+ form_params['grant_type'] = grant_type
388
+ form_params['client_id'] = client_id
389
+ form_params['device_code'] = opts[:'device_code'] if !opts[:'device_code'].nil?
390
+ form_params['code'] = opts[:'code'] if !opts[:'code'].nil?
391
+ form_params['code_verifier'] = opts[:'code_verifier'] if !opts[:'code_verifier'].nil?
392
+ form_params['redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil?
393
+ form_params['refresh_token'] = opts[:'refresh_token'] if !opts[:'refresh_token'].nil?
394
+
395
+ # http body (model)
396
+ post_body = opts[:debug_body]
397
+
398
+ # return_type
399
+ return_type = opts[:debug_return_type] || 'TokenResponse'
400
+
401
+ # auth_names
402
+ auth_names = opts[:debug_auth_names] || []
403
+
404
+ new_options = opts.merge(
405
+ :operation => :"AuthorizationWireApi.oauth_token",
406
+ :header_params => header_params,
407
+ :query_params => query_params,
408
+ :form_params => form_params,
409
+ :body => post_body,
410
+ :auth_names => auth_names,
411
+ :return_type => return_type
412
+ )
413
+
414
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
415
+ if @api_client.config.debugging
416
+ @api_client.config.logger.debug "API called: AuthorizationWireApi#oauth_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
417
+ end
418
+ return data, status_code, headers
419
+ end
420
+ end
421
+ 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
@@ -0,0 +1,79 @@
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 'cgi'
14
+
15
+ module VPNDetection
16
+ class EntitlementWireApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Plan and usage
23
+ # Answers what the presented key is, what plan is behind it, and what has been spent against that plan's allowance in the current window.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [Entitlement]
26
+ def my_entitlement(opts = {})
27
+ data, _status_code, _headers = my_entitlement_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Plan and usage
32
+ # Answers what the presented key is, what plan is behind it, and what has been spent against that plan&#39;s allowance in the current window.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(Entitlement, Integer, Hash)>] Entitlement data, response status code and response headers
35
+ def my_entitlement_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: EntitlementWireApi.my_entitlement ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/api/v1/entitlement'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:debug_body]
55
+
56
+ # return_type
57
+ return_type = opts[:debug_return_type] || 'Entitlement'
58
+
59
+ # auth_names
60
+ auth_names = opts[:debug_auth_names] || ['apiKeyQuery', 'bearerAuth', 'apiKeyHeader']
61
+
62
+ new_options = opts.merge(
63
+ :operation => :"EntitlementWireApi.my_entitlement",
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => return_type
70
+ )
71
+
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: EntitlementWireApi#my_entitlement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+ end
79
+ 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
@@ -82,7 +82,7 @@ module VPNDetection
82
82
  return data, status_code, headers
83
83
  end
84
84
 
85
- # Lookup your own address
85
+ # My IP
86
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
87
  # @param [Hash] opts the optional parameters
88
88
  # @return [LookupResponse]
@@ -91,7 +91,7 @@ module VPNDetection
91
91
  data
92
92
  end
93
93
 
94
- # Lookup your own address
94
+ # My IP
95
95
  # Answers what is known about the address this request came from, which is the same answer &#x60;GET /{ip}&#x60; 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
96
  # @param [Hash] opts the optional parameters
97
97
  # @return [Array<(LookupResponse, Integer, Hash)>] LookupResponse data, response status code and response headers
@@ -0,0 +1,136 @@
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 'cgi'
14
+
15
+ module VPNDetection
16
+ class OrganizationWireApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Organization
23
+ # The organization this credential is scoped to. There is no way to name a different one. A credential describes exactly one organization, so an identifier in the path could only ever be your own or a refusal.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [AccountOrgWrap]
26
+ def account_org(opts = {})
27
+ data, _status_code, _headers = account_org_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Organization
32
+ # The organization this credential is scoped to. There is no way to name a different one. A credential describes exactly one organization, so an identifier in the path could only ever be your own or a refusal.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(AccountOrgWrap, Integer, Hash)>] AccountOrgWrap data, response status code and response headers
35
+ def account_org_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: OrganizationWireApi.account_org ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/api/v1/iam/org'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:debug_body]
55
+
56
+ # return_type
57
+ return_type = opts[:debug_return_type] || 'AccountOrgWrap'
58
+
59
+ # auth_names
60
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
61
+
62
+ new_options = opts.merge(
63
+ :operation => :"OrganizationWireApi.account_org",
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => return_type
70
+ )
71
+
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: OrganizationWireApi#account_org\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+
79
+ # Members
80
+ # Read-only. Adding or removing a member is an invitation flow with email in the middle rather than a POST, and modelling it as one here would promise something this API does not do.
81
+ # @param [Hash] opts the optional parameters
82
+ # @return [AccountRc]
83
+ def account_org_members(opts = {})
84
+ data, _status_code, _headers = account_org_members_with_http_info(opts)
85
+ data
86
+ end
87
+
88
+ # Members
89
+ # Read-only. Adding or removing a member is an invitation flow with email in the middle rather than a POST, and modelling it as one here would promise something this API does not do.
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [Array<(AccountRc, Integer, Hash)>] AccountRc data, response status code and response headers
92
+ def account_org_members_with_http_info(opts = {})
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug 'Calling API: OrganizationWireApi.account_org_members ...'
95
+ end
96
+ # resource path
97
+ local_var_path = '/api/v1/iam/org/members'
98
+
99
+ # query parameters
100
+ query_params = opts[:query_params] || {}
101
+
102
+ # header parameters
103
+ header_params = opts[:header_params] || {}
104
+ # HTTP header 'Accept' (if needed)
105
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
106
+
107
+ # form parameters
108
+ form_params = opts[:form_params] || {}
109
+
110
+ # http body (model)
111
+ post_body = opts[:debug_body]
112
+
113
+ # return_type
114
+ return_type = opts[:debug_return_type] || 'AccountRc'
115
+
116
+ # auth_names
117
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
118
+
119
+ new_options = opts.merge(
120
+ :operation => :"OrganizationWireApi.account_org_members",
121
+ :header_params => header_params,
122
+ :query_params => query_params,
123
+ :form_params => form_params,
124
+ :body => post_body,
125
+ :auth_names => auth_names,
126
+ :return_type => return_type
127
+ )
128
+
129
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
130
+ if @api_client.config.debugging
131
+ @api_client.config.logger.debug "API called: OrganizationWireApi#account_org_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
132
+ end
133
+ return data, status_code, headers
134
+ end
135
+ end
136
+ end