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,333 @@
|
|
|
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 `finnish-trust-network` Provider which do not directly map to the normalized IdentityData model.
|
|
18
|
+
class FinnishTrustNetworkProviderOutput
|
|
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 11-digit Finnish Personal Identification Code (Henkilötunnus) of the verified individual. This is in the format DDMMYYCZZZQ, where: - DDMMYY is the date of birth - C is a symbol which determines the century of birth - ZZZ is an individual number, indicating gender - Q is a checksum character If ZZZ is even, the individual is female. If ZZZ is odd, the individual is male. If C is '+', the individual was born in the 19th century (1800-1899). If C is '-', 'U', 'V', 'W', 'X', or 'Y', the individual was born in the 20th century (1900-1999). If C is 'A', 'B', 'C', 'D', 'E', or 'F', the individual was born in the 21st century (2000-2099).
|
|
26
|
+
attr_accessor :personal_identification_code
|
|
27
|
+
|
|
28
|
+
# The 9-digit Finnish Unique Identification Number (FINUID, or sähköinen asiointitunnus SATU) of the verified individual. This number is typically used for online transactions and unlike the Finnish Personal Identification Code, does not reveal personal information such as birthdate. The first 8 digits are randomly generated and the last character is a check control.
|
|
29
|
+
attr_accessor :unique_identification_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 bank used to perform the identification for the verified individual.
|
|
41
|
+
attr_accessor :bank
|
|
42
|
+
|
|
43
|
+
# The phone number of the verified individual. This is only returned if the user authenticated with MobileID (Mobiilivarmenne).
|
|
44
|
+
attr_accessor :phone_number
|
|
45
|
+
|
|
46
|
+
# The organization name that the individual is associated with. This is returned for requests that contain the organization scope.
|
|
47
|
+
attr_accessor :organization_name
|
|
48
|
+
|
|
49
|
+
# The VAT number of the organization that the individual is associated with. This is returned for requests that contain the organization scope.
|
|
50
|
+
attr_accessor :vat_number
|
|
51
|
+
|
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
|
+
def self.attribute_map
|
|
54
|
+
{
|
|
55
|
+
:'full_name' => :'fullName',
|
|
56
|
+
:'date_of_birth' => :'dateOfBirth',
|
|
57
|
+
:'personal_identification_code' => :'personalIdentificationCode',
|
|
58
|
+
:'unique_identification_number' => :'uniqueIdentificationNumber',
|
|
59
|
+
:'given_name' => :'givenName',
|
|
60
|
+
:'family_name' => :'familyName',
|
|
61
|
+
:'level_of_assurance' => :'levelOfAssurance',
|
|
62
|
+
:'bank' => :'bank',
|
|
63
|
+
:'phone_number' => :'phoneNumber',
|
|
64
|
+
:'organization_name' => :'organizationName',
|
|
65
|
+
:'vat_number' => :'vatNumber'
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Returns attribute mapping this model knows about
|
|
70
|
+
def self.acceptable_attribute_map
|
|
71
|
+
attribute_map
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Returns all the JSON keys this model knows about
|
|
75
|
+
def self.acceptable_attributes
|
|
76
|
+
acceptable_attribute_map.values
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Attribute type mapping.
|
|
80
|
+
def self.openapi_types
|
|
81
|
+
{
|
|
82
|
+
:'full_name' => :'String',
|
|
83
|
+
:'date_of_birth' => :'Date',
|
|
84
|
+
:'personal_identification_code' => :'String',
|
|
85
|
+
:'unique_identification_number' => :'String',
|
|
86
|
+
:'given_name' => :'String',
|
|
87
|
+
:'family_name' => :'String',
|
|
88
|
+
:'level_of_assurance' => :'String',
|
|
89
|
+
:'bank' => :'String',
|
|
90
|
+
:'phone_number' => :'String',
|
|
91
|
+
:'organization_name' => :'String',
|
|
92
|
+
:'vat_number' => :'String'
|
|
93
|
+
}
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# List of attributes with nullable: true
|
|
97
|
+
def self.openapi_nullable
|
|
98
|
+
Set.new([
|
|
99
|
+
:'full_name',
|
|
100
|
+
:'date_of_birth',
|
|
101
|
+
:'personal_identification_code',
|
|
102
|
+
:'unique_identification_number',
|
|
103
|
+
:'given_name',
|
|
104
|
+
:'family_name',
|
|
105
|
+
:'level_of_assurance',
|
|
106
|
+
:'bank',
|
|
107
|
+
:'phone_number',
|
|
108
|
+
:'organization_name',
|
|
109
|
+
:'vat_number'
|
|
110
|
+
])
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Initializes the object
|
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
115
|
+
def initialize(attributes = {})
|
|
116
|
+
if (!attributes.is_a?(Hash))
|
|
117
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::FinnishTrustNetworkProviderOutput` initialize method"
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
121
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
122
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
123
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
124
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::FinnishTrustNetworkProviderOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
125
|
+
end
|
|
126
|
+
h[k.to_sym] = v
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'full_name')
|
|
130
|
+
self.full_name = attributes[:'full_name']
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'date_of_birth')
|
|
134
|
+
self.date_of_birth = attributes[:'date_of_birth']
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'personal_identification_code')
|
|
138
|
+
self.personal_identification_code = attributes[:'personal_identification_code']
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'unique_identification_number')
|
|
142
|
+
self.unique_identification_number = attributes[:'unique_identification_number']
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'given_name')
|
|
146
|
+
self.given_name = attributes[:'given_name']
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'family_name')
|
|
150
|
+
self.family_name = attributes[:'family_name']
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'level_of_assurance')
|
|
154
|
+
self.level_of_assurance = attributes[:'level_of_assurance']
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'bank')
|
|
158
|
+
self.bank = attributes[:'bank']
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.key?(:'phone_number')
|
|
162
|
+
self.phone_number = attributes[:'phone_number']
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'organization_name')
|
|
166
|
+
self.organization_name = attributes[:'organization_name']
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'vat_number')
|
|
170
|
+
self.vat_number = attributes[:'vat_number']
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
175
|
+
# @return Array for valid properties with the reasons
|
|
176
|
+
def list_invalid_properties
|
|
177
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
178
|
+
invalid_properties = Array.new
|
|
179
|
+
invalid_properties
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Check to see if the all the properties in the model are valid
|
|
183
|
+
# @return true if the model is valid
|
|
184
|
+
def valid?
|
|
185
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
186
|
+
true
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Checks equality by comparing each attribute.
|
|
190
|
+
# @param [Object] Object to be compared
|
|
191
|
+
def ==(o)
|
|
192
|
+
return true if self.equal?(o)
|
|
193
|
+
self.class == o.class &&
|
|
194
|
+
full_name == o.full_name &&
|
|
195
|
+
date_of_birth == o.date_of_birth &&
|
|
196
|
+
personal_identification_code == o.personal_identification_code &&
|
|
197
|
+
unique_identification_number == o.unique_identification_number &&
|
|
198
|
+
given_name == o.given_name &&
|
|
199
|
+
family_name == o.family_name &&
|
|
200
|
+
level_of_assurance == o.level_of_assurance &&
|
|
201
|
+
bank == o.bank &&
|
|
202
|
+
phone_number == o.phone_number &&
|
|
203
|
+
organization_name == o.organization_name &&
|
|
204
|
+
vat_number == o.vat_number
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# @see the `==` method
|
|
208
|
+
# @param [Object] Object to be compared
|
|
209
|
+
def eql?(o)
|
|
210
|
+
self == o
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Calculates hash code according to all attributes.
|
|
214
|
+
# @return [Integer] Hash code
|
|
215
|
+
def hash
|
|
216
|
+
[full_name, date_of_birth, personal_identification_code, unique_identification_number, given_name, family_name, level_of_assurance, bank, phone_number, organization_name, vat_number].hash
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Builds the object from hash
|
|
220
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
221
|
+
# @return [Object] Returns the model itself
|
|
222
|
+
def self.build_from_hash(attributes)
|
|
223
|
+
return nil unless attributes.is_a?(Hash)
|
|
224
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
225
|
+
transformed_hash = {}
|
|
226
|
+
openapi_types.each_pair do |key, type|
|
|
227
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
228
|
+
transformed_hash["#{key}"] = nil
|
|
229
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
230
|
+
# check to ensure the input is an array given that the attribute
|
|
231
|
+
# is documented as an array but the input is not
|
|
232
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
233
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
234
|
+
end
|
|
235
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
236
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
new(transformed_hash)
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Deserializes the data based on type
|
|
243
|
+
# @param string type Data type
|
|
244
|
+
# @param string value Value to be deserialized
|
|
245
|
+
# @return [Object] Deserialized data
|
|
246
|
+
def self._deserialize(type, value)
|
|
247
|
+
case type.to_sym
|
|
248
|
+
when :Time
|
|
249
|
+
Time.parse(value)
|
|
250
|
+
when :Date
|
|
251
|
+
Date.parse(value)
|
|
252
|
+
when :String
|
|
253
|
+
value.to_s
|
|
254
|
+
when :Integer
|
|
255
|
+
value.to_i
|
|
256
|
+
when :Float
|
|
257
|
+
value.to_f
|
|
258
|
+
when :Boolean
|
|
259
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
260
|
+
true
|
|
261
|
+
else
|
|
262
|
+
false
|
|
263
|
+
end
|
|
264
|
+
when :Object
|
|
265
|
+
# generic object (usually a Hash), return directly
|
|
266
|
+
value
|
|
267
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
268
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
269
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
270
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
271
|
+
k_type = Regexp.last_match[:k_type]
|
|
272
|
+
v_type = Regexp.last_match[:v_type]
|
|
273
|
+
{}.tap do |hash|
|
|
274
|
+
value.each do |k, v|
|
|
275
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
276
|
+
end
|
|
277
|
+
end
|
|
278
|
+
else # model
|
|
279
|
+
# models (e.g. Pet) or oneOf
|
|
280
|
+
klass = TrinsicApi.const_get(type)
|
|
281
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
282
|
+
end
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Returns the string representation of the object
|
|
286
|
+
# @return [String] String presentation of the object
|
|
287
|
+
def to_s
|
|
288
|
+
to_hash.to_s
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
292
|
+
# @return [Hash] Returns the object in the form of hash
|
|
293
|
+
def to_body
|
|
294
|
+
to_hash
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# Returns the object in the form of hash
|
|
298
|
+
# @return [Hash] Returns the object in the form of hash
|
|
299
|
+
def to_hash
|
|
300
|
+
hash = {}
|
|
301
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
302
|
+
value = self.send(attr)
|
|
303
|
+
if value.nil?
|
|
304
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
305
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
hash[param] = _to_hash(value)
|
|
309
|
+
end
|
|
310
|
+
hash
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# Outputs non-array value in the form of hash
|
|
314
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
315
|
+
# @param [Object] value Any valid value
|
|
316
|
+
# @return [Hash] Returns the value in the form of hash
|
|
317
|
+
def _to_hash(value)
|
|
318
|
+
if value.is_a?(Array)
|
|
319
|
+
value.compact.map { |v| _to_hash(v) }
|
|
320
|
+
elsif value.is_a?(Hash)
|
|
321
|
+
{}.tap do |hash|
|
|
322
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
323
|
+
end
|
|
324
|
+
elsif value.respond_to? :to_hash
|
|
325
|
+
value.to_hash
|
|
326
|
+
else
|
|
327
|
+
value
|
|
328
|
+
end
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
end
|
|
@@ -0,0 +1,222 @@
|
|
|
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 FranceIdentiteInput
|
|
18
|
+
# The raw 18013-7 exchange request to use for this verification. If set, this overrides any default configuration on your Verification Profile.
|
|
19
|
+
attr_accessor :preview_raw18013_request
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'preview_raw18013_request' => :'preview_raw18013Request'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'preview_raw18013_request' => :'Raw18013RequestInput'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
:'preview_raw18013_request'
|
|
49
|
+
])
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Initializes the object
|
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
54
|
+
def initialize(attributes = {})
|
|
55
|
+
if (!attributes.is_a?(Hash))
|
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::FranceIdentiteInput` initialize method"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
60
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::FranceIdentiteInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
64
|
+
end
|
|
65
|
+
h[k.to_sym] = v
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'preview_raw18013_request')
|
|
69
|
+
self.preview_raw18013_request = attributes[:'preview_raw18013_request']
|
|
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
|
+
invalid_properties
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Check to see if the all the properties in the model are valid
|
|
82
|
+
# @return true if the model is valid
|
|
83
|
+
def valid?
|
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
85
|
+
true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def ==(o)
|
|
91
|
+
return true if self.equal?(o)
|
|
92
|
+
self.class == o.class &&
|
|
93
|
+
preview_raw18013_request == o.preview_raw18013_request
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# @see the `==` method
|
|
97
|
+
# @param [Object] Object to be compared
|
|
98
|
+
def eql?(o)
|
|
99
|
+
self == o
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Calculates hash code according to all attributes.
|
|
103
|
+
# @return [Integer] Hash code
|
|
104
|
+
def hash
|
|
105
|
+
[preview_raw18013_request].hash
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Builds the object from hash
|
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
|
+
# @return [Object] Returns the model itself
|
|
111
|
+
def self.build_from_hash(attributes)
|
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
|
113
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
114
|
+
transformed_hash = {}
|
|
115
|
+
openapi_types.each_pair do |key, type|
|
|
116
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
117
|
+
transformed_hash["#{key}"] = nil
|
|
118
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
119
|
+
# check to ensure the input is an array given that the attribute
|
|
120
|
+
# is documented as an array but the input is not
|
|
121
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
122
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
123
|
+
end
|
|
124
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
125
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
new(transformed_hash)
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Deserializes the data based on type
|
|
132
|
+
# @param string type Data type
|
|
133
|
+
# @param string value Value to be deserialized
|
|
134
|
+
# @return [Object] Deserialized data
|
|
135
|
+
def self._deserialize(type, value)
|
|
136
|
+
case type.to_sym
|
|
137
|
+
when :Time
|
|
138
|
+
Time.parse(value)
|
|
139
|
+
when :Date
|
|
140
|
+
Date.parse(value)
|
|
141
|
+
when :String
|
|
142
|
+
value.to_s
|
|
143
|
+
when :Integer
|
|
144
|
+
value.to_i
|
|
145
|
+
when :Float
|
|
146
|
+
value.to_f
|
|
147
|
+
when :Boolean
|
|
148
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
149
|
+
true
|
|
150
|
+
else
|
|
151
|
+
false
|
|
152
|
+
end
|
|
153
|
+
when :Object
|
|
154
|
+
# generic object (usually a Hash), return directly
|
|
155
|
+
value
|
|
156
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
157
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
158
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
159
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
160
|
+
k_type = Regexp.last_match[:k_type]
|
|
161
|
+
v_type = Regexp.last_match[:v_type]
|
|
162
|
+
{}.tap do |hash|
|
|
163
|
+
value.each do |k, v|
|
|
164
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
else # model
|
|
168
|
+
# models (e.g. Pet) or oneOf
|
|
169
|
+
klass = TrinsicApi.const_get(type)
|
|
170
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the string representation of the object
|
|
175
|
+
# @return [String] String presentation of the object
|
|
176
|
+
def to_s
|
|
177
|
+
to_hash.to_s
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
181
|
+
# @return [Hash] Returns the object in the form of hash
|
|
182
|
+
def to_body
|
|
183
|
+
to_hash
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Returns the object in the form of hash
|
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
|
188
|
+
def to_hash
|
|
189
|
+
hash = {}
|
|
190
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
191
|
+
value = self.send(attr)
|
|
192
|
+
if value.nil?
|
|
193
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
194
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
hash[param] = _to_hash(value)
|
|
198
|
+
end
|
|
199
|
+
hash
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Outputs non-array value in the form of hash
|
|
203
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
204
|
+
# @param [Object] value Any valid value
|
|
205
|
+
# @return [Hash] Returns the value in the form of hash
|
|
206
|
+
def _to_hash(value)
|
|
207
|
+
if value.is_a?(Array)
|
|
208
|
+
value.compact.map { |v| _to_hash(v) }
|
|
209
|
+
elsif value.is_a?(Hash)
|
|
210
|
+
{}.tap do |hash|
|
|
211
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
212
|
+
end
|
|
213
|
+
elsif value.respond_to? :to_hash
|
|
214
|
+
value.to_hash
|
|
215
|
+
else
|
|
216
|
+
value
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
end
|