vgs_api_client 0.0.1.alpha202308242233 → 0.0.1.dev202204182306

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +70 -0
  3. data/docker-compose.yaml +5 -19
  4. data/lib/vgs.rb +82 -0
  5. data/lib/{openapi_client → vgs_api_client}/api/aliases_api.rb +10 -100
  6. data/lib/{openapi_client → vgs_api_client}/api_client.rb +2 -2
  7. data/lib/vgs_api_client/api_error.rb +57 -0
  8. data/lib/{openapi_client → vgs_api_client}/configuration.rb +1 -1
  9. data/lib/vgs_api_client/models/alias_format.rb +44 -0
  10. data/lib/vgs_api_client/models/api_error.rb +249 -0
  11. data/lib/{openapi_client → vgs_api_client}/models/create_aliases_request.rb +2 -2
  12. data/lib/{openapi_client → vgs_api_client}/models/create_aliases_request_new.rb +6 -2
  13. data/lib/{openapi_client → vgs_api_client}/models/create_aliases_request_reference.rb +6 -2
  14. data/lib/{openapi_client → vgs_api_client}/models/inline_response200.rb +1 -1
  15. data/lib/{openapi_client → vgs_api_client}/models/inline_response2001.rb +1 -1
  16. data/lib/{openapi_client → vgs_api_client}/models/inline_response201.rb +1 -1
  17. data/lib/{openapi_client → vgs_api_client}/models/inline_response_default.rb +1 -1
  18. data/lib/{openapi_client/models/alias_dto.rb → vgs_api_client/models/model_alias.rb} +4 -5
  19. data/lib/{openapi_client → vgs_api_client}/models/revealed_data.rb +2 -3
  20. data/lib/{openapi_client → vgs_api_client}/models/update_alias_request.rb +1 -1
  21. data/lib/{openapi_client → vgs_api_client}/models/update_alias_request_data.rb +1 -1
  22. data/lib/vgs_api_client/version.rb +15 -0
  23. data/lib/vgs_api_client.rb +48 -106
  24. data/scripts/assemble/Dockerfile +1 -4
  25. data/scripts/assemble/run.sh +3 -3
  26. data/scripts/publish/Dockerfile +1 -4
  27. data/scripts/publish/run.sh +2 -3
  28. data/scripts/publish.sh +2 -3
  29. data/scripts/run-test-e2e.sh +13 -0
  30. data/scripts/run-test-local.sh +4 -0
  31. data/scripts/test/Dockerfile +5 -9
  32. data/scripts/test/run.sh +26 -9
  33. data/spec/api_client_spec.rb +1 -1
  34. data/spec/configuration_spec.rb +1 -1
  35. data/spec/spec_helper.rb +2 -2
  36. data/spec/test_api_spec.rb +97 -0
  37. data/vgs_api_client-0.0.1.dev202204181658.gem +0 -0
  38. data/vgs_api_client.gemspec +21 -15
  39. metadata +34 -46
  40. data/README.md +0 -39
  41. data/VERSION +0 -1
  42. data/api.yaml +0 -625
  43. data/lib/openapi_client/api_error.rb +0 -57
  44. data/lib/openapi_client/models/alias_format.rb +0 -50
  45. data/lib/openapi_client/models/api_error.rb +0 -0
  46. data/lib/openapi_client/models/batch_aliases_request.rb +0 -264
  47. data/lib/openapi_client/version.rb +0 -15
  48. data/lib/openapi_client.rb +0 -54
  49. data/lib/version.rb +0 -3
  50. data/scripts/lint/Dockerfile +0 -9
  51. data/scripts/lint/run.sh +0 -5
  52. data/scripts/lint.sh +0 -6
  53. data/scripts/run-tests-e2e.sh +0 -8
  54. data/scripts/run-tests.sh +0 -6
  55. data/scripts/test-e2e/Dockerfile +0 -14
  56. data/scripts/test-e2e/run.sh +0 -28
  57. data/spec/test_aliases_api_spec.rb +0 -123
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5cef41e21b760af818c119f92c1322763ae32fd7de395d7a5236a4f3186a78be
4
- data.tar.gz: 356ed7ac8f58d9c5eb56c654dc28cff6aae887349081f94ca4e63f865a63a0e9
3
+ metadata.gz: e20fcf11d76f43536add9dc0f03aa8de69940c5c583b2ab38b2012a95c46f878
4
+ data.tar.gz: 9e5b7290e69a630d091297337189b03c9ce76c655e3d5211b096eb231d342863
5
5
  SHA512:
