Class: Telnyx::Resources::Whatsapp::PhoneNumbers::ConversationalComponents

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/whatsapp/phone_numbers/conversational_components.rb,
sig/telnyx/resources/whatsapp/phone_numbers/conversational_components.rbs

Overview

Manage Whatsapp phone numbers

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ ConversationalComponents

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 ConversationalComponents.

Parameters:



59
60
61
# File 'lib/telnyx/resources/whatsapp/phone_numbers/conversational_components.rb', line 59

def initialize(client:)
  @client = client
end

Instance Method Details

#list(phone_number, request_options: {}) ⇒ Telnyx::Models::Whatsapp::PhoneNumbers::ConversationalComponentListResponse

Get phone number conversational components

Parameters:

  • phone_number (String)

    Phone number (E.164 format)

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

Returns:

See Also:



20
21
22
23
24
25
26
27
# File 'lib/telnyx/resources/whatsapp/phone_numbers/conversational_components.rb', line 20

def list(phone_number, params = {})
  @client.request(
    method: :get,
    path: ["v2/whatsapp/phone_numbers/%1$s/conversational_components", phone_number],
    model: Telnyx::Models::Whatsapp::PhoneNumbers::ConversationalComponentListResponse,
    options: params[:request_options]
  )
end

#patch_all(phone_number, commands: nil, ice_breakers: nil, request_options: {}) ⇒ Telnyx::Models::Whatsapp::PhoneNumbers::ConversationalComponentPatchAllResponse

Update phone number conversational components

Parameters:

Returns:

See Also:



44
45
46
47
48
49
50
51
52
53
54
# File 'lib/telnyx/resources/whatsapp/phone_numbers/conversational_components.rb', line 44

def patch_all(phone_number, params = {})
  parsed, options =
    Telnyx::Whatsapp::PhoneNumbers::ConversationalComponentPatchAllParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["v2/whatsapp/phone_numbers/%1$s/conversational_components", phone_number],
    body: parsed,
    model: Telnyx::Models::Whatsapp::PhoneNumbers::ConversationalComponentPatchAllResponse,
    options: options
  )
end