Class: Telnyx::Resources::Whatsapp::UserData

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/whatsapp/user_data.rb

Overview

Manage Whatsapp business accounts

Instance Method Summary collapse

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.

Parameters:



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

Parameters:

Returns:

See Also:



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

Parameters:

  • webhook_failover_url (String)

    Failover URL to send Whatsapp signup events

  • webhook_url (String)

    URL to send Whatsapp signup events

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



39
40
41
42
43
44
45
46
47
48
# File 'lib/telnyx/resources/whatsapp/user_data.rb', line 39

def update(params = {})
  parsed, options = Telnyx::Whatsapp::UserDataUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: "v2/whatsapp/user_data",
    body: parsed,
    model: Telnyx::Models::Whatsapp::UserDataUpdateResponse,
    options: options
  )
end