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,319 @@
|
|
|
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 AttachmentInfo
|
|
18
|
+
# The unique identifier of the Attachment. Pass this to the `GetAttachment` endpoint, along with the Session ID and the `resultsAccessKey` for said Session.
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# The type of the Attachment. Possible values: - \"selfie\" - \"document_front\" - \"document_back\" - \"document_portrait\" - \"document_signature\" - \"document_scan_report\" Additional attachment types may be defined for specific Providers.
|
|
22
|
+
attr_accessor :type
|
|
23
|
+
|
|
24
|
+
# The MIME type of the attachment's contents; eg, \"image/jpeg\" or \"application/pdf\".
|
|
25
|
+
attr_accessor :content_type
|
|
26
|
+
|
|
27
|
+
# The size in bytes of the attachment.
|
|
28
|
+
attr_accessor :size_bytes
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'id' => :'id',
|
|
34
|
+
:'type' => :'type',
|
|
35
|
+
:'content_type' => :'contentType',
|
|
36
|
+
:'size_bytes' => :'sizeBytes'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns attribute mapping this model knows about
|
|
41
|
+
def self.acceptable_attribute_map
|
|
42
|
+
attribute_map
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
acceptable_attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'id' => :'String',
|
|
54
|
+
:'type' => :'String',
|
|
55
|
+
:'content_type' => :'String',
|
|
56
|
+
:'size_bytes' => :'Integer'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::AttachmentInfo` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::AttachmentInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'id')
|
|
83
|
+
self.id = attributes[:'id']
|
|
84
|
+
else
|
|
85
|
+
self.id = nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'type')
|
|
89
|
+
self.type = attributes[:'type']
|
|
90
|
+
else
|
|
91
|
+
self.type = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'content_type')
|
|
95
|
+
self.content_type = attributes[:'content_type']
|
|
96
|
+
else
|
|
97
|
+
self.content_type = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'size_bytes')
|
|
101
|
+
self.size_bytes = attributes[:'size_bytes']
|
|
102
|
+
else
|
|
103
|
+
self.size_bytes = nil
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
108
|
+
# @return Array for valid properties with the reasons
|
|
109
|
+
def list_invalid_properties
|
|
110
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
111
|
+
invalid_properties = Array.new
|
|
112
|
+
if @id.nil?
|
|
113
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if @type.nil?
|
|
117
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if @content_type.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "content_type", content_type cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @size_bytes.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "size_bytes", size_bytes cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
invalid_properties
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Check to see if the all the properties in the model are valid
|
|
132
|
+
# @return true if the model is valid
|
|
133
|
+
def valid?
|
|
134
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
135
|
+
return false if @id.nil?
|
|
136
|
+
return false if @type.nil?
|
|
137
|
+
return false if @content_type.nil?
|
|
138
|
+
return false if @size_bytes.nil?
|
|
139
|
+
true
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Custom attribute writer method with validation
|
|
143
|
+
# @param [Object] id Value to be assigned
|
|
144
|
+
def id=(id)
|
|
145
|
+
if id.nil?
|
|
146
|
+
fail ArgumentError, 'id cannot be nil'
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
@id = id
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Custom attribute writer method with validation
|
|
153
|
+
# @param [Object] type Value to be assigned
|
|
154
|
+
def type=(type)
|
|
155
|
+
if type.nil?
|
|
156
|
+
fail ArgumentError, 'type cannot be nil'
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
@type = type
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Custom attribute writer method with validation
|
|
163
|
+
# @param [Object] content_type Value to be assigned
|
|
164
|
+
def content_type=(content_type)
|
|
165
|
+
if content_type.nil?
|
|
166
|
+
fail ArgumentError, 'content_type cannot be nil'
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
@content_type = content_type
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Custom attribute writer method with validation
|
|
173
|
+
# @param [Object] size_bytes Value to be assigned
|
|
174
|
+
def size_bytes=(size_bytes)
|
|
175
|
+
if size_bytes.nil?
|
|
176
|
+
fail ArgumentError, 'size_bytes cannot be nil'
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
@size_bytes = size_bytes
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Checks equality by comparing each attribute.
|
|
183
|
+
# @param [Object] Object to be compared
|
|
184
|
+
def ==(o)
|
|
185
|
+
return true if self.equal?(o)
|
|
186
|
+
self.class == o.class &&
|
|
187
|
+
id == o.id &&
|
|
188
|
+
type == o.type &&
|
|
189
|
+
content_type == o.content_type &&
|
|
190
|
+
size_bytes == o.size_bytes
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# @see the `==` method
|
|
194
|
+
# @param [Object] Object to be compared
|
|
195
|
+
def eql?(o)
|
|
196
|
+
self == o
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Calculates hash code according to all attributes.
|
|
200
|
+
# @return [Integer] Hash code
|
|
201
|
+
def hash
|
|
202
|
+
[id, type, content_type, size_bytes].hash
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Builds the object from hash
|
|
206
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
207
|
+
# @return [Object] Returns the model itself
|
|
208
|
+
def self.build_from_hash(attributes)
|
|
209
|
+
return nil unless attributes.is_a?(Hash)
|
|
210
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
211
|
+
transformed_hash = {}
|
|
212
|
+
openapi_types.each_pair do |key, type|
|
|
213
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
214
|
+
transformed_hash["#{key}"] = nil
|
|
215
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
216
|
+
# check to ensure the input is an array given that the attribute
|
|
217
|
+
# is documented as an array but the input is not
|
|
218
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
219
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
220
|
+
end
|
|
221
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
222
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
new(transformed_hash)
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Deserializes the data based on type
|
|
229
|
+
# @param string type Data type
|
|
230
|
+
# @param string value Value to be deserialized
|
|
231
|
+
# @return [Object] Deserialized data
|
|
232
|
+
def self._deserialize(type, value)
|
|
233
|
+
case type.to_sym
|
|
234
|
+
when :Time
|
|
235
|
+
Time.parse(value)
|
|
236
|
+
when :Date
|
|
237
|
+
Date.parse(value)
|
|
238
|
+
when :String
|
|
239
|
+
value.to_s
|
|
240
|
+
when :Integer
|
|
241
|
+
value.to_i
|
|
242
|
+
when :Float
|
|
243
|
+
value.to_f
|
|
244
|
+
when :Boolean
|
|
245
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
246
|
+
true
|
|
247
|
+
else
|
|
248
|
+
false
|
|
249
|
+
end
|
|
250
|
+
when :Object
|
|
251
|
+
# generic object (usually a Hash), return directly
|
|
252
|
+
value
|
|
253
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
254
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
255
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
256
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
257
|
+
k_type = Regexp.last_match[:k_type]
|
|
258
|
+
v_type = Regexp.last_match[:v_type]
|
|
259
|
+
{}.tap do |hash|
|
|
260
|
+
value.each do |k, v|
|
|
261
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
else # model
|
|
265
|
+
# models (e.g. Pet) or oneOf
|
|
266
|
+
klass = TrinsicApi.const_get(type)
|
|
267
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Returns the string representation of the object
|
|
272
|
+
# @return [String] String presentation of the object
|
|
273
|
+
def to_s
|
|
274
|
+
to_hash.to_s
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
278
|
+
# @return [Hash] Returns the object in the form of hash
|
|
279
|
+
def to_body
|
|
280
|
+
to_hash
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# Returns the object in the form of hash
|
|
284
|
+
# @return [Hash] Returns the object in the form of hash
|
|
285
|
+
def to_hash
|
|
286
|
+
hash = {}
|
|
287
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
288
|
+
value = self.send(attr)
|
|
289
|
+
if value.nil?
|
|
290
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
291
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
hash[param] = _to_hash(value)
|
|
295
|
+
end
|
|
296
|
+
hash
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
# Outputs non-array value in the form of hash
|
|
300
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
301
|
+
# @param [Object] value Any valid value
|
|
302
|
+
# @return [Hash] Returns the value in the form of hash
|
|
303
|
+
def _to_hash(value)
|
|
304
|
+
if value.is_a?(Array)
|
|
305
|
+
value.compact.map { |v| _to_hash(v) }
|
|
306
|
+
elsif value.is_a?(Hash)
|
|
307
|
+
{}.tap do |hash|
|
|
308
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
309
|
+
end
|
|
310
|
+
elsif value.respond_to? :to_hash
|
|
311
|
+
value.to_hash
|
|
312
|
+
else
|
|
313
|
+
value
|
|
314
|
+
end
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
end
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module TrinsicApi
|
|
17
|
-
class
|
|
17
|
+
class AttributeAvailability
|
|
18
18
|
NEVER = "Never".freeze
|
|
19
19
|
SOMETIMES = "Sometimes".freeze
|
|
20
20
|
ALWAYS = "Always".freeze
|
|
@@ -34,8 +34,8 @@ module TrinsicApi
|
|
|
34
34
|
# @param [String] The enum value in the form of the string
|
|
35
35
|
# @return [String] The enum value
|
|
36
36
|
def build_from_hash(value)
|
|
37
|
-
return value if
|
|
38
|
-
raise "Invalid ENUM value #{value} for class #
|
|
37
|
+
return value if AttributeAvailability.all_vars.include?(value)
|
|
38
|
+
raise "Invalid ENUM value #{value} for class #AttributeAvailability"
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
end
|
|
@@ -0,0 +1,266 @@
|
|
|
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 `a-at-handy-signatur-login` Provider which do not directly map to the normalized IdentityData model.
|
|
18
|
+
class AustriaHandySignaturProviderOutput
|
|
19
|
+
# The first name of the verified individual
|
|
20
|
+
attr_accessor :first_name
|
|
21
|
+
|
|
22
|
+
# The last name of the verified individual
|
|
23
|
+
attr_accessor :last_name
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'first_name' => :'firstName',
|
|
29
|
+
:'last_name' => :'lastName'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'first_name' => :'String',
|
|
47
|
+
:'last_name' => :'String'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Initializes the object
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
def initialize(attributes = {})
|
|
60
|
+
if (!attributes.is_a?(Hash))
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::AustriaHandySignaturProviderOutput` initialize method"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::AustriaHandySignaturProviderOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
69
|
+
end
|
|
70
|
+
h[k.to_sym] = v
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'first_name')
|
|
74
|
+
self.first_name = attributes[:'first_name']
|
|
75
|
+
else
|
|
76
|
+
self.first_name = nil
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'last_name')
|
|
80
|
+
self.last_name = attributes[:'last_name']
|
|
81
|
+
else
|
|
82
|
+
self.last_name = nil
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
87
|
+
# @return Array for valid properties with the reasons
|
|
88
|
+
def list_invalid_properties
|
|
89
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
90
|
+
invalid_properties = Array.new
|
|
91
|
+
if @first_name.nil?
|
|
92
|
+
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if @last_name.nil?
|
|
96
|
+
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
invalid_properties
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Check to see if the all the properties in the model are valid
|
|
103
|
+
# @return true if the model is valid
|
|
104
|
+
def valid?
|
|
105
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
106
|
+
return false if @first_name.nil?
|
|
107
|
+
return false if @last_name.nil?
|
|
108
|
+
true
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Custom attribute writer method with validation
|
|
112
|
+
# @param [Object] first_name Value to be assigned
|
|
113
|
+
def first_name=(first_name)
|
|
114
|
+
if first_name.nil?
|
|
115
|
+
fail ArgumentError, 'first_name cannot be nil'
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
@first_name = first_name
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Custom attribute writer method with validation
|
|
122
|
+
# @param [Object] last_name Value to be assigned
|
|
123
|
+
def last_name=(last_name)
|
|
124
|
+
if last_name.nil?
|
|
125
|
+
fail ArgumentError, 'last_name cannot be nil'
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
@last_name = last_name
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Checks equality by comparing each attribute.
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def ==(o)
|
|
134
|
+
return true if self.equal?(o)
|
|
135
|
+
self.class == o.class &&
|
|
136
|
+
first_name == o.first_name &&
|
|
137
|
+
last_name == o.last_name
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# @see the `==` method
|
|
141
|
+
# @param [Object] Object to be compared
|
|
142
|
+
def eql?(o)
|
|
143
|
+
self == o
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Calculates hash code according to all attributes.
|
|
147
|
+
# @return [Integer] Hash code
|
|
148
|
+
def hash
|
|
149
|
+
[first_name, last_name].hash
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Builds the object from hash
|
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
154
|
+
# @return [Object] Returns the model itself
|
|
155
|
+
def self.build_from_hash(attributes)
|
|
156
|
+
return nil unless attributes.is_a?(Hash)
|
|
157
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
158
|
+
transformed_hash = {}
|
|
159
|
+
openapi_types.each_pair do |key, type|
|
|
160
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
161
|
+
transformed_hash["#{key}"] = nil
|
|
162
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
163
|
+
# check to ensure the input is an array given that the attribute
|
|
164
|
+
# is documented as an array but the input is not
|
|
165
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
166
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
167
|
+
end
|
|
168
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
169
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
new(transformed_hash)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Deserializes the data based on type
|
|
176
|
+
# @param string type Data type
|
|
177
|
+
# @param string value Value to be deserialized
|
|
178
|
+
# @return [Object] Deserialized data
|
|
179
|
+
def self._deserialize(type, value)
|
|
180
|
+
case type.to_sym
|
|
181
|
+
when :Time
|
|
182
|
+
Time.parse(value)
|
|
183
|
+
when :Date
|
|
184
|
+
Date.parse(value)
|
|
185
|
+
when :String
|
|
186
|
+
value.to_s
|
|
187
|
+
when :Integer
|
|
188
|
+
value.to_i
|
|
189
|
+
when :Float
|
|
190
|
+
value.to_f
|
|
191
|
+
when :Boolean
|
|
192
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
193
|
+
true
|
|
194
|
+
else
|
|
195
|
+
false
|
|
196
|
+
end
|
|
197
|
+
when :Object
|
|
198
|
+
# generic object (usually a Hash), return directly
|
|
199
|
+
value
|
|
200
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
201
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
202
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
203
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
204
|
+
k_type = Regexp.last_match[:k_type]
|
|
205
|
+
v_type = Regexp.last_match[:v_type]
|
|
206
|
+
{}.tap do |hash|
|
|
207
|
+
value.each do |k, v|
|
|
208
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
else # model
|
|
212
|
+
# models (e.g. Pet) or oneOf
|
|
213
|
+
klass = TrinsicApi.const_get(type)
|
|
214
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Returns the string representation of the object
|
|
219
|
+
# @return [String] String presentation of the object
|
|
220
|
+
def to_s
|
|
221
|
+
to_hash.to_s
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
225
|
+
# @return [Hash] Returns the object in the form of hash
|
|
226
|
+
def to_body
|
|
227
|
+
to_hash
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Returns the object in the form of hash
|
|
231
|
+
# @return [Hash] Returns the object in the form of hash
|
|
232
|
+
def to_hash
|
|
233
|
+
hash = {}
|
|
234
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
235
|
+
value = self.send(attr)
|
|
236
|
+
if value.nil?
|
|
237
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
238
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
hash[param] = _to_hash(value)
|
|
242
|
+
end
|
|
243
|
+
hash
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Outputs non-array value in the form of hash
|
|
247
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
248
|
+
# @param [Object] value Any valid value
|
|
249
|
+
# @return [Hash] Returns the value in the form of hash
|
|
250
|
+
def _to_hash(value)
|
|
251
|
+
if value.is_a?(Array)
|
|
252
|
+
value.compact.map { |v| _to_hash(v) }
|
|
253
|
+
elsif value.is_a?(Hash)
|
|
254
|
+
{}.tap do |hash|
|
|
255
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
256
|
+
end
|
|
257
|
+
elsif value.respond_to? :to_hash
|
|
258
|
+
value.to_hash
|
|
259
|
+
else
|
|
260
|
+
value
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
end
|