6
- metadata.gz: 3abb1c7c4cc6f04a2a64c232391ac2ea95be957cc422843db51aac5840a07db0ea5bc5c849af06aa9135287e81963bce4bef4fc9c1b8ad3ec9bb233c2e78f121
7
- data.tar.gz: c4a61a9060672ea4e93041956558eef2cbf672df49a475221bc575203cde2e2a530f62f376e1d2b4528cbf6405985a2844dedbdd1a6a7dd58fb2bb92e8822225
6
+ metadata.gz: 8e7a025a8003879611c5b90179b038770d933c3963aa87e480172fd480be62802d91ed8a79a74d8b8b2529674a42d82286bb0458354b8c937144557e8546bff0
7
+ data.tar.gz: 5b5d08c55d4d1dc5e92980fda86b1d6f1b7fe493f24f564a1abbb4defbfd7b08efd4383cabfa834d9ea87056e04754922652ae6b922fd2451496f0984a0849f2
data/Gemfile.lock ADDED
@@ -0,0 +1,70 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ vgs_api_client (0.0.1.dev202204182306)
5
+ typhoeus (~> 1.0, >= 1.0.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.2)
11
+ byebug (11.1.3)
12
+ coderay (1.1.3)
13
+ diff-lcs (1.5.0)
14
+ ethon (0.15.0)
15
+ ffi (>= 1.15.0)
16
+ ffi (1.15.5)
17
+ jaro_winkler (1.5.4)
18
+ method_source (1.0.0)
19
+ parallel (1.22.1)
20
+ parser (3.1.2.0)
21
+ ast (~> 2.4.1)
22
+ pry (0.13.1)
23
+ coderay (~> 1.1)
24
+ method_source (~> 1.0)
25
+ pry-byebug (3.9.0)
26
+ byebug (~> 11.0)
27
+ pry (~> 0.13.0)
28
+ psych (4.0.3)
29
+ stringio
30
+ rainbow (3.1.1)
31
+ rake (13.0.6)
32
+ rspec (3.11.0)
33
+ rspec-core (~> 3.11.0)
34
+ rspec-expectations (~> 3.11.0)
35
+ rspec-mocks (~> 3.11.0)
36
+ rspec-core (3.11.0)
37
+ rspec-support (~> 3.11.0)
38
+ rspec-expectations (3.11.0)
39
+ diff-lcs (>= 1.2.0, < 2.0)
40
+ rspec-support (~> 3.11.0)
41
+ rspec-mocks (3.11.1)
42
+ diff-lcs (>= 1.2.0, < 2.0)
43
+ rspec-support (~> 3.11.0)
44
+ rspec-support (3.11.0)
45
+ rubocop (0.66.0)
46
+ jaro_winkler (~> 1.5.1)
47
+ parallel (~> 1.10)
48
+ parser (>= 2.5, != 2.5.1.1)
49
+ psych (>= 3.1.0)
50
+ rainbow (>= 2.2.2, < 4.0)
51
+ ruby-progressbar (~> 1.7)
52
+ unicode-display_width (>= 1.4.0, < 1.6)
53
+ ruby-progressbar (1.11.0)
54
+ stringio (3.0.1)
55
+ typhoeus (1.4.0)
56
+ ethon (>= 0.9.0)
57
+ unicode-display_width (1.5.0)
58
+
59
+ PLATFORMS
60
+ aarch64-linux-musl
61
+
62
+ DEPENDENCIES
63
+ pry-byebug
64
+ rake (~> 13.0.1)
65
+ rspec (~> 3.6, >= 3.6.0)
66
+ rubocop (~> 0.66.0)
67
+ vgs_api_client!
68
+
69
+ BUNDLED WITH
70
+ 2.3.11
data/docker-compose.yaml CHANGED
@@ -1,12 +1,6 @@
1
1
  version: '3.7'
