vgs_api_client 0.0.1.alpha202205210401 → 0.0.1.alpha202205220113

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c6208809ab176a04c4a3eb43bf5bea36a2cafa7a64c0717e8890c3050663573
4
- data.tar.gz: 9cda4a453d85c9d7337963135079611c3fb50194dc894bdb8faea95ab96b8240
3
+ metadata.gz: 972d90c01dcdc380c9d999b748435260f67b876f9525794657a39aa15754505a
4
+ data.tar.gz: a0042a1349a153647f0e957b8e796bbc5ca64eb50d587b78d5c7d30270d5d9fa
5
5
  SHA512:
6
- metadata.gz: 5c16f665f080e0be4d2bda5150f4333f0ad56b3790848ba367f21a9d683d610965a188259deaa9d199a4bfa31dea46d45b41b4c6d64ef449cc758a0862e1b600
7
- data.tar.gz: 5c1e24bac909ed4330e266f44b56754cfa34cca04342b62528a56474e0bc6eb9dbc8f44e8f8a43c3390cd7e7c77ee8e9179adf1c039337fbfaf35e7c3c20e3e4
6
+ metadata.gz: 33b10b7eff69c930edbfe1d4034e8d17802c68ff5f2145d58ec5f7412fe1d2f20f6e7900863c051c7d23a58a2d7abf80dc9b689ae9afea7926faf3d33fe7f72d
7
+ data.tar.gz: 4c6d2e5430e9ec3edc7626389b2638e8b51737f22bb5b317008aa74882d69162576e277bcf7d606292248e42c852947995014fbe4e8f5bbfc201e4cc2bed646f
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1.alpha202205210401
1
+ 0.0.1.alpha202205220113
data/api.yaml CHANGED
@@ -129,7 +129,7 @@ paths:
129
129
  schema:
130
130
  $ref: '#/components/schemas/CreateFunctionRequest'
131
131
  examples:
132
- CreateFunctionOne:
132
+ CreateFunctionRequestOne:
133
133
  summary: Create a new function
134
134
  value:
135
135
  data:
@@ -154,7 +154,7 @@ paths:
154
154
  minItems: 1
155
155
  maxItems: 20
156
156
  examples:
157
- CreateFunctionOne:
157
+ CreateFunctionResponseOne:
158
158
  summary: Create a new function
159
159
  value:
160
160
  data:
@@ -162,7 +162,7 @@ paths:
162
162
  def process(input, ctx):
163
163
  return input
164
164
  lang: larky
165
- name: my-function
165
+ name: my-function-46Juzcyx
166
166
  hash: bc1f0c3322091740cead407000af9acc692e7fefd0d96446e07900dcd0f8e308
167
167
 
168
168
  default:
@@ -219,6 +219,17 @@ paths:
219
219
  description: The retrieved function.
220
220
  minItems: 1
221
221
  maxItems: 1
222
+ examples:
223
+ UpdateFunctionResponseOne:
224
+ summary: Update a new function
225
+ value:
226
+ data:
227
+ - src: |
228
+ def process(input, ctx):
229
+ return input
230
+ lang: larky
231
+ name: my-function-46Juzcyx
232
+ hash: bc1f0c3322091740cead407000af9acc692e7fefd0d96446e07900dcd0f8e308
222
233
  default:
223
234
  $ref: '#/components/responses/ApiErrorsResponse'
224
235
 
@@ -233,7 +244,7 @@ paths:
233
244
  content:
234
245
  application/json:
235
246
  schema:
236
- $ref: '#/components/schemas/CreateFunctionRequestPayload'
247
+ $ref: '#/components/schemas/UpdateFunctionRequestPayload'
237
248
  responses:
238
249
  '200':
239
250
  description: No Content
@@ -269,6 +280,12 @@ paths:
269
280
  - $ref: '#/components/parameters/functionName'
270
281
  requestBody:
271
282
  content:
283
+ "application/x-www-form-urlencoded":
284
+ schema:
285
+ type: string
286
+ example:
287
+ hello world
288
+ description: Stream of bytes up to XX KB in size
272
289
  "text/plain":
273
290
  schema:
274
291
  type: string
@@ -320,7 +337,7 @@ paths:
320
337
  uri: https://example.com/software/htp/cics/index.html
321
338
  version: 1.0
322
339
 
323
- "*":
340
+ "*/*":
324
341
  schema:
325
342
  type: string
326
343
  format: binary?
@@ -877,6 +894,18 @@ components:
877
894
  - name
878
895
  - src
879
896
 
897
+ UpdateFunctionRequestPayload:
898
+ type: object
899
+ properties:
900
+ src:
901
+ type: string
902
+ description: Definition of function body
903
+ example: |
904
+ def process(input, ctx):
905
+ return input
906
+ required:
907
+ - src
908
+
880
909
  Function:
