Class: Whatsapp::Webhook::MessageTemplateComponentsUpdate
- Inherits:
-
Object
- Object
- Whatsapp::Webhook::MessageTemplateComponentsUpdate
- Defined in:
- lib/ruby/whatsapp/webhook/message_template_components_update.rb
Overview
Template component modifications (e.g. Meta editing a template's header, body, or button on the business's behalf).
Best-effort schema: Meta's public docs describe this field in one line with no published JSON example. Validate against a real payload (App Dashboard "send test payload") before relying on these attribute names in production. Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/overview
Instance Attribute Summary collapse
-
#message_template_element ⇒ String?
The component that changed, e.g.
- #message_template_id ⇒ Integer?
- #message_template_language ⇒ String?
- #message_template_name ⇒ String?
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message_template_id:, message_template_name:, message_template_language:, message_template_element:) ⇒ MessageTemplateComponentsUpdate
constructor
A new instance of MessageTemplateComponentsUpdate.
Constructor Details
#initialize(message_template_id:, message_template_name:, message_template_language:, message_template_element:) ⇒ MessageTemplateComponentsUpdate
Returns a new instance of MessageTemplateComponentsUpdate.
29 30 31 32 33 34 35 |
# File 'lib/ruby/whatsapp/webhook/message_template_components_update.rb', line 29 def initialize(message_template_id:, message_template_name:, message_template_language:, message_template_element:) @message_template_id = @message_template_name = @message_template_language = @message_template_element = end |
Instance Attribute Details
#message_template_element ⇒ String?
Returns The component that changed, e.g. "BODY".
27 28 29 |
# File 'lib/ruby/whatsapp/webhook/message_template_components_update.rb', line 27 def @message_template_element end |
#message_template_id ⇒ Integer?
15 16 17 |
# File 'lib/ruby/whatsapp/webhook/message_template_components_update.rb', line 15 def @message_template_id end |
#message_template_language ⇒ String?
23 24 25 |
# File 'lib/ruby/whatsapp/webhook/message_template_components_update.rb', line 23 def @message_template_language end |
#message_template_name ⇒ String?
19 20 21 |
# File 'lib/ruby/whatsapp/webhook/message_template_components_update.rb', line 19 def @message_template_name end |
Class Method Details
.deserialize(data) ⇒ MessageTemplateComponentsUpdate
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/ruby/whatsapp/webhook/message_template_components_update.rb', line 40 def deserialize(data) data ||= {} new( message_template_id: data["message_template_id"], message_template_name: data["message_template_name"], message_template_language: data["message_template_language"], message_template_element: data["message_template_element"] ) end |