2
2
 
3
3
  services:
4
- lint:
5
- build:
6
- context: .
7
- dockerfile: scripts/lint/Dockerfile
8
- volumes:
9
- - ./:/vgs-api-client/
10
4
  assemble:
11
5
  build:
12
6
  context: .
@@ -29,18 +23,10 @@ services:
29
23
  context: .
30
24
  dockerfile: scripts/test/Dockerfile
31
25
  environment:
32
- VAULT_API_USERNAME: $VAULT_API_USERNAME
33
- VAULT_API_PASSWORD: $VAULT_API_PASSWORD
26
+ VAULT_API_USERNAME: US7oyrzRGmaKqi3ET8eSsECS
27
+ VAULT_API_PASSWORD: c06cf6d1-a35e-439d-91d1-8bd04e5fd9e5
34
28
  VAULT_API_BASE_URI: https://api.sandbox.verygoodvault.com
35
29
  VAULT_API_VAULT_ID: tntkxfmsefj
36
- LIB_VERSION: ${LIB_VERSION}
37
- test-e2e:
38
- build:
39
- context: .
40
- dockerfile: scripts/test-e2e/Dockerfile
41
- environment:
42
- VAULT_API_USERNAME: $VAULT_API_USERNAME
43
- VAULT_API_PASSWORD: $VAULT_API_PASSWORD
44
- VAULT_API_BASE_URI: https://api.sandbox.verygoodvault.com
45
- VAULT_API_VAULT_ID: tntkxfmsefj
46
- LIB_VERSION: ${LIB_VERSION}
30
+ TEST_AGAINST_PUBLISHED_LIB_VERSION: ${TEST_AGAINST_PUBLISHED_LIB_VERSION}
31
+ volumes:
32
+ - ./:/vgs-api-client/
data/lib/vgs.rb ADDED
@@ -0,0 +1,82 @@
1
+ module VGS
2
+ class VgsApiException < StandardError
3
+ end
4
+
5
+ class Aliases
6
+ def initialize(config)
7
+ @aliases_api = VgsApiClient::AliasesApi.new(VgsApiClient::ApiClient.new(config))
8
+ end
9
+
10
+ def redact(data)
11
+ begin
12
+ requests = data.map do |item|
13
+ VgsApiClient::CreateAliasesRequestNew.new(attributes = {
14
+ :format => VgsApiClient::AliasFormat.build_from_hash(item[:format]),
15
+ :classifiers => item[:classifiers],
16
+ :value => item[:value],
17
+ :storage => item[:storage]
18
+ })
19
+ end
20
+
21
+ create_aliases_request = VgsApiClient::CreateAliasesRequest.new(attributes = {
22
+ :data => requests
23
+ })
24
+ response = @aliases_api.create_aliases(opts = {
25
+ :create_aliases_request => create_aliases_request.to_hash
26
+ })
27
+
28
+ rescue
29
+ raise VgsApiException, "Failed to redact data #{ data }"
30
+ else
31
+ response.data
32
+ end
33
+
34
+ end
35
+
36
+ def reveal(aliases)
37
+ begin
38
+ query = aliases.kind_of?(Array) ? aliases.join(",") : aliases
39
+ response = @aliases_api.reveal_multiple_aliases(q = query)
40
+ rescue
41
+ raise VgsApiException, "Failed to reveal aliases #{ aliases }"
42
+ else
43
+ response.data
44
+ end
45
+ end
46
+
47
+ def delete(_alias)
48
+ begin
49
+ @aliases_api.delete_alias(_alias = _alias)
50
+ rescue
51
+ raise VgsApiException, "Failed to delete alias #{ _alias }"
52
+ end
53
+ end
54
+
55
+ def update(_alias, data)
56
+ begin
57
+ update_alias_request = VgsApiClient::UpdateAliasRequest.new(attributes = {
58
+ :data => VgsApiClient::UpdateAliasRequestData.new(attributes = {
59
+ :classifiers => data[:classifiers]
60
+ })
61
+ })
62
+ @aliases_api.update_alias(_alias = _alias, opts = {
63
+ :update_alias_request => update_alias_request.to_hash
64
+ })
65
+ rescue
66
+ raise VgsApiException, "Failed to update alias #{ _alias }"
67
+ end
68
+ end
69
+ end
70
+
71
+ def self.config(username, password, host = 'https://api.sandbox.verygoodvault.com')
72
+ raise ArgumentError, 'username is nil' if username.nil?
73
+ raise ArgumentError, 'password is nil' if password.nil?
74
+
75
+ config = VgsApiClient::Configuration.default
76
+ config.username = username
77
+ config.password = password
78
+ config.host = host
79
+ config
80
+ end
81
+
82
+ end
@@ -1,7 +1,7 @@
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) ## Introduction ### Alias-Formats | Format | Description | |---------------------------------|-------------------------------------------------------------------------------------------| | UUID | Generic - VGS Alias (Default) - tok_sandbox_xxxxxxxxxxxxxxxxxxxxxxxxx | | NUM_LENGTH_PRESERVING | Generic - Numeric Length Preserving - xxxxxxxxxxxxxxxx | | FPE_SIX_T_FOUR | Payment Card - Format Preserving, Luhn Valid (6T4) - <first_six>xxxxxx<last_four> | | FPE_T_FOUR | Payment Card - Format Preserving, Luhn Valid (T4) - xxxxxxxxxxxx<last_four> | | PFPT | Payment Card - Prefixed, Luhn Valid, 19 Digits Fixed Length - xxxxxxxxxxxxxxxxxxx | | NON_LUHN_FPE_ALPHANUMERIC | Payment Card - Format Preserving - Non Luhn Valid - xxxxxxxxxxxxxxxx | | FPE_SSN_T_FOUR | SSN - Format Preserving (A4) - xxx-xx-<last_four> | | FPE_ACC_NUM_T_FOUR | Account Number - Numeric Length Preserving (A4) - xxxxxxxxxxxx<last_four> | | FPE_ALPHANUMERIC_ACC_NUM_T_FOUR | Account Number - Alphanumeric Length Preserving (A4) - xxxxxxxxxxxx<last_four> | | GENERIC_T_FOUR | Generic - VGS Alias Last Four (T4) - tok_sandbox_xxxxxxxxxxxxxxxxxxxxxxxxx_<last_four> | | RAW_UUID | Generic - UUID - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | | ALPHANUMERIC_SIX_T_FOUR | Numeric - Include Alphanumeric, 19 symbols length (6T4) - <first_six>xxxxxxxxx<last_four> | | VGS_FIXED_LEN_GENERIC | Generic - VGS Alphanumeric Fixed Length, 29 characters - vgsxxxxxxxxxxxxxxxxxxxxxxxxxx | ## 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\" } ] } ```
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\" } ] } ```
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: support@verygoodsecurity.com
@@ -87,7 +87,6 @@ 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')
91
90
  # @return [nil]
