Class: Whatsapp::Webhook::PhoneNumberNameUpdate
- Inherits:
-
Object
- Object
- Whatsapp::Webhook::PhoneNumberNameUpdate
- Defined in:
- lib/ruby/whatsapp/webhook/phone_number_name_update.rb
Overview
Display name verification outcomes for a business phone number.
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
-
#decision ⇒ String?
E.g.
- #phone_number ⇒ String?
- #rejection_reason ⇒ String?
- #requested_verified_name ⇒ String?
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(phone_number:, decision:, requested_verified_name:, rejection_reason: nil) ⇒ PhoneNumberNameUpdate
constructor
A new instance of PhoneNumberNameUpdate.
Constructor Details
#initialize(phone_number:, decision:, requested_verified_name:, rejection_reason: nil) ⇒ PhoneNumberNameUpdate
Returns a new instance of PhoneNumberNameUpdate.
28 29 30 31 32 33 |
# File 'lib/ruby/whatsapp/webhook/phone_number_name_update.rb', line 28 def initialize(phone_number:, decision:, requested_verified_name:, rejection_reason: nil) @phone_number = phone_number @decision = decision @requested_verified_name = requested_verified_name @rejection_reason = rejection_reason end |
Instance Attribute Details
#decision ⇒ String?
Returns e.g. "APPROVED", "REJECTED".
18 19 20 |
# File 'lib/ruby/whatsapp/webhook/phone_number_name_update.rb', line 18 def decision @decision end |
#phone_number ⇒ String?
14 15 16 |
# File 'lib/ruby/whatsapp/webhook/phone_number_name_update.rb', line 14 def phone_number @phone_number end |
#rejection_reason ⇒ String?
26 27 28 |
# File 'lib/ruby/whatsapp/webhook/phone_number_name_update.rb', line 26 def rejection_reason @rejection_reason end |
#requested_verified_name ⇒ String?
22 23 24 |
# File 'lib/ruby/whatsapp/webhook/phone_number_name_update.rb', line 22 def requested_verified_name @requested_verified_name end |
Class Method Details
.deserialize(data) ⇒ PhoneNumberNameUpdate
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/ruby/whatsapp/webhook/phone_number_name_update.rb', line 38 def deserialize(data) data ||= {} new( phone_number: data["phone_number"], decision: data["decision"], requested_verified_name: data["requested_verified_name"], rejection_reason: data["rejection_reason"] ) end |