Class: Telnyx::Resources::TexmlApplications
- Inherits:
-
Object
- Object
- Telnyx::Resources::TexmlApplications
- Defined in:
- lib/telnyx/resources/texml_applications.rb,
sig/telnyx/resources/texml_applications.rbs
Overview
TeXML Applications operations
Instance Method Summary collapse
-
#create(friendly_name:, voice_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, status_callback: nil, status_callback_method: nil, tags: nil, voice_fallback_url: nil, voice_method: nil, request_options: {}) ⇒ Telnyx::Models::TexmlApplicationCreateResponse
Some parameter documentations has been truncated, see Models::TexmlApplicationCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::TexmlApplicationDeleteResponse
Permanently deletes the specified TeXML application from your account.
-
#initialize(client:) ⇒ TexmlApplications
constructor
private
A new instance of TexmlApplications.
-
#list(filter: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::TexmlApplication>
Some parameter documentations has been truncated, see Models::TexmlApplicationListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::TexmlApplicationRetrieveResponse
Retrieves the details of an existing TeXML Application.
-
#update(id, friendly_name:, voice_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, status_callback: nil, status_callback_method: nil, tags: nil, voice_fallback_url: nil, voice_method: nil, request_options: {}) ⇒ Telnyx::Models::TexmlApplicationUpdateResponse
Some parameter documentations has been truncated, see Models::TexmlApplicationUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ TexmlApplications
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 TexmlApplications.
192 193 194 |
# File 'lib/telnyx/resources/texml_applications.rb', line 192 def initialize(client:) @client = client end |
Instance Method Details
#create(friendly_name:, voice_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, status_callback: nil, status_callback_method: nil, tags: nil, voice_fallback_url: nil, voice_method: nil, request_options: {}) ⇒ Telnyx::Models::TexmlApplicationCreateResponse
Some parameter documentations has been truncated, see Models::TexmlApplicationCreateParams for more details.
Creates a TeXML application, which defines the voice URLs and settings used to serve TeXML instructions for calls, and returns the created application.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/telnyx/resources/texml_applications.rb', line 50 def create(params) parsed, = Telnyx::TexmlApplicationCreateParams.dump_request(params) @client.request( method: :post, path: "texml_applications", body: parsed, model: Telnyx::Models::TexmlApplicationCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::TexmlApplicationDeleteResponse
Permanently deletes the specified TeXML application from your account.
180 181 182 183 184 185 186 187 |
# File 'lib/telnyx/resources/texml_applications.rb', line 180 def delete(id, params = {}) @client.request( method: :delete, path: ["texml_applications/%1$s", id], model: Telnyx::Models::TexmlApplicationDeleteResponse, options: params[:request_options] ) end |
#list(filter: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::TexmlApplication>
Some parameter documentations has been truncated, see Models::TexmlApplicationListParams for more details.
Returns a list of your TeXML Applications.
156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/telnyx/resources/texml_applications.rb', line 156 def list(params = {}) parsed, = Telnyx::TexmlApplicationListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "texml_applications", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::TexmlApplication, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::TexmlApplicationRetrieveResponse
Retrieves the details of an existing TeXML Application.
72 73 74 75 76 77 78 79 |
# File 'lib/telnyx/resources/texml_applications.rb', line 72 def retrieve(id, params = {}) @client.request( method: :get, path: ["texml_applications/%1$s", id], model: Telnyx::Models::TexmlApplicationRetrieveResponse, options: params[:request_options] ) end |
#update(id, friendly_name:, voice_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, status_callback: nil, status_callback_method: nil, tags: nil, voice_fallback_url: nil, voice_method: nil, request_options: {}) ⇒ Telnyx::Models::TexmlApplicationUpdateResponse
Some parameter documentations has been truncated, see Models::TexmlApplicationUpdateParams for more details.
Updates settings of an existing TeXML Application.
125 126 127 128 129 130 131 132 133 134 |
# File 'lib/telnyx/resources/texml_applications.rb', line 125 def update(id, params) parsed, = Telnyx::TexmlApplicationUpdateParams.dump_request(params) @client.request( method: :patch, path: ["texml_applications/%1$s", id], body: parsed, model: Telnyx::Models::TexmlApplicationUpdateResponse, options: ) end |