92
91
  def delete_alias(_alias, opts = {})
93
92
  delete_alias_with_http_info(_alias, opts)
@@ -98,7 +97,6 @@ module VgsApiClient
98
97
  # Removes a single alias.
99
98
  # @param _alias [String] Alias to operate on.
100
99
  # @param [Hash] opts the optional parameters
101
- # @option opts [String] :storage
102
100
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
103
101
  def delete_alias_with_http_info(_alias, opts = {})
104
102
  if @api_client.config.debugging
@@ -108,16 +106,11 @@ module VgsApiClient
108
106
  if @api_client.config.client_side_validation && _alias.nil?
109
107
  fail ArgumentError, "Missing the required parameter '_alias' when calling AliasesApi.delete_alias"
110
108
  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
115
109
  # resource path
116
110
  local_var_path = '/aliases/{alias}'.sub('{' + 'alias' + '}', CGI.escape(_alias.to_s))
117
111
 
118
112
  # query parameters
119
113
  query_params = opts[:query_params] || {}
120
- query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
121
114
 
122
115
  # header parameters
123
116
  header_params = opts[:header_params] || {}
@@ -153,77 +146,10 @@ module VgsApiClient
153
146
  return data, status_code, headers
154
147
  end
155
148
 
156
- # Batch Delete Aliases
157
- # Deletes multiple aliases.
158
- # @param batch_aliases_request [BatchAliasesRequest]
159
- # @param [Hash] opts the optional parameters
160
- # @return [nil]
161
- def delete_aliases(batch_aliases_request, opts = {})
162
- delete_aliases_with_http_info(batch_aliases_request, opts)
163
- nil
164
- end
165
-
166
- # Batch Delete Aliases
167
- # Deletes multiple aliases.
168
- # @param batch_aliases_request [BatchAliasesRequest]
169
- # @param [Hash] opts the optional parameters
170
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
171
- def delete_aliases_with_http_info(batch_aliases_request, opts = {})
172
- if @api_client.config.debugging
173
- @api_client.config.logger.debug 'Calling API: AliasesApi.delete_aliases ...'
174
- end
175
- # verify the required parameter 'batch_aliases_request' is set
176
- if @api_client.config.client_side_validation && batch_aliases_request.nil?
177
- fail ArgumentError, "Missing the required parameter 'batch_aliases_request' when calling AliasesApi.delete_aliases"
178
- end
179
- # resource path
180
- local_var_path = '/aliases/delete'
181
-
182
- # query parameters
183
- query_params = opts[:query_params] || {}
184
-
185
- # header parameters
186
- header_params = opts[:header_params] || {}
187
- # HTTP header 'Content-Type'
188
- content_type = @api_client.select_header_content_type(['application/json'])
189
- if !content_type.nil?
190
- header_params['Content-Type'] = content_type
191
- end
192
-
193
- # form parameters
194
- form_params = opts[:form_params] || {}
195
-
196
- # http body (model)
197
- post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_aliases_request)
198
-
199
- # return_type
200
- return_type = opts[:debug_return_type]
201
-
202
- # auth_names
203
- auth_names = opts[:debug_auth_names] || ['basicAuth']
204
-
205
- new_options = opts.merge(
206
- :operation => :"AliasesApi.delete_aliases",
207
- :header_params => header_params,
208
- :query_params => query_params,
209
- :form_params => form_params,
210
- :body => post_body,
211
- :auth_names => auth_names,
212
- :return_type => return_type
213
- )
214
-
215
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
216
- if @api_client.config.debugging
217
- @api_client.config.logger.debug "API called: AliasesApi#delete_aliases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
218
- end
219
- return data, status_code, headers
220
- end
221
-
222
149
  # Reveal single alias
