Class: Whatsapp::SubscribedApp::List
- Inherits:
-
Object
- Object
- Whatsapp::SubscribedApp::List
- Extended by:
- ResponseHandling, Transport
- Defined in:
- lib/ruby/whatsapp/subscribed_app/list.rb
Overview
Lists the apps currently subscribed to a WABA's webhook notifications. Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/reference/whatsapp-business-account/subscribed-apps-api
Constant Summary
Constants included from ResponseHandling
ResponseHandling::MAX_ERROR_BODY
Class Method Summary collapse
Class Method Details
.call(client: Client.new, fields: nil) ⇒ Response::Collection
17 18 19 20 21 22 23 24 |
# File 'lib/ruby/whatsapp/subscribed_app/list.rb', line 17 def call(client: Client.new, fields: nil) params = fields ? { fields: Array(fields).join(",") } : {} response = client.connection.get(edge_path(client), params:) Response::Collection.deserialize( parse_json(handle_response!(response, error_class: Error, action: "list subscribed apps")) ) end |