Class: Whatsapp::MessageTemplates::Button::QuickReply
- Defined in:
- lib/ruby/whatsapp/message_templates/button/quick_reply.rb
Overview
A tappable label that sends its own text back as a reply.
The most common use is an opt-out ("Unsubscribe from Promos"), which Meta expects on marketing templates. Up to 10 per template, but they must be grouped contiguously — see Component::Buttons. Source: https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates/components/
Defined Under Namespace
Modules: Defaults
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(text:) ⇒ QuickReply
constructor
A new instance of QuickReply.
-
#serialize ⇒ Hash
The serialized button.
Methods inherited from Base
Methods included from ValueObject
Constructor Details
#initialize(text:) ⇒ QuickReply
Returns a new instance of QuickReply.
25 26 27 28 29 |
# File 'lib/ruby/whatsapp/message_templates/button/quick_reply.rb', line 25 def initialize(text:) @text = text validate! end |
Instance Attribute Details
#text ⇒ String
19 20 21 |
# File 'lib/ruby/whatsapp/message_templates/button/quick_reply.rb', line 19 def text @text end |