Class: Telnyx::Resources::TexmlApplications

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

Overview

TeXML Applications operations

Instance Method Summary collapse

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.

Parameters:



191
192
193
# File 'lib/telnyx/resources/texml_applications.rb', line 191

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.

Parameters:

  • friendly_name (String)

    A user-assigned name to help manage the application.

  • voice_url (String)

    URL to which Telnyx will deliver your XML Translator webhooks.

  • active (Boolean)

    Specifies whether the connection can be used.

  • anchorsite_override (Symbol, Telnyx::Models::AnchorsiteOverride)

    ‘Latency` directs Telnyx to route media through the site with the lowest round-t

  • call_cost_in_webhooks (Boolean)

    Specifies if call cost webhooks should be sent for this TeXML Application.

  • dtmf_type (Symbol, Telnyx::Models::DtmfType)

    Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF

  • first_command_timeout (Boolean)

    Specifies whether calls to phone numbers associated with this connection should

  • first_command_timeout_secs (Integer)

    Specifies how many seconds to wait before timing out a dial command.

  • inbound (Telnyx::Models::TexmlApplicationCreateParams::Inbound)
  • outbound (Telnyx::Models::TexmlApplicationCreateParams::Outbound)
  • status_callback (String)

    URL for Telnyx to send requests to containing information about call progress ev

  • status_callback_method (Symbol, Telnyx::Models::TexmlApplicationCreateParams::StatusCallbackMethod)

    HTTP request method Telnyx should use when requesting the status_callback URL.

  • tags (Array<String>)

    Tags associated with the Texml Application.

  • voice_fallback_url (String)

    URL to which Telnyx will deliver your XML Translator webhooks if we get an error

  • voice_method (Symbol, Telnyx::Models::TexmlApplicationCreateParams::VoiceMethod)

    HTTP request method Telnyx will use to interact with your XML Translator webhook

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

Returns:

See Also:



49
50
51
52
53
54
55
56
57
58
# File 'lib/telnyx/resources/texml_applications.rb', line 49

def create(params)
  parsed, options = Telnyx::TexmlApplicationCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "texml_applications",
    body: parsed,
    model: Telnyx::Models::TexmlApplicationCreateResponse,
    options: options
  )
end

#delete(id, request_options: {}) ⇒ Telnyx::Models::TexmlApplicationDeleteResponse

Deletes a TeXML Application.

Parameters:

  • id (String)

    Identifies the resource.

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

Returns:

See Also:



179
180
181
182
183
184
185
186
# File 'lib/telnyx/resources/texml_applications.rb', line 179

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.

Parameters:

Returns:

See Also:



155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/telnyx/resources/texml_applications.rb', line 155

def list(params = {})
  parsed, options = 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: options
  )
end

#retrieve(id, request_options: {}) ⇒ Telnyx::Models::TexmlApplicationRetrieveResponse

Retrieves the details of an existing TeXML Application.

Parameters:

  • id (String)

    Identifies the resource.

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

Returns:

See Also:



71
72
73
74
75
76
77
78
# File 'lib/telnyx/resources/texml_applications.rb', line 71

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.

Parameters:

  • id (String)

    Identifies the resource.

  • friendly_name (String)

    A user-assigned name to help manage the application.

  • voice_url (String)

    URL to which Telnyx will deliver your XML Translator webhooks.

  • active (Boolean)

    Specifies whether the connection can be used.

  • anchorsite_override (Symbol, Telnyx::Models::AnchorsiteOverride)

    ‘Latency` directs Telnyx to route media through the site with the lowest round-t

  • call_cost_in_webhooks (Boolean)

    Specifies if call cost webhooks should be sent for this TeXML Application.

  • dtmf_type (Symbol, Telnyx::Models::DtmfType)

    Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF

  • first_command_timeout (Boolean)

    Specifies whether calls to phone numbers associated with this connection should

  • first_command_timeout_secs (Integer)

    Specifies how many seconds to wait before timing out a dial command.

  • inbound (Telnyx::Models::TexmlApplicationUpdateParams::Inbound)
  • outbound (Telnyx::Models::TexmlApplicationUpdateParams::Outbound)
  • status_callback (String)

    URL for Telnyx to send requests to containing information about call progress ev

  • status_callback_method (Symbol, Telnyx::Models::TexmlApplicationUpdateParams::StatusCallbackMethod)

    HTTP request method Telnyx should use when requesting the status_callback URL.

  • tags (Array<String>)

    Tags associated with the Texml Application.

  • voice_fallback_url (String)

    URL to which Telnyx will deliver your XML Translator webhooks if we get an error

  • voice_method (Symbol, Telnyx::Models::TexmlApplicationUpdateParams::VoiceMethod)

    HTTP request method Telnyx will use to interact with your XML Translator webhook

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

Returns:

See Also:



124
125
126
127
128
129
130
131
132
133
# File 'lib/telnyx/resources/texml_applications.rb', line 124

def update(id, params)
  parsed, options = Telnyx::TexmlApplicationUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["texml_applications/%1$s", id],
    body: parsed,
    model: Telnyx::Models::TexmlApplicationUpdateResponse,
    options: options
  )
end