881
910
  type: object
882
911
  properties:
@@ -900,7 +929,4 @@ components:
900
929
  type: string
901
930
  description: SHA256 representation of the function definition
902
931
  example: bc1f0c3322091740cead407000af9acc692e7fefd0d96446e07900dcd0f8e308
903
- required:
904
- - value
905
- - format
906
932
 
@@ -245,7 +245,7 @@ module VgsApiClient
245
245
  # HTTP header 'Accept' (if needed)
246
246
  header_params['Accept'] = @api_client.select_header_accept(['*', 'application/http', 'text/plain', 'application/json'])
247
247
  # HTTP header 'Content-Type'
248
- content_type = @api_client.select_header_content_type(['*', 'application/http', 'text/plain'])
248
+ content_type = @api_client.select_header_content_type(['application/http', 'application/x-www-form-urlencoded', 'text/plain'])
249
249
  if !content_type.nil?
250
250
  header_params['Content-Type'] = content_type
251
251
  end
@@ -340,7 +340,7 @@ module VgsApiClient
340
340
  # Update an existing function definition
341
341
  # @param function_name [String] Name of function to operate on
342
342
  # @param [Hash] opts the optional parameters
343
- # @option opts [CreateFunctionRequestPayload] :create_function_request_payload
343
+ # @option opts [UpdateFunctionRequestPayload] :update_function_request_payload
344
344
  # @return [nil]
345
345
  def update_function(function_name, opts = {})
346
346
  update_function_with_http_info(function_name, opts)
@@ -351,7 +351,7 @@ module VgsApiClient
351
351
  # Update an existing function definition
352
352
  # @param function_name [String] Name of function to operate on
353
353
  # @param [Hash] opts the optional parameters
354
- # @option opts [CreateFunctionRequestPayload] :create_function_request_payload
354
+ # @option opts [UpdateFunctionRequestPayload] :update_function_request_payload
355
355
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
356
356
  def update_function_with_http_info(function_name, opts = {})
357
357
  if @api_client.config.debugging
@@ -381,7 +381,7 @@ module VgsApiClient
381
381
  form_params = opts[:form_params] || {}
382
382
 
383
383
  # http body (model)
384
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_function_request_payload'])
384
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_function_request_payload'])
385
385
 
386
386
  # return_type
387
387
  return_type = opts[:debug_return_type]
