Class: Whatsapp::BusinessPhoneNumber::Account::Get
- Inherits:
-
Object
- Object
- Whatsapp::BusinessPhoneNumber::Account::Get
- Extended by:
- Transport, ResponseHandling
- Defined in:
- lib/ruby/whatsapp/business_phone_number/account/get.rb
Overview
Reads a WhatsApp Business Account's details: its configuration, review and verification status, and ownership. Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/reference/whatsapp-business-account/whatsapp-business-account-api
Defined Under Namespace
Modules: Fields
Constant Summary
Constants included from ResponseHandling
ResponseHandling::MAX_ERROR_BODY
Class Method Summary collapse
Class Method Details
.call(client: Client.new, fields: nil) ⇒ Details
41 42 43 44 45 46 47 48 |
# File 'lib/ruby/whatsapp/business_phone_number/account/get.rb', line 41 def call(client: Client.new, fields: nil) params = fields ? { fields: Array(fields).join(",") } : {} response = client.connection.get(node_path(client), params:) Details.deserialize( parse_json(handle_response!(response, error_class: Error, action: "get business account details")) ) end |