Class: Whatsapp::Webhook::Security
- Inherits:
-
Object
- Object
- Whatsapp::Webhook::Security
- Defined in:
- lib/ruby/whatsapp/webhook/security.rb
Overview
Phone number security settings modifications (e.g. two-step verification 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
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(display_phone_number:, event:, requester: nil) ⇒ Security
constructor
A new instance of Security.
Constructor Details
#initialize(display_phone_number:, event:, requester: nil) ⇒ Security
Returns a new instance of Security.
24 25 26 27 28 |
# File 'lib/ruby/whatsapp/webhook/security.rb', line 24 def initialize(display_phone_number:, event:, requester: nil) @display_phone_number = display_phone_number @event = event @requester = requester end |
Instance Attribute Details
#display_phone_number ⇒ String?
14 15 16 |
# File 'lib/ruby/whatsapp/webhook/security.rb', line 14 def display_phone_number @display_phone_number end |
#event ⇒ String?
18 19 20 |
# File 'lib/ruby/whatsapp/webhook/security.rb', line 18 def event @event end |
#requester ⇒ String?
22 23 24 |
# File 'lib/ruby/whatsapp/webhook/security.rb', line 22 def requester @requester end |
Class Method Details
.deserialize(data) ⇒ Security
33 34 35 36 37 |
# File 'lib/ruby/whatsapp/webhook/security.rb', line 33 def deserialize(data) data ||= {} new(display_phone_number: data["display_phone_number"], event: data["event"], requester: data["requester"]) end |