trinsic_api 2.2.0 → 2.3.0.pre.alpha1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/AddRedirectUriResponse.md +18 -0
- data/docs/ContractField.md +2 -0
- data/docs/ContractIdentifierField.md +22 -0
- data/docs/CreateVerificationProfileResponse.md +18 -0
- data/docs/EnvironmentRedirectUrisAddRequest.md +18 -0
- data/docs/EnvironmentRedirectUrisApi.md +222 -0
- data/docs/FaydaProviderOutput.md +18 -0
- data/docs/Identifier.md +22 -0
- data/docs/IdentityData.md +5 -1
- data/docs/ListEnvironmentRedirectUrisResponse.md +20 -0
- data/docs/ListVerificationProfilesResponse.md +20 -0
- data/docs/MexicoCurpProviderOutput.md +18 -0
- data/docs/ProviderContract.md +2 -0
- data/docs/ProviderOutput.md +22 -0
- data/docs/RedirectUriResponse.md +20 -0
- data/docs/SpidBillingInformation.md +22 -0
- data/docs/SpidInput.md +3 -1
- data/docs/SpidProviderOutput.md +26 -0
- data/docs/VerificationProfileResponse.md +28 -0
- data/docs/VerificationProfilesApi.md +231 -0
- data/lib/trinsic_api/api/environment_redirect_uris_api.rb +228 -0
- data/lib/trinsic_api/api/verification_profiles_api.rb +273 -0
- data/lib/trinsic_api/models/add_redirect_uri_response.rb +237 -0
- data/lib/trinsic_api/models/contract_field.rb +28 -1
- data/lib/trinsic_api/models/contract_identifier_field.rb +315 -0
- data/lib/trinsic_api/models/create_verification_profile_response.rb +238 -0
- data/lib/trinsic_api/models/environment_redirect_uris_add_request.rb +237 -0
- data/lib/trinsic_api/models/fayda_provider_output.rb +222 -0
- data/lib/trinsic_api/models/identifier.rb +289 -0
- data/lib/trinsic_api/models/identity_data.rb +43 -5
- data/lib/trinsic_api/models/list_environment_redirect_uris_response.rb +268 -0
- data/lib/trinsic_api/models/list_verification_profiles_response.rb +266 -0
- data/lib/trinsic_api/models/mexico_curp_provider_output.rb +222 -0
- data/lib/trinsic_api/models/provider_contract.rb +14 -1
- data/lib/trinsic_api/models/provider_output.rb +241 -0
- data/lib/trinsic_api/models/redirect_uri_response.rb +263 -0
- data/lib/trinsic_api/models/spid_billing_information.rb +293 -0
- data/lib/trinsic_api/models/spid_input.rb +16 -5
- data/lib/trinsic_api/models/spid_provider_output.rb +266 -0
- data/lib/trinsic_api/models/verification_profile_response.rb +375 -0
- data/lib/trinsic_api/version.rb +1 -1
- data/lib/trinsic_api.rb +16 -0
- data/spec/api/environment_redirect_uris_api_spec.rb +72 -0
- data/spec/api/verification_profiles_api_spec.rb +76 -0
- data/spec/models/add_redirect_uri_response_spec.rb +36 -0
- data/spec/models/contract_field_spec.rb +6 -0
- data/spec/models/contract_identifier_field_spec.rb +48 -0
- data/spec/models/create_verification_profile_response_spec.rb +36 -0
- data/spec/models/environment_redirect_uris_add_request_spec.rb +36 -0
- data/spec/models/fayda_provider_output_spec.rb +36 -0
- data/spec/models/identifier_spec.rb +48 -0
- data/spec/models/identity_data_spec.rb +12 -0
- data/spec/models/list_environment_redirect_uris_response_spec.rb +42 -0
- data/spec/models/list_verification_profiles_response_spec.rb +42 -0
- data/spec/models/mexico_curp_provider_output_spec.rb +36 -0
- data/spec/models/provider_contract_spec.rb +6 -0
- data/spec/models/provider_output_spec.rb +48 -0
- data/spec/models/redirect_uri_response_spec.rb +42 -0
- data/spec/models/spid_billing_information_spec.rb +48 -0
- data/spec/models/spid_input_spec.rb +6 -0
- data/spec/models/spid_provider_output_spec.rb +60 -0
- data/spec/models/verification_profile_response_spec.rb +66 -0
- metadata +66 -2
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Trinsic API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.13.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module TrinsicApi
|
|
16
|
+
class VerificationProfilesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create Verification Profile
|
|
23
|
+
# Creates a new verification profile within your organization.
|
|
24
|
+
# @param _alias [String] An alias of the verification profile shown to developers and administrators.
|
|
25
|
+
# @param brand_name [String] The brand name of the verification profile shown to end-users.
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @option opts [String] :primary_color The primary color of the verification profile. Must be a 6-character hex string prefixed with a '#' character. Example: #000000
|
|
28
|
+
# @option opts [Array<String>] :providers The list of providers you'd like to select for this profile. We will not currently enable any providers.
|
|
29
|
+
# @option opts [File] :logo The logo of the verification profile.
|
|
30
|
+
# @return [CreateVerificationProfileResponse]
|
|
31
|
+
def create_verification_profile(_alias, brand_name, opts = {})
|
|
32
|
+
data, _status_code, _headers = create_verification_profile_with_http_info(_alias, brand_name, opts)
|
|
33
|
+
data
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Create Verification Profile
|
|
37
|
+
# Creates a new verification profile within your organization.
|
|
38
|
+
# @param _alias [String] An alias of the verification profile shown to developers and administrators.
|
|
39
|
+
# @param brand_name [String] The brand name of the verification profile shown to end-users.
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @option opts [String] :primary_color The primary color of the verification profile. Must be a 6-character hex string prefixed with a '#' character. Example: #000000
|
|
42
|
+
# @option opts [Array<String>] :providers The list of providers you'd like to select for this profile. We will not currently enable any providers.
|
|
43
|
+
# @option opts [File] :logo The logo of the verification profile.
|
|
44
|
+
# @return [Array<(CreateVerificationProfileResponse, Integer, Hash)>] CreateVerificationProfileResponse data, response status code and response headers
|
|
45
|
+
def create_verification_profile_with_http_info(_alias, brand_name, opts = {})
|
|
46
|
+
if @api_client.config.debugging
|
|
47
|
+
@api_client.config.logger.debug 'Calling API: VerificationProfilesApi.create_verification_profile ...'
|
|
48
|
+
end
|
|
49
|
+
# verify the required parameter '_alias' is set
|
|
50
|
+
if @api_client.config.client_side_validation && _alias.nil?
|
|
51
|
+
fail ArgumentError, "Missing the required parameter '_alias' when calling VerificationProfilesApi.create_verification_profile"
|
|
52
|
+
end
|
|
53
|
+
if @api_client.config.client_side_validation && _alias.to_s.length > 255
|
|
54
|
+
fail ArgumentError, 'invalid value for "_alias" when calling VerificationProfilesApi.create_verification_profile, the character length must be smaller than or equal to 255.'
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
if @api_client.config.client_side_validation && _alias.to_s.length < 1
|
|
58
|
+
fail ArgumentError, 'invalid value for "_alias" when calling VerificationProfilesApi.create_verification_profile, the character length must be great than or equal to 1.'
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# verify the required parameter 'brand_name' is set
|
|
62
|
+
if @api_client.config.client_side_validation && brand_name.nil?
|
|
63
|
+
fail ArgumentError, "Missing the required parameter 'brand_name' when calling VerificationProfilesApi.create_verification_profile"
|
|
64
|
+
end
|
|
65
|
+
if @api_client.config.client_side_validation && brand_name.to_s.length > 2500
|
|
66
|
+
fail ArgumentError, 'invalid value for "brand_name" when calling VerificationProfilesApi.create_verification_profile, the character length must be smaller than or equal to 2500.'
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
if @api_client.config.client_side_validation && brand_name.to_s.length < 1
|
|
70
|
+
fail ArgumentError, 'invalid value for "brand_name" when calling VerificationProfilesApi.create_verification_profile, the character length must be great than or equal to 1.'
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
if @api_client.config.client_side_validation && !opts[:'primary_color'].nil? && opts[:'primary_color'].to_s.length > 7
|
|
74
|
+
fail ArgumentError, 'invalid value for "opts[:"primary_color"]" when calling VerificationProfilesApi.create_verification_profile, the character length must be smaller than or equal to 7.'
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if @api_client.config.client_side_validation && !opts[:'primary_color'].nil? && opts[:'primary_color'].to_s.length < 7
|
|
78
|
+
fail ArgumentError, 'invalid value for "opts[:"primary_color"]" when calling VerificationProfilesApi.create_verification_profile, the character length must be great than or equal to 7.'
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# resource path
|
|
82
|
+
local_var_path = '/api/valpha/verification-profiles'
|
|
83
|
+
|
|
84
|
+
# query parameters
|
|
85
|
+
query_params = opts[:query_params] || {}
|
|
86
|
+
|
|
87
|
+
# header parameters
|
|
88
|
+
header_params = opts[:header_params] || {}
|
|
89
|
+
# HTTP header 'Accept' (if needed)
|
|
90
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/problem+json']) unless header_params['Accept']
|
|
91
|
+
# HTTP header 'Content-Type'
|
|
92
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
|
93
|
+
if !content_type.nil?
|
|
94
|
+
header_params['Content-Type'] = content_type
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# form parameters
|
|
98
|
+
form_params = opts[:form_params] || {}
|
|
99
|
+
form_params['Alias'] = _alias
|
|
100
|
+
form_params['BrandName'] = brand_name
|
|
101
|
+
form_params['PrimaryColor'] = opts[:'primary_color'] if !opts[:'primary_color'].nil?
|
|
102
|
+
form_params['Providers'] = @api_client.build_collection_param(opts[:'providers'], :multi) if !opts[:'providers'].nil?
|
|
103
|
+
form_params['Logo'] = opts[:'logo'] if !opts[:'logo'].nil?
|
|
104
|
+
|
|
105
|
+
# http body (model)
|
|
106
|
+
post_body = opts[:debug_body]
|
|
107
|
+
|
|
108
|
+
# return_type
|
|
109
|
+
return_type = opts[:debug_return_type] || 'CreateVerificationProfileResponse'
|
|
110
|
+
|
|
111
|
+
# auth_names
|
|
112
|
+
auth_names = opts[:debug_auth_names] || ['Bearer']
|
|
113
|
+
|
|
114
|
+
new_options = opts.merge(
|
|
115
|
+
:operation => :"VerificationProfilesApi.create_verification_profile",
|
|
116
|
+
:header_params => header_params,
|
|
117
|
+
:query_params => query_params,
|
|
118
|
+
:form_params => form_params,
|
|
119
|
+
:body => post_body,
|
|
120
|
+
:auth_names => auth_names,
|
|
121
|
+
:return_type => return_type
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
125
|
+
if @api_client.config.debugging
|
|
126
|
+
@api_client.config.logger.debug "API called: VerificationProfilesApi#create_verification_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
127
|
+
end
|
|
128
|
+
return data, status_code, headers
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Get Verification Profile
|
|
132
|
+
# Gets a specific verification profile by ID.
|
|
133
|
+
# @param id [String]
|
|
134
|
+
# @param [Hash] opts the optional parameters
|
|
135
|
+
# @return [VerificationProfileResponse]
|
|
136
|
+
def get_verification_profile_by_id(id, opts = {})
|
|
137
|
+
data, _status_code, _headers = get_verification_profile_by_id_with_http_info(id, opts)
|
|
138
|
+
data
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Get Verification Profile
|
|
142
|
+
# Gets a specific verification profile by ID.
|
|
143
|
+
# @param id [String]
|
|
144
|
+
# @param [Hash] opts the optional parameters
|
|
145
|
+
# @return [Array<(VerificationProfileResponse, Integer, Hash)>] VerificationProfileResponse data, response status code and response headers
|
|
146
|
+
def get_verification_profile_by_id_with_http_info(id, opts = {})
|
|
147
|
+
if @api_client.config.debugging
|
|
148
|
+
@api_client.config.logger.debug 'Calling API: VerificationProfilesApi.get_verification_profile_by_id ...'
|
|
149
|
+
end
|
|
150
|
+
# verify the required parameter 'id' is set
|
|
151
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
152
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling VerificationProfilesApi.get_verification_profile_by_id"
|
|
153
|
+
end
|
|
154
|
+
# resource path
|
|
155
|
+
local_var_path = '/api/valpha/verification-profiles/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
156
|
+
|
|
157
|
+
# query parameters
|
|
158
|
+
query_params = opts[:query_params] || {}
|
|
159
|
+
|
|
160
|
+
# header parameters
|
|
161
|
+
header_params = opts[:header_params] || {}
|
|
162
|
+
# HTTP header 'Accept' (if needed)
|
|
163
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/problem+json']) unless header_params['Accept']
|
|
164
|
+
|
|
165
|
+
# form parameters
|
|
166
|
+
form_params = opts[:form_params] || {}
|
|
167
|
+
|
|
168
|
+
# http body (model)
|
|
169
|
+
post_body = opts[:debug_body]
|
|
170
|
+
|
|
171
|
+
# return_type
|
|
172
|
+
return_type = opts[:debug_return_type] || 'VerificationProfileResponse'
|
|
173
|
+
|
|
174
|
+
# auth_names
|
|
175
|
+
auth_names = opts[:debug_auth_names] || ['Bearer']
|
|
176
|
+
|
|
177
|
+
new_options = opts.merge(
|
|
178
|
+
:operation => :"VerificationProfilesApi.get_verification_profile_by_id",
|
|
179
|
+
:header_params => header_params,
|
|
180
|
+
:query_params => query_params,
|
|
181
|
+
:form_params => form_params,
|
|
182
|
+
:body => post_body,
|
|
183
|
+
:auth_names => auth_names,
|
|
184
|
+
:return_type => return_type
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
188
|
+
if @api_client.config.debugging
|
|
189
|
+
@api_client.config.logger.debug "API called: VerificationProfilesApi#get_verification_profile_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
190
|
+
end
|
|
191
|
+
return data, status_code, headers
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# List Verification Profiles
|
|
195
|
+
# List the verification profiles for the current organization and environment.
|
|
196
|
+
# @param [Hash] opts the optional parameters
|
|
197
|
+
# @option opts [Integer] :page (default to 1)
|
|
198
|
+
# @option opts [Integer] :page_size Size of the list to be returned. Accepted range from 1 to 100 (default to 20)
|
|
199
|
+
# @return [ListVerificationProfilesResponse]
|
|
200
|
+
def list_verification_profiles(opts = {})
|
|
201
|
+
data, _status_code, _headers = list_verification_profiles_with_http_info(opts)
|
|
202
|
+
data
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# List Verification Profiles
|
|
206
|
+
# List the verification profiles for the current organization and environment.
|
|
207
|
+
# @param [Hash] opts the optional parameters
|
|
208
|
+
# @option opts [Integer] :page (default to 1)
|
|
209
|
+
# @option opts [Integer] :page_size Size of the list to be returned. Accepted range from 1 to 100 (default to 20)
|
|
210
|
+
# @return [Array<(ListVerificationProfilesResponse, Integer, Hash)>] ListVerificationProfilesResponse data, response status code and response headers
|
|
211
|
+
def list_verification_profiles_with_http_info(opts = {})
|
|
212
|
+
if @api_client.config.debugging
|
|
213
|
+
@api_client.config.logger.debug 'Calling API: VerificationProfilesApi.list_verification_profiles ...'
|
|
214
|
+
end
|
|
215
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 2147483647
|
|
216
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling VerificationProfilesApi.list_verification_profiles, must be smaller than or equal to 2147483647.'
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
220
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling VerificationProfilesApi.list_verification_profiles, must be greater than or equal to 1.'
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
|
|
224
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling VerificationProfilesApi.list_verification_profiles, must be smaller than or equal to 100.'
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
|
228
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling VerificationProfilesApi.list_verification_profiles, must be greater than or equal to 1.'
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# resource path
|
|
232
|
+
local_var_path = '/api/valpha/verification-profiles'
|
|
233
|
+
|
|
234
|
+
# query parameters
|
|
235
|
+
query_params = opts[:query_params] || {}
|
|
236
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
237
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
238
|
+
|
|
239
|
+
# header parameters
|
|
240
|
+
header_params = opts[:header_params] || {}
|
|
241
|
+
# HTTP header 'Accept' (if needed)
|
|
242
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/problem+json']) unless header_params['Accept']
|
|
243
|
+
|
|
244
|
+
# form parameters
|
|
245
|
+
form_params = opts[:form_params] || {}
|
|
246
|
+
|
|
247
|
+
# http body (model)
|
|
248
|
+
post_body = opts[:debug_body]
|
|
249
|
+
|
|
250
|
+
# return_type
|
|
251
|
+
return_type = opts[:debug_return_type] || 'ListVerificationProfilesResponse'
|
|
252
|
+
|
|
253
|
+
# auth_names
|
|
254
|
+
auth_names = opts[:debug_auth_names] || ['Bearer']
|
|
255
|
+
|
|
256
|
+
new_options = opts.merge(
|
|
257
|
+
:operation => :"VerificationProfilesApi.list_verification_profiles",
|
|
258
|
+
:header_params => header_params,
|
|
259
|
+
:query_params => query_params,
|
|
260
|
+
:form_params => form_params,
|
|
261
|
+
:body => post_body,
|
|
262
|
+
:auth_names => auth_names,
|
|
263
|
+
:return_type => return_type
|
|
264
|
+
)
|
|
265
|
+
|
|
266
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
267
|
+
if @api_client.config.debugging
|
|
268
|
+
@api_client.config.logger.debug "API called: VerificationProfilesApi#list_verification_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
269
|
+
end
|
|
270
|
+
return data, status_code, headers
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
end
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Trinsic API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.13.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TrinsicApi
|
|
17
|
+
class AddRedirectUriResponse
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'id' => :'id'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'id' => :'String'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::AddRedirectUriResponse` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::AddRedirectUriResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'id')
|
|
67
|
+
self.id = attributes[:'id']
|
|
68
|
+
else
|
|
69
|
+
self.id = nil
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
+
invalid_properties = Array.new
|
|
78
|
+
if @id.nil?
|
|
79
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
invalid_properties
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Check to see if the all the properties in the model are valid
|
|
86
|
+
# @return true if the model is valid
|
|
87
|
+
def valid?
|
|
88
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
89
|
+
return false if @id.nil?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Custom attribute writer method with validation
|
|
94
|
+
# @param [Object] id Value to be assigned
|
|
95
|
+
def id=(id)
|
|
96
|
+
if id.nil?
|
|
97
|
+
fail ArgumentError, 'id cannot be nil'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
@id = id
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
id == o.id
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# @see the `==` method
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def eql?(o)
|
|
114
|
+
self == o
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Calculates hash code according to all attributes.
|
|
118
|
+
# @return [Integer] Hash code
|
|
119
|
+
def hash
|
|
120
|
+
[id].hash
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Builds the object from hash
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
# @return [Object] Returns the model itself
|
|
126
|
+
def self.build_from_hash(attributes)
|
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
129
|
+
transformed_hash = {}
|
|
130
|
+
openapi_types.each_pair do |key, type|
|
|
131
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = nil
|
|
133
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
134
|
+
# check to ensure the input is an array given that the attribute
|
|
135
|
+
# is documented as an array but the input is not
|
|
136
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
137
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
138
|
+
end
|
|
139
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
140
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
new(transformed_hash)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Deserializes the data based on type
|
|
147
|
+
# @param string type Data type
|
|
148
|
+
# @param string value Value to be deserialized
|
|
149
|
+
# @return [Object] Deserialized data
|
|
150
|
+
def self._deserialize(type, value)
|
|
151
|
+
case type.to_sym
|
|
152
|
+
when :Time
|
|
153
|
+
Time.parse(value)
|
|
154
|
+
when :Date
|
|
155
|
+
Date.parse(value)
|
|
156
|
+
when :String
|
|
157
|
+
value.to_s
|
|
158
|
+
when :Integer
|
|
159
|
+
value.to_i
|
|
160
|
+
when :Float
|
|
161
|
+
value.to_f
|
|
162
|
+
when :Boolean
|
|
163
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
164
|
+
true
|
|
165
|
+
else
|
|
166
|
+
false
|
|
167
|
+
end
|
|
168
|
+
when :Object
|
|
169
|
+
# generic object (usually a Hash), return directly
|
|
170
|
+
value
|
|
171
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
172
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
173
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
174
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
175
|
+
k_type = Regexp.last_match[:k_type]
|
|
176
|
+
v_type = Regexp.last_match[:v_type]
|
|
177
|
+
{}.tap do |hash|
|
|
178
|
+
value.each do |k, v|
|
|
179
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
else # model
|
|
183
|
+
# models (e.g. Pet) or oneOf
|
|
184
|
+
klass = TrinsicApi.const_get(type)
|
|
185
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Returns the string representation of the object
|
|
190
|
+
# @return [String] String presentation of the object
|
|
191
|
+
def to_s
|
|
192
|
+
to_hash.to_s
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
|
197
|
+
def to_body
|
|
198
|
+
to_hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Returns the object in the form of hash
|
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
|
203
|
+
def to_hash
|
|
204
|
+
hash = {}
|
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
206
|
+
value = self.send(attr)
|
|
207
|
+
if value.nil?
|
|
208
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
209
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
hash[param] = _to_hash(value)
|
|
213
|
+
end
|
|
214
|
+
hash
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Outputs non-array value in the form of hash
|
|
218
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
219
|
+
# @param [Object] value Any valid value
|
|
220
|
+
# @return [Hash] Returns the value in the form of hash
|
|
221
|
+
def _to_hash(value)
|
|
222
|
+
if value.is_a?(Array)
|
|
223
|
+
value.compact.map { |v| _to_hash(v) }
|
|
224
|
+
elsif value.is_a?(Hash)
|
|
225
|
+
{}.tap do |hash|
|
|
226
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
227
|
+
end
|
|
228
|
+
elsif value.respond_to? :to_hash
|
|
229
|
+
value.to_hash
|
|
230
|
+
else
|
|
231
|
+
value
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
end
|
|
@@ -19,6 +19,9 @@ module TrinsicApi
|
|
|
19
19
|
# The name of the field as it appears in verification results.
|
|
20
20
|
attr_accessor :name
|
|
21
21
|
|
|
22
|
+
# The scope of the field as it appears in verification results.
|
|
23
|
+
attr_accessor :scope
|
|
24
|
+
|
|
22
25
|
# Indicates when this field will be present in verification results.
|
|
23
26
|
attr_accessor :outputted
|
|
24
27
|
|
|
@@ -48,6 +51,7 @@ module TrinsicApi
|
|
|
48
51
|
def self.attribute_map
|
|
49
52
|
{
|
|
50
53
|
:'name' => :'name',
|
|
54
|
+
:'scope' => :'scope',
|
|
51
55
|
:'outputted' => :'outputted'
|
|
52
56
|
}
|
|
53
57
|
end
|
|
@@ -66,6 +70,7 @@ module TrinsicApi
|
|
|
66
70
|
def self.openapi_types
|
|
67
71
|
{
|
|
68
72
|
:'name' => :'String',
|
|
73
|
+
:'scope' => :'String',
|
|
69
74
|
:'outputted' => :'FieldAvailability'
|
|
70
75
|
}
|
|
71
76
|
end
|
|
@@ -98,6 +103,12 @@ module TrinsicApi
|
|
|
98
103
|
self.name = nil
|
|
99
104
|
end
|
|
100
105
|
|
|
106
|
+
if attributes.key?(:'scope')
|
|
107
|
+
self.scope = attributes[:'scope']
|
|
108
|
+
else
|
|
109
|
+
self.scope = nil
|
|
110
|
+
end
|
|
111
|
+
|
|
101
112
|
if attributes.key?(:'outputted')
|
|
102
113
|
self.outputted = attributes[:'outputted']
|
|
103
114
|
else
|
|
@@ -114,6 +125,10 @@ module TrinsicApi
|
|
|
114
125
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
115
126
|
end
|
|
116
127
|
|
|
128
|
+
if @scope.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "scope", scope cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
117
132
|
if @outputted.nil?
|
|
118
133
|
invalid_properties.push('invalid value for "outputted", outputted cannot be nil.')
|
|
119
134
|
end
|
|
@@ -126,6 +141,7 @@ module TrinsicApi
|
|
|
126
141
|
def valid?
|
|
127
142
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
128
143
|
return false if @name.nil?
|
|
144
|
+
return false if @scope.nil?
|
|
129
145
|
return false if @outputted.nil?
|
|
130
146
|
true
|
|
131
147
|
end
|
|
@@ -140,6 +156,16 @@ module TrinsicApi
|
|
|
140
156
|
@name = name
|
|
141
157
|
end
|
|
142
158
|
|
|
159
|
+
# Custom attribute writer method with validation
|
|
160
|
+
# @param [Object] scope Value to be assigned
|
|
161
|
+
def scope=(scope)
|
|
162
|
+
if scope.nil?
|
|
163
|
+
fail ArgumentError, 'scope cannot be nil'
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
@scope = scope
|
|
167
|
+
end
|
|
168
|
+
|
|
143
169
|
# Custom attribute writer method with validation
|
|
144
170
|
# @param [Object] outputted Value to be assigned
|
|
145
171
|
def outputted=(outputted)
|
|
@@ -156,6 +182,7 @@ module TrinsicApi
|
|
|
156
182
|
return true if self.equal?(o)
|
|
157
183
|
self.class == o.class &&
|
|
158
184
|
name == o.name &&
|
|
185
|
+
scope == o.scope &&
|
|
159
186
|
outputted == o.outputted
|
|
160
187
|
end
|
|
161
188
|
|
|
@@ -168,7 +195,7 @@ module TrinsicApi
|
|
|
168
195
|
# Calculates hash code according to all attributes.
|
|
169
196
|
# @return [Integer] Hash code
|
|
170
197
|
def hash
|
|
171
|
-
[name, outputted].hash
|
|
198
|
+
[name, scope, outputted].hash
|
|
172
199
|
end
|
|
173
200
|
|
|
174
201
|
# Builds the object from hash
|