Class: Whatsapp::BusinessPhoneNumber::Profile::Get
- Inherits:
-
Object
- Object
- Whatsapp::BusinessPhoneNumber::Profile::Get
- Extended by:
- Transport, ResponseHandling
- Defined in:
- lib/ruby/whatsapp/business_phone_number/profile/get.rb
Overview
Reads a business profile: its about text, description, contact details, websites, industry vertical, and profile picture. Source: https://developers.facebook.com/documentation/business-messaging/whatsapp/reference/whatsapp-business-phone-number/whatsapp-business-profile-api
Defined Under Namespace
Constant Summary
Constants included from ResponseHandling
ResponseHandling::MAX_ERROR_BODY
Class Method Summary collapse
Class Method Details
.call(client: Client.new, fields: nil) ⇒ Details
44 45 46 47 48 49 50 51 |
# File 'lib/ruby/whatsapp/business_phone_number/profile/get.rb', line 44 def call(client: Client.new, fields: nil) params = fields ? { fields: Array(fields).join(",") } : {} response = client.connection.get(edge_path(client, Defaults::EDGE), params:) Details.deserialize( parse_json(handle_response!(response, error_class: Error, action: "get business profile details")) ) end |