Class: Telnyx::Resources::Texml::Accounts::Calls::Siprec

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/texml/accounts/calls/siprec.rb

Overview

TeXML REST Commands

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Siprec

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

Parameters:



54
55
56
# File 'lib/telnyx/resources/texml/accounts/calls/siprec.rb', line 54

def initialize(client:)
  @client = client
end

Instance Method Details

#siprec_sid_json(siprec_sid, account_sid:, call_sid:, status: nil, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::Calls::SiprecSiprecSidJsonResponse

Some parameter documentations has been truncated, see Models::Texml::Accounts::Calls::SiprecSiprecSidJsonParams for more details.

Updates siprec session identified by siprec_sid.

Parameters:

  • siprec_sid (String)

    Path param: The SiprecSid that uniquely identifies the Sip Recording.

  • account_sid (String)

    Path param: The id of the account the resource belongs to.

  • call_sid (String)

    Path param: The CallSid that identifies the call to update.

  • status (Symbol, Telnyx::Models::Texml::Accounts::Calls::SiprecSiprecSidJsonParams::Status)

    Body param: The new status of the resource. Specifying ‘stopped` will end the si

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

Returns:

See Also:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/telnyx/resources/texml/accounts/calls/siprec.rb', line 31

def siprec_sid_json(siprec_sid, params)
  parsed, options = Telnyx::Texml::Accounts::Calls::SiprecSiprecSidJsonParams.dump_request(params)
   =
    parsed.delete(:account_sid) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  call_sid =
    parsed.delete(:call_sid) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :post,
    path: ["texml/Accounts/%1$s/Calls/%2$s/Siprec/%3$s.json", , call_sid, siprec_sid],
    headers: {"content-type" => "application/x-www-form-urlencoded"},
    body: parsed,
    model: Telnyx::Models::Texml::Accounts::Calls::SiprecSiprecSidJsonResponse,
    options: options
  )
end