Class: Svix::MessageStatusText
- Inherits:
-
Object
- Object
- Svix::MessageStatusText
- Defined in:
- lib/svix/models/message_status_text.rb
Constant Summary collapse
- SUCCESS =
"success".freeze
- PENDING =
"pending".freeze
- FAIL =
"fail".freeze
- SENDING =
"sending".freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value) ⇒ MessageStatusText
constructor
A new instance of MessageStatusText.
- #serialize ⇒ Object
Constructor Details
#initialize(value) ⇒ MessageStatusText
Returns a new instance of MessageStatusText.
14 15 16 17 18 19 20 |
# File 'lib/svix/models/message_status_text.rb', line 14 def initialize(value) unless MessageStatusText.all_vars.include?(value) raise "Invalid ENUM value '#{value}' for class #MessageStatusText" end @value = value end |
Class Method Details
.all_vars ⇒ Object
10 11 12 |
# File 'lib/svix/models/message_status_text.rb', line 10 def self.all_vars @all_vars ||= [SUCCESS, PENDING, FAIL, SENDING].freeze end |
.deserialize(value) ⇒ Object
22 23 24 25 |
# File 'lib/svix/models/message_status_text.rb', line 22 def self.deserialize(value) return value if MessageStatusText.all_vars.include?(value) raise "Invalid ENUM value '#{value}' for class #MessageStatusText" end |
Instance Method Details
#serialize ⇒ Object
27 28 29 |
# File 'lib/svix/models/message_status_text.rb', line 27 def serialize @value end |