Class: Telnyx::Resources::List

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

Overview

Voice Channels

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ List

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

Parameters:



48
49
50
# File 'lib/telnyx/resources/list.rb', line 48

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve_all(request_options: {}) ⇒ Telnyx::Models::ListRetrieveAllResponse

Retrieve a list of all phone numbers using Channel Billing, grouped by Zone.

Parameters:

Returns:

See Also:



16
17
18
19
20
21
22
23
# File 'lib/telnyx/resources/list.rb', line 16

def retrieve_all(params = {})
  @client.request(
    method: :get,
    path: "list",
    model: Telnyx::Models::ListRetrieveAllResponse,
    options: params[:request_options]
  )
end

#retrieve_by_zone(channel_zone_id, request_options: {}) ⇒ Telnyx::Models::ListRetrieveByZoneResponse

Retrieve a list of phone numbers using Channel Billing for a specific Zone.

Parameters:

  • channel_zone_id (String)

    Channel zone identifier

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

Returns:

See Also:



36
37
38
39
40
41
42
43
# File 'lib/telnyx/resources/list.rb', line 36

def retrieve_by_zone(channel_zone_id, params = {})
  @client.request(
    method: :get,
    path: ["list/%1$s", channel_zone_id],
    model: Telnyx::Models::ListRetrieveByZoneResponse,
    options: params[:request_options]
  )
end