Class: Telnyx::Resources::ExternalConnections
- Inherits:
-
Object
- Object
- Telnyx::Resources::ExternalConnections
- Defined in:
- lib/telnyx/resources/external_connections.rb,
lib/telnyx/resources/external_connections/uploads.rb,
lib/telnyx/resources/external_connections/releases.rb,
lib/telnyx/resources/external_connections/log_messages.rb,
lib/telnyx/resources/external_connections/phone_numbers.rb,
lib/telnyx/resources/external_connections/civic_addresses.rb
Overview
External Connections operations
Defined Under Namespace
Classes: CivicAddresses, LogMessages, PhoneNumbers, Releases, Uploads
Instance Attribute Summary collapse
-
#civic_addresses ⇒ Telnyx::Resources::ExternalConnections::CivicAddresses
readonly
External Connections operations.
-
#log_messages ⇒ Telnyx::Resources::ExternalConnections::LogMessages
readonly
External Connections operations.
-
#phone_numbers ⇒ Telnyx::Resources::ExternalConnections::PhoneNumbers
readonly
External Connections operations.
-
#releases ⇒ Telnyx::Resources::ExternalConnections::Releases
readonly
External Connections operations.
-
#uploads ⇒ Telnyx::Resources::ExternalConnections::Uploads
readonly
External Connections operations.
Instance Method Summary collapse
-
#create(external_sip_connection:, outbound:, active: nil, inbound: nil, tags: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::ExternalConnectionCreateResponse
Some parameter documentations has been truncated, see Models::ExternalConnectionCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::ExternalConnectionDeleteResponse
Permanently deletes an External Connection.
-
#initialize(client:) ⇒ ExternalConnections
constructor
private
A new instance of ExternalConnections.
-
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::ExternalConnection>
Some parameter documentations has been truncated, see Models::ExternalConnectionListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::ExternalConnectionRetrieveResponse
Return the details of an existing External Connection inside the ‘data’ attribute of the response.
-
#update(id, outbound:, active: nil, inbound: nil, tags: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::ExternalConnectionUpdateResponse
Some parameter documentations has been truncated, see Models::ExternalConnectionUpdateParams for more details.
-
#update_location(location_id, id:, static_emergency_address_id:, request_options: {}) ⇒ Telnyx::Models::ExternalConnectionUpdateLocationResponse
Update a location’s static emergency address.
Constructor Details
#initialize(client:) ⇒ ExternalConnections
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 ExternalConnections.
220 221 222 223 224 225 226 227 |
# File 'lib/telnyx/resources/external_connections.rb', line 220 def initialize(client:) @client = client @log_messages = Telnyx::Resources::ExternalConnections::LogMessages.new(client: client) @civic_addresses = Telnyx::Resources::ExternalConnections::CivicAddresses.new(client: client) @phone_numbers = Telnyx::Resources::ExternalConnections::PhoneNumbers.new(client: client) @releases = Telnyx::Resources::ExternalConnections::Releases.new(client: client) @uploads = Telnyx::Resources::ExternalConnections::Uploads.new(client: client) end |
Instance Attribute Details
#civic_addresses ⇒ Telnyx::Resources::ExternalConnections::CivicAddresses (readonly)
External Connections operations
13 14 15 |
# File 'lib/telnyx/resources/external_connections.rb', line 13 def civic_addresses @civic_addresses end |
#log_messages ⇒ Telnyx::Resources::ExternalConnections::LogMessages (readonly)
External Connections operations
9 10 11 |
# File 'lib/telnyx/resources/external_connections.rb', line 9 def @log_messages end |
#phone_numbers ⇒ Telnyx::Resources::ExternalConnections::PhoneNumbers (readonly)
External Connections operations
17 18 19 |
# File 'lib/telnyx/resources/external_connections.rb', line 17 def phone_numbers @phone_numbers end |
#releases ⇒ Telnyx::Resources::ExternalConnections::Releases (readonly)
External Connections operations
21 22 23 |
# File 'lib/telnyx/resources/external_connections.rb', line 21 def releases @releases end |
#uploads ⇒ Telnyx::Resources::ExternalConnections::Uploads (readonly)
External Connections operations
25 26 27 |
# File 'lib/telnyx/resources/external_connections.rb', line 25 def uploads @uploads end |
Instance Method Details
#create(external_sip_connection:, outbound:, active: nil, inbound: nil, tags: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::ExternalConnectionCreateResponse
Some parameter documentations has been truncated, see Models::ExternalConnectionCreateParams for more details.
Creates a new External Connection based on the parameters sent in the request. The external_sip_connection and outbound voice profile id are required. Once created, you can assign phone numbers to your application using the ‘/phone_numbers` endpoint.
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/telnyx/resources/external_connections.rb', line 58 def create(params) parsed, = Telnyx::ExternalConnectionCreateParams.dump_request(params) @client.request( method: :post, path: "external_connections", body: parsed, model: Telnyx::Models::ExternalConnectionCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::ExternalConnectionDeleteResponse
Permanently deletes an External Connection. Deletion may be prevented if the application is in use by phone numbers, is active, or if it is an Operator Connect connection. To remove an Operator Connect integration please contact Telnyx support.
178 179 180 181 182 183 184 185 |
# File 'lib/telnyx/resources/external_connections.rb', line 178 def delete(id, params = {}) @client.request( method: :delete, path: ["external_connections/%1$s", id], model: Telnyx::Models::ExternalConnectionDeleteResponse, options: params[:request_options] ) end |
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::ExternalConnection>
Some parameter documentations has been truncated, see Models::ExternalConnectionListParams for more details.
This endpoint returns a list of your External Connections inside the ‘data’ attribute of the response. External Connections are used by Telnyx customers to seamless configure SIP trunking integrations with Telnyx Partners, through External Voice Integrations in Mission Control Portal.
151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/telnyx/resources/external_connections.rb', line 151 def list(params = {}) parsed, = Telnyx::ExternalConnectionListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "external_connections", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::ExternalConnection, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::ExternalConnectionRetrieveResponse
Return the details of an existing External Connection inside the ‘data’ attribute of the response.
81 82 83 84 85 86 87 88 |
# File 'lib/telnyx/resources/external_connections.rb', line 81 def retrieve(id, params = {}) @client.request( method: :get, path: ["external_connections/%1$s", id], model: Telnyx::Models::ExternalConnectionRetrieveResponse, options: params[:request_options] ) end |
#update(id, outbound:, active: nil, inbound: nil, tags: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::ExternalConnectionUpdateResponse
Some parameter documentations has been truncated, see Models::ExternalConnectionUpdateParams for more details.
Updates settings of an existing External Connection based on the parameters of the request.
119 120 121 122 123 124 125 126 127 128 |
# File 'lib/telnyx/resources/external_connections.rb', line 119 def update(id, params) parsed, = Telnyx::ExternalConnectionUpdateParams.dump_request(params) @client.request( method: :patch, path: ["external_connections/%1$s", id], body: parsed, model: Telnyx::Models::ExternalConnectionUpdateResponse, options: ) end |
#update_location(location_id, id:, static_emergency_address_id:, request_options: {}) ⇒ Telnyx::Models::ExternalConnectionUpdateLocationResponse
Update a location’s static emergency address
202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/telnyx/resources/external_connections.rb', line 202 def update_location(location_id, params) parsed, = Telnyx::ExternalConnectionUpdateLocationParams.dump_request(params) id = parsed.delete(:id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :patch, path: ["external_connections/%1$s/locations/%2$s", id, location_id], body: parsed, model: Telnyx::Models::ExternalConnectionUpdateLocationResponse, options: ) end |