Class: Telnyx::Resources::InboundChannels

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

Overview

Voice Channels

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ InboundChannels

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

Parameters:



56
57
58
# File 'lib/telnyx/resources/inbound_channels.rb', line 56

def initialize(client:)
  @client = client
end

Instance Method Details

#list(request_options: {}) ⇒ Telnyx::Models::InboundChannelListResponse

Returns the US Zone voice channels for your account. voice channels allows you to use Channel Billing for calls to your Telnyx phone numbers. Please check the <a href=“support.telnyx.com/en/articles/8428806-global-channel-billing”>Telnyx Support Articles</a> section for full information and examples of how to utilize Channel Billing.

Parameters:

Returns:

See Also:



44
45
46
47
48
49
50
51
# File 'lib/telnyx/resources/inbound_channels.rb', line 44

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

#update(channels:, request_options: {}) ⇒ Telnyx::Models::InboundChannelUpdateResponse

Update the number of Voice Channels for the US Zone. This allows your account to handle multiple simultaneous inbound calls to US numbers. Use this endpoint to increase or decrease your capacity based on expected call volume.

Parameters:

  • channels (Integer)

    The new number of concurrent channels for the account

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

Returns:

See Also:



20
21
22
23
24
25
26
27
28
29
# File 'lib/telnyx/resources/inbound_channels.rb', line 20

def update(params)
  parsed, options = Telnyx::InboundChannelUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: "inbound_channels",
    body: parsed,
    model: Telnyx::Models::InboundChannelUpdateResponse,
    options: options
  )
end