vgs_api_client 0.0.1.dev202204201806 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +70 -0
  3. data/README.md +237 -0
  4. data/docs/AliasFormat.md +15 -0
  5. data/docs/AliasesApi.md +366 -0
  6. data/docs/ApiError.md +24 -0
  7. data/docs/CreateAliasesRequest.md +18 -0
  8. data/docs/CreateAliasesRequestExisting.md +20 -0
  9. data/docs/CreateAliasesRequestNew.md +22 -0
  10. data/docs/InlineResponse200.md +18 -0
  11. data/docs/InlineResponse2001.md +18 -0
  12. data/docs/InlineResponse201.md +18 -0
  13. data/docs/InlineResponseDefault.md +18 -0
  14. data/docs/ModelAlias.md +20 -0
  15. data/docs/RevealedData.md +24 -0
  16. data/docs/UpdateAliasRequest.md +18 -0
  17. data/docs/UpdateAliasRequestData.md +18 -0
  18. data/git_push.sh +57 -0
  19. data/lib/vgs_api_client/api/aliases_api.rb +17 -8
  20. data/lib/vgs_api_client/api_client.rb +5 -5
  21. data/lib/vgs_api_client/api_error.rb +3 -3
  22. data/lib/vgs_api_client/configuration.rb +3 -3
  23. data/lib/vgs_api_client/models/alias_format.rb +3 -3
  24. data/lib/vgs_api_client/models/api_error.rb +6 -6
  25. data/lib/vgs_api_client/models/create_aliases_request.rb +7 -35
  26. data/lib/vgs_api_client/models/{create_aliases_request_reference.rb → create_aliases_request_existing.rb} +7 -7
  27. data/lib/vgs_api_client/models/create_aliases_request_new.rb +7 -53
  28. data/lib/vgs_api_client/models/inline_response200.rb +6 -6
  29. data/lib/vgs_api_client/models/inline_response2001.rb +6 -30
  30. data/lib/vgs_api_client/models/inline_response201.rb +6 -6
  31. data/lib/vgs_api_client/models/inline_response_default.rb +6 -21
  32. data/lib/vgs_api_client/models/model_alias.rb +6 -6
  33. data/lib/vgs_api_client/models/revealed_data.rb +7 -53
  34. data/lib/vgs_api_client/models/update_alias_request.rb +6 -6
  35. data/lib/vgs_api_client/models/update_alias_request_data.rb +6 -6
  36. data/lib/vgs_api_client/version.rb +4 -4
  37. data/lib/vgs_api_client.rb +5 -5
  38. data/spec/api/aliases_api_spec.rb +137 -0
  39. data/spec/api_client_spec.rb +31 -31
  40. data/spec/configuration_spec.rb +5 -5
  41. data/spec/models/alias_format_spec.rb +28 -0
  42. data/spec/models/api_error_spec.rb +52 -0
  43. data/spec/models/create_aliases_request_existing_spec.rb +40 -0
  44. data/spec/models/create_aliases_request_new_spec.rb +46 -0
  45. data/spec/models/create_aliases_request_spec.rb +34 -0
  46. data/spec/models/inline_response2001_spec.rb +34 -0
  47. data/spec/models/inline_response200_spec.rb +34 -0
  48. data/spec/models/inline_response201_spec.rb +34 -0
  49. data/spec/models/inline_response_default_spec.rb +34 -0
  50. data/spec/models/model_alias_spec.rb +40 -0
  51. data/spec/models/revealed_data_spec.rb +52 -0
  52. data/spec/models/update_alias_request_data_spec.rb +34 -0
  53. data/spec/models/update_alias_request_spec.rb +34 -0
  54. data/spec/spec_helper.rb +2 -2
  55. data/vgs_api_client.gemspec +3 -3
  56. metadata +51 -22
  57. data/DEVELOPMENT.md +0 -11
  58. data/LICENSE +0 -11
  59. data/RELEASE.md +0 -15
  60. data/docker-compose.yaml +0 -32
  61. data/lib/vgs.rb +0 -82
  62. data/scripts/assemble/Dockerfile +0 -8
  63. data/scripts/assemble/run.sh +0 -9
  64. data/scripts/publish/Dockerfile +0 -8
  65. data/scripts/publish/run.sh +0 -14
  66. data/scripts/publish.sh +0 -12
  67. data/scripts/run-tests-e2e.sh +0 -10
  68. data/scripts/run-tests.sh +0 -6
  69. data/scripts/test/Dockerfile +0 -12
  70. data/scripts/test/run.sh +0 -37
  71. data/spec/test_aliases_api_spec.rb +0 -97
