vgs_api_client 0.0.1.alpha202305231051 → 0.0.1.alpha202305301958
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/VERSION +1 -1
- data/api.yaml +86 -21
- data/lib/openapi_client/api/aliases_api.rb +33 -9
- data/lib/openapi_client/api/default_api.rb +86 -0
- data/lib/openapi_client/api_client.rb +1 -1
- data/lib/openapi_client/models/{model_alias.rb → alias_dto.rb} +4 -3
- data/lib/openapi_client/models/alias_format.rb +3 -0
- data/lib/openapi_client/models/batch_aliases_request.rb +264 -0
- data/lib/openapi_client/models/create_aliases_request.rb +1 -1
- data/lib/openapi_client/models/create_aliases_request_new.rb +1 -5
- data/lib/openapi_client/models/create_aliases_request_reference.rb +1 -5
- data/lib/openapi_client/models/revealed_data.rb +2 -1
- data/lib/openapi_client/version.rb +1 -1
- data/lib/openapi_client.rb +3 -1
- data/lib/version.rb +1 -1
- data/lib/vgs_api_client.rb +1 -1
- data/scripts/assemble/run.sh +1 -1
- data/scripts/test/run.sh +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33b5532fd2a4d307fc52cdf2223f4f6922c899b7ad1fdb0272454701d0b692ae
|
4
|
+
data.tar.gz: 39d36a06ec9201929f9a455ca6a530a0bdda1139ea2d4101d765a804af79f9cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 435b29794d361f4649730d7d378dec4d5f6435bfd5c4a49e3862c868249b640a7c22e5bd68418991089f681f8a8c635299e6f840fbd3d8dabd93b628d4f10b85
|
7
|
+
data.tar.gz: e8a0a309b8a0ae7b2621ae36624957c1462cfe226f95d99567e21a7bce003d58126da57be6f5e54ec5230dc07c3a76d457c0af3aa24bafd9cd2b4700ddc82c13
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.1.
|
1
|
+
0.0.1.alpha202305301958
|
data/api.yaml
CHANGED
@@ -201,7 +201,7 @@ paths:
|
|
201
201
|
manager or drop us a line at
|
202
202
|
[support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
|
203
203
|
parameters:
|
204
|
-
- name:
|
204
|
+
- name: aliases
|
205
205
|
in: query
|
206
206
|
required: true
|
207
207
|
description: Comma-separated list of aliases to reveal.
|
@@ -209,6 +209,14 @@ paths:
|
|
209
209
|
- "tok_sandbox_5UpnbMvaihRuRwz5QXwBFw,tok_sandbox_9ToiJHedw1nE1Jfx1qYYgz"
|
210
210
|
schema:
|
211
211
|
type: string
|
212
|
+
- name: storage
|
213
|
+
in: query
|
214
|
+
required: false
|
215
|
+
description: PERSISTENT or VOLATILE storage
|
216
|
+
example:
|
217
|
+
- "PERSISTENT"
|
218
|
+
schema:
|
219
|
+
type: string
|
212
220
|
responses:
|
213
221
|
'200':
|
214
222
|
description: OK
|
@@ -247,12 +255,37 @@ paths:
|
|
247
255
|
- lang: Shell
|
248
256
|
label: cURL
|
249
257
|
source: |
|
250
|
-
curl https://api.sandbox.verygoodvault.com/aliases?
|
258
|
+
curl https://api.sandbox.verygoodvault.com/aliases?aliases={{alias1}},{{alias2}}?storage=PERSISTENT \
|
251
259
|
-u "$USERNAME:$PASSWORD"
|
252
260
|
|
261
|
+
/aliases/delete:
|
262
|
+
post:
|
263
|
+
summary: "POST aliases/delete"
|
264
|
+
operationId: "deleteAliases"
|
265
|
+
requestBody:
|
266
|
+
content:
|
267
|
+
application/json:
|
268
|
+
schema:
|
269
|
+
$ref: "#/components/schemas/BatchAliasesRequest"
|
270
|
+
required: true
|
271
|
+
responses:
|
272
|
+
"204":
|
273
|
+
description: "No Content"
|
274
|
+
"404":
|
275
|
+
description: "Not Found"
|
276
|
+
x-codeSamples:
|
277
|
+
- lang: Shell
|
278
|
+
label: cURL
|
279
|
+
source: |
|
280
|
+
curl -v https://api.sandbox.verygoodvault.com/aliases/delete -d \
|
281
|
+
'{"storage":"VOLATILE","data":["tok_whjuj6F8r3f2KeCpY7RPCE"]}' \
|
282
|
+
-H 'Content-Type: application/json' \
|
283
|
+
-u "$USERNAME:$PASSWORD"
|
284
|
+
|
253
285
|
/aliases/{alias}:
|
254
286
|
parameters:
|
255
287
|
- $ref: '#/components/parameters/alias'
|
288
|
+
- $ref: '#/components/parameters/storage'
|
256
289
|
get:
|
257
290
|
operationId: revealAlias
|
258
291
|
tags:
|
@@ -267,6 +300,7 @@ paths:
|
|
267
300
|
[support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
|
268
301
|
parameters:
|
269
302
|
- $ref: '#/components/parameters/alias'
|
303
|
+
- $ref: '#/components/parameters/storage'
|
270
304
|
responses:
|
271
305
|
'200':
|
272
306
|
description: OK
|
@@ -288,7 +322,7 @@ paths:
|
|
288
322
|
- lang: Shell
|
289
323
|
label: cURL
|
290
324
|
source: |
|
291
|
-
curl https://api.sandbox.verygoodvault.com/aliases/{{alias}} \
|
325
|
+
curl https://api.sandbox.verygoodvault.com/aliases/{{alias}}?storage=PERSISTENT \
|
292
326
|
-u "$USERNAME:$PASSWORD"
|
293
327
|
put:
|
294
328
|
operationId: updateAlias
|
@@ -332,6 +366,7 @@ paths:
|
|
332
366
|
Removes a single alias.
|
333
367
|
parameters:
|
334
368
|
- $ref: '#/components/parameters/alias'
|
369
|
+
- $ref: '#/components/parameters/storage'
|
335
370
|
responses:
|
336
371
|
'204':
|
337
372
|
description: No Content
|
@@ -341,7 +376,7 @@ paths:
|
|
341
376
|
- lang: Shell
|
342
377
|
label: cURL
|
343
378
|
source: |
|
344
|
-
curl https://api.sandbox.verygoodvault.com/aliases/{{alias}} \
|
379
|
+
curl https://api.sandbox.verygoodvault.com/aliases/{{alias}}?storage=PERSISTENT \
|
345
380
|
-X DELETE \
|
346
381
|
-u "$USERNAME:$PASSWORD"
|
347
382
|
|
@@ -365,6 +400,16 @@ components:
|
|
365
400
|
schema:
|
366
401
|
type: string
|
367
402
|
example: tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e
|
403
|
+
storage:
|
404
|
+
name: "storage"
|
405
|
+
in: "query"
|
406
|
+
required: false
|
407
|
+
schema:
|
408
|
+
type: "string"
|
409
|
+
enum:
|
410
|
+
- "PERSISTENT"
|
411
|
+
- "VOLATILE"
|
412
|
+
default: "PERSISTENT"
|
368
413
|
|
369
414
|
responses:
|
370
415
|
ApiErrorsResponse:
|
@@ -414,13 +459,14 @@ components:
|
|
414
459
|
aliases:
|
415
460
|
type: "array"
|
416
461
|
items:
|
417
|
-
$ref: '#/components/schemas/
|
462
|
+
$ref: '#/components/schemas/AliasDto'
|
418
463
|
description: List of aliases associated with the value.
|
419
464
|
created_at:
|
420
465
|
type: "string"
|
421
466
|
format: "date-time"
|
422
467
|
description: Creation time, in UTC.
|
423
468
|
example: "2019-05-15T12:30:45Z"
|
469
|
+
nullable: true
|
424
470
|
storage:
|
425
471
|
type: string
|
426
472
|
enum:
|
@@ -432,7 +478,7 @@ components:
|
|
432
478
|
|
433
479
|
VOLATILE results in data being persisted into an in-memory data store for one hour which is required for PCI compliant storage of card security code data.
|
434
480
|
|
435
|
-
|
481
|
+
AliasDto:
|
436
482
|
type: "object"
|
437
483
|
properties:
|
438
484
|
alias:
|
@@ -441,27 +487,48 @@ components:
|
|
441
487
|
description: Opaque string used to substitute the raw value.
|
442
488
|
format:
|
443
489
|
$ref: '#/components/schemas/AliasFormat'
|
490
|
+
nullable: true
|
444
491
|
|
445
492
|
AliasFormat:
|
446
493
|
type: string
|
447
494
|
enum:
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
495
|
+
- "ALPHANUMERIC_SIX_T_FOUR"
|
496
|
+
- "CUSTOM"
|
497
|
+
- "FPE_ACC_NUM_T_FOUR"
|
498
|
+
- "FPE_ALPHANUMERIC_ACC_NUM_T_FOUR"
|
499
|
+
- "FPE_SIX_T_FOUR"
|
500
|
+
- "FPE_SSN_T_FOUR"
|
501
|
+
- "FPE_T_FOUR"
|
502
|
+
- "GENERIC_T_FOUR"
|
503
|
+
- "JS"
|
504
|
+
- "NON_LUHN_FPE_ALPHANUMERIC"
|
505
|
+
- "NUM_LENGTH_PRESERVING"
|
506
|
+
- "PFPT"
|
507
|
+
- "RAW_UUID"
|
508
|
+
- "UUID"
|
509
|
+
- "VGS_FIXED_LEN_GENERIC"
|
460
510
|
description: |
|
461
511
|
Format of the generated alias string.
|
462
512
|
|
463
513
|
See [Alias Formats](#section/Introduction/Alias-Formats) for details.
|
464
514
|
example: UUID
|
515
|
+
nullable: true
|
516
|
+
|
517
|
+
BatchAliasesRequest:
|
518
|
+
type: "object"
|
519
|
+
properties:
|
520
|
+
data:
|
521
|
+
type: "array"
|
522
|
+
items:
|
523
|
+
type: "string"
|
524
|
+
storage:
|
525
|
+
type: "string"
|
526
|
+
enum:
|
527
|
+
- "PERSISTENT"
|
528
|
+
- "VOLATILE"
|
529
|
+
description: |
|
530
|
+
Format for batch requests (limit 20)
|
531
|
+
example: '{"data":["123-13123-1232"],"storage":"PERSISTENT"}'
|
465
532
|
|
466
533
|
CreateAliasesRequest:
|
467
534
|
type: object
|
@@ -469,9 +536,7 @@ components:
|
|
469
536
|
data:
|
470
537
|
type: array
|
471
538
|
items:
|
472
|
-
|
473
|
-
- $ref: '#/components/schemas/CreateAliasesRequestNew'
|
474
|
-
- $ref: '#/components/schemas/CreateAliasesRequestReference'
|
539
|
+
$ref: "#/components/schemas/CreateAliasesRequestNew"
|
475
540
|
minItems: 1
|
476
541
|
maxItems: 20
|
477
542
|
required:
|
@@ -87,6 +87,7 @@ module VgsApiClient
|
|
87
87
|
# Removes a single alias.
|
88
88
|
# @param _alias [String] Alias to operate on.
|
89
89
|
# @param [Hash] opts the optional parameters
|
90
|
+
# @option opts [String] :storage (default to 'PERSISTENT')
|
90
91
|
# @return [nil]
|
91
92
|
def delete_alias(_alias, opts = {})
|
92
93
|
delete_alias_with_http_info(_alias, opts)
|
@@ -97,6 +98,7 @@ module VgsApiClient
|
|
97
98
|
# Removes a single alias.
|
98
99
|
# @param _alias [String] Alias to operate on.
|
99
100
|
# @param [Hash] opts the optional parameters
|
101
|
+
# @option opts [String] :storage
|
100
102
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
101
103
|
def delete_alias_with_http_info(_alias, opts = {})
|
102
104
|
if @api_client.config.debugging
|
@@ -106,11 +108,16 @@ module VgsApiClient
|
|
106
108
|
if @api_client.config.client_side_validation && _alias.nil?
|
107
109
|
fail ArgumentError, "Missing the required parameter '_alias' when calling AliasesApi.delete_alias"
|
108
110
|
end
|
111
|
+
allowable_values = ["PERSISTENT", "VOLATILE"]
|
112
|
+
if @api_client.config.client_side_validation && opts[:'storage'] && !allowable_values.include?(opts[:'storage'])
|
113
|
+
fail ArgumentError, "invalid value for \"storage\", must be one of #{allowable_values}"
|
114
|
+
end
|
109
115
|
# resource path
|
110
116
|
local_var_path = '/aliases/{alias}'.sub('{' + 'alias' + '}', CGI.escape(_alias.to_s))
|
111
117
|
|
112
118
|
# query parameters
|
113
119
|
query_params = opts[:query_params] || {}
|
120
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
114
121
|
|
115
122
|
# header parameters
|
116
123
|
header_params = opts[:header_params] || {}
|
@@ -150,6 +157,7 @@ module VgsApiClient
|
|
150
157
|
# Retrieves a stored value along with its aliases. **NOTE:** This endpoint may expose sensitive data. Therefore, it is disabled by default. To enable it, please contact your VGS account manager or drop us a line at [support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
|
151
158
|
# @param _alias [String] Alias to operate on.
|
152
159
|
# @param [Hash] opts the optional parameters
|
160
|
+
# @option opts [String] :storage (default to 'PERSISTENT')
|
153
161
|
# @return [InlineResponse2001]
|
154
162
|
def reveal_alias(_alias, opts = {})
|
155
163
|
data, _status_code, _headers = reveal_alias_with_http_info(_alias, opts)
|
@@ -160,6 +168,7 @@ module VgsApiClient
|
|
160
168
|
# Retrieves a stored value along with its aliases. **NOTE:** This endpoint may expose sensitive data. Therefore, it is disabled by default. To enable it, please contact your VGS account manager or drop us a line at [support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
|
161
169
|
# @param _alias [String] Alias to operate on.
|
162
170
|
# @param [Hash] opts the optional parameters
|
171
|
+
# @option opts [String] :storage
|
163
172
|
# @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
|
164
173
|
def reveal_alias_with_http_info(_alias, opts = {})
|
165
174
|
if @api_client.config.debugging
|
@@ -169,11 +178,16 @@ module VgsApiClient
|
|
169
178
|
if @api_client.config.client_side_validation && _alias.nil?
|
170
179
|
fail ArgumentError, "Missing the required parameter '_alias' when calling AliasesApi.reveal_alias"
|
171
180
|
end
|
181
|
+
allowable_values = ["PERSISTENT", "VOLATILE"]
|
182
|
+
if @api_client.config.client_side_validation && opts[:'storage'] && !allowable_values.include?(opts[:'storage'])
|
183
|
+
fail ArgumentError, "invalid value for \"storage\", must be one of #{allowable_values}"
|
184
|
+
end
|
172
185
|
# resource path
|
173
186
|
local_var_path = '/aliases/{alias}'.sub('{' + 'alias' + '}', CGI.escape(_alias.to_s))
|
174
187
|
|
175
188
|
# query parameters
|
176
189
|
query_params = opts[:query_params] || {}
|
190
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
177
191
|
|
178
192
|
# header parameters
|
179
193
|
header_params = opts[:header_params] || {}
|
@@ -211,33 +225,36 @@ module VgsApiClient
|
|
211
225
|
|
212
226
|
# Reveal multiple aliases
|
213
227
|
# Given a list of aliases, retrieves all associated values stored in the vault. **NOTE:** This endpoint may expose sensitive data. Therefore, it is disabled by default. To enable it, please contact your VGS account manager or drop us a line at [support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
|
214
|
-
# @param
|
228
|
+
# @param aliases [String] Comma-separated list of aliases to reveal.
|
215
229
|
# @param [Hash] opts the optional parameters
|
230
|
+
# @option opts [String] :storage PERSISTENT or VOLATILE storage
|
216
231
|
# @return [InlineResponse200]
|
217
|
-
def reveal_multiple_aliases(
|
218
|
-
data, _status_code, _headers = reveal_multiple_aliases_with_http_info(
|
232
|
+
def reveal_multiple_aliases(aliases, opts = {})
|
233
|
+
data, _status_code, _headers = reveal_multiple_aliases_with_http_info(aliases, opts)
|
219
234
|
data
|
220
235
|
end
|
221
236
|
|
222
237
|
# Reveal multiple aliases
|
223
238
|
# Given a list of aliases, retrieves all associated values stored in the vault. **NOTE:** This endpoint may expose sensitive data. Therefore, it is disabled by default. To enable it, please contact your VGS account manager or drop us a line at [support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
|
224
|
-
# @param
|
239
|
+
# @param aliases [String] Comma-separated list of aliases to reveal.
|
225
240
|
# @param [Hash] opts the optional parameters
|
241
|
+
# @option opts [String] :storage PERSISTENT or VOLATILE storage
|
226
242
|
# @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
|
227
|
-
def reveal_multiple_aliases_with_http_info(
|
243
|
+
def reveal_multiple_aliases_with_http_info(aliases, opts = {})
|
228
244
|
if @api_client.config.debugging
|
229
245
|
@api_client.config.logger.debug 'Calling API: AliasesApi.reveal_multiple_aliases ...'
|
230
246
|
end
|
231
|
-
# verify the required parameter '
|
232
|
-
if @api_client.config.client_side_validation &&
|
233
|
-
fail ArgumentError, "Missing the required parameter '
|
247
|
+
# verify the required parameter 'aliases' is set
|
248
|
+
if @api_client.config.client_side_validation && aliases.nil?
|
249
|
+
fail ArgumentError, "Missing the required parameter 'aliases' when calling AliasesApi.reveal_multiple_aliases"
|
234
250
|
end
|
235
251
|
# resource path
|
236
252
|
local_var_path = '/aliases'
|
237
253
|
|
238
254
|
# query parameters
|
239
255
|
query_params = opts[:query_params] || {}
|
240
|
-
query_params[:'
|
256
|
+
query_params[:'aliases'] = aliases
|
257
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
241
258
|
|
242
259
|
# header parameters
|
243
260
|
header_params = opts[:header_params] || {}
|
@@ -277,6 +294,7 @@ module VgsApiClient
|
|
277
294
|
# Apply new classifiers to the value that the specified alias is associated with.
|
278
295
|
# @param _alias [String] Alias to operate on.
|
279
296
|
# @param [Hash] opts the optional parameters
|
297
|
+
# @option opts [String] :storage (default to 'PERSISTENT')
|
280
298
|
# @option opts [UpdateAliasRequest] :update_alias_request
|
281
299
|
# @return [nil]
|
282
300
|
def update_alias(_alias, opts = {})
|
@@ -288,6 +306,7 @@ module VgsApiClient
|
|
288
306
|
# Apply new classifiers to the value that the specified alias is associated with.
|
289
307
|
# @param _alias [String] Alias to operate on.
|
290
308
|
# @param [Hash] opts the optional parameters
|
309
|
+
# @option opts [String] :storage
|
291
310
|
# @option opts [UpdateAliasRequest] :update_alias_request
|
292
311
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
293
312
|
def update_alias_with_http_info(_alias, opts = {})
|
@@ -298,11 +317,16 @@ module VgsApiClient
|
|
298
317
|
if @api_client.config.client_side_validation && _alias.nil?
|
299
318
|
fail ArgumentError, "Missing the required parameter '_alias' when calling AliasesApi.update_alias"
|
300
319
|
end
|
320
|
+
allowable_values = ["PERSISTENT", "VOLATILE"]
|
321
|
+
if @api_client.config.client_side_validation && opts[:'storage'] && !allowable_values.include?(opts[:'storage'])
|
322
|
+
fail ArgumentError, "invalid value for \"storage\", must be one of #{allowable_values}"
|
323
|
+
end
|
301
324
|
# resource path
|
302
325
|
local_var_path = '/aliases/{alias}'.sub('{' + 'alias' + '}', CGI.escape(_alias.to_s))
|
303
326
|
|
304
327
|
# query parameters
|
305
328
|
query_params = opts[:query_params] || {}
|
329
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
306
330
|
|
307
331
|
# header parameters
|
308
332
|
header_params = opts[:header_params] || {}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
=begin
|
2
|
+
#Vault HTTP API
|
3
|
+
|
4
|
+
#The VGS Vault HTTP API is used for storing, retrieving, and managing sensitive data (aka Tokenization) within a VGS Vault. The VGS API is organized around REST. Our API is built with a predictable resource-oriented structure, uses JSON-encoded requests and responses, follows standard HTTP verbs/responses, and uses industry standard authentication. ## What is VGS Storing sensitive data on your company’s infrastructure often comes with a heavy compliance burden. For instance, storing payments data yourself greatly increases the amount of work needed to become PCI compliant. It also increases your security risk in general. To combat this, companies will minimize the amount of sensitive information they have to handle or store. VGS provides multiple methods for minimizing the sensitive information that needs to be stored which allows customers to secure any type of data for any use-case. **Tokenization** is a method that focuses on securing the storage of data. This is the quickest way to get started and is free. [Get started with Tokenization](https://www.verygoodsecurity.com/docs/tokenization/getting-started). **Zero Data** is a unique method invented by VGS in 2016 that securely stores data like Tokenization, however it also removes the customer’s environment from PCI scope completely providing maximum security, and minimum compliance scope. [Get started with Zero Data](https://www.verygoodsecurity.com/docs/getting-started/before-you-start). Additionally, for scenarios where neither technology is a complete solution, for instance with legacy systems, VGS provides a compliance product which guarantees customers are able to meet their compliance needs no matter what may happen. [Get started with Control](https://www.verygoodsecurity.com/docs/control). ## Learn about Tokenization - [Create an Account for Free Tokenization](https://dashboard.verygoodsecurity.com/tokenization) - [Try a Tokenization Demo](https://www.verygoodsecurity.com/docs/tokenization/getting-started) - [Install a Tokenization SDK](https://www.verygoodsecurity.com/docs/tokenization/client-libraries) ### Authentication This API uses `Basic` authentication and is implemented using industry best practices to ensure the security of the connection. Read more about [Identity and Access Management at VGS](https://www.verygoodsecurity.com/docs/vault/the-platform/iam) Credentials to access the API can be generated on the [dashboard](https://dashboard.verygoodsecurity.com) by going to the Settings section of the vault of your choosing. [Docs » Guides » Access credentials](https://www.verygoodsecurity.com/docs/settings/access-credentials) ## Resource Limits ### Data Limits This API allows storing data up to 32MB in size. ### Rate Limiting The API allows up to 3,000 requests per minute. Requests are associated with the vault, regardless of the access credentials used to authenticate the request. Your current rate limit is included as HTTP headers in every API response: | Header Name | Description | |-------------------------|----------------------------------------------------------| | `x-ratelimit-remaining` | The number of requests remaining in the 1-minute window. | If you exceed the rate limit, the API will reject the request with HTTP [429 Too Many Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429). ### Errors The API uses standard HTTP status codes to indicate whether the request succeeded or not. In case of failure, the response body will be JSON in a predefined format. For example, trying to create too many aliases at once results in the following response: ```json { \"errors\": [ { \"status\": 400, \"title\": \"Bad request\", \"detail\": \"Too many values (limit: 20)\", \"href\": \"https://api.sandbox.verygoodvault.com/aliases\" } ] } ```
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: support@verygoodsecurity.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module VgsApiClient
|
16
|
+
class DefaultApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# POST aliases/delete
|
23
|
+
# @param batch_aliases_request [BatchAliasesRequest]
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [nil]
|
26
|
+
def delete_aliases(batch_aliases_request, opts = {})
|
27
|
+
delete_aliases_with_http_info(batch_aliases_request, opts)
|
28
|
+
nil
|
29
|
+
end
|
30
|
+
|
31
|
+
# POST aliases/delete
|
32
|
+
# @param batch_aliases_request [BatchAliasesRequest]
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
35
|
+
def delete_aliases_with_http_info(batch_aliases_request, opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.delete_aliases ...'
|
38
|
+
end
|
39
|
+
# verify the required parameter 'batch_aliases_request' is set
|
40
|
+
if @api_client.config.client_side_validation && batch_aliases_request.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'batch_aliases_request' when calling DefaultApi.delete_aliases"
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/aliases/delete'
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = opts[:header_params] || {}
|
51
|
+
# HTTP header 'Content-Type'
|
52
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
53
|
+
if !content_type.nil?
|
54
|
+
header_params['Content-Type'] = content_type
|
55
|
+
end
|
56
|
+
|
57
|
+
# form parameters
|
58
|
+
form_params = opts[:form_params] || {}
|
59
|
+
|
60
|
+
# http body (model)
|
61
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_aliases_request)
|
62
|
+
|
63
|
+
# return_type
|
64
|
+
return_type = opts[:debug_return_type]
|
65
|
+
|
66
|
+
# auth_names
|
67
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
68
|
+
|
69
|
+
new_options = opts.merge(
|
70
|
+
:operation => :"DefaultApi.delete_aliases",
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => return_type
|
77
|
+
)
|
78
|
+
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
80
|
+
if @api_client.config.debugging
|
81
|
+
@api_client.config.logger.debug "API called: DefaultApi#delete_aliases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -31,7 +31,7 @@ module VgsApiClient
|
|
31
31
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
32
32
|
def initialize(config = Configuration.default)
|
33
33
|
@config = config
|
34
|
-
@user_agent = "vgs-api-client/0.0.1.
|
34
|
+
@user_agent = "vgs-api-client/0.0.1.alpha202305301958/ruby"
|
35
35
|
@default_headers = {
|
36
36
|
'Content-Type' => 'application/json',
|
37
37
|
'User-Agent' => @user_agent
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module VgsApiClient
|
17
|
-
class
|
17
|
+
class AliasDto
|
18
18
|
# Opaque string used to substitute the raw value.
|
19
19
|
attr_accessor :_alias
|
20
20
|
|
@@ -44,6 +44,7 @@ module VgsApiClient
|
|
44
44
|
# List of attributes with nullable: true
|
45
45
|
def self.openapi_nullable
|
46
46
|
Set.new([
|
47
|
+
:'format'
|
47
48
|
])
|
48
49
|
end
|
49
50
|
|
@@ -51,13 +52,13 @@ module VgsApiClient
|
|
51
52
|
# @param [Hash] attributes Model attributes in the form of hash
|
52
53
|
def initialize(attributes = {})
|
53
54
|
if (!attributes.is_a?(Hash))
|
54
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `VgsApiClient::
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VgsApiClient::AliasDto` initialize method"
|
55
56
|
end
|
56
57
|
|
57
58
|
# check to see if the attribute exists and convert string to symbol for hash key
|
58
59
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
59
60
|
if (!self.class.attribute_map.key?(k.to_sym))
|
60
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `VgsApiClient::
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VgsApiClient::AliasDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
61
62
|
end
|
62
63
|
h[k.to_sym] = v
|
63
64
|
}
|
@@ -15,12 +15,15 @@ require 'time'
|
|
15
15
|
|
16
16
|
module VgsApiClient
|
17
17
|
class AliasFormat
|
18
|
+
ALPHANUMERIC_SIX_T_FOUR = "ALPHANUMERIC_SIX_T_FOUR".freeze
|
19
|
+
CUSTOM = "CUSTOM".freeze
|
18
20
|
FPE_ACC_NUM_T_FOUR = "FPE_ACC_NUM_T_FOUR".freeze
|
19
21
|
FPE_ALPHANUMERIC_ACC_NUM_T_FOUR = "FPE_ALPHANUMERIC_ACC_NUM_T_FOUR".freeze
|
20
22
|
FPE_SIX_T_FOUR = "FPE_SIX_T_FOUR".freeze
|
21
23
|
FPE_SSN_T_FOUR = "FPE_SSN_T_FOUR".freeze
|
22
24
|
FPE_T_FOUR = "FPE_T_FOUR".freeze
|
23
25
|
GENERIC_T_FOUR = "GENERIC_T_FOUR".freeze
|
26
|
+
JS = "JS".freeze
|
24
27
|
NON_LUHN_FPE_ALPHANUMERIC = "NON_LUHN_FPE_ALPHANUMERIC".freeze
|
25
28
|
NUM_LENGTH_PRESERVING = "NUM_LENGTH_PRESERVING".freeze
|
26
29
|
PFPT = "PFPT".freeze
|
@@ -0,0 +1,264 @@
|
|
1
|
+
=begin
|
2
|
+
#Vault HTTP API
|
3
|
+
|
4
|
+
#The VGS Vault HTTP API is used for storing, retrieving, and managing sensitive data (aka Tokenization) within a VGS Vault. The VGS API is organized around REST. Our API is built with a predictable resource-oriented structure, uses JSON-encoded requests and responses, follows standard HTTP verbs/responses, and uses industry standard authentication. ## What is VGS Storing sensitive data on your company’s infrastructure often comes with a heavy compliance burden. For instance, storing payments data yourself greatly increases the amount of work needed to become PCI compliant. It also increases your security risk in general. To combat this, companies will minimize the amount of sensitive information they have to handle or store. VGS provides multiple methods for minimizing the sensitive information that needs to be stored which allows customers to secure any type of data for any use-case. **Tokenization** is a method that focuses on securing the storage of data. This is the quickest way to get started and is free. [Get started with Tokenization](https://www.verygoodsecurity.com/docs/tokenization/getting-started). **Zero Data** is a unique method invented by VGS in 2016 that securely stores data like Tokenization, however it also removes the customer’s environment from PCI scope completely providing maximum security, and minimum compliance scope. [Get started with Zero Data](https://www.verygoodsecurity.com/docs/getting-started/before-you-start). Additionally, for scenarios where neither technology is a complete solution, for instance with legacy systems, VGS provides a compliance product which guarantees customers are able to meet their compliance needs no matter what may happen. [Get started with Control](https://www.verygoodsecurity.com/docs/control). ## Learn about Tokenization - [Create an Account for Free Tokenization](https://dashboard.verygoodsecurity.com/tokenization) - [Try a Tokenization Demo](https://www.verygoodsecurity.com/docs/tokenization/getting-started) - [Install a Tokenization SDK](https://www.verygoodsecurity.com/docs/tokenization/client-libraries) ### Authentication This API uses `Basic` authentication and is implemented using industry best practices to ensure the security of the connection. Read more about [Identity and Access Management at VGS](https://www.verygoodsecurity.com/docs/vault/the-platform/iam) Credentials to access the API can be generated on the [dashboard](https://dashboard.verygoodsecurity.com) by going to the Settings section of the vault of your choosing. [Docs » Guides » Access credentials](https://www.verygoodsecurity.com/docs/settings/access-credentials) ## Resource Limits ### Data Limits This API allows storing data up to 32MB in size. ### Rate Limiting The API allows up to 3,000 requests per minute. Requests are associated with the vault, regardless of the access credentials used to authenticate the request. Your current rate limit is included as HTTP headers in every API response: | Header Name | Description | |-------------------------|----------------------------------------------------------| | `x-ratelimit-remaining` | The number of requests remaining in the 1-minute window. | If you exceed the rate limit, the API will reject the request with HTTP [429 Too Many Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429). ### Errors The API uses standard HTTP status codes to indicate whether the request succeeded or not. In case of failure, the response body will be JSON in a predefined format. For example, trying to create too many aliases at once results in the following response: ```json { \"errors\": [ { \"status\": 400, \"title\": \"Bad request\", \"detail\": \"Too many values (limit: 20)\", \"href\": \"https://api.sandbox.verygoodvault.com/aliases\" } ] } ```
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: support@verygoodsecurity.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module VgsApiClient
|
17
|
+
# Format for batch requests (limit 20)
|
18
|
+
class BatchAliasesRequest
|
19
|
+
attr_accessor :data
|
20
|
+
|
21
|
+
attr_accessor :storage
|
22
|
+
|
23
|
+
class EnumAttributeValidator
|
24
|
+
attr_reader :datatype
|
25
|
+
attr_reader :allowable_values
|
26
|
+
|
27
|
+
def initialize(datatype, allowable_values)
|
28
|
+
@allowable_values = allowable_values.map do |value|
|
29
|
+
case datatype.to_s
|
30
|
+
when /Integer/i
|
31
|
+
value.to_i
|
32
|
+
when /Float/i
|
33
|
+
value.to_f
|
34
|
+
else
|
35
|
+
value
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def valid?(value)
|
41
|
+
!value || allowable_values.include?(value)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
46
|
+
def self.attribute_map
|
47
|
+
{
|
48
|
+
:'data' => :'data',
|
49
|
+
:'storage' => :'storage'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Returns all the JSON keys this model knows about
|
54
|
+
def self.acceptable_attributes
|
55
|
+
attribute_map.values
|
56
|
+
end
|
57
|
+
|
58
|
+
# Attribute type mapping.
|
59
|
+
def self.openapi_types
|
60
|
+
{
|
61
|
+
:'data' => :'Array<String>',
|
62
|
+
:'storage' => :'String'
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
66
|
+
# List of attributes with nullable: true
|
67
|
+
def self.openapi_nullable
|
68
|
+
Set.new([
|
69
|
+
])
|
70
|
+
end
|
71
|
+
|
72
|
+
# Initializes the object
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
74
|
+
def initialize(attributes = {})
|
75
|
+
if (!attributes.is_a?(Hash))
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VgsApiClient::BatchAliasesRequest` initialize method"
|
77
|
+
end
|
78
|
+
|
79
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
81
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VgsApiClient::BatchAliasesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
83
|
+
end
|
84
|
+
h[k.to_sym] = v
|
85
|
+
}
|
86
|
+
|
87
|
+
if attributes.key?(:'data')
|
88
|
+
if (value = attributes[:'data']).is_a?(Array)
|
89
|
+
self.data = value
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'storage')
|
94
|
+
self.storage = attributes[:'storage']
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
99
|
+
# @return Array for valid properties with the reasons
|
100
|
+
def list_invalid_properties
|
101
|
+
invalid_properties = Array.new
|
102
|
+
invalid_properties
|
103
|
+
end
|
104
|
+
|
105
|
+
# Check to see if the all the properties in the model are valid
|
106
|
+
# @return true if the model is valid
|
107
|
+
def valid?
|
108
|
+
storage_validator = EnumAttributeValidator.new('String', ["PERSISTENT", "VOLATILE"])
|
109
|
+
return false unless storage_validator.valid?(@storage)
|
110
|
+
true
|
111
|
+
end
|
112
|
+
|
113
|
+
# Custom attribute writer method checking allowed values (enum).
|
114
|
+
# @param [Object] storage Object to be assigned
|
115
|
+
def storage=(storage)
|
116
|
+
validator = EnumAttributeValidator.new('String', ["PERSISTENT", "VOLATILE"])
|
117
|
+
unless validator.valid?(storage)
|
118
|
+
fail ArgumentError, "invalid value for \"storage\", must be one of #{validator.allowable_values}."
|
119
|
+
end
|
120
|
+
@storage = storage
|
121
|
+
end
|
122
|
+
|
123
|
+
# Checks equality by comparing each attribute.
|
124
|
+
# @param [Object] Object to be compared
|
125
|
+
def ==(o)
|
126
|
+
return true if self.equal?(o)
|
127
|
+
self.class == o.class &&
|
128
|
+
data == o.data &&
|
129
|
+
storage == o.storage
|
130
|
+
end
|
131
|
+
|
132
|
+
# @see the `==` method
|
133
|
+
# @param [Object] Object to be compared
|
134
|
+
def eql?(o)
|
135
|
+
self == o
|
136
|
+
end
|
137
|
+
|
138
|
+
# Calculates hash code according to all attributes.
|
139
|
+
# @return [Integer] Hash code
|
140
|
+
def hash
|
141
|
+
[data, storage].hash
|
142
|
+
end
|
143
|
+
|
144
|
+
# Builds the object from hash
|
145
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
146
|
+
# @return [Object] Returns the model itself
|
147
|
+
def self.build_from_hash(attributes)
|
148
|
+
new.build_from_hash(attributes)
|
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 build_from_hash(attributes)
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
156
|
+
self.class.openapi_types.each_pair do |key, type|
|
157
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
158
|
+
self.send("#{key}=", nil)
|
159
|
+
elsif type =~ /\AArray<(.*)>/i
|
160
|
+
# check to ensure the input is an array given that the attribute
|
161
|
+
# is documented as an array but the input is not
|
162
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
163
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
164
|
+
end
|
165
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
166
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
self
|
171
|
+
end
|
172
|
+
|
173
|
+
# Deserializes the data based on type
|
174
|
+
# @param string type Data type
|
175
|
+
# @param string value Value to be deserialized
|
176
|
+
# @return [Object] Deserialized data
|
177
|
+
def _deserialize(type, value)
|
178
|
+
case type.to_sym
|
179
|
+
when :Time
|
180
|
+
Time.parse(value)
|
181
|
+
when :Date
|
182
|
+
Date.parse(value)
|
183
|
+
when :String
|
184
|
+
value.to_s
|
185
|
+
when :Integer
|
186
|
+
value.to_i
|
187
|
+
when :Float
|
188
|
+
value.to_f
|
189
|
+
when :Boolean
|
190
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
191
|
+
true
|
192
|
+
else
|
193
|
+
false
|
194
|
+
end
|
195
|
+
when :Object
|
196
|
+
# generic object (usually a Hash), return directly
|
197
|
+
value
|
198
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
199
|
+
inner_type = Regexp.last_match[:inner_type]
|
200
|
+
value.map { |v| _deserialize(inner_type, v) }
|
201
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
202
|
+
k_type = Regexp.last_match[:k_type]
|
203
|
+
v_type = Regexp.last_match[:v_type]
|
204
|
+
{}.tap do |hash|
|
205
|
+
value.each do |k, v|
|
206
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
else # model
|
210
|
+
# models (e.g. Pet) or oneOf
|
211
|
+
klass = VgsApiClient.const_get(type)
|
212
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
# Returns the string representation of the object
|
217
|
+
# @return [String] String presentation of the object
|
218
|
+
def to_s
|
219
|
+
to_hash.to_s
|
220
|
+
end
|
221
|
+
|
222
|
+
# to_body is an alias to to_hash (backward compatibility)
|
223
|
+
# @return [Hash] Returns the object in the form of hash
|
224
|
+
def to_body
|
225
|
+
to_hash
|
226
|
+
end
|
227
|
+
|
228
|
+
# Returns the object in the form of hash
|
229
|
+
# @return [Hash] Returns the object in the form of hash
|
230
|
+
def to_hash
|
231
|
+
hash = {}
|
232
|
+
self.class.attribute_map.each_pair do |attr, param|
|
233
|
+
value = self.send(attr)
|
234
|
+
if value.nil?
|
235
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
236
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
237
|
+
end
|
238
|
+
|
239
|
+
hash[param] = _to_hash(value)
|
240
|
+
end
|
241
|
+
hash
|
242
|
+
end
|
243
|
+
|
244
|
+
# Outputs non-array value in the form of hash
|
245
|
+
# For object, use to_hash. Otherwise, just return the value
|
246
|
+
# @param [Object] value Any valid value
|
247
|
+
# @return [Hash] Returns the value in the form of hash
|
248
|
+
def _to_hash(value)
|
249
|
+
if value.is_a?(Array)
|
250
|
+
value.compact.map { |v| _to_hash(v) }
|
251
|
+
elsif value.is_a?(Hash)
|
252
|
+
{}.tap do |hash|
|
253
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
254
|
+
end
|
255
|
+
elsif value.respond_to? :to_hash
|
256
|
+
value.to_hash
|
257
|
+
else
|
258
|
+
value
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
end
|
263
|
+
|
264
|
+
end
|
@@ -76,6 +76,7 @@ module VgsApiClient
|
|
76
76
|
# List of attributes with nullable: true
|
77
77
|
def self.openapi_nullable
|
78
78
|
Set.new([
|
79
|
+
:'format',
|
79
80
|
])
|
80
81
|
end
|
81
82
|
|
@@ -119,10 +120,6 @@ module VgsApiClient
|
|
119
120
|
# @return Array for valid properties with the reasons
|
120
121
|
def list_invalid_properties
|
121
122
|
invalid_properties = Array.new
|
122
|
-
if @format.nil?
|
123
|
-
invalid_properties.push('invalid value for "format", format cannot be nil.')
|
124
|
-
end
|
125
|
-
|
126
123
|
if @value.nil?
|
127
124
|
invalid_properties.push('invalid value for "value", value cannot be nil.')
|
128
125
|
end
|
@@ -133,7 +130,6 @@ module VgsApiClient
|
|
133
130
|
# Check to see if the all the properties in the model are valid
|
134
131
|
# @return true if the model is valid
|
135
132
|
def valid?
|
136
|
-
return false if @format.nil?
|
137
133
|
storage_validator = EnumAttributeValidator.new('String', ["PERSISTENT", "VOLATILE"])
|
138
134
|
return false unless storage_validator.valid?(@storage)
|
139
135
|
return false if @value.nil?
|
@@ -44,6 +44,7 @@ module VgsApiClient
|
|
44
44
|
# List of attributes with nullable: true
|
45
45
|
def self.openapi_nullable
|
46
46
|
Set.new([
|
47
|
+
:'format'
|
47
48
|
])
|
48
49
|
end
|
49
50
|
|
@@ -79,10 +80,6 @@ module VgsApiClient
|
|
79
80
|
invalid_properties.push('invalid value for "_alias", _alias cannot be nil.')
|
80
81
|
end
|
81
82
|
|
82
|
-
if @format.nil?
|
83
|
-
invalid_properties.push('invalid value for "format", format cannot be nil.')
|
84
|
-
end
|
85
|
-
|
86
83
|
invalid_properties
|
87
84
|
end
|
88
85
|
|
@@ -90,7 +87,6 @@ module VgsApiClient
|
|
90
87
|
# @return true if the model is valid
|
91
88
|
def valid?
|
92
89
|
return false if @_alias.nil?
|
93
|
-
return false if @format.nil?
|
94
90
|
true
|
95
91
|
end
|
96
92
|
|
@@ -71,7 +71,7 @@ module VgsApiClient
|
|
71
71
|
# Attribute type mapping.
|
72
72
|
def self.openapi_types
|
73
73
|
{
|
74
|
-
:'aliases' => :'Array<
|
74
|
+
:'aliases' => :'Array<AliasDto>',
|
75
75
|
:'classifiers' => :'Array<String>',
|
76
76
|
:'created_at' => :'Time',
|
77
77
|
:'storage' => :'String',
|
@@ -82,6 +82,7 @@ module VgsApiClient
|
|
82
82
|
# List of attributes with nullable: true
|
83
83
|
def self.openapi_nullable
|
84
84
|
Set.new([
|
85
|
+
:'created_at',
|
85
86
|
])
|
86
87
|
end
|
87
88
|
|
data/lib/openapi_client.rb
CHANGED
@@ -17,8 +17,10 @@ require 'openapi_client/version'
|
|
17
17
|
require 'openapi_client/configuration'
|
18
18
|
|
19
19
|
# Models
|
20
|
+
require 'openapi_client/models/alias_dto'
|
20
21
|
require 'openapi_client/models/alias_format'
|
21
22
|
require 'openapi_client/models/api_error'
|
23
|
+
require 'openapi_client/models/batch_aliases_request'
|
22
24
|
require 'openapi_client/models/create_aliases_request'
|
23
25
|
require 'openapi_client/models/create_aliases_request_new'
|
24
26
|
require 'openapi_client/models/create_aliases_request_reference'
|
@@ -26,13 +28,13 @@ require 'openapi_client/models/inline_response200'
|
|
26
28
|
require 'openapi_client/models/inline_response2001'
|
27
29
|
require 'openapi_client/models/inline_response201'
|
28
30
|
require 'openapi_client/models/inline_response_default'
|
29
|
-
require 'openapi_client/models/model_alias'
|
30
31
|
require 'openapi_client/models/revealed_data'
|
31
32
|
require 'openapi_client/models/update_alias_request'
|
32
33
|
require 'openapi_client/models/update_alias_request_data'
|
33
34
|
|
34
35
|
# APIs
|
35
36
|
require 'openapi_client/api/aliases_api'
|
37
|
+
require 'openapi_client/api/default_api'
|
36
38
|
|
37
39
|
module VgsApiClient
|
38
40
|
class << self
|
data/lib/version.rb
CHANGED
data/lib/vgs_api_client.rb
CHANGED
@@ -65,7 +65,7 @@ module VGS
|
|
65
65
|
def reveal(aliases)
|
66
66
|
begin
|
67
67
|
query = aliases.kind_of?(Array) ? aliases.join(",") : aliases
|
68
|
-
response = @aliases_api.reveal_multiple_aliases(
|
68
|
+
response = @aliases_api.reveal_multiple_aliases(aliases = query)
|
69
69
|
rescue Exception => e
|
70
70
|
raise map_exception("Failed to reveal aliases #{ aliases }", e)
|
71
71
|
else
|
data/scripts/assemble/run.sh
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
LIB_VERSION=${LIB_VERSION:-0.0.1.alpha$(date "+%Y%m%d%H%M")}
|
4
4
|
|
5
5
|
# fix version
|
6
|
-
grep -rl 0.0.1.
|
6
|
+
grep -rl 0.0.1.alpha202305301958 . | xargs sed -i "s/0.0.1.alpha202305301958/${LIB_VERSION}/g"
|
7
7
|
|
8
8
|
# build
|
9
9
|
gem build vgs_api_client.gemspec
|
data/scripts/test/run.sh
CHANGED
@@ -5,7 +5,7 @@ set -e
|
|
5
5
|
echo "Installing lib from local sources"
|
6
6
|
# fix version
|
7
7
|
VERSION=0.0.1.alpha$(date "+%Y%m%d%H%M")
|
8
|
-
grep -rl 0.0.1.
|
8
|
+
grep -rl 0.0.1.alpha202305301958 . | xargs sed -i "s/0.0.1.alpha202305301958/$VERSION/g"
|
9
9
|
|
10
10
|
bundle install
|
11
11
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vgs_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.
|
4
|
+
version: 0.0.1.alpha202305301958
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Very Good Security
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -68,11 +68,14 @@ files:
|
|
68
68
|
- docker-compose.yaml
|
69
69
|
- lib/openapi_client.rb
|
70
70
|
- lib/openapi_client/api/aliases_api.rb
|
71
|
+
- lib/openapi_client/api/default_api.rb
|
71
72
|
- lib/openapi_client/api_client.rb
|
72
73
|
- lib/openapi_client/api_error.rb
|
73
74
|
- lib/openapi_client/configuration.rb
|
75
|
+
- lib/openapi_client/models/alias_dto.rb
|
74
76
|
- lib/openapi_client/models/alias_format.rb
|
75
77
|
- lib/openapi_client/models/api_error.rb
|
78
|
+
- lib/openapi_client/models/batch_aliases_request.rb
|
76
79
|
- lib/openapi_client/models/create_aliases_request.rb
|
77
80
|
- lib/openapi_client/models/create_aliases_request_new.rb
|
78
81
|
- lib/openapi_client/models/create_aliases_request_reference.rb
|
@@ -80,7 +83,6 @@ files:
|
|
80
83
|
- lib/openapi_client/models/inline_response2001.rb
|
81
84
|
- lib/openapi_client/models/inline_response201.rb
|
82
85
|
- lib/openapi_client/models/inline_response_default.rb
|
83
|
-
- lib/openapi_client/models/model_alias.rb
|
84
86
|
- lib/openapi_client/models/revealed_data.rb
|
85
87
|
- lib/openapi_client/models/update_alias_request.rb
|
86
88
|
- lib/openapi_client/models/update_alias_request_data.rb
|