Class: Twilio::TwiML::Stop

Inherits:
TwiML
  • Object
show all
Defined in:
lib/twilio-ruby/twiml/voice_response.rb

Overview

<Stop> TwiML Verb

Instance Attribute Summary

Attributes inherited from TwiML

#name

Instance Method Summary collapse

Methods inherited from TwiML

#add_child, #add_text, #append, #comment, to_lower_camel_case, #to_s, #xml

Constructor Details

#initialize(**keyword_args) {|_self| ... } ⇒ Stop

Returns a new instance of Stop.

Yields:

  • (_self)

Yield Parameters:


329
330
331
332
333
334
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 329

def initialize(**keyword_args)
  super(**keyword_args)
  @name = 'Stop'

  yield(self) if block_given?
end

Instance Method Details

#siprec(name: nil, connector_name: nil, track: nil, **keyword_args) {|siprec| ... } ⇒ Object

Create a new <Siprec> element

name

Friendly name given to SIPREC

connector_name

Unique name for Connector

track

Track to be streamed to remote service

keyword_args

additional attributes

Yields:


358
359
360
361
362
363
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 358

def siprec(name: nil, connector_name: nil, track: nil, **keyword_args)
  siprec = Siprec.new(name: name, connector_name: connector_name, track: track, **keyword_args)

  yield(siprec) if block_given?
  append(siprec)
end

#stream(name: nil, connector_name: nil, url: nil, track: nil, status_callback: nil, status_callback_method: nil, **keyword_args) {|stream| ... } ⇒ Object

Create a new <Stream> element

name

Friendly name given to the Stream

connector_name

Unique name for Stream Connector

url

URL of the remote service where the Stream is routed

track

Track to be streamed to remote service

status_callback

Status Callback URL

status_callback_method

Status Callback URL method

keyword_args

additional attributes

Yields:


345
346
347
348
349
350
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 345

def stream(name: nil, connector_name: nil, url: nil, track: nil, status_callback: nil, status_callback_method: nil, **keyword_args)
  stream = Stream.new(name: name, connector_name: connector_name, url: url, track: track, status_callback: status_callback, status_callback_method: status_callback_method, **keyword_args)

  yield(stream) if block_given?
  append(stream)
end