Class: Whatsapp::SubscribedApp::Response::Unsubscription
- Inherits:
-
Object
- Object
- Whatsapp::SubscribedApp::Response::Unsubscription
- Defined in:
- lib/ruby/whatsapp/subscribed_app/response/unsubscription.rb
Overview
The response to unsubscribing this app from a WABA's webhook notifications:
{success}.
Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/reference/whatsapp-business-account/subscribed-apps-api
Instance Attribute Summary collapse
-
#success ⇒ Boolean
Whether the app was unsubscribed.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(success: false) ⇒ Unsubscription
constructor
A new instance of Unsubscription.
Constructor Details
#initialize(success: false) ⇒ Unsubscription
Returns a new instance of Unsubscription.
15 16 17 |
# File 'lib/ruby/whatsapp/subscribed_app/response/unsubscription.rb', line 15 def initialize(success: false) @success = success end |
Instance Attribute Details
#success ⇒ Boolean
Returns Whether the app was unsubscribed.
12 13 14 |
# File 'lib/ruby/whatsapp/subscribed_app/response/unsubscription.rb', line 12 def success @success end |
Class Method Details
.deserialize(response) ⇒ Unsubscription
22 23 24 25 26 |
# File 'lib/ruby/whatsapp/subscribed_app/response/unsubscription.rb', line 22 def deserialize(response) response ||= {} new(success: response["success"] == true) end |