data/docs/ApiError.md ADDED
@@ -0,0 +1,24 @@
1
+ # VgsapiClient::ApiError
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **detail** | **String** | Explanation of what exactly went wrong. | [optional] |
8
+ | **href** | **String** | Request URL. | [optional] |
9
+ | **status** | **Integer** | HTTP status code. | [optional] |
10
+ | **title** | **String** | High-level reason of why the request failed. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'vgs_api_client'
16
+
17
+ instance = VgsapiClient::ApiError.new(
18
+ detail: null,
19
+ href: null,
20
+ status: null,
21
+ title: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,18 @@
1
+ # VgsapiClient::CreateAliasesRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**Array<OneOfCreateAliasesRequestNewCreateAliasesRequestExisting>**](OneOfCreateAliasesRequestNewCreateAliasesRequestExisting.md) | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'vgs_api_client'
13
+
14
+ instance = VgsapiClient::CreateAliasesRequest.new(
15
+ data: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # VgsapiClient::CreateAliasesRequestExisting
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **_alias** | **String** | Existing alias to use as a reference. | |
8
+ | **format** | [**AliasFormat**](AliasFormat.md) | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'vgs_api_client'
14
+
15
+ instance = VgsapiClient::CreateAliasesRequestExisting.new(
16
+ _alias: tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e,
17
+ format: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,22 @@
1
+ # VgsapiClient::CreateAliasesRequestNew
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **classifiers** | **Array<String>** | List of tags to classify the value with. | [optional] |
8
+ | **format** | [**AliasFormat**](AliasFormat.md) | | |
9
+ | **value** | **String** | Raw value to encrypt & store in the vault. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'vgs_api_client'
15
+
16
+ instance = VgsapiClient::CreateAliasesRequestNew.new(
17
+ classifiers: null,
18
+ format: null,
19
+ value: 122105155
20
+ )
21
+ ```
22
+
@@ -0,0 +1,18 @@
1
+ # VgsapiClient::InlineResponse200
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**Hash<String, RevealedData>**](RevealedData.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'vgs_api_client'
13
+
14
+ instance = VgsapiClient::InlineResponse200.new(
15
+ data: {"tok_sandbox_5UpnbMvaihRuRwz5QXwBFw":{"aliases":[{"format":"UUID","value":"tok_sandbox_5UpnbMvaihRuRwz5QXwBFw"}],"classifiers":["bank-account"],"created_at":"2019-08-10T11:45:30Z","value":"476673481"},"tok_sandbox_9ToiJHedw1nE1Jfx1qYYgz":{"aliases":[{"format":"UUID","value":"tok_sandbox_9ToiJHedw1nE1Jfx1qYYgz"}],"classifiers":["bank-account"],"created_at":"2019-08-10T11:45:30Z","value":"750360025"}}
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # VgsapiClient::InlineResponse2001
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**Array<RevealedData>**](RevealedData.md) | The retrieved value. | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'vgs_api_client'
13
+
14
+ instance = VgsapiClient::InlineResponse2001.new(
15
+ data: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # VgsapiClient::InlineResponse201
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**Array<RevealedData>**](RevealedData.md) | List of stored values along with their aliases. | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'vgs_api_client'
13
+
14
+ instance = VgsapiClient::InlineResponse201.new(
15
+ data: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # VgsapiClient::InlineResponseDefault
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **errors** | [**Array<ApiError>**](ApiError.md) | List of errors that occurred while processing the request. | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'vgs_api_client'
13
+
14
+ instance = VgsapiClient::InlineResponseDefault.new(
15
+ errors: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # VgsapiClient::ModelAlias
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **_alias** | **String** | Opaque string used to substitute the raw value. | [optional] |
8
+ | **format** | [**AliasFormat**](AliasFormat.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'vgs_api_client'
14
+
15
+ instance = VgsapiClient::ModelAlias.new(
16
+ _alias: tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e,
17
+ format: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,24 @@
1
+ # VgsapiClient::RevealedData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **aliases** | [**Array<ModelAlias>**](ModelAlias.md) | List of aliases associated with the value. | [optional] |
8
+ | **classifiers** | **Array<String>** | List of tags the value is classified with. | [optional] |
9
+ | **created_at** | **Time** | Creation time, in UTC. | [optional] |
10
+ | **value** | **String** | Decrypted value stored in the vault. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'vgs_api_client'
16
+
17
+ instance = VgsapiClient::RevealedData.new(
18
+ aliases: null,
19
+ classifiers: null,
20
+ created_at: 2019-05-15T12:30:45Z,
21
+ value: 122105155
22
+ )
23
+ ```
24
+
@@ -0,0 +1,18 @@
1
+ # VgsapiClient::UpdateAliasRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**UpdateAliasRequestData**](UpdateAliasRequestData.md) | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'vgs_api_client'
13
+
14
+ instance = VgsapiClient::UpdateAliasRequest.new(
15
+ data: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # VgsapiClient::UpdateAliasRequestData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **classifiers** | **Array<String>** | List of tags to classify the value with. | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'vgs_api_client'
13
+
14
+ instance = VgsapiClient::UpdateAliasRequestData.new(
15
+ classifiers: null
16
+ )
17
+ ```
18
+
data/git_push.sh ADDED
@@ -0,0 +1,57 @@
1
+ #!/bin/sh
2
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
+ #
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
5
+
6
+ git_user_id=$1
7
+ git_repo_id=$2
8
+ release_note=$3
9
+ git_host=$4
10
+
11
+ if [ "$git_host" = "" ]; then
12
+ git_host="github.com"
13
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
+ fi
15
+
16
+ if [ "$git_user_id" = "" ]; then
17
+ git_user_id="verygoodsecurity"
18
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
+ fi
20
+
21
+ if [ "$git_repo_id" = "" ]; then
22
+ git_repo_id="vgs-api-client-ruby"
23
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
+ fi
25
+
26
+ if [ "$release_note" = "" ]; then
27
+ release_note="Minor update"
28
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
+ fi
30
+
31
+ # Initialize the local directory as a Git repository
32
+ git init
33
+
34
+ # Adds the files in the local repository and stages them for commit.
35
+ git add .
36
+
37
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
+ git commit -m "$release_note"
39
+
40
+ # Sets the new remote
41
+ git_remote=$(git remote)
42
+ if [ "$git_remote" = "" ]; then # git remote not defined
43
+
44
+ if [ "$GIT_TOKEN" = "" ]; then
45
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
+ else
48
+ git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
49
+ fi
50
+
51
+ fi
52
+
53
+ git pull origin master
54
+
55
+ # Pushes (Forces) the changes in the local repository up to the remote repository
56
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
+ git push origin master 2>&1 | grep -v 'To https'
@@ -1,18 +1,18 @@
1
1
  =begin
2
2
  #Vault HTTP API
3
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. 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\" } ] } ```
4
+ #Storing, retrieving, and managing sensitive data within a VGS organization. **NOTE:** _The Vault API is intended only for environments that are already PCI-compliant. If you want to use this API, but are not yet PCI-compliant, you can use [VGS Collect](https://www.verygoodsecurity.com/docs/vgs-collect/what-is-it) or VGS Proxy with [Inbound Routes](https://www.verygoodsecurity.com/docs/getting-started/quick-integration#securing-inbound-connection) to quickly and seamlessly achieve compliance._ Looking for the old version of the API? Find it [here](https://www.verygoodsecurity.com/docs/api/1/vault). # Introduction Each encrypted value stored in a VGS vault has one or multiple _aliases_ associated with it. These aliases are fully opaque and retain no information about the underlying data. The user may safely store aliases without compromising data security. **NOTE:** The API works with persistent storage only. Unlike volatile storage, this means that the data is stored permanently, without any implicit TTL. Aliases are not valuable on their own. However, they can be used to decrypt the associated value and pass it to another service via the [forward proxy](https://www.verygoodsecurity.com/docs/guides/outbound-connection). ## Alias Formats Each alias corresponds to a certain format. There are several alias formats suitable for different kinds of sensitive data. For example, `UUID` produces a random Base58-encoded UUID string with an environment-dependent prefix: ``` tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e ``` This format is generic and suitable for any kind of data. The tables below contain descriptions of all alias formats recognized by the API. ### Generic Formats | Value | Description | |-------------------------|-------------------------------------------------------| | `NUM_LENGTH_PRESERVING` | Length-Preserving, Numeric | | `RAW_UUID` | UUID | | `UUID` | UUID (Prefixed, Base58-Encoded) | | `GENERIC_T_FOUR` | UUID (Prefixed, Base58-Encoded, Last four preserving) | ### Account Number Formats | Value | Description | |-----------------------------------|--------------------------------------| | `FPE_ACC_NUM_T_FOUR` | Length-Preserving, Numeric (A4) | | `FPE_ALPHANUMERIC_ACC_NUM_T_FOUR` | Length-Preserving, Alphanumeric (A4) | ### Payment Card Formats | Value | Description | |------------------|---------------------------------------------| | `FPE_SIX_T_FOUR` | Format-Preserving, Luhn Valid (6T4) | | `FPE_T_FOUR` | Format-Preserving, Luhn Valid (T4) | | `PFPT` | Prefixed, Luhn Valid, 19-Digit Fixed Length | ### SSN Formats | Value | Description | |------------------|------------------------| | `FPE_SSN_T_FOUR` | Format-Preserving (A4) | # Authentication This API uses `Basic` authentication. 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) # 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
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: support@verygoodsecurity.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.4.0
9
+ OpenAPI Generator version: 5.0.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'cgi'
14
14
 
15
- module VgsApiClient
15
+ module VgsapiClient
16
16
  class AliasesApi
17
17
  attr_accessor :api_client
18
18
 
@@ -211,7 +211,7 @@ module VgsApiClient
211
211
 
212
212
  # Reveal multiple aliases
213
213
  # 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 q [String] Comma-separated list of aliases to reveal.
214
+ # @param q [Array<String>] Comma-separated list of aliases to reveal.
215
215
  # @param [Hash] opts the optional parameters
216
216
  # @return [InlineResponse200]
217
217
  def reveal_multiple_aliases(q, opts = {})
@@ -221,7 +221,7 @@ module VgsApiClient
221
221
 
222
222
  # Reveal multiple aliases
223
223
  # 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 q [String] Comma-separated list of aliases to reveal.
224
+ # @param q [Array<String>] Comma-separated list of aliases to reveal.
225
225
  # @param [Hash] opts the optional parameters
226
226
  # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
227
227
  def reveal_multiple_aliases_with_http_info(q, opts = {})
@@ -232,12 +232,21 @@ module VgsApiClient
232
232
  if @api_client.config.client_side_validation && q.nil?
233
233
  fail ArgumentError, "Missing the required parameter 'q' when calling AliasesApi.reveal_multiple_aliases"
234
234
  end
235
+ if @api_client.config.client_side_validation && q.length > 20
236
+ fail ArgumentError, 'invalid value for "q" when calling AliasesApi.reveal_multiple_aliases, number of items must be less than or equal to 20.'
237
+ end
238
+
239
+ if @api_client.config.client_side_validation && q.length < 1
240
+ fail ArgumentError, 'invalid value for "q" when calling AliasesApi.reveal_multiple_aliases, number of items must be greater than or equal to 1.'
241
+ end
242
+
235
243
  # resource path
236
244
  local_var_path = '/aliases'
237
245
 
238
246
  # query parameters
239
247
  query_params = opts[:query_params] || {}
240
- query_params[:'q'] = q
248
+ # query_params[:'q'] = @api_client.build_collection_param(q, :multi)
249
+ query_params[:'q'] = q.join(',')
241
250
 
242
251
  # header parameters
243
252
  header_params = opts[:header_params] || {}
@@ -280,8 +289,8 @@ module VgsApiClient
280
289
  # @option opts [UpdateAliasRequest] :update_alias_request
281
290
  # @return [nil]
282
291
  def update_alias(_alias, opts = {})
283
- update_alias_with_http_info(_alias, opts)
284
- nil
292
+ data, status_code, headers = update_alias_with_http_info(_alias, opts)
293
+ status_code
285
294
  end
286
295
 
287
296
  # Update data classifiers
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Vault HTTP API
3
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. 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\" } ] } ```
4
+ #Storing, retrieving, and managing sensitive data within a VGS organization. **NOTE:** _The Vault API is intended only for environments that are already PCI-compliant. If you want to use this API, but are not yet PCI-compliant, you can use [VGS Collect](https://www.verygoodsecurity.com/docs/vgs-collect/what-is-it) or VGS Proxy with [Inbound Routes](https://www.verygoodsecurity.com/docs/getting-started/quick-integration#securing-inbound-connection) to quickly and seamlessly achieve compliance._ Looking for the old version of the API? Find it [here](https://www.verygoodsecurity.com/docs/api/1/vault). # Introduction Each encrypted value stored in a VGS vault has one or multiple _aliases_ associated with it. These aliases are fully opaque and retain no information about the underlying data. The user may safely store aliases without compromising data security. **NOTE:** The API works with persistent storage only. Unlike volatile storage, this means that the data is stored permanently, without any implicit TTL. Aliases are not valuable on their own. However, they can be used to decrypt the associated value and pass it to another service via the [forward proxy](https://www.verygoodsecurity.com/docs/guides/outbound-connection). ## Alias Formats Each alias corresponds to a certain format. There are several alias formats suitable for different kinds of sensitive data. For example, `UUID` produces a random Base58-encoded UUID string with an environment-dependent prefix: ``` tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e ``` This format is generic and suitable for any kind of data. The tables below contain descriptions of all alias formats recognized by the API. ### Generic Formats | Value | Description | |-------------------------|-------------------------------------------------------| | `NUM_LENGTH_PRESERVING` | Length-Preserving, Numeric | | `RAW_UUID` | UUID | | `UUID` | UUID (Prefixed, Base58-Encoded) | | `GENERIC_T_FOUR` | UUID (Prefixed, Base58-Encoded, Last four preserving) | ### Account Number Formats | Value | Description | |-----------------------------------|--------------------------------------| | `FPE_ACC_NUM_T_FOUR` | Length-Preserving, Numeric (A4) | | `FPE_ALPHANUMERIC_ACC_NUM_T_FOUR` | Length-Preserving, Alphanumeric (A4) | ### Payment Card Formats | Value | Description | |------------------|---------------------------------------------| | `FPE_SIX_T_FOUR` | Format-Preserving, Luhn Valid (6T4) | | `FPE_T_FOUR` | Format-Preserving, Luhn Valid (T4) | | `PFPT` | Prefixed, Luhn Valid, 19-Digit Fixed Length | ### SSN Formats | Value | Description | |------------------|------------------------| | `FPE_SSN_T_FOUR` | Format-Preserving (A4) | # Authentication This API uses `Basic` authentication. 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) # 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
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: support@verygoodsecurity.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.4.0
9
+ OpenAPI Generator version: 5.0.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -17,7 +17,7 @@ require 'tempfile'
17
17
  require 'time'
18
18
  require 'typhoeus'
19
19
 
20
- module VgsApiClient
20
+ module VgsapiClient
21
21
  class ApiClient
22
22
  # The Configuration object holding settings to be used in the API client.
23
23
  attr_accessor :config
@@ -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.dev202204201806/ruby"
34
+ @user_agent = "{{ user_agent_client_name }}{{ library_version }}{{ language_name }}/0.0.1/ruby"
35
35
  @default_headers = {
36
36
  'Content-Type' => 'application/json',
37
37
  'User-Agent' => @user_agent
@@ -276,7 +276,7 @@ module VgsApiClient
276
276
  end
277
277
  else
278
278
  # models (e.g. Pet) or oneOf
279
- klass = VgsApiClient.const_get(return_type)
279
+ klass = VgsapiClient.const_get(return_type)
280
280
  klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data)
281
281
  end
282
282
  end
@@ -1,16 +1,16 @@
1
1
  =begin
2
2
  #Vault HTTP API
3
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. 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\" } ] } ```
4
+ #Storing, retrieving, and managing sensitive data within a VGS organization. **NOTE:** _The Vault API is intended only for environments that are already PCI-compliant. If you want to use this API, but are not yet PCI-compliant, you can use [VGS Collect](https://www.verygoodsecurity.com/docs/vgs-collect/what-is-it) or VGS Proxy with [Inbound Routes](https://www.verygoodsecurity.com/docs/getting-started/quick-integration#securing-inbound-connection) to quickly and seamlessly achieve compliance._ Looking for the old version of the API? Find it [here](https://www.verygoodsecurity.com/docs/api/1/vault). # Introduction Each encrypted value stored in a VGS vault has one or multiple _aliases_ associated with it. These aliases are fully opaque and retain no information about the underlying data. The user may safely store aliases without compromising data security. **NOTE:** The API works with persistent storage only. Unlike volatile storage, this means that the data is stored permanently, without any implicit TTL. Aliases are not valuable on their own. However, they can be used to decrypt the associated value and pass it to another service via the [forward proxy](https://www.verygoodsecurity.com/docs/guides/outbound-connection). ## Alias Formats Each alias corresponds to a certain format. There are several alias formats suitable for different kinds of sensitive data. For example, `UUID` produces a random Base58-encoded UUID string with an environment-dependent prefix: ``` tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e ``` This format is generic and suitable for any kind of data. The tables below contain descriptions of all alias formats recognized by the API. ### Generic Formats | Value | Description | |-------------------------|-------------------------------------------------------| | `NUM_LENGTH_PRESERVING` | Length-Preserving, Numeric | | `RAW_UUID` | UUID | | `UUID` | UUID (Prefixed, Base58-Encoded) | | `GENERIC_T_FOUR` | UUID (Prefixed, Base58-Encoded, Last four preserving) | ### Account Number Formats | Value | Description | |-----------------------------------|--------------------------------------| | `FPE_ACC_NUM_T_FOUR` | Length-Preserving, Numeric (A4) | | `FPE_ALPHANUMERIC_ACC_NUM_T_FOUR` | Length-Preserving, Alphanumeric (A4) | ### Payment Card Formats | Value | Description | |------------------|---------------------------------------------| | `FPE_SIX_T_FOUR` | Format-Preserving, Luhn Valid (6T4) | | `FPE_T_FOUR` | Format-Preserving, Luhn Valid (T4) | | `PFPT` | Prefixed, Luhn Valid, 19-Digit Fixed Length | ### SSN Formats | Value | Description | |------------------|------------------------| | `FPE_SSN_T_FOUR` | Format-Preserving (A4) | # Authentication This API uses `Basic` authentication. 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) # 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
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: support@verygoodsecurity.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.4.0
9
+ OpenAPI Generator version: 5.0.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
- module VgsApiClient
13
+ module VgsapiClient
14
14
  class ApiError < StandardError
15
15
  attr_reader :code, :response_headers, :response_body
16
16
 
@@ -1,16 +1,16 @@
1
1
  =begin
2
2
  #Vault HTTP API
3
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. 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\" } ] } ```
4
+ #Storing, retrieving, and managing sensitive data within a VGS organization. **NOTE:** _The Vault API is intended only for environments that are already PCI-compliant. If you want to use this API, but are not yet PCI-compliant, you can use [VGS Collect](https://www.verygoodsecurity.com/docs/vgs-collect/what-is-it) or VGS Proxy with [Inbound Routes](https://www.verygoodsecurity.com/docs/getting-started/quick-integration#securing-inbound-connection) to quickly and seamlessly achieve compliance._ Looking for the old version of the API? Find it [here](https://www.verygoodsecurity.com/docs/api/1/vault). # Introduction Each encrypted value stored in a VGS vault has one or multiple _aliases_ associated with it. These aliases are fully opaque and retain no information about the underlying data. The user may safely store aliases without compromising data security. **NOTE:** The API works with persistent storage only. Unlike volatile storage, this means that the data is stored permanently, without any implicit TTL. Aliases are not valuable on their own. However, they can be used to decrypt the associated value and pass it to another service via the [forward proxy](https://www.verygoodsecurity.com/docs/guides/outbound-connection). ## Alias Formats Each alias corresponds to a certain format. There are several alias formats suitable for different kinds of sensitive data. For example, `UUID` produces a random Base58-encoded UUID string with an environment-dependent prefix: ``` tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e ``` This format is generic and suitable for any kind of data. The tables below contain descriptions of all alias formats recognized by the API. ### Generic Formats | Value | Description | |-------------------------|-------------------------------------------------------| | `NUM_LENGTH_PRESERVING` | Length-Preserving, Numeric | | `RAW_UUID` | UUID | | `UUID` | UUID (Prefixed, Base58-Encoded) | | `GENERIC_T_FOUR` | UUID (Prefixed, Base58-Encoded, Last four preserving) | ### Account Number Formats | Value | Description | |-----------------------------------|--------------------------------------| | `FPE_ACC_NUM_T_FOUR` | Length-Preserving, Numeric (A4) | | `FPE_ALPHANUMERIC_ACC_NUM_T_FOUR` | Length-Preserving, Alphanumeric (A4) | ### Payment Card Formats | Value | Description | |------------------|---------------------------------------------| | `FPE_SIX_T_FOUR` | Format-Preserving, Luhn Valid (6T4) | | `FPE_T_FOUR` | Format-Preserving, Luhn Valid (T4) | | `PFPT` | Prefixed, Luhn Valid, 19-Digit Fixed Length | ### SSN Formats | Value | Description | |------------------|------------------------| | `FPE_SSN_T_FOUR` | Format-Preserving (A4) | # Authentication This API uses `Basic` authentication. 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) # 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
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: support@verygoodsecurity.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.4.0
9
+ OpenAPI Generator version: 5.0.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
- module VgsApiClient
13
+ module VgsapiClient
14
14
  class Configuration
15
15
  # Defines url scheme
16
16
  attr_accessor :scheme
@@ -1,19 +1,19 @@
1
1
  =begin
2
2
  #Vault HTTP API
3
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. 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\" } ] } ```
4
+ #Storing, retrieving, and managing sensitive data within a VGS organization. **NOTE:** _The Vault API is intended only for environments that are already PCI-compliant. If you want to use this API, but are not yet PCI-compliant, you can use [VGS Collect](https://www.verygoodsecurity.com/docs/vgs-collect/what-is-it) or VGS Proxy with [Inbound Routes](https://www.verygoodsecurity.com/docs/getting-started/quick-integration#securing-inbound-connection) to quickly and seamlessly achieve compliance._ Looking for the old version of the API? Find it [here](https://www.verygoodsecurity.com/docs/api/1/vault). # Introduction Each encrypted value stored in a VGS vault has one or multiple _aliases_ associated with it. These aliases are fully opaque and retain no information about the underlying data. The user may safely store aliases without compromising data security. **NOTE:** The API works with persistent storage only. Unlike volatile storage, this means that the data is stored permanently, without any implicit TTL. Aliases are not valuable on their own. However, they can be used to decrypt the associated value and pass it to another service via the [forward proxy](https://www.verygoodsecurity.com/docs/guides/outbound-connection). ## Alias Formats Each alias corresponds to a certain format. There are several alias formats suitable for different kinds of sensitive data. For example, `UUID` produces a random Base58-encoded UUID string with an environment-dependent prefix: ``` tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e ``` This format is generic and suitable for any kind of data. The tables below contain descriptions of all alias formats recognized by the API. ### Generic Formats | Value | Description | |-------------------------|-------------------------------------------------------| | `NUM_LENGTH_PRESERVING` | Length-Preserving, Numeric | | `RAW_UUID` | UUID | | `UUID` | UUID (Prefixed, Base58-Encoded) | | `GENERIC_T_FOUR` | UUID (Prefixed, Base58-Encoded, Last four preserving) | ### Account Number Formats | Value | Description | |-----------------------------------|--------------------------------------| | `FPE_ACC_NUM_T_FOUR` | Length-Preserving, Numeric (A4) | | `FPE_ALPHANUMERIC_ACC_NUM_T_FOUR` | Length-Preserving, Alphanumeric (A4) | ### Payment Card Formats | Value | Description | |------------------|---------------------------------------------| | `FPE_SIX_T_FOUR` | Format-Preserving, Luhn Valid (6T4) | | `FPE_T_FOUR` | Format-Preserving, Luhn Valid (T4) | | `PFPT` | Prefixed, Luhn Valid, 19-Digit Fixed Length | ### SSN Formats | Value | Description | |------------------|------------------------| | `FPE_SSN_T_FOUR` | Format-Preserving (A4) | # Authentication This API uses `Basic` authentication. 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) # 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
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: support@verygoodsecurity.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.4.0
9
+ OpenAPI Generator version: 5.0.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module VgsApiClient
16
+ module VgsapiClient
17
17
  class AliasFormat
18
18
  FPE_ACC_NUM_T_FOUR = "FPE_ACC_NUM_T_FOUR".freeze
19
19
  FPE_ALPHANUMERIC_ACC_NUM_T_FOUR = "FPE_ALPHANUMERIC_ACC_NUM_T_FOUR".freeze