Class: MessenteApi::WhatsappOtpButtonType
- Inherits:
-
Object
- Object
- MessenteApi::WhatsappOtpButtonType
- Defined in:
- lib/messente_api/models/whatsapp_otp_button_type.rb
Constant Summary collapse
- COPY_CODE =
"copy_code".freeze
- ONE_TAP =
"one_tap".freeze
- ZERO_TAP =
"zero_tap".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
22 23 24 |
# File 'lib/messente_api/models/whatsapp_otp_button_type.rb', line 22 def self.all_vars @all_vars ||= [COPY_CODE, ONE_TAP, ZERO_TAP].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
29 30 31 |
# File 'lib/messente_api/models/whatsapp_otp_button_type.rb', line 29 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
36 37 38 39 |
# File 'lib/messente_api/models/whatsapp_otp_button_type.rb', line 36 def build_from_hash(value) return value if WhatsappOtpButtonType.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #WhatsappOtpButtonType" end |