Class: Whatsapp::Webhook::AccountAlerts
- Inherits:
-
Object
- Object
- Whatsapp::Webhook::AccountAlerts
- Defined in:
- lib/ruby/whatsapp/webhook/account_alerts.rb
Overview
Notifications of messaging limit, business profile, and Official Business Account status changes.
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
- #alert_description ⇒ String?
- #alert_severity ⇒ String?
- #alert_status ⇒ String?
- #entity_id ⇒ String?
- #entity_type ⇒ String?
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(entity_type:, entity_id:, alert_severity:, alert_status:, alert_description:) ⇒ AccountAlerts
constructor
A new instance of AccountAlerts.
Constructor Details
#initialize(entity_type:, entity_id:, alert_severity:, alert_status:, alert_description:) ⇒ AccountAlerts
Returns a new instance of AccountAlerts.
33 34 35 36 37 38 39 |
# File 'lib/ruby/whatsapp/webhook/account_alerts.rb', line 33 def initialize(entity_type:, entity_id:, alert_severity:, alert_status:, alert_description:) @entity_type = entity_type @entity_id = entity_id @alert_severity = alert_severity @alert_status = alert_status @alert_description = alert_description end |
Instance Attribute Details
#alert_description ⇒ String?
31 32 33 |
# File 'lib/ruby/whatsapp/webhook/account_alerts.rb', line 31 def alert_description @alert_description end |
#alert_severity ⇒ String?
23 24 25 |
# File 'lib/ruby/whatsapp/webhook/account_alerts.rb', line 23 def alert_severity @alert_severity end |
#alert_status ⇒ String?
27 28 29 |
# File 'lib/ruby/whatsapp/webhook/account_alerts.rb', line 27 def alert_status @alert_status end |
#entity_id ⇒ String?
19 20 21 |
# File 'lib/ruby/whatsapp/webhook/account_alerts.rb', line 19 def entity_id @entity_id end |
#entity_type ⇒ String?
15 16 17 |
# File 'lib/ruby/whatsapp/webhook/account_alerts.rb', line 15 def entity_type @entity_type end |
Class Method Details
.deserialize(data) ⇒ AccountAlerts
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/ruby/whatsapp/webhook/account_alerts.rb', line 44 def deserialize(data) data ||= {} new( entity_type: data["entity_type"], entity_id: data["entity_id"], alert_severity: data["alert_severity"], alert_status: data["alert_status"], alert_description: data["alert_description"] ) end |