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
Defined Under Namespace
Classes: CivicAddresses, LogMessages, PhoneNumbers, Releases, Uploads
Instance Attribute Summary collapse
- #civic_addresses ⇒ Telnyx::Resources::ExternalConnections::CivicAddresses readonly
- #log_messages ⇒ Telnyx::Resources::ExternalConnections::LogMessages readonly
- #phone_numbers ⇒ Telnyx::Resources::ExternalConnections::PhoneNumbers readonly
- #releases ⇒ Telnyx::Resources::ExternalConnections::Releases readonly
- #uploads ⇒ Telnyx::Resources::ExternalConnections::Uploads readonly
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.
213 214 215 216 217 218 219 220 |
# File 'lib/telnyx/resources/external_connections.rb', line 213 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)
10 11 12 |
# File 'lib/telnyx/resources/external_connections.rb', line 10 def civic_addresses @civic_addresses end |
#log_messages ⇒ Telnyx::Resources::ExternalConnections::LogMessages (readonly)
7 8 9 |
# File 'lib/telnyx/resources/external_connections.rb', line 7 def @log_messages end |
#phone_numbers ⇒ Telnyx::Resources::ExternalConnections::PhoneNumbers (readonly)
13 14 15 |
# File 'lib/telnyx/resources/external_connections.rb', line 13 def phone_numbers @phone_numbers end |
#releases ⇒ Telnyx::Resources::ExternalConnections::Releases (readonly)
16 17 18 |
# File 'lib/telnyx/resources/external_connections.rb', line 16 def releases @releases end |
#uploads ⇒ Telnyx::Resources::ExternalConnections::Uploads (readonly)
19 20 21 |
# File 'lib/telnyx/resources/external_connections.rb', line 19 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.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/telnyx/resources/external_connections.rb', line 52 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.
171 172 173 174 175 176 177 178 |
# File 'lib/telnyx/resources/external_connections.rb', line 171 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.
145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/telnyx/resources/external_connections.rb', line 145 def list(params = {}) parsed, = Telnyx::ExternalConnectionListParams.dump_request(params) @client.request( method: :get, path: "external_connections", query: parsed.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.
75 76 77 78 79 80 81 82 |
# File 'lib/telnyx/resources/external_connections.rb', line 75 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.
113 114 115 116 117 118 119 120 121 122 |
# File 'lib/telnyx/resources/external_connections.rb', line 113 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
195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/telnyx/resources/external_connections.rb', line 195 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 |