Class: Telnyx::Resources::CallControlApplications
- Inherits:
-
Object
- Object
- Telnyx::Resources::CallControlApplications
- Defined in:
- lib/telnyx/resources/call_control_applications.rb
Overview
Call Control applications operations
Instance Method Summary collapse
-
#create(application_name:, webhook_event_url:, active: nil, anchorsite_override: nil, call_cost_in_webhooks: nil, dtmf_type: nil, first_command_timeout: nil, first_command_timeout_secs: nil, inbound: nil, outbound: nil, redact_dtmf_debug_logging: nil, webhook_api_version: nil, webhook_event_failover_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::CallControlApplicationCreateResponse
Some parameter documentations has been truncated, see Models::CallControlApplicationCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::CallControlApplicationDeleteResponse
Deletes a call control application.
-
#initialize(client:) ⇒ CallControlApplications
constructor
private
A new instance of CallControlApplications.
-
#list(filter: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::CallControlApplication>
Some parameter documentations has been truncated, see Models::CallControlApplicationListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::CallControlApplicationRetrieveResponse
Retrieves the details of an existing call control application.
-
#update(id, application_name:, webhook_event_url:, active: nil, anchorsite_override: nil, call_cost_in_webhooks: nil, dtmf_type: nil, first_command_timeout: nil, first_command_timeout_secs: nil, inbound: nil, outbound: nil, redact_dtmf_debug_logging: nil, tags: nil, webhook_api_version: nil, webhook_event_failover_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::CallControlApplicationUpdateResponse
Some parameter documentations has been truncated, see Models::CallControlApplicationUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ CallControlApplications
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 CallControlApplications.
189 190 191 |
# File 'lib/telnyx/resources/call_control_applications.rb', line 189 def initialize(client:) @client = client end |
Instance Method Details
#create(application_name:, webhook_event_url:, active: nil, anchorsite_override: nil, call_cost_in_webhooks: nil, dtmf_type: nil, first_command_timeout: nil, first_command_timeout_secs: nil, inbound: nil, outbound: nil, redact_dtmf_debug_logging: nil, webhook_api_version: nil, webhook_event_failover_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::CallControlApplicationCreateResponse
Some parameter documentations has been truncated, see Models::CallControlApplicationCreateParams for more details.
Create a call control application.
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/telnyx/resources/call_control_applications.rb', line 47 def create(params) parsed, = Telnyx::CallControlApplicationCreateParams.dump_request(params) @client.request( method: :post, path: "call_control_applications", body: parsed, model: Telnyx::Models::CallControlApplicationCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::CallControlApplicationDeleteResponse
Deletes a call control application.
177 178 179 180 181 182 183 184 |
# File 'lib/telnyx/resources/call_control_applications.rb', line 177 def delete(id, params = {}) @client.request( method: :delete, path: ["call_control_applications/%1$s", id], model: Telnyx::Models::CallControlApplicationDeleteResponse, options: params[:request_options] ) end |
#list(filter: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::CallControlApplication>
Some parameter documentations has been truncated, see Models::CallControlApplicationListParams for more details.
Return a list of call control applications.
153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/telnyx/resources/call_control_applications.rb', line 153 def list(params = {}) parsed, = Telnyx::CallControlApplicationListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "call_control_applications", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::CallControlApplication, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::CallControlApplicationRetrieveResponse
Retrieves the details of an existing call control application.
69 70 71 72 73 74 75 76 |
# File 'lib/telnyx/resources/call_control_applications.rb', line 69 def retrieve(id, params = {}) @client.request( method: :get, path: ["call_control_applications/%1$s", id], model: Telnyx::Models::CallControlApplicationRetrieveResponse, options: params[:request_options] ) end |
#update(id, application_name:, webhook_event_url:, active: nil, anchorsite_override: nil, call_cost_in_webhooks: nil, dtmf_type: nil, first_command_timeout: nil, first_command_timeout_secs: nil, inbound: nil, outbound: nil, redact_dtmf_debug_logging: nil, tags: nil, webhook_api_version: nil, webhook_event_failover_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::CallControlApplicationUpdateResponse
Some parameter documentations has been truncated, see Models::CallControlApplicationUpdateParams for more details.
Updates settings of an existing call control application.
122 123 124 125 126 127 128 129 130 131 |
# File 'lib/telnyx/resources/call_control_applications.rb', line 122 def update(id, params) parsed, = Telnyx::CallControlApplicationUpdateParams.dump_request(params) @client.request( method: :patch, path: ["call_control_applications/%1$s", id], body: parsed, model: Telnyx::Models::CallControlApplicationUpdateResponse, options: ) end |