Class: Telnyx::Resources::List

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

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:



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

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:



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

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:



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

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