Class: Telnyx::Resources::Whatsapp::UserData
- Inherits:
-
Object
- Object
- Telnyx::Resources::Whatsapp::UserData
- Defined in:
- lib/telnyx/resources/whatsapp/user_data.rb
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
Fetch Whatsapp user data.
-
#update(webhook_failover_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::Whatsapp::UserDataUpdateResponse
Update Whatsapp user data.
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.
53 54 55 |
# File 'lib/telnyx/resources/whatsapp/user_data.rb', line 53 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(request_options: {}) ⇒ Telnyx::Models::Whatsapp::UserDataRetrieveResponse
Fetch Whatsapp user data
17 18 19 20 21 22 23 24 |
# File 'lib/telnyx/resources/whatsapp/user_data.rb', line 17 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
Update Whatsapp user data
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/telnyx/resources/whatsapp/user_data.rb', line 39 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 |