Class: Whatsapp::Webhook::TemplateCategoryUpdate
- Inherits:
-
Object
- Object
- Whatsapp::Webhook::TemplateCategoryUpdate
- Defined in:
- lib/ruby/whatsapp/webhook/template_category_update.rb
Overview
Template category changes and re-categorization corrections.
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
- #correct_category ⇒ String?
- #message_template_id ⇒ Integer?
- #message_template_language ⇒ String?
- #message_template_name ⇒ String?
- #new_category ⇒ String?
- #previous_category ⇒ String?
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message_template_id:, message_template_name:, message_template_language:, previous_category:, new_category:, correct_category: nil) ⇒ TemplateCategoryUpdate
constructor
A new instance of TemplateCategoryUpdate.
Constructor Details
#initialize(message_template_id:, message_template_name:, message_template_language:, previous_category:, new_category:, correct_category: nil) ⇒ TemplateCategoryUpdate
Returns a new instance of TemplateCategoryUpdate.
36 37 38 39 40 41 42 43 44 |
# File 'lib/ruby/whatsapp/webhook/template_category_update.rb', line 36 def initialize(message_template_id:, message_template_name:, message_template_language:, previous_category:, new_category:, correct_category: nil) @message_template_id = @message_template_name = @message_template_language = @previous_category = previous_category @new_category = new_category @correct_category = correct_category end |
Instance Attribute Details
#correct_category ⇒ String?
34 35 36 |
# File 'lib/ruby/whatsapp/webhook/template_category_update.rb', line 34 def correct_category @correct_category end |
#message_template_id ⇒ Integer?
14 15 16 |
# File 'lib/ruby/whatsapp/webhook/template_category_update.rb', line 14 def @message_template_id end |
#message_template_language ⇒ String?
22 23 24 |
# File 'lib/ruby/whatsapp/webhook/template_category_update.rb', line 22 def @message_template_language end |
#message_template_name ⇒ String?
18 19 20 |
# File 'lib/ruby/whatsapp/webhook/template_category_update.rb', line 18 def @message_template_name end |
#new_category ⇒ String?
30 31 32 |
# File 'lib/ruby/whatsapp/webhook/template_category_update.rb', line 30 def new_category @new_category end |
#previous_category ⇒ String?
26 27 28 |
# File 'lib/ruby/whatsapp/webhook/template_category_update.rb', line 26 def previous_category @previous_category end |
Class Method Details
.deserialize(data) ⇒ TemplateCategoryUpdate
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/ruby/whatsapp/webhook/template_category_update.rb', line 49 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"], previous_category: data["previous_category"], new_category: data["new_category"], correct_category: data["correct_category"] ) end |