trinsic_api 3.0.1 → 3.0.2.pre.preview
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/AadhaarClaims.md +46 -0
- data/docs/AadhaarLanguage.md +20 -0
- data/docs/AadhaarLocalizedClaims.md +40 -0
- data/docs/AppleWalletInput.md +3 -1
- data/docs/ConnectIdAddress.md +26 -0
- data/docs/ConnectIdAgeVerification.md +20 -0
- data/docs/ConnectIdBeneficiaryAccount.md +24 -0
- data/docs/ConnectIdProviderOutput.md +38 -0
- data/docs/CzechMojeIdAddressOutput.md +28 -0
- data/docs/CzechMojeIdProviderOutput.md +62 -0
- data/docs/DigilockerAadhaarProviderOutput.md +30 -0
- data/docs/FaydaProviderOutput.md +7 -1
- data/docs/FinnishTrustNetworkProviderOutput.md +38 -0
- data/docs/FranceIdentiteInput.md +18 -0
- data/docs/FranceIdentiteProviderOutput.md +18 -0
- data/docs/FrejaIndirectProviderOutput.md +24 -0
- data/docs/FrejaProviderOutput.md +36 -8
- data/docs/GetProviderResponse.md +18 -0
- data/docs/GoogleWalletInput.md +3 -1
- data/docs/NigeriaNinLookup2ProviderOutput.md +40 -0
- data/docs/NorwegianBankIdProviderOutput.md +32 -0
- data/docs/OneIdProviderAddress.md +26 -0
- data/docs/OneIdProviderOutput.md +28 -0
- data/docs/OutputFrejaAddress.md +24 -0
- data/docs/OutputFrejaDocument.md +24 -0
- data/docs/PhilippinesDigitalNidProviderOutput.md +21 -1
- data/docs/PhilippinesPhysicalNidProviderOutput.md +17 -1
- data/docs/ProviderInput.md +6 -0
- data/docs/ProviderOutput.md +24 -2
- data/docs/ProvidersApi.md +70 -0
- data/docs/Raw18013DocumentRequest.md +20 -0
- data/docs/Raw18013RequestInput.md +18 -0
- data/docs/RecommendProvidersResponse.md +3 -1
- data/docs/SamsungWalletInput.md +18 -0
- data/docs/UkEvisaLookupInput.md +20 -0
- data/docs/UnitedKingdomEvisaProviderOutput.md +38 -0
- data/docs/VerificationProfileResponse.md +2 -0
- data/docs/VerificationProfilesApi.md +4 -0
- data/docs/YotiDeeplinkProviderOutput.md +40 -0
- data/lib/trinsic_api/api/providers_api.rb +63 -0
- data/lib/trinsic_api/api/verification_profiles_api.rb +6 -0
- data/lib/trinsic_api/models/aadhaar_claims.rb +376 -0
- data/lib/trinsic_api/models/aadhaar_language.rb +250 -0
- data/lib/trinsic_api/models/aadhaar_localized_claims.rb +343 -0
- data/lib/trinsic_api/models/apple_wallet_input.rb +16 -5
- data/lib/trinsic_api/models/connect_id_address.rb +266 -0
- data/lib/trinsic_api/models/connect_id_age_verification.rb +233 -0
- data/lib/trinsic_api/models/connect_id_beneficiary_account.rb +255 -0
- data/lib/trinsic_api/models/connect_id_provider_output.rb +333 -0
- data/lib/trinsic_api/models/czech_moje_id_address_output.rb +277 -0
- data/lib/trinsic_api/models/czech_moje_id_provider_output.rb +465 -0
- data/lib/trinsic_api/models/digilocker_aadhaar_provider_output.rb +305 -0
- data/lib/trinsic_api/models/fayda_provider_output.rb +38 -5
- data/lib/trinsic_api/models/finnish_trust_network_provider_output.rb +333 -0
- data/lib/trinsic_api/models/france_identite_input.rb +222 -0
- data/lib/trinsic_api/models/france_identite_provider_output.rb +239 -0
- data/lib/trinsic_api/models/freja_indirect_provider_output.rb +320 -0
- data/lib/trinsic_api/models/freja_provider_output.rb +185 -91
- data/lib/trinsic_api/models/get_provider_response.rb +238 -0
- data/lib/trinsic_api/models/google_wallet_input.rb +16 -5
- data/lib/trinsic_api/models/integration_step.rb +1 -1
- data/lib/trinsic_api/models/nigeria_nin_lookup2_provider_output.rb +392 -0
- data/lib/trinsic_api/models/norwegian_bank_id_provider_output.rb +300 -0
- data/lib/trinsic_api/models/one_id_provider_address.rb +266 -0
- data/lib/trinsic_api/models/one_id_provider_output.rb +278 -0
- data/lib/trinsic_api/models/output_freja_address.rb +255 -0
- data/lib/trinsic_api/models/output_freja_document.rb +255 -0
- data/lib/trinsic_api/models/philippines_digital_nid_provider_output.rb +114 -4
- data/lib/trinsic_api/models/philippines_physical_nid_provider_output.rb +92 -4
- data/lib/trinsic_api/models/provider_input.rb +34 -1
- data/lib/trinsic_api/models/provider_output.rb +127 -6
- data/lib/trinsic_api/models/raw18013_document_request.rb +276 -0
- data/lib/trinsic_api/models/raw18013_request_input.rb +259 -0
- data/lib/trinsic_api/models/recommend_providers_response.rb +33 -4
- data/lib/trinsic_api/models/samsung_wallet_input.rb +222 -0
- data/lib/trinsic_api/models/uk_evisa_lookup_input.rb +283 -0
- data/lib/trinsic_api/models/united_kingdom_evisa_provider_output.rb +333 -0
- data/lib/trinsic_api/models/verification_profile_response.rb +28 -1
- data/lib/trinsic_api/models/yoti_deeplink_provider_output.rb +344 -0
- data/lib/trinsic_api/version.rb +1 -1
- data/lib/trinsic_api.rb +27 -0
- data/spec/api/providers_api_spec.rb +12 -0
- data/spec/api/verification_profiles_api_spec.rb +2 -0
- data/spec/models/aadhaar_claims_spec.rb +120 -0
- data/spec/models/aadhaar_language_spec.rb +42 -0
- data/spec/models/aadhaar_localized_claims_spec.rb +102 -0
- data/spec/models/apple_wallet_input_spec.rb +6 -0
- data/spec/models/connect_id_address_spec.rb +60 -0
- data/spec/models/connect_id_age_verification_spec.rb +42 -0
- data/spec/models/connect_id_beneficiary_account_spec.rb +54 -0
- data/spec/models/connect_id_provider_output_spec.rb +96 -0
- data/spec/models/czech_moje_id_address_output_spec.rb +66 -0
- data/spec/models/czech_moje_id_provider_output_spec.rb +168 -0
- data/spec/models/digilocker_aadhaar_provider_output_spec.rb +72 -0
- data/spec/models/fayda_provider_output_spec.rb +18 -0
- data/spec/models/finnish_trust_network_provider_output_spec.rb +96 -0
- data/spec/models/france_identite_input_spec.rb +36 -0
- data/spec/models/france_identite_provider_output_spec.rb +36 -0
- data/spec/models/freja_indirect_provider_output_spec.rb +54 -0
- data/spec/models/freja_provider_output_spec.rb +88 -4
- data/spec/models/get_provider_response_spec.rb +36 -0
- data/spec/models/google_wallet_input_spec.rb +6 -0
- data/spec/models/nigeria_nin_lookup2_provider_output_spec.rb +102 -0
- data/spec/models/norwegian_bank_id_provider_output_spec.rb +78 -0
- data/spec/models/one_id_provider_address_spec.rb +60 -0
- data/spec/models/one_id_provider_output_spec.rb +66 -0
- data/spec/models/output_freja_address_spec.rb +54 -0
- data/spec/models/output_freja_document_spec.rb +54 -0
- data/spec/models/philippines_digital_nid_provider_output_spec.rb +60 -0
- data/spec/models/philippines_physical_nid_provider_output_spec.rb +48 -0
- data/spec/models/provider_input_spec.rb +18 -0
- data/spec/models/provider_output_spec.rb +66 -0
- data/spec/models/raw18013_document_request_spec.rb +42 -0
- data/spec/models/raw18013_request_input_spec.rb +36 -0
- data/spec/models/recommend_providers_response_spec.rb +6 -0
- data/spec/models/samsung_wallet_input_spec.rb +36 -0
- data/spec/models/uk_evisa_lookup_input_spec.rb +42 -0
- data/spec/models/united_kingdom_evisa_provider_output_spec.rb +96 -0
- data/spec/models/verification_profile_response_spec.rb +6 -0
- data/spec/models/yoti_deeplink_provider_output_spec.rb +102 -0
- metadata +230 -122
|
@@ -0,0 +1,392 @@
|
|
|
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
|
+
# Exposed properties for the `nigeria-nin-lookup-2` Provider which do not directly map to the normalized IdentityData model.
|
|
18
|
+
class NigeriaNinLookup2ProviderOutput
|
|
19
|
+
# The first name (given name) of the ID holder.
|
|
20
|
+
attr_accessor :first_name
|
|
21
|
+
|
|
22
|
+
# The middle name of the ID holder.
|
|
23
|
+
attr_accessor :middle_name
|
|
24
|
+
|
|
25
|
+
# The surname (family name) of the ID holder.
|
|
26
|
+
attr_accessor :surname
|
|
27
|
+
|
|
28
|
+
# The sex of the ID holder. Possible values: - Male - Female
|
|
29
|
+
attr_accessor :sex
|
|
30
|
+
|
|
31
|
+
# The date of birth of the ID holder.
|
|
32
|
+
attr_accessor :date_of_birth
|
|
33
|
+
|
|
34
|
+
# Country of birth as an ISO 3166-1 alpha-2 code.
|
|
35
|
+
attr_accessor :birth_country
|
|
36
|
+
|
|
37
|
+
# National Identification Number (NIN). This is a unique, permanent identifier assigned by the National Identity Management Commission upon enrollment. Format: 11 numeric digits (regex: /^[0-9]{11}$/). The digits are validated using the Verhoeff algorithm, meaning the last digit serves as a check digit.
|
|
38
|
+
attr_accessor :national_identity_number
|
|
39
|
+
|
|
40
|
+
# Phone number registered with the National Identity Management Commission.
|
|
41
|
+
attr_accessor :phone_number
|
|
42
|
+
|
|
43
|
+
# Email address registered with the National Identity Management Commission.
|
|
44
|
+
attr_accessor :email
|
|
45
|
+
|
|
46
|
+
# Full residential address as a single string, normalized to lowercase without delimiters.
|
|
47
|
+
attr_accessor :address
|
|
48
|
+
|
|
49
|
+
# Local Government Area of residence. Nigeria is divided into 774 Local Government Areas (LGAs), which are the third-tier administrative divisions below states and the Federal Capital Territory. LGAs are roughly equivalent to counties or municipalities in other countries.
|
|
50
|
+
attr_accessor :local_government_area
|
|
51
|
+
|
|
52
|
+
# State of residence.
|
|
53
|
+
attr_accessor :state
|
|
54
|
+
|
|
55
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
56
|
+
def self.attribute_map
|
|
57
|
+
{
|
|
58
|
+
:'first_name' => :'firstName',
|
|
59
|
+
:'middle_name' => :'middleName',
|
|
60
|
+
:'surname' => :'surname',
|
|
61
|
+
:'sex' => :'sex',
|
|
62
|
+
:'date_of_birth' => :'dateOfBirth',
|
|
63
|
+
:'birth_country' => :'birthCountry',
|
|
64
|
+
:'national_identity_number' => :'nationalIdentityNumber',
|
|
65
|
+
:'phone_number' => :'phoneNumber',
|
|
66
|
+
:'email' => :'email',
|
|
67
|
+
:'address' => :'address',
|
|
68
|
+
:'local_government_area' => :'localGovernmentArea',
|
|
69
|
+
:'state' => :'state'
|
|
70
|
+
}
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Returns attribute mapping this model knows about
|
|
74
|
+
def self.acceptable_attribute_map
|
|
75
|
+
attribute_map
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Returns all the JSON keys this model knows about
|
|
79
|
+
def self.acceptable_attributes
|
|
80
|
+
acceptable_attribute_map.values
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Attribute type mapping.
|
|
84
|
+
def self.openapi_types
|
|
85
|
+
{
|
|
86
|
+
:'first_name' => :'String',
|
|
87
|
+
:'middle_name' => :'String',
|
|
88
|
+
:'surname' => :'String',
|
|
89
|
+
:'sex' => :'String',
|
|
90
|
+
:'date_of_birth' => :'Date',
|
|
91
|
+
:'birth_country' => :'String',
|
|
92
|
+
:'national_identity_number' => :'String',
|
|
93
|
+
:'phone_number' => :'String',
|
|
94
|
+
:'email' => :'String',
|
|
95
|
+
:'address' => :'String',
|
|
96
|
+
:'local_government_area' => :'String',
|
|
97
|
+
:'state' => :'String'
|
|
98
|
+
}
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# List of attributes with nullable: true
|
|
102
|
+
def self.openapi_nullable
|
|
103
|
+
Set.new([
|
|
104
|
+
:'middle_name',
|
|
105
|
+
:'sex',
|
|
106
|
+
:'date_of_birth',
|
|
107
|
+
:'birth_country',
|
|
108
|
+
:'phone_number',
|
|
109
|
+
:'email',
|
|
110
|
+
:'address',
|
|
111
|
+
:'local_government_area',
|
|
112
|
+
:'state'
|
|
113
|
+
])
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Initializes the object
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
def initialize(attributes = {})
|
|
119
|
+
if (!attributes.is_a?(Hash))
|
|
120
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::NigeriaNinLookup2ProviderOutput` initialize method"
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
124
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
125
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
126
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
127
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::NigeriaNinLookup2ProviderOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
128
|
+
end
|
|
129
|
+
h[k.to_sym] = v
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'first_name')
|
|
133
|
+
self.first_name = attributes[:'first_name']
|
|
134
|
+
else
|
|
135
|
+
self.first_name = nil
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'middle_name')
|
|
139
|
+
self.middle_name = attributes[:'middle_name']
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'surname')
|
|
143
|
+
self.surname = attributes[:'surname']
|
|
144
|
+
else
|
|
145
|
+
self.surname = nil
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'sex')
|
|
149
|
+
self.sex = attributes[:'sex']
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'date_of_birth')
|
|
153
|
+
self.date_of_birth = attributes[:'date_of_birth']
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'birth_country')
|
|
157
|
+
self.birth_country = attributes[:'birth_country']
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'national_identity_number')
|
|
161
|
+
self.national_identity_number = attributes[:'national_identity_number']
|
|
162
|
+
else
|
|
163
|
+
self.national_identity_number = nil
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'phone_number')
|
|
167
|
+
self.phone_number = attributes[:'phone_number']
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'email')
|
|
171
|
+
self.email = attributes[:'email']
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'address')
|
|
175
|
+
self.address = attributes[:'address']
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'local_government_area')
|
|
179
|
+
self.local_government_area = attributes[:'local_government_area']
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if attributes.key?(:'state')
|
|
183
|
+
self.state = attributes[:'state']
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
188
|
+
# @return Array for valid properties with the reasons
|
|
189
|
+
def list_invalid_properties
|
|
190
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
191
|
+
invalid_properties = Array.new
|
|
192
|
+
if @first_name.nil?
|
|
193
|
+
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if @surname.nil?
|
|
197
|
+
invalid_properties.push('invalid value for "surname", surname cannot be nil.')
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if @national_identity_number.nil?
|
|
201
|
+
invalid_properties.push('invalid value for "national_identity_number", national_identity_number cannot be nil.')
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
invalid_properties
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Check to see if the all the properties in the model are valid
|
|
208
|
+
# @return true if the model is valid
|
|
209
|
+
def valid?
|
|
210
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
211
|
+
return false if @first_name.nil?
|
|
212
|
+
return false if @surname.nil?
|
|
213
|
+
return false if @national_identity_number.nil?
|
|
214
|
+
true
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Custom attribute writer method with validation
|
|
218
|
+
# @param [Object] first_name Value to be assigned
|
|
219
|
+
def first_name=(first_name)
|
|
220
|
+
if first_name.nil?
|
|
221
|
+
fail ArgumentError, 'first_name cannot be nil'
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
@first_name = first_name
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Custom attribute writer method with validation
|
|
228
|
+
# @param [Object] surname Value to be assigned
|
|
229
|
+
def surname=(surname)
|
|
230
|
+
if surname.nil?
|
|
231
|
+
fail ArgumentError, 'surname cannot be nil'
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
@surname = surname
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Custom attribute writer method with validation
|
|
238
|
+
# @param [Object] national_identity_number Value to be assigned
|
|
239
|
+
def national_identity_number=(national_identity_number)
|
|
240
|
+
if national_identity_number.nil?
|
|
241
|
+
fail ArgumentError, 'national_identity_number cannot be nil'
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
@national_identity_number = national_identity_number
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Checks equality by comparing each attribute.
|
|
248
|
+
# @param [Object] Object to be compared
|
|
249
|
+
def ==(o)
|
|
250
|
+
return true if self.equal?(o)
|
|
251
|
+
self.class == o.class &&
|
|
252
|
+
first_name == o.first_name &&
|
|
253
|
+
middle_name == o.middle_name &&
|
|
254
|
+
surname == o.surname &&
|
|
255
|
+
sex == o.sex &&
|
|
256
|
+
date_of_birth == o.date_of_birth &&
|
|
257
|
+
birth_country == o.birth_country &&
|
|
258
|
+
national_identity_number == o.national_identity_number &&
|
|
259
|
+
phone_number == o.phone_number &&
|
|
260
|
+
email == o.email &&
|
|
261
|
+
address == o.address &&
|
|
262
|
+
local_government_area == o.local_government_area &&
|
|
263
|
+
state == o.state
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# @see the `==` method
|
|
267
|
+
# @param [Object] Object to be compared
|
|
268
|
+
def eql?(o)
|
|
269
|
+
self == o
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Calculates hash code according to all attributes.
|
|
273
|
+
# @return [Integer] Hash code
|
|
274
|
+
def hash
|
|
275
|
+
[first_name, middle_name, surname, sex, date_of_birth, birth_country, national_identity_number, phone_number, email, address, local_government_area, state].hash
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Builds the object from hash
|
|
279
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
280
|
+
# @return [Object] Returns the model itself
|
|
281
|
+
def self.build_from_hash(attributes)
|
|
282
|
+
return nil unless attributes.is_a?(Hash)
|
|
283
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
284
|
+
transformed_hash = {}
|
|
285
|
+
openapi_types.each_pair do |key, type|
|
|
286
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
287
|
+
transformed_hash["#{key}"] = nil
|
|
288
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
289
|
+
# check to ensure the input is an array given that the attribute
|
|
290
|
+
# is documented as an array but the input is not
|
|
291
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
292
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
293
|
+
end
|
|
294
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
295
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
296
|
+
end
|
|
297
|
+
end
|
|
298
|
+
new(transformed_hash)
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Deserializes the data based on type
|
|
302
|
+
# @param string type Data type
|
|
303
|
+
# @param string value Value to be deserialized
|
|
304
|
+
# @return [Object] Deserialized data
|
|
305
|
+
def self._deserialize(type, value)
|
|
306
|
+
case type.to_sym
|
|
307
|
+
when :Time
|
|
308
|
+
Time.parse(value)
|
|
309
|
+
when :Date
|
|
310
|
+
Date.parse(value)
|
|
311
|
+
when :String
|
|
312
|
+
value.to_s
|
|
313
|
+
when :Integer
|
|
314
|
+
value.to_i
|
|
315
|
+
when :Float
|
|
316
|
+
value.to_f
|
|
317
|
+
when :Boolean
|
|
318
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
319
|
+
true
|
|
320
|
+
else
|
|
321
|
+
false
|
|
322
|
+
end
|
|
323
|
+
when :Object
|
|
324
|
+
# generic object (usually a Hash), return directly
|
|
325
|
+
value
|
|
326
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
327
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
328
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
329
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
330
|
+
k_type = Regexp.last_match[:k_type]
|
|
331
|
+
v_type = Regexp.last_match[:v_type]
|
|
332
|
+
{}.tap do |hash|
|
|
333
|
+
value.each do |k, v|
|
|
334
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
335
|
+
end
|
|
336
|
+
end
|
|
337
|
+
else # model
|
|
338
|
+
# models (e.g. Pet) or oneOf
|
|
339
|
+
klass = TrinsicApi.const_get(type)
|
|
340
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
341
|
+
end
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# Returns the string representation of the object
|
|
345
|
+
# @return [String] String presentation of the object
|
|
346
|
+
def to_s
|
|
347
|
+
to_hash.to_s
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
351
|
+
# @return [Hash] Returns the object in the form of hash
|
|
352
|
+
def to_body
|
|
353
|
+
to_hash
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# Returns the object in the form of hash
|
|
357
|
+
# @return [Hash] Returns the object in the form of hash
|
|
358
|
+
def to_hash
|
|
359
|
+
hash = {}
|
|
360
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
361
|
+
value = self.send(attr)
|
|
362
|
+
if value.nil?
|
|
363
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
364
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
hash[param] = _to_hash(value)
|
|
368
|
+
end
|
|
369
|
+
hash
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
# Outputs non-array value in the form of hash
|
|
373
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
374
|
+
# @param [Object] value Any valid value
|
|
375
|
+
# @return [Hash] Returns the value in the form of hash
|
|
376
|
+
def _to_hash(value)
|
|
377
|
+
if value.is_a?(Array)
|
|
378
|
+
value.compact.map { |v| _to_hash(v) }
|
|
379
|
+
elsif value.is_a?(Hash)
|
|
380
|
+
{}.tap do |hash|
|
|
381
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
382
|
+
end
|
|
383
|
+
elsif value.respond_to? :to_hash
|
|
384
|
+
value.to_hash
|
|
385
|
+
else
|
|
386
|
+
value
|
|
387
|
+
end
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
end
|
|
@@ -0,0 +1,300 @@
|
|
|
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
|
+
# Exposed properties for the `norway-bankid` Provider which do not directly map to the normalized IdentityData model.
|
|
18
|
+
class NorwegianBankIdProviderOutput
|
|
19
|
+
# The full name of the individual.
|
|
20
|
+
attr_accessor :full_name
|
|
21
|
+
|
|
22
|
+
# The date of birth of the individual.
|
|
23
|
+
attr_accessor :date_of_birth
|
|
24
|
+
|
|
25
|
+
# The personal identifier for Norwegian BankID. This uniquely identifies the user in the Norwegian BankID system and is considered a stable identifier to use.
|
|
26
|
+
attr_accessor :personal_identifier
|
|
27
|
+
|
|
28
|
+
# The 11-digit Norwegian National Identity Number (fødselsnummer) of the verified individual. This is in the format DDMMYYZZZCC, where: - DDMMYY is the date of birth (In some cases, this is not the date of birth due to no available identity numbers for some dates - ZZZ is an individual number, indicating gender - CC is a checksum character If ZZZ is even, the individual is female. If ZZZ is odd, the individual is male.
|
|
29
|
+
attr_accessor :national_identity_number
|
|
30
|
+
|
|
31
|
+
# The given name of the individual.
|
|
32
|
+
attr_accessor :given_name
|
|
33
|
+
|
|
34
|
+
# The family name of the individual.
|
|
35
|
+
attr_accessor :family_name
|
|
36
|
+
|
|
37
|
+
# The level of assurance (LOA) for the verification. The LOA refers to the degree of confidence in the claimed identity of a person. The European Digital Identity Framework (EUDI) measures the confidence of the digital identity's verification and authentication strength by a set of requirements for different levels. To learn more, see: https://ec.europa.eu/digital-building-blocks/sites/spaces/DIGITAL/pages/467110081/eIDAS+Levels+of+Assurance Possible values: - Low: The user has self asserted their identity and multifactor authentication is not required. - Substantial: The user has performed either a remote or in-person identity verification and multifactor authentication is required. - High: The user has performed an in-person identity proofing with an authorized representative and has strong cryptographic authentication requirements such as using a smart card.
|
|
38
|
+
attr_accessor :level_of_assurance
|
|
39
|
+
|
|
40
|
+
# The authentication method used by the individual. Possible values: - urn:bankid:bis - BankID with Biometrics - urn:bankid:bid - Standard BankID with High Assurance
|
|
41
|
+
attr_accessor :authentication_method
|
|
42
|
+
|
|
43
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
44
|
+
def self.attribute_map
|
|
45
|
+
{
|
|
46
|
+
:'full_name' => :'fullName',
|
|
47
|
+
:'date_of_birth' => :'dateOfBirth',
|
|
48
|
+
:'personal_identifier' => :'personalIdentifier',
|
|
49
|
+
:'national_identity_number' => :'nationalIdentityNumber',
|
|
50
|
+
:'given_name' => :'givenName',
|
|
51
|
+
:'family_name' => :'familyName',
|
|
52
|
+
:'level_of_assurance' => :'levelOfAssurance',
|
|
53
|
+
:'authentication_method' => :'authenticationMethod'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns attribute mapping this model knows about
|
|
58
|
+
def self.acceptable_attribute_map
|
|
59
|
+
attribute_map
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Returns all the JSON keys this model knows about
|
|
63
|
+
def self.acceptable_attributes
|
|
64
|
+
acceptable_attribute_map.values
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Attribute type mapping.
|
|
68
|
+
def self.openapi_types
|
|
69
|
+
{
|
|
70
|
+
:'full_name' => :'String',
|
|
71
|
+
:'date_of_birth' => :'Date',
|
|
72
|
+
:'personal_identifier' => :'String',
|
|
73
|
+
:'national_identity_number' => :'String',
|
|
74
|
+
:'given_name' => :'String',
|
|
75
|
+
:'family_name' => :'String',
|
|
76
|
+
:'level_of_assurance' => :'String',
|
|
77
|
+
:'authentication_method' => :'String'
|
|
78
|
+
}
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# List of attributes with nullable: true
|
|
82
|
+
def self.openapi_nullable
|
|
83
|
+
Set.new([
|
|
84
|
+
:'full_name',
|
|
85
|
+
:'date_of_birth',
|
|
86
|
+
:'personal_identifier',
|
|
87
|
+
:'national_identity_number',
|
|
88
|
+
:'given_name',
|
|
89
|
+
:'family_name',
|
|
90
|
+
:'level_of_assurance',
|
|
91
|
+
:'authentication_method'
|
|
92
|
+
])
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Initializes the object
|
|
96
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
97
|
+
def initialize(attributes = {})
|
|
98
|
+
if (!attributes.is_a?(Hash))
|
|
99
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::NorwegianBankIdProviderOutput` initialize method"
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
103
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
104
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
105
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
106
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::NorwegianBankIdProviderOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
107
|
+
end
|
|
108
|
+
h[k.to_sym] = v
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'full_name')
|
|
112
|
+
self.full_name = attributes[:'full_name']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'date_of_birth')
|
|
116
|
+
self.date_of_birth = attributes[:'date_of_birth']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'personal_identifier')
|
|
120
|
+
self.personal_identifier = attributes[:'personal_identifier']
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'national_identity_number')
|
|
124
|
+
self.national_identity_number = attributes[:'national_identity_number']
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'given_name')
|
|
128
|
+
self.given_name = attributes[:'given_name']
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'family_name')
|
|
132
|
+
self.family_name = attributes[:'family_name']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'level_of_assurance')
|
|
136
|
+
self.level_of_assurance = attributes[:'level_of_assurance']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'authentication_method')
|
|
140
|
+
self.authentication_method = attributes[:'authentication_method']
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
145
|
+
# @return Array for valid properties with the reasons
|
|
146
|
+
def list_invalid_properties
|
|
147
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
148
|
+
invalid_properties = Array.new
|
|
149
|
+
invalid_properties
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Check to see if the all the properties in the model are valid
|
|
153
|
+
# @return true if the model is valid
|
|
154
|
+
def valid?
|
|
155
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
156
|
+
true
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Checks equality by comparing each attribute.
|
|
160
|
+
# @param [Object] Object to be compared
|
|
161
|
+
def ==(o)
|
|
162
|
+
return true if self.equal?(o)
|
|
163
|
+
self.class == o.class &&
|
|
164
|
+
full_name == o.full_name &&
|
|
165
|
+
date_of_birth == o.date_of_birth &&
|
|
166
|
+
personal_identifier == o.personal_identifier &&
|
|
167
|
+
national_identity_number == o.national_identity_number &&
|
|
168
|
+
given_name == o.given_name &&
|
|
169
|
+
family_name == o.family_name &&
|
|
170
|
+
level_of_assurance == o.level_of_assurance &&
|
|
171
|
+
authentication_method == o.authentication_method
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# @see the `==` method
|
|
175
|
+
# @param [Object] Object to be compared
|
|
176
|
+
def eql?(o)
|
|
177
|
+
self == o
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Calculates hash code according to all attributes.
|
|
181
|
+
# @return [Integer] Hash code
|
|
182
|
+
def hash
|
|
183
|
+
[full_name, date_of_birth, personal_identifier, national_identity_number, given_name, family_name, level_of_assurance, authentication_method].hash
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Builds the object from hash
|
|
187
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
188
|
+
# @return [Object] Returns the model itself
|
|
189
|
+
def self.build_from_hash(attributes)
|
|
190
|
+
return nil unless attributes.is_a?(Hash)
|
|
191
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
192
|
+
transformed_hash = {}
|
|
193
|
+
openapi_types.each_pair do |key, type|
|
|
194
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
195
|
+
transformed_hash["#{key}"] = nil
|
|
196
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
197
|
+
# check to ensure the input is an array given that the attribute
|
|
198
|
+
# is documented as an array but the input is not
|
|
199
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
200
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
201
|
+
end
|
|
202
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
203
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
new(transformed_hash)
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Deserializes the data based on type
|
|
210
|
+
# @param string type Data type
|
|
211
|
+
# @param string value Value to be deserialized
|
|
212
|
+
# @return [Object] Deserialized data
|
|
213
|
+
def self._deserialize(type, value)
|
|
214
|
+
case type.to_sym
|
|
215
|
+
when :Time
|
|
216
|
+
Time.parse(value)
|
|
217
|
+
when :Date
|
|
218
|
+
Date.parse(value)
|
|
219
|
+
when :String
|
|
220
|
+
value.to_s
|
|
221
|
+
when :Integer
|
|
222
|
+
value.to_i
|
|
223
|
+
when :Float
|
|
224
|
+
value.to_f
|
|
225
|
+
when :Boolean
|
|
226
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
227
|
+
true
|
|
228
|
+
else
|
|
229
|
+
false
|
|
230
|
+
end
|
|
231
|
+
when :Object
|
|
232
|
+
# generic object (usually a Hash), return directly
|
|
233
|
+
value
|
|
234
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
235
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
236
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
237
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
238
|
+
k_type = Regexp.last_match[:k_type]
|
|
239
|
+
v_type = Regexp.last_match[:v_type]
|
|
240
|
+
{}.tap do |hash|
|
|
241
|
+
value.each do |k, v|
|
|
242
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
else # model
|
|
246
|
+
# models (e.g. Pet) or oneOf
|
|
247
|
+
klass = TrinsicApi.const_get(type)
|
|
248
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Returns the string representation of the object
|
|
253
|
+
# @return [String] String presentation of the object
|
|
254
|
+
def to_s
|
|
255
|
+
to_hash.to_s
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
259
|
+
# @return [Hash] Returns the object in the form of hash
|
|
260
|
+
def to_body
|
|
261
|
+
to_hash
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Returns the object in the form of hash
|
|
265
|
+
# @return [Hash] Returns the object in the form of hash
|
|
266
|
+
def to_hash
|
|
267
|
+
hash = {}
|
|
268
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
269
|
+
value = self.send(attr)
|
|
270
|
+
if value.nil?
|
|
271
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
272
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
hash[param] = _to_hash(value)
|
|
276
|
+
end
|
|
277
|
+
hash
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Outputs non-array value in the form of hash
|
|
281
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
282
|
+
# @param [Object] value Any valid value
|
|
283
|
+
# @return [Hash] Returns the value in the form of hash
|
|
284
|
+
def _to_hash(value)
|
|
285
|
+
if value.is_a?(Array)
|
|
286
|
+
value.compact.map { |v| _to_hash(v) }
|
|
287
|
+
elsif value.is_a?(Hash)
|
|
288
|
+
{}.tap do |hash|
|
|
289
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
290
|
+
end
|
|
291
|
+
elsif value.respond_to? :to_hash
|
|
292
|
+
value.to_hash
|
|
293
|
+
else
|
|
294
|
+
value
|
|
295
|
+
end
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
end
|