vgs_api_client 0.0.27 → 0.0.36
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/DEVELOPMENT.md +11 -0
- data/LICENSE +11 -0
- data/RELEASE.md +15 -0
- data/docker-compose.yaml +32 -7
- data/lib/vgs.rb +82 -0
- data/lib/vgs_api_client/api/aliases_api.rb +14 -8
- data/lib/vgs_api_client/api_client.rb +6 -6
- data/lib/vgs_api_client/api_error.rb +2 -2
- data/lib/vgs_api_client/configuration.rb +4 -3
- data/lib/vgs_api_client/models/alias_format.rb +2 -2
- data/lib/vgs_api_client/models/api_error.rb +2 -2
- data/lib/vgs_api_client/models/create_aliases_request.rb +31 -3
- data/lib/vgs_api_client/models/create_aliases_request_new.rb +49 -3
- data/lib/vgs_api_client/models/{create_aliases_request_existing.rb → create_aliases_request_reference.rb} +5 -5
- data/lib/vgs_api_client/models/inline_response200.rb +2 -2
- data/lib/vgs_api_client/models/inline_response2001.rb +26 -2
- data/lib/vgs_api_client/models/inline_response201.rb +2 -2
- data/lib/vgs_api_client/models/inline_response_default.rb +17 -2
- data/lib/vgs_api_client/models/model_alias.rb +2 -2
- data/lib/vgs_api_client/models/revealed_data.rb +49 -3
- data/lib/vgs_api_client/models/update_alias_request.rb +2 -2
- data/lib/vgs_api_client/models/update_alias_request_data.rb +2 -2
- data/lib/vgs_api_client/version.rb +3 -3
- data/lib/vgs_api_client.rb +3 -3
- data/scripts/assemble/Dockerfile +8 -0
- data/scripts/assemble/run.sh +9 -0
- data/scripts/publish/Dockerfile +8 -0
- data/scripts/publish/run.sh +15 -0
- data/scripts/publish.sh +13 -0
- data/scripts/run-tests-e2e.sh +8 -0
- data/scripts/run-tests.sh +6 -0
- data/scripts/test/Dockerfile +14 -0
- data/scripts/test/run.sh +13 -0
- data/scripts/test-e2e/Dockerfile +22 -0
- data/scripts/test-e2e/run.sh +30 -0
- data/spec/api_client_spec.rb +4 -4
- data/spec/configuration_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- data/spec/test_aliases_api_spec.rb +97 -0
- data/vgs_api_client.gemspec +2 -2
- metadata +20 -52
- data/README.md +0 -237
- data/docs/AliasFormat.md +0 -15
- data/docs/AliasesApi.md +0 -366
- data/docs/ApiError.md +0 -24
- data/docs/CreateAliasesRequest.md +0 -18
- data/docs/CreateAliasesRequestExisting.md +0 -20
- data/docs/CreateAliasesRequestNew.md +0 -22
- data/docs/InlineResponse200.md +0 -18
- data/docs/InlineResponse2001.md +0 -18
- data/docs/InlineResponse201.md +0 -18
- data/docs/InlineResponseDefault.md +0 -18
- data/docs/ModelAlias.md +0 -20
- data/docs/RevealedData.md +0 -24
- data/docs/UpdateAliasRequest.md +0 -18
- data/docs/UpdateAliasRequestData.md +0 -18
- data/git_push.sh +0 -58
- data/publish/Dockerfile +0 -11
- data/publish/build_and_publish.sh +0 -13
- data/spec/api/aliases_api_spec.rb +0 -96
- data/spec/api/test_api_spec.rb +0 -137
- data/spec/models/alias_format_spec.rb +0 -28
- data/spec/models/api_error_spec.rb +0 -52
- data/spec/models/create_aliases_request_existing_spec.rb +0 -40
- data/spec/models/create_aliases_request_new_spec.rb +0 -46
- data/spec/models/create_aliases_request_spec.rb +0 -34
- data/spec/models/inline_response2001_spec.rb +0 -34
- data/spec/models/inline_response200_spec.rb +0 -34
- data/spec/models/inline_response201_spec.rb +0 -34
- data/spec/models/inline_response_default_spec.rb +0 -34
- data/spec/models/model_alias_spec.rb +0 -40
- data/spec/models/revealed_data_spec.rb +0 -52
- data/spec/models/update_alias_request_data_spec.rb +0 -34
- data/spec/models/update_alias_request_spec.rb +0 -34
- data/test/Dockerfile +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ac791716077474e6e10c682083c03d3a6bc74bab8dfe095db6b1175ce384292
|
4
|
+
data.tar.gz: 04c38e7663d97faa123607ed30e118cec6d0fece3996990a2543d9e2cc64268a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 945150111d39f3f5118a77311a0b5fb578263278d0d1b24592421547b7b607e0cae6ab8a04320849a7343f551bf49b93495a5e89a829dbb884cba81b023b2d49
|
7
|
+
data.tar.gz: 1f8980fb53018cd62404f565130a2acc8420e62a640f4d4d12cf263a4d1a95764443690f3bc56ccd24905f12a16d333fdd050723e3804e43a851c97749194311
|
data/DEVELOPMENT.md
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
Copyright 2022, VERY GOOD SECURITY, Inc.
|
2
|
+
|
3
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
4
|
+
|
5
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
6
|
+
|
7
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
8
|
+
|
9
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
10
|
+
|
11
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/RELEASE.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# Release
|
2
|
+
|
3
|
+
In order to release version of new library you have to create github release.
|
4
|
+
|
5
|
+
### Versioning
|
6
|
+
|
7
|
+
Libraries that have versions that follow SemVer versioning schema will be released.
|
8
|
+
|
9
|
+
### Release
|
10
|
+
|
11
|
+
After creating tag CI will take care of publishing library to artifact repository.
|
12
|
+
|
13
|
+
### Misc
|
14
|
+
|
15
|
+
In order to release new version of this library you have to have write permissions to this repo.
|
data/docker-compose.yaml
CHANGED
@@ -1,15 +1,40 @@
|
|
1
1
|
version: '3.7'
|
2
2
|
|
3
3
|
services:
|
4
|
-
|
4
|
+
assemble:
|
5
5
|
build:
|
6
|
-
context:
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
context: .
|
7
|
+
dockerfile: scripts/assemble/Dockerfile
|
8
|
+
environment:
|
9
|
+
LIB_VERSION: ${LIB_VERSION}
|
10
|
+
volumes:
|
11
|
+
- ./:/vgs-api-client/
|
12
|
+
publish:
|
13
|
+
build:
|
14
|
+
context: .
|
15
|
+
dockerfile: scripts/publish/Dockerfile
|
16
|
+
environment:
|
17
|
+
ARTIFACT_REPOSITORY_TOKEN: ${ARTIFACT_REPOSITORY_TOKEN}
|
18
|
+
LIB_VERSION: ${LIB_VERSION}
|
10
19
|
volumes:
|
11
|
-
- ./:/
|
20
|
+
- ./:/vgs-api-client/
|
12
21
|
test:
|
13
22
|
build:
|
14
23
|
context: .
|
15
|
-
dockerfile: test/Dockerfile
|
24
|
+
dockerfile: scripts/test/Dockerfile
|
25
|
+
environment:
|
26
|
+
VAULT_API_USERNAME: US7oyrzRGmaKqi3ET8eSsECS
|
27
|
+
VAULT_API_PASSWORD: c06cf6d1-a35e-439d-91d1-8bd04e5fd9e5
|
28
|
+
VAULT_API_BASE_URI: https://api.sandbox.verygoodvault.com
|
29
|
+
VAULT_API_VAULT_ID: tntkxfmsefj
|
30
|
+
LIB_VERSION: ${LIB_VERSION}
|
31
|
+
test-e2e:
|
32
|
+
build:
|
33
|
+
context: .
|
34
|
+
dockerfile: scripts/test-e2e/Dockerfile
|
35
|
+
environment:
|
36
|
+
VAULT_API_USERNAME: US7oyrzRGmaKqi3ET8eSsECS
|
37
|
+
VAULT_API_PASSWORD: c06cf6d1-a35e-439d-91d1-8bd04e5fd9e5
|
38
|
+
VAULT_API_BASE_URI: https://api.sandbox.verygoodvault.com
|
39
|
+
VAULT_API_VAULT_ID: tntkxfmsefj
|
40
|
+
LIB_VERSION: ${LIB_VERSION}
|
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,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Vault HTTP API
|
3
3
|
|
4
|
-
#
|
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
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.0
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -49,7 +49,10 @@ module VgsApiClient
|
|
49
49
|
# HTTP header 'Accept' (if needed)
|
50
50
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
51
51
|
# HTTP header 'Content-Type'
|
52
|
-
|
52
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
53
|
+
if !content_type.nil?
|
54
|
+
header_params['Content-Type'] = content_type
|
55
|
+
end
|
53
56
|
|
54
57
|
# form parameters
|
55
58
|
form_params = opts[:form_params] || {}
|
@@ -207,8 +210,8 @@ module VgsApiClient
|
|
207
210
|
end
|
208
211
|
|
209
212
|
# Reveal multiple aliases
|
210
|
-
# Given a
|
211
|
-
# @param q [String] Comma-separated aliases
|
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.
|
212
215
|
# @param [Hash] opts the optional parameters
|
213
216
|
# @return [InlineResponse200]
|
214
217
|
def reveal_multiple_aliases(q, opts = {})
|
@@ -217,8 +220,8 @@ module VgsApiClient
|
|
217
220
|
end
|
218
221
|
|
219
222
|
# Reveal multiple aliases
|
220
|
-
# Given a
|
221
|
-
# @param q [String] Comma-separated aliases
|
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.
|
222
225
|
# @param [Hash] opts the optional parameters
|
223
226
|
# @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
|
224
227
|
def reveal_multiple_aliases_with_http_info(q, opts = {})
|
@@ -306,7 +309,10 @@ module VgsApiClient
|
|
306
309
|
# HTTP header 'Accept' (if needed)
|
307
310
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
308
311
|
# HTTP header 'Content-Type'
|
309
|
-
|
312
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
313
|
+
if !content_type.nil?
|
314
|
+
header_params['Content-Type'] = content_type
|
315
|
+
end
|
310
316
|
|
311
317
|
# form parameters
|
312
318
|
form_params = opts[:form_params] || {}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Vault HTTP API
|
3
3
|
|
4
|
-
#
|
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
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.0
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -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 = "
|
34
|
+
@user_agent = "vgs-api-client/0.0.36/ruby"
|
35
35
|
@default_headers = {
|
36
36
|
'Content-Type' => 'application/json',
|
37
37
|
'User-Agent' => @user_agent
|
@@ -296,7 +296,7 @@ module VgsApiClient
|
|
296
296
|
@config.base_url(opts[:operation]) + path
|
297
297
|
end
|
298
298
|
|
299
|
-
# Update
|
299
|
+
# Update header and query params based on authentication settings.
|
300
300
|
#
|
301
301
|
# @param [Hash] header_params Header parameters
|
302
302
|
# @param [Hash] query_params Query parameters
|
@@ -335,8 +335,8 @@ module VgsApiClient
|
|
335
335
|
# @param [Array] content_types array for Content-Type
|
336
336
|
# @return [String] the Content-Type header (e.g. application/json)
|
337
337
|
def select_header_content_type(content_types)
|
338
|
-
#
|
339
|
-
return
|
338
|
+
# return nil by default
|
339
|
+
return if content_types.nil? || content_types.empty?
|
340
340
|
# use JSON when present, otherwise use the first one
|
341
341
|
json_content_type = content_types.find { |s| json_mime?(s) }
|
342
342
|
json_content_type || content_types.first
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Vault HTTP API
|
3
3
|
|
4
|
-
#
|
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
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.0
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Vault HTTP API
|
3
3
|
|
4
|
-
#
|
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
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.0
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -147,13 +147,13 @@ module VgsApiClient
|
|
147
147
|
@server_operation_variables = {}
|
148
148
|
@api_key = {}
|
149
149
|
@api_key_prefix = {}
|
150
|
-
@timeout = 0
|
151
150
|
@client_side_validation = true
|
152
151
|
@verify_ssl = true
|
153
152
|
@verify_ssl_host = true
|
154
153
|
@params_encoding = nil
|
155
154
|
@cert_file = nil
|
156
155
|
@key_file = nil
|
156
|
+
@timeout = 0
|
157
157
|
@debugging = false
|
158
158
|
@inject_format = false
|
159
159
|
@force_ending_format = false
|
@@ -281,5 +281,6 @@ module VgsApiClient
|
|
281
281
|
|
282
282
|
url
|
283
283
|
end
|
284
|
+
|
284
285
|
end
|
285
286
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Vault HTTP API
|
3
3
|
|
4
|
-
#
|
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
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.0
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Vault HTTP API
|
3
3
|
|
4
|
-
#
|
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
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.0
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|