vgs_api_client 0.0.21 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -27
- data/docker-compose.yaml +3 -6
- data/docs/AliasFormat.md +2 -2
- data/docs/AliasesApi.md +23 -23
- data/docs/ApiError.md +2 -2
- data/docs/CreateAliasesRequest.md +2 -2
- data/docs/CreateAliasesRequestExisting.md +2 -2
- data/docs/CreateAliasesRequestNew.md +2 -2
- data/docs/InlineResponse200.md +2 -2
- data/docs/InlineResponse2001.md +2 -2
- data/docs/InlineResponse201.md +2 -2
- data/docs/InlineResponseDefault.md +2 -2
- data/docs/ModelAlias.md +2 -2
- data/docs/RevealedData.md +2 -2
- data/docs/UpdateAliasRequest.md +2 -2
- data/docs/UpdateAliasRequestData.md +2 -2
- data/lib/vgs_api_client/api/aliases_api.rb +1 -1
- data/lib/vgs_api_client/api_client.rb +9 -3
- data/lib/vgs_api_client/api_error.rb +1 -1
- data/lib/vgs_api_client/configuration.rb +1 -1
- data/lib/vgs_api_client/models/alias_format.rb +1 -1
- data/lib/vgs_api_client/models/api_error.rb +5 -4
- data/lib/vgs_api_client/models/create_aliases_request.rb +5 -4
- data/lib/vgs_api_client/models/create_aliases_request_existing.rb +5 -4
- data/lib/vgs_api_client/models/create_aliases_request_new.rb +5 -4
- data/lib/vgs_api_client/models/inline_response200.rb +5 -4
- data/lib/vgs_api_client/models/inline_response2001.rb +5 -4
- data/lib/vgs_api_client/models/inline_response201.rb +5 -4
- data/lib/vgs_api_client/models/inline_response_default.rb +5 -4
- data/lib/vgs_api_client/models/model_alias.rb +5 -4
- data/lib/vgs_api_client/models/revealed_data.rb +5 -4
- data/lib/vgs_api_client/models/update_alias_request.rb +5 -4
- data/lib/vgs_api_client/models/update_alias_request_data.rb +5 -4
- data/lib/vgs_api_client/version.rb +2 -2
- data/lib/vgs_api_client.rb +2 -2
- data/{docker → publish}/Dockerfile +1 -1
- data/{docker → publish}/build_and_publish.sh +2 -0
- data/spec/api/aliases_api_spec.rb +12 -53
- data/spec/api/test_api_spec.rb +137 -0
- data/spec/api_client_spec.rb +29 -29
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/alias_format_spec.rb +5 -5
- data/spec/models/api_error_spec.rb +5 -5
- data/spec/models/create_aliases_request_existing_spec.rb +5 -5
- data/spec/models/create_aliases_request_new_spec.rb +5 -5
- data/spec/models/create_aliases_request_spec.rb +5 -5
- data/spec/models/inline_response2001_spec.rb +5 -5
- data/spec/models/inline_response200_spec.rb +5 -5
- data/spec/models/inline_response201_spec.rb +5 -5
- data/spec/models/inline_response_default_spec.rb +5 -5
- data/spec/models/model_alias_spec.rb +5 -5
- data/spec/models/revealed_data_spec.rb +5 -5
- data/spec/models/update_alias_request_data_spec.rb +5 -5
- data/spec/models/update_alias_request_spec.rb +5 -5
- data/test/Dockerfile +16 -0
- data/vgs_api_client.gemspec +1 -1
- metadata +7 -6
- data/Gemfile.lock +0 -70
- data/docker/Dockerfile.test +0 -5
@@ -13,7 +13,7 @@ OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module VgsApiClient
|
17
17
|
class CreateAliasesRequest
|
18
18
|
attr_accessor :data
|
19
19
|
|
@@ -46,13 +46,13 @@ module VgsapiClient
|
|
46
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
47
47
|
def initialize(attributes = {})
|
48
48
|
if (!attributes.is_a?(Hash))
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VgsApiClient::CreateAliasesRequest` initialize method"
|
50
50
|
end
|
51
51
|
|
52
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
53
53
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
54
|
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VgsApiClient::CreateAliasesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
56
|
end
|
57
57
|
h[k.to_sym] = v
|
58
58
|
}
|
@@ -142,6 +142,7 @@ module VgsapiClient
|
|
142
142
|
# @return [Object] Returns the model itself
|
143
143
|
def build_from_hash(attributes)
|
144
144
|
return nil unless attributes.is_a?(Hash)
|
145
|
+
attributes = attributes.transform_keys(&:to_sym)
|
145
146
|
self.class.openapi_types.each_pair do |key, type|
|
146
147
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
147
148
|
self.send("#{key}=", nil)
|
@@ -197,7 +198,7 @@ module VgsapiClient
|
|
197
198
|
end
|
198
199
|
else # model
|
199
200
|
# models (e.g. Pet) or oneOf
|
200
|
-
klass =
|
201
|
+
klass = VgsApiClient.const_get(type)
|
201
202
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
202
203
|
end
|
203
204
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module VgsApiClient
|
17
17
|
class CreateAliasesRequestExisting
|
18
18
|
# Existing alias to use as a reference.
|
19
19
|
attr_accessor :_alias
|
@@ -51,13 +51,13 @@ module VgsapiClient
|
|
51
51
|
# @param [Hash] attributes Model attributes in the form of hash
|
52
52
|
def initialize(attributes = {})
|
53
53
|
if (!attributes.is_a?(Hash))
|
54
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VgsApiClient::CreateAliasesRequestExisting` initialize method"
|
55
55
|
end
|
56
56
|
|
57
57
|
# check to see if the attribute exists and convert string to symbol for hash key
|
58
58
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
59
59
|
if (!self.class.attribute_map.key?(k.to_sym))
|
60
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
60
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VgsApiClient::CreateAliasesRequestExisting`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
61
61
|
end
|
62
62
|
h[k.to_sym] = v
|
63
63
|
}
|
@@ -127,6 +127,7 @@ module VgsapiClient
|
|
127
127
|
# @return [Object] Returns the model itself
|
128
128
|
def build_from_hash(attributes)
|
129
129
|
return nil unless attributes.is_a?(Hash)
|
130
|
+
attributes = attributes.transform_keys(&:to_sym)
|
130
131
|
self.class.openapi_types.each_pair do |key, type|
|
131
132
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
132
133
|
self.send("#{key}=", nil)
|
@@ -182,7 +183,7 @@ module VgsapiClient
|
|
182
183
|
end
|
183
184
|
else # model
|
184
185
|
# models (e.g. Pet) or oneOf
|
185
|
-
klass =
|
186
|
+
klass = VgsApiClient.const_get(type)
|
186
187
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
187
188
|
end
|
188
189
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module VgsApiClient
|
17
17
|
class CreateAliasesRequestNew
|
18
18
|
# List of tags to classify the value with.
|
19
19
|
attr_accessor :classifiers
|
@@ -56,13 +56,13 @@ module VgsapiClient
|
|
56
56
|
# @param [Hash] attributes Model attributes in the form of hash
|
57
57
|
def initialize(attributes = {})
|
58
58
|
if (!attributes.is_a?(Hash))
|
59
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VgsApiClient::CreateAliasesRequestNew` initialize method"
|
60
60
|
end
|
61
61
|
|
62
62
|
# check to see if the attribute exists and convert string to symbol for hash key
|
63
63
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
64
64
|
if (!self.class.attribute_map.key?(k.to_sym))
|
65
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VgsApiClient::CreateAliasesRequestNew`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
66
66
|
end
|
67
67
|
h[k.to_sym] = v
|
68
68
|
}
|
@@ -139,6 +139,7 @@ module VgsapiClient
|
|
139
139
|
# @return [Object] Returns the model itself
|
140
140
|
def build_from_hash(attributes)
|
141
141
|
return nil unless attributes.is_a?(Hash)
|
142
|
+
attributes = attributes.transform_keys(&:to_sym)
|
142
143
|
self.class.openapi_types.each_pair do |key, type|
|
143
144
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
144
145
|
self.send("#{key}=", nil)
|
@@ -194,7 +195,7 @@ module VgsapiClient
|
|
194
195
|
end
|
195
196
|
else # model
|
196
197
|
# models (e.g. Pet) or oneOf
|
197
|
-
klass =
|
198
|
+
klass = VgsApiClient.const_get(type)
|
198
199
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
199
200
|
end
|
200
201
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module VgsApiClient
|
17
17
|
class InlineResponse200
|
18
18
|
attr_accessor :data
|
19
19
|
|
@@ -46,13 +46,13 @@ module VgsapiClient
|
|
46
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
47
47
|
def initialize(attributes = {})
|
48
48
|
if (!attributes.is_a?(Hash))
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VgsApiClient::InlineResponse200` initialize method"
|
50
50
|
end
|
51
51
|
|
52
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
53
53
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
54
|
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VgsApiClient::InlineResponse200`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
56
|
end
|
57
57
|
h[k.to_sym] = v
|
58
58
|
}
|
@@ -109,6 +109,7 @@ module VgsapiClient
|
|
109
109
|
# @return [Object] Returns the model itself
|
110
110
|
def build_from_hash(attributes)
|
111
111
|
return nil unless attributes.is_a?(Hash)
|
112
|
+
attributes = attributes.transform_keys(&:to_sym)
|
112
113
|
self.class.openapi_types.each_pair do |key, type|
|
113
114
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
114
115
|
self.send("#{key}=", nil)
|
@@ -164,7 +165,7 @@ module VgsapiClient
|
|
164
165
|
end
|
165
166
|
else # model
|
166
167
|
# models (e.g. Pet) or oneOf
|
167
|
-
klass =
|
168
|
+
klass = VgsApiClient.const_get(type)
|
168
169
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
170
|
end
|
170
171
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module VgsApiClient
|
17
17
|
class InlineResponse2001
|
18
18
|
# The retrieved value.
|
19
19
|
attr_accessor :data
|
@@ -47,13 +47,13 @@ module VgsapiClient
|
|
47
47
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
48
|
def initialize(attributes = {})
|
49
49
|
if (!attributes.is_a?(Hash))
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VgsApiClient::InlineResponse2001` initialize method"
|
51
51
|
end
|
52
52
|
|
53
53
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
54
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
55
|
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VgsApiClient::InlineResponse2001`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
57
|
end
|
58
58
|
h[k.to_sym] = v
|
59
59
|
}
|
@@ -134,6 +134,7 @@ module VgsapiClient
|
|
134
134
|
# @return [Object] Returns the model itself
|
135
135
|
def build_from_hash(attributes)
|
136
136
|
return nil unless attributes.is_a?(Hash)
|
137
|
+
attributes = attributes.transform_keys(&:to_sym)
|
137
138
|
self.class.openapi_types.each_pair do |key, type|
|
138
139
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
139
140
|
self.send("#{key}=", nil)
|
@@ -189,7 +190,7 @@ module VgsapiClient
|
|
189
190
|
end
|
190
191
|
else # model
|
191
192
|
# models (e.g. Pet) or oneOf
|
192
|
-
klass =
|
193
|
+
klass = VgsApiClient.const_get(type)
|
193
194
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
194
195
|
end
|
195
196
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module VgsApiClient
|
17
17
|
class InlineResponse201
|
18
18
|
# List of stored values along with their aliases.
|
19
19
|
attr_accessor :data
|
@@ -47,13 +47,13 @@ module VgsapiClient
|
|
47
47
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
48
|
def initialize(attributes = {})
|
49
49
|
if (!attributes.is_a?(Hash))
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VgsApiClient::InlineResponse201` initialize method"
|
51
51
|
end
|
52
52
|
|
53
53
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
54
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
55
|
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VgsApiClient::InlineResponse201`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
57
|
end
|
58
58
|
h[k.to_sym] = v
|
59
59
|
}
|
@@ -110,6 +110,7 @@ module VgsapiClient
|
|
110
110
|
# @return [Object] Returns the model itself
|
111
111
|
def build_from_hash(attributes)
|
112
112
|
return nil unless attributes.is_a?(Hash)
|
113
|
+
attributes = attributes.transform_keys(&:to_sym)
|
113
114
|
self.class.openapi_types.each_pair do |key, type|
|
114
115
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
115
116
|
self.send("#{key}=", nil)
|
@@ -165,7 +166,7 @@ module VgsapiClient
|
|
165
166
|
end
|
166
167
|
else # model
|
167
168
|
# models (e.g. Pet) or oneOf
|
168
|
-
klass =
|
169
|
+
klass = VgsApiClient.const_get(type)
|
169
170
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
170
171
|
end
|
171
172
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module VgsApiClient
|
17
17
|
class InlineResponseDefault
|
18
18
|
# List of errors that occurred while processing the request.
|
19
19
|
attr_accessor :errors
|
@@ -47,13 +47,13 @@ module VgsapiClient
|
|
47
47
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
48
|
def initialize(attributes = {})
|
49
49
|
if (!attributes.is_a?(Hash))
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VgsApiClient::InlineResponseDefault` initialize method"
|
51
51
|
end
|
52
52
|
|
53
53
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
54
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
55
|
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VgsApiClient::InlineResponseDefault`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
57
|
end
|
58
58
|
h[k.to_sym] = v
|
59
59
|
}
|
@@ -125,6 +125,7 @@ module VgsapiClient
|
|
125
125
|
# @return [Object] Returns the model itself
|
126
126
|
def build_from_hash(attributes)
|
127
127
|
return nil unless attributes.is_a?(Hash)
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
128
129
|
self.class.openapi_types.each_pair do |key, type|
|
129
130
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
130
131
|
self.send("#{key}=", nil)
|
@@ -180,7 +181,7 @@ module VgsapiClient
|
|
180
181
|
end
|
181
182
|
else # model
|
182
183
|
# models (e.g. Pet) or oneOf
|
183
|
-
klass =
|
184
|
+
klass = VgsApiClient.const_get(type)
|
184
185
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
185
186
|
end
|
186
187
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module VgsApiClient
|
17
17
|
class ModelAlias
|
18
18
|
# Opaque string used to substitute the raw value.
|
19
19
|
attr_accessor :_alias
|
@@ -51,13 +51,13 @@ module VgsapiClient
|
|
51
51
|
# @param [Hash] attributes Model attributes in the form of hash
|
52
52
|
def initialize(attributes = {})
|
53
53
|
if (!attributes.is_a?(Hash))
|
54
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VgsApiClient::ModelAlias` initialize method"
|
55
55
|
end
|
56
56
|
|
57
57
|
# check to see if the attribute exists and convert string to symbol for hash key
|
58
58
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
59
59
|
if (!self.class.attribute_map.key?(k.to_sym))
|
60
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
60
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VgsApiClient::ModelAlias`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
61
61
|
end
|
62
62
|
h[k.to_sym] = v
|
63
63
|
}
|
@@ -117,6 +117,7 @@ module VgsapiClient
|
|
117
117
|
# @return [Object] Returns the model itself
|
118
118
|
def build_from_hash(attributes)
|
119
119
|
return nil unless attributes.is_a?(Hash)
|
120
|
+
attributes = attributes.transform_keys(&:to_sym)
|
120
121
|
self.class.openapi_types.each_pair do |key, type|
|
121
122
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
122
123
|
self.send("#{key}=", nil)
|
@@ -172,7 +173,7 @@ module VgsapiClient
|
|
172
173
|
end
|
173
174
|
else # model
|
174
175
|
# models (e.g. Pet) or oneOf
|
175
|
-
klass =
|
176
|
+
klass = VgsApiClient.const_get(type)
|
176
177
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
177
178
|
end
|
178
179
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module VgsApiClient
|
17
17
|
class RevealedData
|
18
18
|
# List of aliases associated with the value.
|
19
19
|
attr_accessor :aliases
|
@@ -62,13 +62,13 @@ module VgsapiClient
|
|
62
62
|
# @param [Hash] attributes Model attributes in the form of hash
|
63
63
|
def initialize(attributes = {})
|
64
64
|
if (!attributes.is_a?(Hash))
|
65
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VgsApiClient::RevealedData` initialize method"
|
66
66
|
end
|
67
67
|
|
68
68
|
# check to see if the attribute exists and convert string to symbol for hash key
|
69
69
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
70
|
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VgsApiClient::RevealedData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
72
|
end
|
73
73
|
h[k.to_sym] = v
|
74
74
|
}
|
@@ -142,6 +142,7 @@ module VgsapiClient
|
|
142
142
|
# @return [Object] Returns the model itself
|
143
143
|
def build_from_hash(attributes)
|
144
144
|
return nil unless attributes.is_a?(Hash)
|
145
|
+
attributes = attributes.transform_keys(&:to_sym)
|
145
146
|
self.class.openapi_types.each_pair do |key, type|
|
146
147
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
147
148
|
self.send("#{key}=", nil)
|
@@ -197,7 +198,7 @@ module VgsapiClient
|
|
197
198
|
end
|
198
199
|
else # model
|
199
200
|
# models (e.g. Pet) or oneOf
|
200
|
-
klass =
|
201
|
+
klass = VgsApiClient.const_get(type)
|
201
202
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
202
203
|
end
|
203
204
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module VgsApiClient
|
17
17
|
class UpdateAliasRequest
|
18
18
|
attr_accessor :data
|
19
19
|
|
@@ -46,13 +46,13 @@ module VgsapiClient
|
|
46
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
47
47
|
def initialize(attributes = {})
|
48
48
|
if (!attributes.is_a?(Hash))
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VgsApiClient::UpdateAliasRequest` initialize method"
|
50
50
|
end
|
51
51
|
|
52
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
53
53
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
54
|
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VgsApiClient::UpdateAliasRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
56
|
end
|
57
57
|
h[k.to_sym] = v
|
58
58
|
}
|
@@ -112,6 +112,7 @@ module VgsapiClient
|
|
112
112
|
# @return [Object] Returns the model itself
|
113
113
|
def build_from_hash(attributes)
|
114
114
|
return nil unless attributes.is_a?(Hash)
|
115
|
+
attributes = attributes.transform_keys(&:to_sym)
|
115
116
|
self.class.openapi_types.each_pair do |key, type|
|
116
117
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
117
118
|
self.send("#{key}=", nil)
|
@@ -167,7 +168,7 @@ module VgsapiClient
|
|
167
168
|
end
|
168
169
|
else # model
|
169
170
|
# models (e.g. Pet) or oneOf
|
170
|
-
klass =
|
171
|
+
klass = VgsApiClient.const_get(type)
|
171
172
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
172
173
|
end
|
173
174
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module VgsApiClient
|
17
17
|
class UpdateAliasRequestData
|
18
18
|
# List of tags to classify the value with.
|
19
19
|
attr_accessor :classifiers
|
@@ -47,13 +47,13 @@ module VgsapiClient
|
|
47
47
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
48
|
def initialize(attributes = {})
|
49
49
|
if (!attributes.is_a?(Hash))
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `VgsApiClient::UpdateAliasRequestData` initialize method"
|
51
51
|
end
|
52
52
|
|
53
53
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
54
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
55
|
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `VgsApiClient::UpdateAliasRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
57
|
end
|
58
58
|
h[k.to_sym] = v
|
59
59
|
}
|
@@ -115,6 +115,7 @@ module VgsapiClient
|
|
115
115
|
# @return [Object] Returns the model itself
|
116
116
|
def build_from_hash(attributes)
|
117
117
|
return nil unless attributes.is_a?(Hash)
|
118
|
+
attributes = attributes.transform_keys(&:to_sym)
|
118
119
|
self.class.openapi_types.each_pair do |key, type|
|
119
120
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
120
121
|
self.send("#{key}=", nil)
|
@@ -170,7 +171,7 @@ module VgsapiClient
|
|
170
171
|
end
|
171
172
|
else # model
|
172
173
|
# models (e.g. Pet) or oneOf
|
173
|
-
klass =
|
174
|
+
klass = VgsApiClient.const_get(type)
|
174
175
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
175
176
|
end
|
176
177
|
end
|
data/lib/vgs_api_client.rb
CHANGED
@@ -34,10 +34,10 @@ require 'vgs_api_client/models/update_alias_request_data'
|
|
34
34
|
# APIs
|
35
35
|
require 'vgs_api_client/api/aliases_api'
|
36
36
|
|
37
|
-
module
|
37
|
+
module VgsApiClient
|
38
38
|
class << self
|
39
39
|
# Customize default settings for the SDK using block.
|
40
|
-
#
|
40
|
+
# VgsApiClient.configure do |config|
|
41
41
|
# config.username = "xxx"
|
42
42
|
# config.password = "xxx"
|
43
43
|
# end
|
@@ -6,35 +6,20 @@
|
|
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:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
|
16
|
-
# Unit tests for
|
16
|
+
# Unit tests for VgsApiClient::AliasesApi
|
17
17
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
18
|
# Please update as you see appropriate
|
19
19
|
describe 'AliasesApi' do
|
20
|
-
before
|
21
|
-
# run before
|
22
|
-
|
23
|
-
config.username = "US8X3DSEC1MyCACn6RpJL8LT"
|
24
|
-
config.password = "02ceadd3-273a-4e98-9005-5daa28a0f6d2"
|
25
|
-
end
|
26
|
-
@api_instance = VgsapiClient::AliasesApi.new
|
27
|
-
@create_aliases_request = VgsapiClient::CreateAliasesRequest.new
|
28
|
-
@create_aliases_request_new = VgsapiClient::CreateAliasesRequestNew.new
|
29
|
-
@create_aliases_request_new.format = VgsapiClient::AliasFormat.build_from_hash("UUID")
|
30
|
-
@create_aliases_request_new.classifiers = ["bank-account"]
|
31
|
-
@create_aliases_request_new.value = "122105155"
|
32
|
-
@create_aliases_request_new2 = VgsapiClient::CreateAliasesRequestNew.new
|
33
|
-
@create_aliases_request_new2.format = VgsapiClient::AliasFormat.build_from_hash("UUID")
|
34
|
-
@create_aliases_request_new2.classifiers = ["bank-account"]
|
35
|
-
@create_aliases_request_new2.value = "122105156"
|
36
|
-
@create_aliases_request.data = [@create_aliases_request_new, @create_aliases_request_new2]
|
37
|
-
@aliases = Array.new
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = VgsApiClient::AliasesApi.new
|
38
23
|
end
|
39
24
|
|
40
25
|
after do
|
@@ -43,7 +28,7 @@ describe 'AliasesApi' do
|
|
43
28
|
|
44
29
|
describe 'test an instance of AliasesApi' do
|
45
30
|
it 'should create an instance of AliasesApi' do
|
46
|
-
expect(@api_instance).to be_instance_of(
|
31
|
+
expect(@api_instance).to be_instance_of(VgsApiClient::AliasesApi)
|
47
32
|
end
|
48
33
|
end
|
49
34
|
|
@@ -54,17 +39,8 @@ describe 'AliasesApi' do
|
|
54
39
|
# @option opts [CreateAliasesRequest] :create_aliases_request
|
55
40
|
# @return [InlineResponse201]
|
56
41
|
describe 'create_aliases test' do
|
57
|
-
it 'should
|
42
|
+
it 'should work' do
|
58
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
59
|
-
opts = {}
|
60
|
-
opts[:create_aliases_request] = @create_aliases_request.to_hash
|
61
|
-
api_response = @api_instance.create_aliases(opts)
|
62
|
-
api_response.data.each do |el|
|
63
|
-
el.aliases.each do |cur_alias|
|
64
|
-
expect(cur_alias._alias).to match('tok_sandbox_.+')
|
65
|
-
@aliases.push(cur_alias._alias)
|
66
|
-
end
|
67
|
-
end
|
68
44
|
end
|
69
45
|
end
|
70
46
|
|
@@ -87,26 +63,20 @@ describe 'AliasesApi' do
|
|
87
63
|
# @param [Hash] opts the optional parameters
|
88
64
|
# @return [InlineResponse2001]
|
89
65
|
describe 'reveal_alias test' do
|
90
|
-
it 'should
|
66
|
+
it 'should work' do
|
91
67
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
92
|
-
api_response = @api_instance.reveal_alias(@aliases.first, {})
|
93
|
-
expect(api_response.data[0].value).to eq "122105155"
|
94
68
|
end
|
95
69
|
end
|
96
70
|
|
97
71
|
# unit tests for reveal_multiple_aliases
|
98
72
|
# Reveal multiple aliases
|
99
|
-
# Given a
|
100
|
-
# @param q Comma-separated
|
73
|
+
# Given a comma separated aliases string, 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).
|
74
|
+
# @param q Comma-separated aliases string
|
101
75
|
# @param [Hash] opts the optional parameters
|
102
76
|
# @return [InlineResponse200]
|
103
|
-
# need to fix line258 as query_params[:'q'] = q.join(',')
|
104
77
|
describe 'reveal_multiple_aliases test' do
|
105
|
-
it 'should
|
78
|
+
it 'should work' do
|
106
79
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
107
|
-
api_response = @api_instance.reveal_multiple_aliases(@aliases.join(','))
|
108
|
-
expect(api_response.data[@aliases[0]].value).to eq "122105155"
|
109
|
-
expect(api_response.data[@aliases[1]].value).to eq "122105156"
|
110
80
|
end
|
111
81
|
end
|
112
82
|
|
@@ -116,21 +86,10 @@ describe 'AliasesApi' do
|
|
116
86
|
# @param _alias Alias to operate on.
|
117
87
|
# @param [Hash] opts the optional parameters
|
118
88
|
# @option opts [UpdateAliasRequest] :update_alias_request
|
119
|
-
# @return
|
120
|
-
# need to fix update_alias to return status code
|
89
|
+
# @return [nil]
|
121
90
|
describe 'update_alias test' do
|
122
91
|
it 'should work' do
|
123
92
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
124
|
-
update_alias_request = VgsapiClient::UpdateAliasRequest.new
|
125
|
-
update_alias_request_data = VgsapiClient::UpdateAliasRequestData.new
|
126
|
-
update_alias_request_data.classifiers = ["bank-account", "test-tag"]
|
127
|
-
update_alias_request.data = update_alias_request_data
|
128
|
-
|
129
|
-
opts = {}
|
130
|
-
opts[:update_alias_request] = update_alias_request.to_hash
|
131
|
-
api_response = @api_instance.update_alias(@aliases.first, opts)
|
132
|
-
# puts api_response
|
133
|
-
expect(api_response).to be nil
|
134
93
|
end
|
135
94
|
end
|
136
95
|
|