223
150
  # 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).
224
151
  # @param _alias [String] Alias to operate on.
225
152
  # @param [Hash] opts the optional parameters
226
- # @option opts [String] :storage (default to 'PERSISTENT')
227
153
  # @return [InlineResponse2001]
228
154
  def reveal_alias(_alias, opts = {})
229
155
  data, _status_code, _headers = reveal_alias_with_http_info(_alias, opts)
@@ -234,7 +160,6 @@ module VgsApiClient
234
160
  # 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).
235
161
  # @param _alias [String] Alias to operate on.
236
162
  # @param [Hash] opts the optional parameters
237
- # @option opts [String] :storage
238
163
  # @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
239
164
  def reveal_alias_with_http_info(_alias, opts = {})
240
165
  if @api_client.config.debugging
@@ -244,16 +169,11 @@ module VgsApiClient
244
169
  if @api_client.config.client_side_validation && _alias.nil?
245
170
  fail ArgumentError, "Missing the required parameter '_alias' when calling AliasesApi.reveal_alias"
246
171
  end
247
- allowable_values = ["PERSISTENT", "VOLATILE"]
248
- if @api_client.config.client_side_validation && opts[:'storage'] && !allowable_values.include?(opts[:'storage'])
249
- fail ArgumentError, "invalid value for \"storage\", must be one of #{allowable_values}"
250
- end
251
172
  # resource path
