Class: Whatsapp::MessageTemplates::Button::Base
- Inherits:
-
Object
- Object
- Whatsapp::MessageTemplates::Button::Base
- Includes:
- ValueObject
- Defined in:
- lib/ruby/whatsapp/message_templates/button/base.rb
Overview
Shared behaviour for every button a template can declare.
Each subclass owns its own wire type as Defaults::TYPE rather than having it
supplied by the TYPES registry — a button's type is intrinsic to the
button, so keeping it on the class means one source of truth for both
serialization and the per-type cap checks in Component::Buttons.
Direct Known Subclasses
Constant Summary collapse
- MAX_TEXT_LENGTH =
Character limit shared by every button that carries a tappable label.
25
Instance Method Summary collapse
-
#api_type ⇒ String
The uppercase value Meta expects in the button's
typefield.
Methods included from ValueObject
Instance Method Details
#api_type ⇒ String
The uppercase value Meta expects in the button's type field.
20 21 22 |
# File 'lib/ruby/whatsapp/message_templates/button/base.rb', line 20 def api_type self.class::Defaults::TYPE end |