@@ -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.alpha202205210401/ruby"
34
+ @user_agent = "vgs-api-client/0.0.1.alpha202205220113/ruby"
35
35
  @default_headers = {
36
36
  'Content-Type' => 'application/json',
37
37
  'User-Agent' => @user_agent
@@ -0,0 +1,224 @@
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 UpdateFunctionRequestPayload
18
+ # Definition of function body
19
+ attr_accessor :src
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'src' => :'src'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'src' => :'String'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VgsApiClient::UpdateFunctionRequestPayload` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VgsApiClient::UpdateFunctionRequestPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'src')
62
+ self.src = attributes[:'src']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ if @src.nil?
71
+ invalid_properties.push('invalid value for "src", src cannot be nil.')
72
+ end
73
+
74
+ invalid_properties
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ def valid?
80
+ return false if @src.nil?
81
+ true
82
+ end
83
+
84
+ # Checks equality by comparing each attribute.
85
+ # @param [Object] Object to be compared
86
+ def ==(o)
87
+ return true if self.equal?(o)
88
+ self.class == o.class &&
89
+ src == o.src
90
+ end
91
+
92
+ # @see the `==` method
93
+ # @param [Object] Object to be compared
94
+ def eql?(o)
95
+ self == o
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Integer] Hash code
100
+ def hash
101
+ [src].hash
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def self.build_from_hash(attributes)
108
+ new.build_from_hash(attributes)
109
+ end
110
+
111
+ # Builds the object from hash
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ # @return [Object] Returns the model itself
114
+ def build_from_hash(attributes)
115
+ return nil unless attributes.is_a?(Hash)
116
+ self.class.openapi_types.each_pair do |key, type|
117
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
118
+ self.send("#{key}=", nil)
119
+ elsif type =~ /\AArray<(.*)>/i
120
+ # check to ensure the input is an array given that the attribute
121
+ # is documented as an array but the input is not
122
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
123
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
124
+ end
125
+ elsif !attributes[self.class.attribute_map[key]].nil?
126
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
127
+ end
128
+ end
129
+
130
+ self
131
+ end
132
+
133
+ # Deserializes the data based on type
134
+ # @param string type Data type
135
+ # @param string value Value to be deserialized
136
+ # @return [Object] Deserialized data
137
+ def _deserialize(type, value)
138
+ case type.to_sym
139
+ when :Time
140
+ Time.parse(value)
141
+ when :Date
142
+ Date.parse(value)
143
+ when :String
144
+ value.to_s
145
+ when :Integer
146
+ value.to_i
147
+ when :Float
148
+ value.to_f
149
+ when :Boolean
150
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
151
+ true
152
+ else
153
+ false
154
+ end
155
+ when :Object
156
+ # generic object (usually a Hash), return directly
157
+ value
158
+ when /\AArray<(?<inner_type>.+)>\z/
159
+ inner_type = Regexp.last_match[:inner_type]
160
+ value.map { |v| _deserialize(inner_type, v) }
161
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
162
+ k_type = Regexp.last_match[:k_type]
163
+ v_type = Regexp.last_match[:v_type]
164
+ {}.tap do |hash|
165
+ value.each do |k, v|
166
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
167
+ end
168
+ end
169
+ else # model
170
+ # models (e.g. Pet) or oneOf
171
+ klass = VgsApiClient.const_get(type)
172
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ if value.nil?
195
+ is_nullable = self.class.openapi_nullable.include?(attr)
196
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
197
+ end
198
+
199
+ hash[param] = _to_hash(value)
200
+ end
201
+ hash
202
+ end
203
+
204
+ # Outputs non-array value in the form of hash
205
+ # For object, use to_hash. Otherwise, just return the value
206
+ # @param [Object] value Any valid value
207
+ # @return [Hash] Returns the value in the form of hash
208
+ def _to_hash(value)
209
+ if value.is_a?(Array)
210
+ value.compact.map { |v| _to_hash(v) }
211
+ elsif value.is_a?(Hash)
212
+ {}.tap do |hash|
213
+ value.each { |k, v| hash[k] = _to_hash(v) }
214
+ end
215
+ elsif value.respond_to? :to_hash
216
+ value.to_hash
217
+ else
218
+ value
219
+ end
220
+ end
221
+
222
+ end
223
+
224
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.4.0
11
11
  =end
12
12
 
13
13
  module VgsApiClient
14
- VERSION = '0.0.1.alpha202205210401'
14
+ VERSION = '0.0.1.alpha202205220113'
15
15
  end
@@ -35,6 +35,7 @@ require 'openapi_client/models/model_alias'
35
35
  require 'openapi_client/models/revealed_data'
36
36
  require 'openapi_client/models/update_alias_request'
37
37
  require 'openapi_client/models/update_alias_request_data'
38
+ require 'openapi_client/models/update_function_request_payload'
38
39
 
39
40
  # APIs
40
41
  require 'openapi_client/api/aliases_api'
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module VGS
2
- VERSION = '0.0.1.alpha202205210401'
2
+ VERSION = '0.0.1.alpha202205220113'
3
3
  end
@@ -3,7 +3,7 @@
3
3
  LIB_VERSION=${LIB_VERSION:-0.0.1.alpha$(date "+%Y%m%d%H%M")}
4
4
 
5
5
  # fix version
6
- grep -rl 0.0.1.alpha202205210401 . | xargs sed -i "s/0.0.1.alpha202205210401/${LIB_VERSION}/g"
6
+ grep -rl 0.0.1.alpha202205220113 . | xargs sed -i "s/0.0.1.alpha202205220113/${LIB_VERSION}/g"
7
7
 
8
8
  # build
9
9
  gem build vgs_api_client.gemspec
data/scripts/test/run.sh CHANGED
@@ -5,7 +5,7 @@ set -e
5
5
  echo "Installing lib from local sources"
6
6
  # fix version
7
7
  VERSION=0.0.1.alpha$(date "+%Y%m%d%H%M")
8
- grep -rl 0.0.1.alpha202205210401 . | xargs sed -i "s/0.0.1.alpha202205210401/$VERSION/g"
8
+ grep -rl 0.0.1.alpha202205220113 . | xargs sed -i "s/0.0.1.alpha202205220113/$VERSION/g"
9
9
 
10
10
  bundle install
11
11
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vgs_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.alpha202205210401
4
+ version: 0.0.1.alpha202205220113
5
5
  platform: ruby
6
6
  authors:
7
7
  - Very Good Security
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-21 00:00:00.000000000 Z
11
+ date: 2022-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -90,6 +90,7 @@ files:
90
90
  - lib/openapi_client/models/revealed_data.rb
91
91
  - lib/openapi_client/models/update_alias_request.rb
92
92
  - lib/openapi_client/models/update_alias_request_data.rb
93
+ - lib/openapi_client/models/update_function_request_payload.rb
93
94
  - lib/openapi_client/version.rb
94
95
  - lib/version.rb
95
96
  - lib/vgs_api_client.rb