Class: Telnyx::Resources::List
- Inherits:
-
Object
- Object
- Telnyx::Resources::List
- Defined in:
- lib/telnyx/resources/list.rb
Overview
Voice Channels
Instance Method Summary collapse
-
#initialize(client:) ⇒ List
constructor
private
A new instance of List.
-
#retrieve_all(request_options: {}) ⇒ Telnyx::Models::ListRetrieveAllResponse
Retrieve a list of all phone numbers using Channel Billing, grouped by Zone.
-
#retrieve_by_zone(channel_zone_id, request_options: {}) ⇒ Telnyx::Models::ListRetrieveByZoneResponse
Retrieve a list of phone numbers using Channel Billing for a specific Zone.
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.
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.
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.
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 |