252
173
  local_var_path = '/aliases/{alias}'.sub('{' + 'alias' + '}', CGI.escape(_alias.to_s))
253
174
 
254
175
  # query parameters
255
176
  query_params = opts[:query_params] || {}
256
- query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
257
177
 
258
178
  # header parameters
259
179
  header_params = opts[:header_params] || {}
@@ -291,36 +211,33 @@ module VgsApiClient
291
211
 
292
212
  # Reveal multiple aliases
293
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).
294
- # @param aliases [String] Comma-separated list of aliases to reveal.
214
+ # @param q [String] Comma-separated list of aliases to reveal.
295
215
  # @param [Hash] opts the optional parameters
296
- # @option opts [String] :storage PERSISTENT or VOLATILE storage
297
216
  # @return [InlineResponse200]
298
- def reveal_multiple_aliases(aliases, opts = {})
299
- data, _status_code, _headers = reveal_multiple_aliases_with_http_info(aliases, opts)
217
+ def reveal_multiple_aliases(q, opts = {})
218
+ data, _status_code, _headers = reveal_multiple_aliases_with_http_info(q, opts)
300
219
  data
301
220
  end
302
221
 
303
222
  # Reveal multiple aliases
304
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).
305
- # @param aliases [String] Comma-separated list of aliases to reveal.
224
+ # @param q [String] Comma-separated list of aliases to reveal.
306
225
  # @param [Hash] opts the optional parameters
307
- # @option opts [String] :storage PERSISTENT or VOLATILE storage
308
226
  # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
309
- def reveal_multiple_aliases_with_http_info(aliases, opts = {})
227
+ def reveal_multiple_aliases_with_http_info(q, opts = {})
310
228
  if @api_client.config.debugging
311
229
  @api_client.config.logger.debug 'Calling API: AliasesApi.reveal_multiple_aliases ...'
312
230
  end
313
- # verify the required parameter 'aliases' is set
314
- if @api_client.config.client_side_validation && aliases.nil?
315
- fail ArgumentError, "Missing the required parameter 'aliases' when calling AliasesApi.reveal_multiple_aliases"
231
+ # verify the required parameter 'q' is set
232
+ if @api_client.config.client_side_validation && q.nil?
233
+ fail ArgumentError, "Missing the required parameter 'q' when calling AliasesApi.reveal_multiple_aliases"
316
234
  end
317
235
  # resource path
318
236
  local_var_path = '/aliases'
319
237
 
320
238
  # query parameters
321
239
  query_params = opts[:query_params] || {}
322
- query_params[:'aliases'] = aliases
323
- query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
240
+ query_params[:'q'] = q
324
241
 
325
242
  # header parameters
326
243
  header_params = opts[:header_params] || {}
@@ -360,7 +277,6 @@ module VgsApiClient
360
277
  # Apply new classifiers to the value that the specified alias is associated with.
361
278
  # @param _alias [String] Alias to operate on.
362
279
  # @param [Hash] opts the optional parameters
363
- # @option opts [String] :storage (default to 'PERSISTENT')
364
280
  # @option opts [UpdateAliasRequest] :update_alias_request
365
281
  # @return [nil]
366
282
  def update_alias(_alias, opts = {})
@@ -372,7 +288,6 @@ module VgsApiClient
372
288
  # Apply new classifiers to the value that the specified alias is associated with.
373
289
  # @param _alias [String] Alias to operate on.
374
290
  # @param [Hash] opts the optional parameters
375
- # @option opts [String] :storage
376
291
  # @option opts [UpdateAliasRequest] :update_alias_request
377
292
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
378
293
  def update_alias_with_http_info(_alias, opts = {})
@@ -383,16 +298,11 @@ module VgsApiClient
383
298
  if @api_client.config.client_side_validation && _alias.nil?
384
299
  fail ArgumentError, "Missing the required parameter '_alias' when calling AliasesApi.update_alias"
385
300
  end
