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
data/lib/trinsic_api/models/{finalize_mdl_exchange_request.rb → portugal_id_card_provider_output.rb}
RENAMED
|
@@ -14,26 +14,27 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module TrinsicApi
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
# Exposed properties for the `a-pt-id-login` Provider which do not directly map to the normalized IdentityData model.
|
|
18
|
+
class PortugalIdCardProviderOutput
|
|
19
|
+
# The first name of the verified individual
|
|
20
|
+
attr_accessor :first_name
|
|
20
21
|
|
|
21
|
-
# The
|
|
22
|
-
attr_accessor :
|
|
22
|
+
# The last name of the verified individual
|
|
23
|
+
attr_accessor :last_name
|
|
23
24
|
|
|
24
|
-
# The
|
|
25
|
-
attr_accessor :
|
|
25
|
+
# The date of birth of the verified individual
|
|
26
|
+
attr_accessor :date_of_birth
|
|
26
27
|
|
|
27
|
-
# The
|
|
28
|
-
attr_accessor :
|
|
28
|
+
# The 8-digit Portuguese Civil Identification Number (número de identificação civil) of the verified individual.
|
|
29
|
+
attr_accessor :civil_identification_number
|
|
29
30
|
|
|
30
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
32
|
def self.attribute_map
|
|
32
33
|
{
|
|
33
|
-
:'
|
|
34
|
-
:'
|
|
35
|
-
:'
|
|
36
|
-
:'
|
|
34
|
+
:'first_name' => :'firstName',
|
|
35
|
+
:'last_name' => :'lastName',
|
|
36
|
+
:'date_of_birth' => :'dateOfBirth',
|
|
37
|
+
:'civil_identification_number' => :'civilIdentificationNumber'
|
|
37
38
|
}
|
|
38
39
|
end
|
|
39
40
|
|
|
@@ -50,10 +51,10 @@ module TrinsicApi
|
|
|
50
51
|
# Attribute type mapping.
|
|
51
52
|
def self.openapi_types
|
|
52
53
|
{
|
|
53
|
-
:'
|
|
54
|
-
:'
|
|
55
|
-
:'
|
|
56
|
-
:'
|
|
54
|
+
:'first_name' => :'String',
|
|
55
|
+
:'last_name' => :'String',
|
|
56
|
+
:'date_of_birth' => :'Date',
|
|
57
|
+
:'civil_identification_number' => :'String'
|
|
57
58
|
}
|
|
58
59
|
end
|
|
59
60
|
|
|
@@ -67,40 +68,40 @@ module TrinsicApi
|
|
|
67
68
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
69
|
def initialize(attributes = {})
|
|
69
70
|
if (!attributes.is_a?(Hash))
|
|
70
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::
|
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::PortugalIdCardProviderOutput` initialize method"
|
|
71
72
|
end
|
|
72
73
|
|
|
73
74
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
75
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
76
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
77
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::
|
|
78
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::PortugalIdCardProviderOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
79
|
end
|
|
79
80
|
h[k.to_sym] = v
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
if attributes.key?(:'
|
|
83
|
-
self.
|
|
83
|
+
if attributes.key?(:'first_name')
|
|
84
|
+
self.first_name = attributes[:'first_name']
|
|
84
85
|
else
|
|
85
|
-
self.
|
|
86
|
+
self.first_name = nil
|
|
86
87
|
end
|
|
87
88
|
|
|
88
|
-
if attributes.key?(:'
|
|
89
|
-
self.
|
|
89
|
+
if attributes.key?(:'last_name')
|
|
90
|
+
self.last_name = attributes[:'last_name']
|
|
90
91
|
else
|
|
91
|
-
self.
|
|
92
|
+
self.last_name = nil
|
|
92
93
|
end
|
|
93
94
|
|
|
94
|
-
if attributes.key?(:'
|
|
95
|
-
self.
|
|
95
|
+
if attributes.key?(:'date_of_birth')
|
|
96
|
+
self.date_of_birth = attributes[:'date_of_birth']
|
|
96
97
|
else
|
|
97
|
-
self.
|
|
98
|
+
self.date_of_birth = nil
|
|
98
99
|
end
|
|
99
100
|
|
|
100
|
-
if attributes.key?(:'
|
|
101
|
-
self.
|
|
101
|
+
if attributes.key?(:'civil_identification_number')
|
|
102
|
+
self.civil_identification_number = attributes[:'civil_identification_number']
|
|
102
103
|
else
|
|
103
|
-
self.
|
|
104
|
+
self.civil_identification_number = nil
|
|
104
105
|
end
|
|
105
106
|
end
|
|
106
107
|
|
|
@@ -109,20 +110,20 @@ module TrinsicApi
|
|
|
109
110
|
def list_invalid_properties
|
|
110
111
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
111
112
|
invalid_properties = Array.new
|
|
112
|
-
if @
|
|
113
|
-
invalid_properties.push('invalid value for "
|
|
113
|
+
if @first_name.nil?
|
|
114
|
+
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
|
114
115
|
end
|
|
115
116
|
|
|
116
|
-
if @
|
|
117
|
-
invalid_properties.push('invalid value for "
|
|
117
|
+
if @last_name.nil?
|
|
118
|
+
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
|
118
119
|
end
|
|
119
120
|
|
|
120
|
-
if @
|
|
121
|
-
invalid_properties.push('invalid value for "
|
|
121
|
+
if @date_of_birth.nil?
|
|
122
|
+
invalid_properties.push('invalid value for "date_of_birth", date_of_birth cannot be nil.')
|
|
122
123
|
end
|
|
123
124
|
|
|
124
|
-
if @
|
|
125
|
-
invalid_properties.push('invalid value for "
|
|
125
|
+
if @civil_identification_number.nil?
|
|
126
|
+
invalid_properties.push('invalid value for "civil_identification_number", civil_identification_number cannot be nil.')
|
|
126
127
|
end
|
|
127
128
|
|
|
128
129
|
invalid_properties
|
|
@@ -132,51 +133,51 @@ module TrinsicApi
|
|
|
132
133
|
# @return true if the model is valid
|
|
133
134
|
def valid?
|
|
134
135
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
135
|
-
return false if @
|
|
136
|
-
return false if @
|
|
137
|
-
return false if @
|
|
138
|
-
return false if @
|
|
136
|
+
return false if @first_name.nil?
|
|
137
|
+
return false if @last_name.nil?
|
|
138
|
+
return false if @date_of_birth.nil?
|
|
139
|
+
return false if @civil_identification_number.nil?
|
|
139
140
|
true
|
|
140
141
|
end
|
|
141
142
|
|
|
142
143
|
# Custom attribute writer method with validation
|
|
143
|
-
# @param [Object]
|
|
144
|
-
def
|
|
145
|
-
if
|
|
146
|
-
fail ArgumentError, '
|
|
144
|
+
# @param [Object] first_name Value to be assigned
|
|
145
|
+
def first_name=(first_name)
|
|
146
|
+
if first_name.nil?
|
|
147
|
+
fail ArgumentError, 'first_name cannot be nil'
|
|
147
148
|
end
|
|
148
149
|
|
|
149
|
-
@
|
|
150
|
+
@first_name = first_name
|
|
150
151
|
end
|
|
151
152
|
|
|
152
153
|
# Custom attribute writer method with validation
|
|
153
|
-
# @param [Object]
|
|
154
|
-
def
|
|
155
|
-
if
|
|
156
|
-
fail ArgumentError, '
|
|
154
|
+
# @param [Object] last_name Value to be assigned
|
|
155
|
+
def last_name=(last_name)
|
|
156
|
+
if last_name.nil?
|
|
157
|
+
fail ArgumentError, 'last_name cannot be nil'
|
|
157
158
|
end
|
|
158
159
|
|
|
159
|
-
@
|
|
160
|
+
@last_name = last_name
|
|
160
161
|
end
|
|
161
162
|
|
|
162
163
|
# Custom attribute writer method with validation
|
|
163
|
-
# @param [Object]
|
|
164
|
-
def
|
|
165
|
-
if
|
|
166
|
-
fail ArgumentError, '
|
|
164
|
+
# @param [Object] date_of_birth Value to be assigned
|
|
165
|
+
def date_of_birth=(date_of_birth)
|
|
166
|
+
if date_of_birth.nil?
|
|
167
|
+
fail ArgumentError, 'date_of_birth cannot be nil'
|
|
167
168
|
end
|
|
168
169
|
|
|
169
|
-
@
|
|
170
|
+
@date_of_birth = date_of_birth
|
|
170
171
|
end
|
|
171
172
|
|
|
172
173
|
# Custom attribute writer method with validation
|
|
173
|
-
# @param [Object]
|
|
174
|
-
def
|
|
175
|
-
if
|
|
176
|
-
fail ArgumentError, '
|
|
174
|
+
# @param [Object] civil_identification_number Value to be assigned
|
|
175
|
+
def civil_identification_number=(civil_identification_number)
|
|
176
|
+
if civil_identification_number.nil?
|
|
177
|
+
fail ArgumentError, 'civil_identification_number cannot be nil'
|
|
177
178
|
end
|
|
178
179
|
|
|
179
|
-
@
|
|
180
|
+
@civil_identification_number = civil_identification_number
|
|
180
181
|
end
|
|
181
182
|
|
|
182
183
|
# Checks equality by comparing each attribute.
|
|
@@ -184,10 +185,10 @@ module TrinsicApi
|
|
|
184
185
|
def ==(o)
|
|
185
186
|
return true if self.equal?(o)
|
|
186
187
|
self.class == o.class &&
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
first_name == o.first_name &&
|
|
189
|
+
last_name == o.last_name &&
|
|
190
|
+
date_of_birth == o.date_of_birth &&
|
|
191
|
+
civil_identification_number == o.civil_identification_number
|
|
191
192
|
end
|
|
192
193
|
|
|
193
194
|
# @see the `==` method
|
|
@@ -199,7 +200,7 @@ module TrinsicApi
|
|
|
199
200
|
# Calculates hash code according to all attributes.
|
|
200
201
|
# @return [Integer] Hash code
|
|
201
202
|
def hash
|
|
202
|
-
[
|
|
203
|
+
[first_name, last_name, date_of_birth, civil_identification_number].hash
|
|
203
204
|
end
|
|
204
205
|
|
|
205
206
|
# Builds the object from hash
|
|
@@ -0,0 +1,344 @@
|
|
|
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 `post-office-easyid` Provider which do not directly map to the normalized IdentityData model.
|
|
18
|
+
class PostOfficeEasyIdProviderOutput
|
|
19
|
+
# The unique id for your service of the individual. This is not shared between different services so if the user logs into a different service, the user will have a new id for the other service.
|
|
20
|
+
attr_accessor :remember_me_id
|
|
21
|
+
|
|
22
|
+
# The email address of the individual
|
|
23
|
+
attr_accessor :email
|
|
24
|
+
|
|
25
|
+
# The given name of the individual. This can correspond to first and middle names in English.
|
|
26
|
+
attr_accessor :given_name
|
|
27
|
+
|
|
28
|
+
# The family name of the individual
|
|
29
|
+
attr_accessor :family_name
|
|
30
|
+
|
|
31
|
+
# Full name of the individual which is composed of the given and family name. Unverified full name may be safe to use. For example, Aadhaar card provides full name, but due to certain limitations of verifying Aadhaar, Yoti is unable to verify this property so it is listed as \"unverified\".
|
|
32
|
+
attr_accessor :full_name
|
|
33
|
+
|
|
34
|
+
# The date of birth of the individual. Unverified date of birth may be safe to use. For example, Aadhaar card provides date of birth, but due to certain limitations of verifying Aadhaar, Yoti is unable to verify this property so it is listed as \"unverified\".
|
|
35
|
+
attr_accessor :date_of_birth
|
|
36
|
+
|
|
37
|
+
# The gender of the individual. Depending on the source or country, gender may not be verified. This is a setting that can be configured while setting up scopes. Unverified gender may be safe to use. For example, Aadhaar card provides gender, but due to certain limitations of verifying Aadhaar, Yoti is unable to verify this property so it is listed as \"unverified\". In some countries Possible values: - \"MALE\" - \"FEMALE\" - \"TRANSGENDER\" - \"OTHER\"
|
|
38
|
+
attr_accessor :gender
|
|
39
|
+
|
|
40
|
+
# The nationality of the individual as a ISO alpha-3 code
|
|
41
|
+
attr_accessor :nationality
|
|
42
|
+
|
|
43
|
+
# The mobile phone number of the individual. This number was verified with a one time password (OTP) during the user's registration with Yoti. In some cases, Yoti may do additional checks against its sources to confirm the user's identity.
|
|
44
|
+
attr_accessor :mobile_number
|
|
45
|
+
|
|
46
|
+
# A structured postal address for the individual that comes from the underlying document or can be manually added. In the case of being manually added, the address is considered \"unverified\". Unverified addresses may be safe to use. For example, Aadhaar card provides an address, but due to certain limitations of verifying Aadhaar, Yoti is unable to verify this property so it is listed as \"unverified\".
|
|
47
|
+
attr_accessor :structured_postal_address
|
|
48
|
+
|
|
49
|
+
# The whole address for the individual that comes from the underlying document or can be manually added. In the case of being manually added, the address is considered \"unverified\". The format of this will be different for each country. Refer to `StructuredPostalAddress` for a detailed version of the address.
|
|
50
|
+
attr_accessor :postal_address
|
|
51
|
+
|
|
52
|
+
# The details of the underlying document used to help create the Yoti credential
|
|
53
|
+
attr_accessor :document_details
|
|
54
|
+
|
|
55
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
56
|
+
def self.attribute_map
|
|
57
|
+
{
|
|
58
|
+
:'remember_me_id' => :'rememberMeId',
|
|
59
|
+
:'email' => :'email',
|
|
60
|
+
:'given_name' => :'givenName',
|
|
61
|
+
:'family_name' => :'familyName',
|
|
62
|
+
:'full_name' => :'fullName',
|
|
63
|
+
:'date_of_birth' => :'dateOfBirth',
|
|
64
|
+
:'gender' => :'gender',
|
|
65
|
+
:'nationality' => :'nationality',
|
|
66
|
+
:'mobile_number' => :'mobileNumber',
|
|
67
|
+
:'structured_postal_address' => :'structuredPostalAddress',
|
|
68
|
+
:'postal_address' => :'postalAddress',
|
|
69
|
+
:'document_details' => :'documentDetails'
|
|
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
|
+
:'remember_me_id' => :'String',
|
|
87
|
+
:'email' => :'String',
|
|
88
|
+
:'given_name' => :'String',
|
|
89
|
+
:'family_name' => :'String',
|
|
90
|
+
:'full_name' => :'String',
|
|
91
|
+
:'date_of_birth' => :'Date',
|
|
92
|
+
:'gender' => :'String',
|
|
93
|
+
:'nationality' => :'String',
|
|
94
|
+
:'mobile_number' => :'String',
|
|
95
|
+
:'structured_postal_address' => :'YotiStructuredPostalAddress',
|
|
96
|
+
:'postal_address' => :'String',
|
|
97
|
+
:'document_details' => :'YotiDocumentDetails'
|
|
98
|
+
}
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# List of attributes with nullable: true
|
|
102
|
+
def self.openapi_nullable
|
|
103
|
+
Set.new([
|
|
104
|
+
:'remember_me_id',
|
|
105
|
+
:'email',
|
|
106
|
+
:'given_name',
|
|
107
|
+
:'family_name',
|
|
108
|
+
:'full_name',
|
|
109
|
+
:'date_of_birth',
|
|
110
|
+
:'gender',
|
|
111
|
+
:'nationality',
|
|
112
|
+
:'mobile_number',
|
|
113
|
+
:'structured_postal_address',
|
|
114
|
+
:'postal_address',
|
|
115
|
+
:'document_details'
|
|
116
|
+
])
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Initializes the object
|
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
|
+
def initialize(attributes = {})
|
|
122
|
+
if (!attributes.is_a?(Hash))
|
|
123
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::PostOfficeEasyIdProviderOutput` initialize method"
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
127
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
128
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
129
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
130
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::PostOfficeEasyIdProviderOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
131
|
+
end
|
|
132
|
+
h[k.to_sym] = v
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'remember_me_id')
|
|
136
|
+
self.remember_me_id = attributes[:'remember_me_id']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'email')
|
|
140
|
+
self.email = attributes[:'email']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'given_name')
|
|
144
|
+
self.given_name = attributes[:'given_name']
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'family_name')
|
|
148
|
+
self.family_name = attributes[:'family_name']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'full_name')
|
|
152
|
+
self.full_name = attributes[:'full_name']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'date_of_birth')
|
|
156
|
+
self.date_of_birth = attributes[:'date_of_birth']
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'gender')
|
|
160
|
+
self.gender = attributes[:'gender']
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'nationality')
|
|
164
|
+
self.nationality = attributes[:'nationality']
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if attributes.key?(:'mobile_number')
|
|
168
|
+
self.mobile_number = attributes[:'mobile_number']
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'structured_postal_address')
|
|
172
|
+
self.structured_postal_address = attributes[:'structured_postal_address']
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if attributes.key?(:'postal_address')
|
|
176
|
+
self.postal_address = attributes[:'postal_address']
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if attributes.key?(:'document_details')
|
|
180
|
+
self.document_details = attributes[:'document_details']
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
185
|
+
# @return Array for valid properties with the reasons
|
|
186
|
+
def list_invalid_properties
|
|
187
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
188
|
+
invalid_properties = Array.new
|
|
189
|
+
invalid_properties
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Check to see if the all the properties in the model are valid
|
|
193
|
+
# @return true if the model is valid
|
|
194
|
+
def valid?
|
|
195
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
196
|
+
true
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Checks equality by comparing each attribute.
|
|
200
|
+
# @param [Object] Object to be compared
|
|
201
|
+
def ==(o)
|
|
202
|
+
return true if self.equal?(o)
|
|
203
|
+
self.class == o.class &&
|
|
204
|
+
remember_me_id == o.remember_me_id &&
|
|
205
|
+
email == o.email &&
|
|
206
|
+
given_name == o.given_name &&
|
|
207
|
+
family_name == o.family_name &&
|
|
208
|
+
full_name == o.full_name &&
|
|
209
|
+
date_of_birth == o.date_of_birth &&
|
|
210
|
+
gender == o.gender &&
|
|
211
|
+
nationality == o.nationality &&
|
|
212
|
+
mobile_number == o.mobile_number &&
|
|
213
|
+
structured_postal_address == o.structured_postal_address &&
|
|
214
|
+
postal_address == o.postal_address &&
|
|
215
|
+
document_details == o.document_details
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# @see the `==` method
|
|
219
|
+
# @param [Object] Object to be compared
|
|
220
|
+
def eql?(o)
|
|
221
|
+
self == o
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Calculates hash code according to all attributes.
|
|
225
|
+
# @return [Integer] Hash code
|
|
226
|
+
def hash
|
|
227
|
+
[remember_me_id, email, given_name, family_name, full_name, date_of_birth, gender, nationality, mobile_number, structured_postal_address, postal_address, document_details].hash
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Builds the object from hash
|
|
231
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
232
|
+
# @return [Object] Returns the model itself
|
|
233
|
+
def self.build_from_hash(attributes)
|
|
234
|
+
return nil unless attributes.is_a?(Hash)
|
|
235
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
236
|
+
transformed_hash = {}
|
|
237
|
+
openapi_types.each_pair do |key, type|
|
|
238
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
239
|
+
transformed_hash["#{key}"] = nil
|
|
240
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
241
|
+
# check to ensure the input is an array given that the attribute
|
|
242
|
+
# is documented as an array but the input is not
|
|
243
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
244
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
245
|
+
end
|
|
246
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
247
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
new(transformed_hash)
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Deserializes the data based on type
|
|
254
|
+
# @param string type Data type
|
|
255
|
+
# @param string value Value to be deserialized
|
|
256
|
+
# @return [Object] Deserialized data
|
|
257
|
+
def self._deserialize(type, value)
|
|
258
|
+
case type.to_sym
|
|
259
|
+
when :Time
|
|
260
|
+
Time.parse(value)
|
|
261
|
+
when :Date
|
|
262
|
+
Date.parse(value)
|
|
263
|
+
when :String
|
|
264
|
+
value.to_s
|
|
265
|
+
when :Integer
|
|
266
|
+
value.to_i
|
|
267
|
+
when :Float
|
|
268
|
+
value.to_f
|
|
269
|
+
when :Boolean
|
|
270
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
271
|
+
true
|
|
272
|
+
else
|
|
273
|
+
false
|
|
274
|
+
end
|
|
275
|
+
when :Object
|
|
276
|
+
# generic object (usually a Hash), return directly
|
|
277
|
+
value
|
|
278
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
279
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
280
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
281
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
282
|
+
k_type = Regexp.last_match[:k_type]
|
|
283
|
+
v_type = Regexp.last_match[:v_type]
|
|
284
|
+
{}.tap do |hash|
|
|
285
|
+
value.each do |k, v|
|
|
286
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
else # model
|
|
290
|
+
# models (e.g. Pet) or oneOf
|
|
291
|
+
klass = TrinsicApi.const_get(type)
|
|
292
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
293
|
+
end
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Returns the string representation of the object
|
|
297
|
+
# @return [String] String presentation of the object
|
|
298
|
+
def to_s
|
|
299
|
+
to_hash.to_s
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
303
|
+
# @return [Hash] Returns the object in the form of hash
|
|
304
|
+
def to_body
|
|
305
|
+
to_hash
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Returns the object in the form of hash
|
|
309
|
+
# @return [Hash] Returns the object in the form of hash
|
|
310
|
+
def to_hash
|
|
311
|
+
hash = {}
|
|
312
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
313
|
+
value = self.send(attr)
|
|
314
|
+
if value.nil?
|
|
315
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
316
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
hash[param] = _to_hash(value)
|
|
320
|
+
end
|
|
321
|
+
hash
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Outputs non-array value in the form of hash
|
|
325
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
326
|
+
# @param [Object] value Any valid value
|
|
327
|
+
# @return [Hash] Returns the value in the form of hash
|
|
328
|
+
def _to_hash(value)
|
|
329
|
+
if value.is_a?(Array)
|
|
330
|
+
value.compact.map { |v| _to_hash(v) }
|
|
331
|
+
elsif value.is_a?(Hash)
|
|
332
|
+
{}.tap do |hash|
|
|
333
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
334
|
+
end
|
|
335
|
+
elsif value.respond_to? :to_hash
|
|
336
|
+
value.to_hash
|
|
337
|
+
else
|
|
338
|
+
value
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
end
|