Class: Telnyx::Resources::ChannelZones
- Inherits:
-
Object
- Object
- Telnyx::Resources::ChannelZones
- Defined in:
- lib/telnyx/resources/channel_zones.rb,
sig/telnyx/resources/channel_zones.rbs
Overview
Voice Channels
Instance Method Summary collapse
-
#initialize(client:) ⇒ ChannelZones
constructor
private
A new instance of ChannelZones.
-
#list(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::GcbChannelZone>
Returns the non-US voice channels for your account.
-
#update(channel_zone_id, channels:, request_options: {}) ⇒ Telnyx::Models::GcbChannelZone
Update the number of Voice Channels for the Non-US Zones.
Constructor Details
#initialize(client:) ⇒ ChannelZones
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 ChannelZones.
65 66 67 |
# File 'lib/telnyx/resources/channel_zones.rb', line 65 def initialize(client:) @client = client end |
Instance Method Details
#list(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::GcbChannelZone>
Returns the non-US voice channels for your account. voice channels allow you to use Channel Billing for calls to your Telnyx phone numbers. Please check the Telnyx Support Articles section for full information and examples of how to utilize Channel Billing.
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/telnyx/resources/channel_zones.rb', line 49 def list(params = {}) parsed, = Telnyx::ChannelZoneListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "channel_zones", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::GcbChannelZone, options: ) end |
#update(channel_zone_id, channels:, request_options: {}) ⇒ Telnyx::Models::GcbChannelZone
Update the number of Voice Channels for the Non-US Zones. This allows your account to handle multiple simultaneous inbound calls to Non-US numbers. Use this endpoint to increase or decrease your capacity based on expected call volume.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/telnyx/resources/channel_zones.rb', line 23 def update(channel_zone_id, params) parsed, = Telnyx::ChannelZoneUpdateParams.dump_request(params) @client.request( method: :put, path: ["channel_zones/%1$s", channel_zone_id], body: parsed, model: Telnyx::GcbChannelZone, options: ) end |