386
- allowable_values = ["PERSISTENT", "VOLATILE"]
387
- if @api_client.config.client_side_validation && opts[:'storage'] && !allowable_values.include?(opts[:'storage'])
388
- fail ArgumentError, "invalid value for \"storage\", must be one of #{allowable_values}"
389
- end
390
301
  # resource path
391
302
  local_var_path = '/aliases/{alias}'.sub('{' + 'alias' + '}', CGI.escape(_alias.to_s))
392
303
 
393
304
  # query parameters
394
305
  query_params = opts[:query_params] || {}
395
- query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
396
306
 
397
307
  # header parameters
398
308
  header_params = opts[:header_params] || {}
@@ -1,7 +1,7 @@
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) ## Introduction ### Alias-Formats | Format | Description | |---------------------------------|-------------------------------------------------------------------------------------------| | UUID | Generic - VGS Alias (Default) - tok_sandbox_xxxxxxxxxxxxxxxxxxxxxxxxx | | NUM_LENGTH_PRESERVING | Generic - Numeric Length Preserving - xxxxxxxxxxxxxxxx | | FPE_SIX_T_FOUR | Payment Card - Format Preserving, Luhn Valid (6T4) - <first_six>xxxxxx<last_four> | | FPE_T_FOUR | Payment Card - Format Preserving, Luhn Valid (T4) - xxxxxxxxxxxx<last_four> | | PFPT | Payment Card - Prefixed, Luhn Valid, 19 Digits Fixed Length - xxxxxxxxxxxxxxxxxxx | | NON_LUHN_FPE_ALPHANUMERIC | Payment Card - Format Preserving - Non Luhn Valid - xxxxxxxxxxxxxxxx | | FPE_SSN_T_FOUR | SSN - Format Preserving (A4) - xxx-xx-<last_four> | | FPE_ACC_NUM_T_FOUR | Account Number - Numeric Length Preserving (A4) - xxxxxxxxxxxx<last_four> | | FPE_ALPHANUMERIC_ACC_NUM_T_FOUR | Account Number - Alphanumeric Length Preserving (A4) - xxxxxxxxxxxx<last_four> | | GENERIC_T_FOUR | Generic - VGS Alias Last Four (T4) - tok_sandbox_xxxxxxxxxxxxxxxxxxxxxxxxx_<last_four> | | RAW_UUID | Generic - UUID - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | | ALPHANUMERIC_SIX_T_FOUR | Numeric - Include Alphanumeric, 19 symbols length (6T4) - <first_six>xxxxxxxxx<last_four> | | VGS_FIXED_LEN_GENERIC | Generic - VGS Alphanumeric Fixed Length, 29 characters - vgsxxxxxxxxxxxxxxxxxxxxxxxxxx | ## 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\" } ] } ```
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\" } ] } ```
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: support@verygoodsecurity.com
@@ -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.alpha202308242233/ruby"
34
+ @user_agent = "vgs-api-client/0.0.1.dev202204182306/ruby"
35
35
  @default_headers = {
36
36
  'Content-Type' => 'application/json',
37
37
  'User-Agent' => @user_agent
@@ -0,0 +1,57 @@
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. 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
+ module VgsApiClient
14
+ class ApiError < StandardError
15
+ attr_reader :code, :response_headers, :response_body
16
+
17
+ # Usage examples:
18
+ # ApiError.new
19
+ # ApiError.new("message")
20
+ # ApiError.new(:code => 500, :response_headers => {}, :response_body => "")
21
+ # ApiError.new(:code => 404, :message => "Not Found")
22
+ def initialize(arg = nil)
23
+ if arg.is_a? Hash
24
+ if arg.key?(:message) || arg.key?('message')
25
+ super(arg[:message] || arg['message'])
26
+ else
27
+ super arg
28
+ end
29
+
30
+ arg.each do |k, v|
31
+ instance_variable_set "@#{k}", v
32
+ end
33
+ else
34
+ super arg
35
+ end
36
+ end
37
+
38
+ # Override to_s to display a friendly error message
39
+ def to_s
40
+ message
41
+ end
42
+
43
+ def message
44
+ if @message.nil?
45
+ msg = "Error message: the server returns an error"
46
+ else
47
+ msg = @message
48
+ end
49
+
50
+ msg += "\nHTTP status code: #{code}" if code
51
+ msg += "\nResponse headers: #{response_headers}" if response_headers
52
+ msg += "\nResponse body: #{response_body}" if response_body
53
+
54
+ msg
55
+ end
56
+ end
57
+ end
@@ -1,7 +1,7 @@
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) ## Introduction ### Alias-Formats | Format | Description | |---------------------------------|-------------------------------------------------------------------------------------------| | UUID | Generic - VGS Alias (Default) - tok_sandbox_xxxxxxxxxxxxxxxxxxxxxxxxx | | NUM_LENGTH_PRESERVING | Generic - Numeric Length Preserving - xxxxxxxxxxxxxxxx | | FPE_SIX_T_FOUR | Payment Card - Format Preserving, Luhn Valid (6T4) - <first_six>xxxxxx<last_four> | | FPE_T_FOUR | Payment Card - Format Preserving, Luhn Valid (T4) - xxxxxxxxxxxx<last_four> | | PFPT | Payment Card - Prefixed, Luhn Valid, 19 Digits Fixed Length - xxxxxxxxxxxxxxxxxxx | | NON_LUHN_FPE_ALPHANUMERIC | Payment Card - Format Preserving - Non Luhn Valid - xxxxxxxxxxxxxxxx | | FPE_SSN_T_FOUR | SSN - Format Preserving (A4) - xxx-xx-<last_four> | | FPE_ACC_NUM_T_FOUR | Account Number - Numeric Length Preserving (A4) - xxxxxxxxxxxx<last_four> | | FPE_ALPHANUMERIC_ACC_NUM_T_FOUR | Account Number - Alphanumeric Length Preserving (A4) - xxxxxxxxxxxx<last_four> | | GENERIC_T_FOUR | Generic - VGS Alias Last Four (T4) - tok_sandbox_xxxxxxxxxxxxxxxxxxxxxxxxx_<last_four> | | RAW_UUID | Generic - UUID - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | | ALPHANUMERIC_SIX_T_FOUR | Numeric - Include Alphanumeric, 19 symbols length (6T4) - <first_six>xxxxxxxxx<last_four> | | VGS_FIXED_LEN_GENERIC | Generic - VGS Alphanumeric Fixed Length, 29 characters - vgsxxxxxxxxxxxxxxxxxxxxxxxxxx | ## 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\" } ] } ```
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\" } ] } ```
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: support@verygoodsecurity.com
@@ -0,0 +1,44 @@
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. 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
+ class AliasFormat
18
+ FPE_ACC_NUM_T_FOUR = "FPE_ACC_NUM_T_FOUR".freeze
19
+ FPE_ALPHANUMERIC_ACC_NUM_T_FOUR = "FPE_ALPHANUMERIC_ACC_NUM_T_FOUR".freeze
20
+ FPE_SIX_T_FOUR = "FPE_SIX_T_FOUR".freeze
21
+ FPE_SSN_T_FOUR = "FPE_SSN_T_FOUR".freeze
22
+ FPE_T_FOUR = "FPE_T_FOUR".freeze
23
+ NUM_LENGTH_PRESERVING = "NUM_LENGTH_PRESERVING".freeze
24
+ PFPT = "PFPT".freeze
25
+ RAW_UUID = "RAW_UUID".freeze
26
+ UUID = "UUID".freeze
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def self.build_from_hash(value)
32
+ new.build_from_hash(value)
33
+ end
34
+
35
+ # Builds the enum from string
36
+ # @param [String] The enum value in the form of the string
37
+ # @return [String] The enum value
38
+ def build_from_hash(value)
39
+ constantValues = AliasFormat.constants.select { |c| AliasFormat::const_get(c) == value }
40
+ raise "Invalid ENUM value #{value} for class #AliasFormat" if constantValues.empty?
41
+ value
42
+ end
43
+ end
44
+ end