Class: Telnyx::Resources::SiprecConnectors

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

Overview

SIPREC connectors configuration.

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ SiprecConnectors

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 SiprecConnectors.

Parameters:



114
115
116
# File 'lib/telnyx/resources/siprec_connectors.rb', line 114

def initialize(client:)
  @client = client
end

Instance Method Details

#create(host:, name:, port:, app_subdomain: nil, request_options: {}) ⇒ Telnyx::Models::SiprecConnectorCreateResponse

Some parameter documentations has been truncated, see Models::SiprecConnectorCreateParams for more details.

Creates a new SIPREC connector configuration.

Parameters:

  • host (String)

    Hostname/IPv4 address of the SIPREC SRS.

  • name (String)

    Name for the SIPREC connector resource.

  • port (Integer)

    Port for the SIPREC SRS.

  • app_subdomain (String)

    Subdomain to route the call when using Telnyx SRS (optional for non-Telnyx SRS).

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

Returns:

See Also:



27
28
29
30
31
32
33
34
35
36
# File 'lib/telnyx/resources/siprec_connectors.rb', line 27

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

#delete(connector_name, request_options: {}) ⇒ nil

Deletes a stored SIPREC connector.

Parameters:

  • connector_name (String)

    Uniquely identifies a SIPREC connector.

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

Returns:

  • (nil)

See Also:



102
103
104
105
106
107
108
109
# File 'lib/telnyx/resources/siprec_connectors.rb', line 102

def delete(connector_name, params = {})
  @client.request(
    method: :delete,
    path: ["siprec_connectors/%1$s", connector_name],
    model: NilClass,
    options: params[:request_options]
  )
end

#retrieve(connector_name, request_options: {}) ⇒ Telnyx::Models::SiprecConnectorRetrieveResponse

Returns details of a stored SIPREC connector.

Parameters:

  • connector_name (String)

    Uniquely identifies a SIPREC connector.

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

Returns:

See Also:



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

def retrieve(connector_name, params = {})
  @client.request(
    method: :get,
    path: ["siprec_connectors/%1$s", connector_name],
    model: Telnyx::Models::SiprecConnectorRetrieveResponse,
    options: params[:request_options]
  )
end

#update(connector_name, host:, name:, port:, app_subdomain: nil, request_options: {}) ⇒ Telnyx::Models::SiprecConnectorUpdateResponse

Some parameter documentations has been truncated, see Models::SiprecConnectorUpdateParams for more details.

Updates a stored SIPREC connector configuration.

Parameters:

  • connector_name (String)

    Uniquely identifies a SIPREC connector.

  • host (String)

    Hostname/IPv4 address of the SIPREC SRS.

  • name (String)

    Name for the SIPREC connector resource.

  • port (Integer)

    Port for the SIPREC SRS.

  • app_subdomain (String)

    Subdomain to route the call when using Telnyx SRS (optional for non-Telnyx SRS).

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

Returns:

See Also:



80
81
82
83
84
85
86
87
88
89
# File 'lib/telnyx/resources/siprec_connectors.rb', line 80

def update(connector_name, params)
  parsed, options = Telnyx::SiprecConnectorUpdateParams.dump_request(params)
  @client.request(
    method: :put,
    path: ["siprec_connectors/%1$s", connector_name],
    body: parsed,
    model: Telnyx::Models::SiprecConnectorUpdateResponse,
    options: options
  )
end