Class: ElasticEmail::MessageCategory
- Inherits:
-
Object
- Object
- ElasticEmail::MessageCategory
- Defined in:
- lib/ElasticEmail/models/message_category.rb
Constant Summary collapse
- UNKNOWN =
"Unknown".freeze
- IGNORE =
"Ignore".freeze
- SPAM =
"Spam".freeze
- BLACK_LISTED =
"BlackListed".freeze
- NO_MAILBOX =
"NoMailbox".freeze
- GREY_LISTED =
"GreyListed".freeze
- THROTTLED =
"Throttled".freeze
- TIMEOUT =
"Timeout".freeze
- CONNECTION_PROBLEM =
"ConnectionProblem".freeze
- SPF_PROBLEM =
"SPFProblem".freeze
- ACCOUNT_PROBLEM =
"AccountProblem".freeze
- DNS_PROBLEM =
"DNSProblem".freeze
- NOT_DELIVERED_CANCELLED =
"NotDeliveredCancelled".freeze
- CODE_ERROR =
"CodeError".freeze
- MANUAL_CANCEL =
"ManualCancel".freeze
- CONNECTION_TERMINATED =
"ConnectionTerminated".freeze
- NOT_DELIVERED =
"NotDelivered".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
36 37 38 |
# File 'lib/ElasticEmail/models/message_category.rb', line 36 def self.all_vars @all_vars ||= [UNKNOWN, IGNORE, SPAM, BLACK_LISTED, NO_MAILBOX, GREY_LISTED, THROTTLED, TIMEOUT, CONNECTION_PROBLEM, SPF_PROBLEM, ACCOUNT_PROBLEM, DNS_PROBLEM, NOT_DELIVERED_CANCELLED, CODE_ERROR, MANUAL_CANCEL, CONNECTION_TERMINATED, NOT_DELIVERED].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
43 44 45 |
# File 'lib/ElasticEmail/models/message_category.rb', line 43 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
50 51 52 53 |
# File 'lib/ElasticEmail/models/message_category.rb', line 50 def build_from_hash(value) return value if MessageCategory.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #MessageCategory" end |