Class: Yapstone::GovernmentIdType
- Inherits:
-
Object
- Object
- Yapstone::GovernmentIdType
- Defined in:
- lib/yapstone-so/models/government_id_type.rb
Constant Summary collapse
- DRIVERS_LICENSE =
"DRIVERS_LICENSE".freeze
- PASSPORT =
"PASSPORT".freeze
- GOVERNMENT_ID =
"GOVERNMENT_ID".freeze
- PASSPORT_CARD =
"PASSPORT_CARD".freeze
- LAST_FOUR_SSN =
"LAST_FOUR_SSN".freeze
- TAX_ID =
"TAX_ID".freeze
- SIN =
"SIN".freeze
- NIF =
"NIF".freeze
- CODICE_FISCALE =
"CODICE_FISCALE".freeze
Class Method Summary collapse
-
.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
.build_from_hash(value) ⇒ String
Builds the enum from string
30 31 32 |
# File 'lib/yapstone-so/models/government_id_type.rb', line 30 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
37 38 39 40 41 |
# File 'lib/yapstone-so/models/government_id_type.rb', line 37 def build_from_hash(value) constantValues = GovernmentIdType.constants.select { |c| GovernmentIdType::const_get(c) == value } raise "Invalid ENUM value #{value} for class #GovernmentIdType" if constantValues.empty? value end |