Class: Telnyx::Resources::Whatsapp::UserData
- Inherits:
-
Object
- Object
- Telnyx::Resources::Whatsapp::UserData
- Defined in:
- lib/telnyx/resources/whatsapp/user_data.rb,
sig/telnyx/resources/whatsapp/user_data.rbs
Overview
Manage Whatsapp business accounts
Instance Method Summary collapse
-
#initialize(client:) ⇒ UserData
constructor
private
A new instance of UserData.
-
#retrieve(request_options: {}) ⇒ Telnyx::Models::Whatsapp::UserDataRetrieveResponse
Returns the WhatsApp user-data settings associated with the authenticated Telnyx account.
-
#update(webhook_failover_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::Whatsapp::UserDataUpdateResponse
Updates the supplied WhatsApp user-data settings for the authenticated Telnyx account.
Constructor Details
#initialize(client:) ⇒ UserData
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of UserData.
55 56 57 |
# File 'lib/telnyx/resources/whatsapp/user_data.rb', line 55 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(request_options: {}) ⇒ Telnyx::Models::Whatsapp::UserDataRetrieveResponse
Returns the WhatsApp user-data settings associated with the authenticated Telnyx account.
18 19 20 21 22 23 24 25 |
# File 'lib/telnyx/resources/whatsapp/user_data.rb', line 18 def retrieve(params = {}) @client.request( method: :get, path: "v2/whatsapp/user_data", model: Telnyx::Models::Whatsapp::UserDataRetrieveResponse, options: params[:request_options] ) end |
#update(webhook_failover_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::Whatsapp::UserDataUpdateResponse
Updates the supplied WhatsApp user-data settings for the authenticated Telnyx account.
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/telnyx/resources/whatsapp/user_data.rb', line 41 def update(params = {}) parsed, = Telnyx::Whatsapp::UserDataUpdateParams.dump_request(params) @client.request( method: :patch, path: "v2/whatsapp/user_data", body: parsed, model: Telnyx::Models::Whatsapp::UserDataUpdateResponse, options: ) end |