Class: Onfido::DocumentTypes
- Inherits:
-
Object
- Object
- Onfido::DocumentTypes
- Defined in:
- lib/onfido/models/document_types.rb
Constant Summary collapse
- PASSPORT =
"passport".freeze
- DRIVING_LICENCE =
"driving_licence".freeze
- NATIONAL_IDENTITY_CARD =
"national_identity_card".freeze
- RESIDENCE_PERMIT =
"residence_permit".freeze
- PASSPORT_CARD =
"passport_card".freeze
- TAX_ID =
"tax_id".freeze
- VISA =
"visa".freeze
- VOTER_ID =
"voter_id".freeze
- RESIDENCE_STATUS_DOCUMENT =
"residence_status_document".freeze
- POSTAL_IDENTITY_CARD =
"postal_identity_card".freeze
- SOCIAL_SECURITY_CARD =
"social_security_card".freeze
- WORK_PERMIT =
"work_permit".freeze
- ASYLUM_REGISTRATION_CARD =
"asylum_registration_card".freeze
- NATIONAL_HEALTH_INSURANCE_CARD =
"national_health_insurance_card".freeze
- MUNICIPALITY_IDENTITY_CARD =
"municipality_identity_card".freeze
- PRIVATE_OPERATORS_CARD =
"private_operators_card".freeze
- PROOF_OF_CITIZENSHIP =
"proof_of_citizenship".freeze
- SERVICE_ID_CARD =
"service_id_card".freeze
- IMMIGRATION_STATUS_DOCUMENT =
"immigration_status_document".freeze
- INDIGENOUS_CARD =
"indigenous_card".freeze
- VEHICLE_REGISTRATION_CARD =
"vehicle_registration_card".freeze
- CERTIFICATE_OF_NATURALISATION =
"certificate_of_naturalisation".freeze
- PROFESSIONAL_QUALIFICATION_CARD =
"professional_qualification_card".freeze
- CONSULAR_ID =
"consular_id".freeze
- INTERNATIONAL_DRIVING_LICENCE =
"international_driving_licence".freeze
- HOME_OFFICE_LETTER =
"home_office_letter".freeze
- BIRTH_CERTIFICATE =
"birth_certificate".freeze
- VEHICLE_REGISTRATION_CERTIFICATE =
"vehicle_registration_certificate".freeze
- FORM_FOR_AFFIXING_THE_VISA =
"form_for_affixing_the_visa".freeze
- IDENTIFICATION_NUMBER_DOCUMENT =
"identification_number_document".freeze
- UNKNOWN_DEFAULT_OPEN_API =
"unknown_default_open_api".freeze
Class Method Summary collapse
- .all_vars ⇒ Object
-
.build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Class Method Details
.all_vars ⇒ Object
50 51 52 |
# File 'lib/onfido/models/document_types.rb', line 50 def self.all_vars @all_vars ||= [PASSPORT, DRIVING_LICENCE, NATIONAL_IDENTITY_CARD, RESIDENCE_PERMIT, PASSPORT_CARD, TAX_ID, VISA, VOTER_ID, RESIDENCE_STATUS_DOCUMENT, POSTAL_IDENTITY_CARD, SOCIAL_SECURITY_CARD, WORK_PERMIT, ASYLUM_REGISTRATION_CARD, NATIONAL_HEALTH_INSURANCE_CARD, MUNICIPALITY_IDENTITY_CARD, PRIVATE_OPERATORS_CARD, PROOF_OF_CITIZENSHIP, SERVICE_ID_CARD, IMMIGRATION_STATUS_DOCUMENT, INDIGENOUS_CARD, VEHICLE_REGISTRATION_CARD, CERTIFICATE_OF_NATURALISATION, PROFESSIONAL_QUALIFICATION_CARD, CONSULAR_ID, INTERNATIONAL_DRIVING_LICENCE, HOME_OFFICE_LETTER, BIRTH_CERTIFICATE, VEHICLE_REGISTRATION_CERTIFICATE, FORM_FOR_AFFIXING_THE_VISA, IDENTIFICATION_NUMBER_DOCUMENT, UNKNOWN_DEFAULT_OPEN_API].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
57 58 59 |
# File 'lib/onfido/models/document_types.rb', line 57 def self.build_from_hash(value) new.build_from_hash(value) end |
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
64 65 66 67 |
# File 'lib/onfido/models/document_types.rb', line 64 def build_from_hash(value) return value if DocumentTypes.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #DocumentTypes" end |