Class: ElasticEmail::ContactStatus
- Inherits:
-
Object
- Object
- ElasticEmail::ContactStatus
- Defined in:
- lib/ElasticEmail/models/contact_status.rb
Constant Summary collapse
- TRANSACTIONAL =
"Transactional".freeze
- ENGAGED =
"Engaged".freeze
- ACTIVE =
"Active".freeze
- BOUNCED =
"Bounced".freeze
- UNSUBSCRIBED =
"Unsubscribed".freeze
- ABUSE =
"Abuse".freeze
- INACTIVE =
"Inactive".freeze
- STALE =
"Stale".freeze
- NOT_CONFIRMED =
"NotConfirmed".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
31 32 33 |
# File 'lib/ElasticEmail/models/contact_status.rb', line 31 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
38 39 40 41 42 |
# File 'lib/ElasticEmail/models/contact_status.rb', line 38 def build_from_hash(value) constantValues = ContactStatus.constants.select { |c| ContactStatus::const_get(c) == value } raise "Invalid ENUM value #{value} for class #ContactStatus" if constantValues.empty? value end |