trinsic_api 2.3.0.pre.alpha2 → 3.0.0
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/{EnvironmentRedirectUrisAddRequest.md → AddRedirectUriRequest.md} +2 -2
- data/docs/Address.md +2 -2
- data/docs/AppleWalletProviderOutput.md +18 -0
- data/docs/AttachmentInfo.md +24 -0
- data/docs/{MdlFieldDataType.md → AttributeAvailability.md} +2 -2
- data/docs/AustriaHandySignaturProviderOutput.md +20 -0
- data/docs/BelgiumIdCardProviderOutput.md +24 -0
- data/docs/ContractAttachment.md +20 -0
- data/docs/ContractAttribute.md +20 -0
- data/docs/CoteDIvoireNidLookup2Input.md +18 -0
- data/docs/CzechiaMojeIdProviderOutput.md +24 -0
- data/docs/DocumentData.md +12 -10
- data/docs/EstoniaIdCardProviderOutput.md +24 -0
- data/docs/FaydaProviderOutput.md +1 -1
- data/docs/FinlandIdCardProviderOutput.md +24 -0
- data/docs/FrejaProviderOutput.md +24 -0
- data/docs/FrenchNumeriqueGivenName.md +22 -0
- data/docs/FrenchNumeriqueNationality.md +20 -0
- data/docs/FrenchNumeriquePhone.md +22 -0
- data/docs/FrenchNumeriqueProviderOutput.md +66 -0
- data/docs/GetAttachmentRequest.md +2 -4
- data/docs/GoogleWalletProviderOutput.md +18 -0
- data/docs/IdentityData.md +9 -11
- data/docs/ItsmeProviderOutput.md +26 -0
- data/docs/KenyaNidMatch2Input.md +1 -1
- data/docs/{Language.md → KenyaNidMatch2InputSex.md} +2 -2
- data/docs/LaWalletProviderOutput.md +52 -0
- data/docs/LatviaEparakstsMobileProviderOutput.md +22 -0
- data/docs/LatviaEparakstsProviderOutput.md +22 -0
- data/docs/ListProvidersResponse.md +1 -1
- data/docs/{ListEnvironmentRedirectUrisResponse.md → ListRedirectUrisResponse.md} +2 -2
- data/docs/LithuaniaIdCardProviderOutput.md +24 -0
- data/docs/LloydsSmartIdProviderOutput.md +40 -0
- data/docs/Match.md +2 -2
- data/docs/MatchData.md +12 -10
- data/docs/MdlOutput.md +24 -0
- data/docs/MdlOutputCertificateData.md +26 -0
- data/docs/{ExternalMdlFieldData.md → MdlOutputFieldData.md} +3 -3
- data/docs/{FieldAvailability.md → MdlOutputFieldDataType.md} +2 -2
- data/docs/MexicoCurpProviderOutput.md +1 -1
- data/docs/MitIdProviderOutput.md +38 -0
- data/docs/MobileIdInput.md +1 -1
- data/docs/{SexV1.md → MobileIdLanguage.md} +2 -2
- data/docs/MobileIdProviderOutput.md +34 -0
- data/docs/NigeriaNinBiometric2Input.md +22 -0
- data/docs/NigeriaNinLookup2Input.md +18 -0
- data/docs/NigeriaNinMatch2Input.md +30 -0
- data/docs/NigeriaNinMatch2InputSex.md +15 -0
- data/docs/PersonData.md +10 -10
- data/docs/PeruDniAddress.md +22 -0
- data/docs/PeruDniLookupInput.md +18 -0
- data/docs/PeruDniProviderOutput.md +48 -0
- data/docs/PhilippinesDigitalNidProviderOutput.md +2 -2
- data/docs/PhilippinesPhysicalNidProviderOutput.md +2 -2
- data/docs/PolandEdoAppProviderOutput.md +24 -0
- data/docs/PolandMojeIdProviderOutput.md +22 -0
- data/docs/PortugalIdCardProviderOutput.md +24 -0
- data/docs/PostOfficeEasyIdProviderOutput.md +40 -0
- data/docs/{ProviderContract.md → Provider.md} +29 -25
- data/docs/ProviderInput.md +50 -32
- data/docs/ProviderOutput.md +61 -7
- data/docs/ProvidersApi.md +79 -0
- data/docs/RecommendProviderHealthOption.md +15 -0
- data/docs/{ProviderInformation.md → RecommendProviderInformation.md} +14 -14
- data/docs/{RecommendRequest.md → RecommendProvidersRequest.md} +3 -3
- data/docs/RecommendProvidersResponse.md +18 -0
- data/docs/{EnvironmentRedirectUrisApi.md → RedirectUrisApi.md} +21 -21
- data/docs/SamsungWalletProviderOutput.md +18 -0
- data/docs/SerbiaIdCardProviderOutput.md +24 -0
- data/docs/SessionsApi.md +149 -1
- data/docs/SmartIdInput.md +0 -2
- data/docs/SmartIdProviderOutput.md +42 -0
- data/docs/SouthAfricaNidBiometric2Input.md +22 -0
- data/docs/SouthAfricaNidMatch2Input.md +30 -0
- data/docs/SouthAfricaNidMatch2InputSex.md +15 -0
- data/docs/SpidProviderOutput.md +45 -25
- data/docs/SubProviderMetadata.md +0 -2
- data/docs/SwedenBankIdProviderOutput.md +42 -0
- data/docs/UgandaNidMatch2Input.md +22 -0
- data/docs/VerificationProfileResponse.md +3 -1
- data/docs/VerificationProfilesApi.md +3 -1
- data/docs/YotiDocumentDetails.md +26 -0
- data/docs/YotiProviderOutput.md +40 -0
- data/docs/YotiStructuredPostalAddress.md +56 -0
- data/docs/ZimbabweNidLookup2Input.md +18 -0
- data/lib/trinsic_api/api/providers_api.rb +82 -0
- data/lib/trinsic_api/api/{environment_redirect_uris_api.rb → redirect_uris_api.rb} +28 -28
- data/lib/trinsic_api/api/sessions_api.rb +142 -2
- data/lib/trinsic_api/api/verification_profiles_api.rb +3 -0
- data/lib/trinsic_api/models/{environment_redirect_uris_add_request.rb → add_redirect_uri_request.rb} +12 -3
- data/lib/trinsic_api/models/address.rb +3 -0
- data/lib/trinsic_api/models/apple_wallet_provider_output.rb +239 -0
- data/lib/trinsic_api/models/attachment_info.rb +319 -0
- data/lib/trinsic_api/models/{field_availability.rb → attribute_availability.rb} +3 -3
- data/lib/trinsic_api/models/austria_handy_signatur_provider_output.rb +266 -0
- data/lib/trinsic_api/models/{bangladesh_nid_input.rb → belgium_id_card_provider_output.rb} +60 -90
- data/lib/trinsic_api/models/{contract_identifier_field.rb → contract_attachment.rb} +25 -52
- data/lib/trinsic_api/models/{contract_field.rb → contract_attribute.rb} +8 -35
- data/lib/trinsic_api/models/cote_d_ivoire_nid_lookup2_input.rb +222 -0
- data/lib/trinsic_api/models/{finalize_mdl_exchange_response.rb → czechia_moje_id_provider_output.rb} +85 -52
- data/lib/trinsic_api/models/document_data.rb +18 -1
- data/lib/trinsic_api/models/estonia_id_card_provider_output.rb +320 -0
- data/lib/trinsic_api/models/fayda_provider_output.rb +1 -0
- data/lib/trinsic_api/models/finland_id_card_provider_output.rb +320 -0
- data/lib/trinsic_api/models/freja_provider_output.rb +320 -0
- data/lib/trinsic_api/models/french_numerique_given_name.rb +245 -0
- data/lib/trinsic_api/models/french_numerique_nationality.rb +234 -0
- data/lib/trinsic_api/models/french_numerique_phone.rb +245 -0
- data/lib/trinsic_api/models/french_numerique_provider_output.rb +487 -0
- data/lib/trinsic_api/models/get_attachment_request.rb +22 -49
- data/lib/trinsic_api/models/google_wallet_provider_output.rb +239 -0
- data/lib/trinsic_api/models/identity_data.rb +30 -33
- data/lib/trinsic_api/models/itsme_provider_output.rb +315 -0
- data/lib/trinsic_api/models/kenya_nid_match2_input.rb +1 -1
- data/lib/trinsic_api/models/{sex_v1.rb → kenya_nid_match2_input_sex.rb} +4 -6
- data/lib/trinsic_api/models/la_wallet_provider_output.rb +682 -0
- data/lib/trinsic_api/models/latvia_eparaksts_mobile_provider_output.rb +293 -0
- data/lib/trinsic_api/models/{create_mdl_exchange_response.rb → latvia_eparaksts_provider_output.rb} +53 -52
- data/lib/trinsic_api/models/list_providers_response.rb +2 -2
- data/lib/trinsic_api/models/{list_environment_redirect_uris_response.rb → list_redirect_uris_response.rb} +3 -3
- data/lib/trinsic_api/models/lithuania_id_card_provider_output.rb +320 -0
- data/lib/trinsic_api/models/lloyds_smart_id_provider_output.rb +344 -0
- data/lib/trinsic_api/models/match.rb +2 -0
- data/lib/trinsic_api/models/match_data.rb +23 -1
- data/lib/trinsic_api/models/{mdl_identity_data.rb → mdl_output.rb} +35 -8
- data/lib/trinsic_api/models/{mdl_certificate_data.rb → mdl_output_certificate_data.rb} +4 -4
- data/lib/trinsic_api/models/{external_mdl_field_data.rb → mdl_output_field_data.rb} +4 -4
- data/lib/trinsic_api/models/{mdl_field_data_type.rb → mdl_output_field_data_type.rb} +5 -4
- data/lib/trinsic_api/models/mexico_curp_provider_output.rb +1 -0
- data/lib/trinsic_api/models/mit_id_provider_output.rb +333 -0
- data/lib/trinsic_api/models/mobile_id_input.rb +1 -1
- data/lib/trinsic_api/models/{language.rb → mobile_id_language.rb} +3 -3
- data/lib/trinsic_api/models/mobile_id_provider_output.rb +311 -0
- data/lib/trinsic_api/models/nigeria_nin_biometric2_input.rb +246 -0
- data/lib/trinsic_api/models/{provider_attachments.rb → nigeria_nin_lookup2_input.rb} +12 -11
- data/lib/trinsic_api/models/{recommend_response.rb → nigeria_nin_match2_input.rb} +94 -82
- data/lib/trinsic_api/models/nigeria_nin_match2_input_sex.rb +40 -0
- data/lib/trinsic_api/models/person_data.rb +7 -0
- data/lib/trinsic_api/models/{identifier.rb → peru_dni_address.rb} +53 -49
- data/lib/trinsic_api/models/peru_dni_lookup_input.rb +222 -0
- data/lib/trinsic_api/models/peru_dni_provider_output.rb +518 -0
- data/lib/trinsic_api/models/philippines_digital_nid_provider_output.rb +2 -1
- data/lib/trinsic_api/models/philippines_physical_nid_provider_output.rb +2 -1
- data/lib/trinsic_api/models/poland_edo_app_provider_output.rb +320 -0
- data/lib/trinsic_api/models/poland_moje_id_provider_output.rb +293 -0
- data/lib/trinsic_api/models/{finalize_mdl_exchange_request.rb → portugal_id_card_provider_output.rb} +69 -68
- data/lib/trinsic_api/models/post_office_easy_id_provider_output.rb +344 -0
- data/lib/trinsic_api/models/{provider_contract.rb → provider.rb} +183 -125
- data/lib/trinsic_api/models/provider_input.rb +223 -124
- data/lib/trinsic_api/models/provider_output.rb +317 -15
- data/lib/trinsic_api/models/recommend_provider_health_option.rb +41 -0
- data/lib/trinsic_api/models/{provider_information.rb → recommend_provider_information.rb} +79 -73
- data/lib/trinsic_api/models/{recommend_request.rb → recommend_providers_request.rb} +27 -5
- data/lib/trinsic_api/models/{list_provider_contracts_response.rb → recommend_providers_response.rb} +20 -21
- data/lib/trinsic_api/models/redirect_uri_response.rb +9 -0
- data/lib/trinsic_api/models/samsung_wallet_provider_output.rb +239 -0
- data/lib/trinsic_api/models/serbia_id_card_provider_output.rb +320 -0
- data/lib/trinsic_api/models/smart_id_input.rb +1 -12
- data/lib/trinsic_api/models/smart_id_provider_output.rb +355 -0
- data/lib/trinsic_api/models/south_africa_nid_biometric2_input.rb +246 -0
- data/lib/trinsic_api/models/south_africa_nid_match2_input.rb +310 -0
- data/lib/trinsic_api/models/south_africa_nid_match2_input_sex.rb +40 -0
- data/lib/trinsic_api/models/spid_provider_output.rb +131 -20
- data/lib/trinsic_api/models/sub_provider_metadata.rb +1 -28
- data/lib/trinsic_api/models/{provider_info.rb → sweden_bank_id_provider_output.rb} +121 -153
- data/lib/trinsic_api/models/uganda_nid_match2_input.rb +244 -0
- data/lib/trinsic_api/models/verification_profile_response.rb +31 -4
- data/lib/trinsic_api/models/yoti_document_details.rb +266 -0
- data/lib/trinsic_api/models/yoti_provider_output.rb +344 -0
- data/lib/trinsic_api/models/yoti_structured_postal_address.rb +431 -0
- data/lib/trinsic_api/models/{document_scan_attachments.rb → zimbabwe_nid_lookup2_input.rb} +12 -11
- data/lib/trinsic_api/version.rb +1 -1
- data/lib/trinsic_api.rb +63 -30
- data/spec/api/providers_api_spec.rb +47 -0
- data/spec/api/{environment_redirect_uris_api_spec.rb → redirect_uris_api_spec.rb} +10 -10
- data/spec/api/sessions_api_spec.rb +27 -1
- data/spec/api/verification_profiles_api_spec.rb +1 -0
- data/spec/models/{environment_redirect_uris_add_request_spec.rb → add_redirect_uri_request_spec.rb} +6 -6
- data/spec/models/{list_provider_contracts_response_spec.rb → apple_wallet_provider_output_spec.rb} +7 -7
- data/spec/models/attachment_info_spec.rb +54 -0
- data/spec/models/{mdl_field_data_type_spec.rb → attribute_availability_spec.rb} +6 -6
- data/spec/models/austria_handy_signatur_provider_output_spec.rb +42 -0
- data/spec/models/{finalize_mdl_exchange_response_spec.rb → belgium_id_card_provider_output_spec.rb} +10 -10
- data/spec/models/contract_attachment_spec.rb +42 -0
- data/spec/models/contract_attribute_spec.rb +42 -0
- data/spec/models/cote_d_ivoire_nid_lookup2_input_spec.rb +36 -0
- data/spec/models/czechia_moje_id_provider_output_spec.rb +54 -0
- data/spec/models/document_data_spec.rb +6 -0
- data/spec/models/estonia_id_card_provider_output_spec.rb +54 -0
- data/spec/models/finland_id_card_provider_output_spec.rb +54 -0
- data/spec/models/freja_provider_output_spec.rb +54 -0
- data/spec/models/french_numerique_given_name_spec.rb +48 -0
- data/spec/models/french_numerique_nationality_spec.rb +42 -0
- data/spec/models/{contract_identifier_field_spec.rb → french_numerique_phone_spec.rb} +9 -9
- data/spec/models/french_numerique_provider_output_spec.rb +180 -0
- data/spec/models/get_attachment_request_spec.rb +1 -7
- data/spec/models/google_wallet_provider_output_spec.rb +36 -0
- data/spec/models/identity_data_spec.rb +1 -7
- data/spec/models/{bangladesh_nid_input_spec.rb → itsme_provider_output_spec.rb} +11 -11
- data/spec/models/{sex_v1_spec.rb → kenya_nid_match2_input_sex_spec.rb} +6 -6
- data/spec/models/la_wallet_provider_output_spec.rb +138 -0
- data/spec/models/latvia_eparaksts_mobile_provider_output_spec.rb +48 -0
- data/spec/models/latvia_eparaksts_provider_output_spec.rb +48 -0
- data/spec/models/{list_environment_redirect_uris_response_spec.rb → list_redirect_uris_response_spec.rb} +6 -6
- data/spec/models/lithuania_id_card_provider_output_spec.rb +54 -0
- data/spec/models/lloyds_smart_id_provider_output_spec.rb +102 -0
- data/spec/models/match_data_spec.rb +6 -0
- data/spec/models/{mdl_certificate_data_spec.rb → mdl_output_certificate_data_spec.rb} +6 -6
- data/spec/models/{external_mdl_field_data_spec.rb → mdl_output_field_data_spec.rb} +6 -6
- data/spec/models/{field_availability_spec.rb → mdl_output_field_data_type_spec.rb} +6 -6
- data/spec/models/{mdl_identity_data_spec.rb → mdl_output_spec.rb} +12 -6
- data/spec/models/mit_id_provider_output_spec.rb +96 -0
- data/spec/models/{language_spec.rb → mobile_id_language_spec.rb} +6 -6
- data/spec/models/{create_mdl_exchange_request_spec.rb → mobile_id_provider_output_spec.rb} +20 -14
- data/spec/models/nigeria_nin_biometric2_input_spec.rb +48 -0
- data/spec/models/{document_scan_attachments_spec.rb → nigeria_nin_lookup2_input_spec.rb} +7 -7
- data/spec/models/nigeria_nin_match2_input_sex_spec.rb +30 -0
- data/spec/models/{provider_info_spec.rb → nigeria_nin_match2_input_spec.rb} +13 -13
- data/spec/models/{identifier_spec.rb → peru_dni_address_spec.rb} +9 -9
- data/spec/models/{provider_attachments_spec.rb → peru_dni_lookup_input_spec.rb} +7 -7
- data/spec/models/peru_dni_provider_output_spec.rb +126 -0
- data/spec/models/{finalize_mdl_exchange_request_spec.rb → poland_edo_app_provider_output_spec.rb} +10 -10
- data/spec/models/{create_mdl_exchange_response_spec.rb → poland_moje_id_provider_output_spec.rb} +9 -9
- data/spec/models/portugal_id_card_provider_output_spec.rb +54 -0
- data/spec/models/post_office_easy_id_provider_output_spec.rb +102 -0
- data/spec/models/provider_input_spec.rb +70 -16
- data/spec/models/provider_output_spec.rb +164 -2
- data/spec/models/{provider_contract_spec.rb → provider_spec.rb} +28 -16
- data/spec/models/recommend_provider_health_option_spec.rb +30 -0
- data/spec/models/{provider_information_spec.rb → recommend_provider_information_spec.rb} +11 -11
- data/spec/models/{recommend_request_spec.rb → recommend_providers_request_spec.rb} +6 -6
- data/spec/models/recommend_providers_response_spec.rb +36 -0
- data/spec/models/samsung_wallet_provider_output_spec.rb +36 -0
- data/spec/models/serbia_id_card_provider_output_spec.rb +54 -0
- data/spec/models/smart_id_input_spec.rb +0 -6
- data/spec/models/smart_id_provider_output_spec.rb +108 -0
- data/spec/models/south_africa_nid_biometric2_input_spec.rb +48 -0
- data/spec/models/south_africa_nid_match2_input_sex_spec.rb +30 -0
- data/spec/models/{attachment_access_keys_spec.rb → south_africa_nid_match2_input_spec.rb} +18 -12
- data/spec/models/spid_provider_output_spec.rb +61 -1
- data/spec/models/sub_provider_metadata_spec.rb +0 -6
- data/spec/models/sweden_bank_id_provider_output_spec.rb +108 -0
- data/spec/models/{contract_field_spec.rb → uganda_nid_match2_input_spec.rb} +9 -9
- data/spec/models/verification_profile_response_spec.rb +6 -0
- data/spec/models/yoti_document_details_spec.rb +60 -0
- data/spec/models/yoti_provider_output_spec.rb +102 -0
- data/spec/models/yoti_structured_postal_address_spec.rb +150 -0
- data/spec/models/zimbabwe_nid_lookup2_input_spec.rb +36 -0
- metadata +254 -122
- data/docs/AttachmentAccessKeys.md +0 -28
- data/docs/AttachmentsApi.md +0 -79
- data/docs/BangladeshNidInput.md +0 -26
- data/docs/ContractField.md +0 -22
- data/docs/ContractIdentifierField.md +0 -22
- data/docs/CreateMdlExchangeRequest.md +0 -32
- data/docs/CreateMdlExchangeResponse.md +0 -22
- data/docs/DocumentScanAttachments.md +0 -18
- data/docs/FinalizeMdlExchangeRequest.md +0 -24
- data/docs/FinalizeMdlExchangeResponse.md +0 -24
- data/docs/Identifier.md +0 -22
- data/docs/ListProviderContractsResponse.md +0 -18
- data/docs/MdlApi.md +0 -151
- data/docs/MdlCertificateData.md +0 -26
- data/docs/MdlIdentityData.md +0 -22
- data/docs/NetworkApi.md +0 -223
- data/docs/ProviderAttachments.md +0 -18
- data/docs/ProviderInfo.md +0 -30
- data/docs/RecommendResponse.md +0 -22
- data/lib/trinsic_api/api/attachments_api.rb +0 -86
- data/lib/trinsic_api/api/mdl_api.rb +0 -150
- data/lib/trinsic_api/api/network_api.rb +0 -215
- data/lib/trinsic_api/models/attachment_access_keys.rb +0 -287
- data/lib/trinsic_api/models/create_mdl_exchange_request.rb +0 -404
- data/spec/api/attachments_api_spec.rb +0 -47
- data/spec/api/mdl_api_spec.rb +0 -59
- data/spec/api/network_api_spec.rb +0 -72
- data/spec/models/recommend_response_spec.rb +0 -48
|
@@ -0,0 +1,355 @@
|
|
|
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 `smart-id` Provider which do not directly map to the normalized IdentityData model.
|
|
18
|
+
class SmartIdProviderOutput
|
|
19
|
+
# The given name (first name) of the individual, extracted from the Smart ID authentication certificate's Subject Distinguished Name \"G\" (givenName) attribute.
|
|
20
|
+
attr_accessor :given_name
|
|
21
|
+
|
|
22
|
+
# The family name (surname) of the individual, extracted from the Smart ID authentication certificate's Subject Distinguished Name \"SN\" (surname) attribute.
|
|
23
|
+
attr_accessor :family_name
|
|
24
|
+
|
|
25
|
+
# The individual's date of birth, derived from the personal code. NOTE: Newer Latvian personal codes starting with \"32\" do not contain date of birth information.
|
|
26
|
+
attr_accessor :date_of_birth
|
|
27
|
+
|
|
28
|
+
# The individual's sex, derived from the first digit of the personal code. NOTE: Not available for Latvian personal codes. Possible values: - Male - Female
|
|
29
|
+
attr_accessor :sex
|
|
30
|
+
|
|
31
|
+
# The ISO 3166-1 alpha-2 country code extracted from the Smart ID authentication certificate's Subject Distinguished Name \"C\" (country) attribute. This represents the country of the certificate issuer, not the person's nationality or citizenship. For Smart ID, this will be \"EE\" (Estonia), \"LT\" (Lithuania), or \"LV\" (Latvia).
|
|
32
|
+
attr_accessor :country
|
|
33
|
+
|
|
34
|
+
# The identity document type, extracted from the first 3 characters of the SERIALNUMBER field (before the country code). Possible values: - PNO: Personal Number (national civic registration number) - PAS: Passport - IDC: National identity card
|
|
35
|
+
attr_accessor :identity_type
|
|
36
|
+
|
|
37
|
+
# The personal code (Estonian: isikukood, Lithuanian: asmens kodas, Latvian: personas kods) of the individual, extracted from the SERIALNUMBER field of the Smart ID authentication certificate. This is the portion after the identity type and country prefix (e.g., \"48501010014\" from \"PNOEE-48501010014\"). Estonian and Lithuanian personal codes are 11 digits in the format GYYMMDDSSSC where: - G = century/gender (3-4 = 1900s, 5-6 = 2000s; odd = male, even = female) - YYMMDD = date of birth - SSS = sequence number - C = checksum digit Latvian personal codes use the format DDMMYY-NNNNN (6 digits, a dash, and 5 digits). See: - https://en.wikipedia.org/wiki/National_identification_number#Estonia - https://en.wikipedia.org/wiki/National_identification_number#Lithuania - https://en.wikipedia.org/wiki/National_identification_number#Latvia
|
|
38
|
+
attr_accessor :personal_code
|
|
39
|
+
|
|
40
|
+
# The SERIALNUMBER attribute from the Smart ID authentication certificate's Subject Distinguished Name. Format: \"{identity-type}{country-code}-{identifier}\" Components: - identity-type (3 chars): PNO (Personal Number), PAS (Passport), IDC (ID Card) - country-code (2 chars): ISO 3166-1 alpha-2 (EE, LT, LV) - identifier: The personal code
|
|
41
|
+
attr_accessor :serial_number
|
|
42
|
+
|
|
43
|
+
# The full Subject Distinguished Name (Subject DN) from the Smart ID authentication certificate. Contains comma-separated RDN (Relative Distinguished Name) components including C (Country), CN (Common Name), SN (Surname), G (Given Name), and SERIALNUMBER (Personal identifier).
|
|
44
|
+
attr_accessor :certificate_subject
|
|
45
|
+
|
|
46
|
+
# The certificate level indicating the authentication assurance level. Possible values: - QUALIFIED: Highest assurance level (eIDAS QES - Qualified Electronic Signature), legally equivalent to a handwritten signature. This is the standard production level. - ADVANCED: Lower assurance level (eIDAS AdES), also called \"Smart-ID Basic\". Only available in test environments for test accounts.
|
|
47
|
+
attr_accessor :certificate_level
|
|
48
|
+
|
|
49
|
+
# A unique identifier for the Smart ID account/document used for this authentication. Format: PNO{CC}-{personal-code}-{device-id}-{qualification} Components: - PNO = Personal Number (identity type) - CC = Country code (EE, LT, LV) - personal-code = The individual's personal code - device-id = Random 4-character device identifier - qualification = NQ (non-qualified) or Q (qualified certificate) This is a stable identifier that can be used to recognize returning users across sessions.
|
|
50
|
+
attr_accessor :document_number
|
|
51
|
+
|
|
52
|
+
# Indicates which interaction flow was used during the Smart ID authentication process. This reflects which of the allowedInteractionsOrder options was actually used. Possible values: - displayTextAndPIN: User saw text and entered PIN - verificationCodeChoice: User selected from multiple verification codes - confirmationMessage: User confirmed a message - confirmationMessageAndVerificationCodeChoice: Combination of both
|
|
53
|
+
attr_accessor :interaction_flow_used
|
|
54
|
+
|
|
55
|
+
# The IP address of the device where the Smart ID app was used for authentication. Can be IPv4 or IPv6 format.
|
|
56
|
+
attr_accessor :device_ip_address
|
|
57
|
+
|
|
58
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
59
|
+
def self.attribute_map
|
|
60
|
+
{
|
|
61
|
+
:'given_name' => :'givenName',
|
|
62
|
+
:'family_name' => :'familyName',
|
|
63
|
+
:'date_of_birth' => :'dateOfBirth',
|
|
64
|
+
:'sex' => :'sex',
|
|
65
|
+
:'country' => :'country',
|
|
66
|
+
:'identity_type' => :'identityType',
|
|
67
|
+
:'personal_code' => :'personalCode',
|
|
68
|
+
:'serial_number' => :'serialNumber',
|
|
69
|
+
:'certificate_subject' => :'certificateSubject',
|
|
70
|
+
:'certificate_level' => :'certificateLevel',
|
|
71
|
+
:'document_number' => :'documentNumber',
|
|
72
|
+
:'interaction_flow_used' => :'interactionFlowUsed',
|
|
73
|
+
:'device_ip_address' => :'deviceIpAddress'
|
|
74
|
+
}
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Returns attribute mapping this model knows about
|
|
78
|
+
def self.acceptable_attribute_map
|
|
79
|
+
attribute_map
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Returns all the JSON keys this model knows about
|
|
83
|
+
def self.acceptable_attributes
|
|
84
|
+
acceptable_attribute_map.values
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Attribute type mapping.
|
|
88
|
+
def self.openapi_types
|
|
89
|
+
{
|
|
90
|
+
:'given_name' => :'String',
|
|
91
|
+
:'family_name' => :'String',
|
|
92
|
+
:'date_of_birth' => :'Date',
|
|
93
|
+
:'sex' => :'String',
|
|
94
|
+
:'country' => :'String',
|
|
95
|
+
:'identity_type' => :'String',
|
|
96
|
+
:'personal_code' => :'String',
|
|
97
|
+
:'serial_number' => :'String',
|
|
98
|
+
:'certificate_subject' => :'String',
|
|
99
|
+
:'certificate_level' => :'String',
|
|
100
|
+
:'document_number' => :'String',
|
|
101
|
+
:'interaction_flow_used' => :'String',
|
|
102
|
+
:'device_ip_address' => :'String'
|
|
103
|
+
}
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# List of attributes with nullable: true
|
|
107
|
+
def self.openapi_nullable
|
|
108
|
+
Set.new([
|
|
109
|
+
:'given_name',
|
|
110
|
+
:'family_name',
|
|
111
|
+
:'date_of_birth',
|
|
112
|
+
:'sex',
|
|
113
|
+
:'country',
|
|
114
|
+
:'identity_type',
|
|
115
|
+
:'personal_code',
|
|
116
|
+
:'serial_number',
|
|
117
|
+
:'certificate_subject',
|
|
118
|
+
:'certificate_level',
|
|
119
|
+
:'document_number',
|
|
120
|
+
:'interaction_flow_used',
|
|
121
|
+
:'device_ip_address'
|
|
122
|
+
])
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Initializes the object
|
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
127
|
+
def initialize(attributes = {})
|
|
128
|
+
if (!attributes.is_a?(Hash))
|
|
129
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::SmartIdProviderOutput` initialize method"
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
133
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
134
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
135
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
136
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::SmartIdProviderOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
137
|
+
end
|
|
138
|
+
h[k.to_sym] = v
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'given_name')
|
|
142
|
+
self.given_name = attributes[:'given_name']
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'family_name')
|
|
146
|
+
self.family_name = attributes[:'family_name']
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'date_of_birth')
|
|
150
|
+
self.date_of_birth = attributes[:'date_of_birth']
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'sex')
|
|
154
|
+
self.sex = attributes[:'sex']
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'country')
|
|
158
|
+
self.country = attributes[:'country']
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.key?(:'identity_type')
|
|
162
|
+
self.identity_type = attributes[:'identity_type']
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'personal_code')
|
|
166
|
+
self.personal_code = attributes[:'personal_code']
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'serial_number')
|
|
170
|
+
self.serial_number = attributes[:'serial_number']
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if attributes.key?(:'certificate_subject')
|
|
174
|
+
self.certificate_subject = attributes[:'certificate_subject']
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'certificate_level')
|
|
178
|
+
self.certificate_level = attributes[:'certificate_level']
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
if attributes.key?(:'document_number')
|
|
182
|
+
self.document_number = attributes[:'document_number']
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
if attributes.key?(:'interaction_flow_used')
|
|
186
|
+
self.interaction_flow_used = attributes[:'interaction_flow_used']
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if attributes.key?(:'device_ip_address')
|
|
190
|
+
self.device_ip_address = attributes[:'device_ip_address']
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
195
|
+
# @return Array for valid properties with the reasons
|
|
196
|
+
def list_invalid_properties
|
|
197
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
198
|
+
invalid_properties = Array.new
|
|
199
|
+
invalid_properties
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Check to see if the all the properties in the model are valid
|
|
203
|
+
# @return true if the model is valid
|
|
204
|
+
def valid?
|
|
205
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
206
|
+
true
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Checks equality by comparing each attribute.
|
|
210
|
+
# @param [Object] Object to be compared
|
|
211
|
+
def ==(o)
|
|
212
|
+
return true if self.equal?(o)
|
|
213
|
+
self.class == o.class &&
|
|
214
|
+
given_name == o.given_name &&
|
|
215
|
+
family_name == o.family_name &&
|
|
216
|
+
date_of_birth == o.date_of_birth &&
|
|
217
|
+
sex == o.sex &&
|
|
218
|
+
country == o.country &&
|
|
219
|
+
identity_type == o.identity_type &&
|
|
220
|
+
personal_code == o.personal_code &&
|
|
221
|
+
serial_number == o.serial_number &&
|
|
222
|
+
certificate_subject == o.certificate_subject &&
|
|
223
|
+
certificate_level == o.certificate_level &&
|
|
224
|
+
document_number == o.document_number &&
|
|
225
|
+
interaction_flow_used == o.interaction_flow_used &&
|
|
226
|
+
device_ip_address == o.device_ip_address
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# @see the `==` method
|
|
230
|
+
# @param [Object] Object to be compared
|
|
231
|
+
def eql?(o)
|
|
232
|
+
self == o
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Calculates hash code according to all attributes.
|
|
236
|
+
# @return [Integer] Hash code
|
|
237
|
+
def hash
|
|
238
|
+
[given_name, family_name, date_of_birth, sex, country, identity_type, personal_code, serial_number, certificate_subject, certificate_level, document_number, interaction_flow_used, device_ip_address].hash
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Builds the object from hash
|
|
242
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
243
|
+
# @return [Object] Returns the model itself
|
|
244
|
+
def self.build_from_hash(attributes)
|
|
245
|
+
return nil unless attributes.is_a?(Hash)
|
|
246
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
247
|
+
transformed_hash = {}
|
|
248
|
+
openapi_types.each_pair do |key, type|
|
|
249
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
250
|
+
transformed_hash["#{key}"] = nil
|
|
251
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
252
|
+
# check to ensure the input is an array given that the attribute
|
|
253
|
+
# is documented as an array but the input is not
|
|
254
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
255
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
256
|
+
end
|
|
257
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
258
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
259
|
+
end
|
|
260
|
+
end
|
|
261
|
+
new(transformed_hash)
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Deserializes the data based on type
|
|
265
|
+
# @param string type Data type
|
|
266
|
+
# @param string value Value to be deserialized
|
|
267
|
+
# @return [Object] Deserialized data
|
|
268
|
+
def self._deserialize(type, value)
|
|
269
|
+
case type.to_sym
|
|
270
|
+
when :Time
|
|
271
|
+
Time.parse(value)
|
|
272
|
+
when :Date
|
|
273
|
+
Date.parse(value)
|
|
274
|
+
when :String
|
|
275
|
+
value.to_s
|
|
276
|
+
when :Integer
|
|
277
|
+
value.to_i
|
|
278
|
+
when :Float
|
|
279
|
+
value.to_f
|
|
280
|
+
when :Boolean
|
|
281
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
282
|
+
true
|
|
283
|
+
else
|
|
284
|
+
false
|
|
285
|
+
end
|
|
286
|
+
when :Object
|
|
287
|
+
# generic object (usually a Hash), return directly
|
|
288
|
+
value
|
|
289
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
290
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
291
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
292
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
293
|
+
k_type = Regexp.last_match[:k_type]
|
|
294
|
+
v_type = Regexp.last_match[:v_type]
|
|
295
|
+
{}.tap do |hash|
|
|
296
|
+
value.each do |k, v|
|
|
297
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
298
|
+
end
|
|
299
|
+
end
|
|
300
|
+
else # model
|
|
301
|
+
# models (e.g. Pet) or oneOf
|
|
302
|
+
klass = TrinsicApi.const_get(type)
|
|
303
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
304
|
+
end
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# Returns the string representation of the object
|
|
308
|
+
# @return [String] String presentation of the object
|
|
309
|
+
def to_s
|
|
310
|
+
to_hash.to_s
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
314
|
+
# @return [Hash] Returns the object in the form of hash
|
|
315
|
+
def to_body
|
|
316
|
+
to_hash
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Returns the object in the form of hash
|
|
320
|
+
# @return [Hash] Returns the object in the form of hash
|
|
321
|
+
def to_hash
|
|
322
|
+
hash = {}
|
|
323
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
324
|
+
value = self.send(attr)
|
|
325
|
+
if value.nil?
|
|
326
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
327
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
hash[param] = _to_hash(value)
|
|
331
|
+
end
|
|
332
|
+
hash
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# Outputs non-array value in the form of hash
|
|
336
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
337
|
+
# @param [Object] value Any valid value
|
|
338
|
+
# @return [Hash] Returns the value in the form of hash
|
|
339
|
+
def _to_hash(value)
|
|
340
|
+
if value.is_a?(Array)
|
|
341
|
+
value.compact.map { |v| _to_hash(v) }
|
|
342
|
+
elsif value.is_a?(Hash)
|
|
343
|
+
{}.tap do |hash|
|
|
344
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
345
|
+
end
|
|
346
|
+
elsif value.respond_to? :to_hash
|
|
347
|
+
value.to_hash
|
|
348
|
+
else
|
|
349
|
+
value
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
end
|
|
@@ -0,0 +1,246 @@
|
|
|
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 SouthAfricaNidBiometric2Input
|
|
18
|
+
# The user's South African National ID number
|
|
19
|
+
attr_accessor :id_number
|
|
20
|
+
|
|
21
|
+
# An array of exactly 8 images required for biometric liveness verification. The first 7 images should be liveness frames captured during the liveness detection process, and the last image (8th) should be a selfie of the user. All images must be in JPEG format and each image must be less than 15MB in size.
|
|
22
|
+
attr_accessor :liveness_images
|
|
23
|
+
|
|
24
|
+
# Test selfie for test environment (optional, maximum 15MB). Must be JPEG format.
|
|
25
|
+
attr_accessor :test_selfie
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'id_number' => :'idNumber',
|
|
31
|
+
:'liveness_images' => :'livenessImages',
|
|
32
|
+
:'test_selfie' => :'testSelfie'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'id_number' => :'String',
|
|
50
|
+
:'liveness_images' => :'Array<String>',
|
|
51
|
+
:'test_selfie' => :'String'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
:'id_number',
|
|
59
|
+
:'liveness_images',
|
|
60
|
+
:'test_selfie'
|
|
61
|
+
])
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Initializes the object
|
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
66
|
+
def initialize(attributes = {})
|
|
67
|
+
if (!attributes.is_a?(Hash))
|
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::SouthAfricaNidBiometric2Input` initialize method"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
72
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
74
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::SouthAfricaNidBiometric2Input`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
76
|
+
end
|
|
77
|
+
h[k.to_sym] = v
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'id_number')
|
|
81
|
+
self.id_number = attributes[:'id_number']
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'liveness_images')
|
|
85
|
+
if (value = attributes[:'liveness_images']).is_a?(Array)
|
|
86
|
+
self.liveness_images = value
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'test_selfie')
|
|
91
|
+
self.test_selfie = attributes[:'test_selfie']
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
96
|
+
# @return Array for valid properties with the reasons
|
|
97
|
+
def list_invalid_properties
|
|
98
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
99
|
+
invalid_properties = Array.new
|
|
100
|
+
invalid_properties
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Check to see if the all the properties in the model are valid
|
|
104
|
+
# @return true if the model is valid
|
|
105
|
+
def valid?
|
|
106
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Checks equality by comparing each attribute.
|
|
111
|
+
# @param [Object] Object to be compared
|
|
112
|
+
def ==(o)
|
|
113
|
+
return true if self.equal?(o)
|
|
114
|
+
self.class == o.class &&
|
|
115
|
+
id_number == o.id_number &&
|
|
116
|
+
liveness_images == o.liveness_images &&
|
|
117
|
+
test_selfie == o.test_selfie
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# @see the `==` method
|
|
121
|
+
# @param [Object] Object to be compared
|
|
122
|
+
def eql?(o)
|
|
123
|
+
self == o
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Calculates hash code according to all attributes.
|
|
127
|
+
# @return [Integer] Hash code
|
|
128
|
+
def hash
|
|
129
|
+
[id_number, liveness_images, test_selfie].hash
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Builds the object from hash
|
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
134
|
+
# @return [Object] Returns the model itself
|
|
135
|
+
def self.build_from_hash(attributes)
|
|
136
|
+
return nil unless attributes.is_a?(Hash)
|
|
137
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
138
|
+
transformed_hash = {}
|
|
139
|
+
openapi_types.each_pair do |key, type|
|
|
140
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = nil
|
|
142
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
143
|
+
# check to ensure the input is an array given that the attribute
|
|
144
|
+
# is documented as an array but the input is not
|
|
145
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
146
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
147
|
+
end
|
|
148
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
149
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
new(transformed_hash)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Deserializes the data based on type
|
|
156
|
+
# @param string type Data type
|
|
157
|
+
# @param string value Value to be deserialized
|
|
158
|
+
# @return [Object] Deserialized data
|
|
159
|
+
def self._deserialize(type, value)
|
|
160
|
+
case type.to_sym
|
|
161
|
+
when :Time
|
|
162
|
+
Time.parse(value)
|
|
163
|
+
when :Date
|
|
164
|
+
Date.parse(value)
|
|
165
|
+
when :String
|
|
166
|
+
value.to_s
|
|
167
|
+
when :Integer
|
|
168
|
+
value.to_i
|
|
169
|
+
when :Float
|
|
170
|
+
value.to_f
|
|
171
|
+
when :Boolean
|
|
172
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
173
|
+
true
|
|
174
|
+
else
|
|
175
|
+
false
|
|
176
|
+
end
|
|
177
|
+
when :Object
|
|
178
|
+
# generic object (usually a Hash), return directly
|
|
179
|
+
value
|
|
180
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
181
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
182
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
183
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
184
|
+
k_type = Regexp.last_match[:k_type]
|
|
185
|
+
v_type = Regexp.last_match[:v_type]
|
|
186
|
+
{}.tap do |hash|
|
|
187
|
+
value.each do |k, v|
|
|
188
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
else # model
|
|
192
|
+
# models (e.g. Pet) or oneOf
|
|
193
|
+
klass = TrinsicApi.const_get(type)
|
|
194
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Returns the string representation of the object
|
|
199
|
+
# @return [String] String presentation of the object
|
|
200
|
+
def to_s
|
|
201
|
+
to_hash.to_s
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
|
206
|
+
def to_body
|
|
207
|
+
to_hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Returns the object in the form of hash
|
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
|
212
|
+
def to_hash
|
|
213
|
+
hash = {}
|
|
214
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
215
|
+
value = self.send(attr)
|
|
216
|
+
if value.nil?
|
|
217
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
218
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
hash[param] = _to_hash(value)
|
|
222
|
+
end
|
|
223
|
+
hash
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Outputs non-array value in the form of hash
|
|
227
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
228
|
+
# @param [Object] value Any valid value
|
|
229
|
+
# @return [Hash] Returns the value in the form of hash
|
|
230
|
+
def _to_hash(value)
|
|
231
|
+
if value.is_a?(Array)
|
|
232
|
+
value.compact.map { |v| _to_hash(v) }
|
|
233
|
+
elsif value.is_a?(Hash)
|
|
234
|
+
{}.tap do |hash|
|
|
235
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
236
|
+
end
|
|
237
|
+
elsif value.respond_to? :to_hash
|
|
238
|
+
value.to_hash
|
|
239
|
+
else
|
|
240
|
+
value
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
end
|