Class: Twilio::TwiML::Enqueue

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

Overview

<Enqueue> TwiML Noun

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(name: nil, **keyword_args) {|_self| ... } ⇒ Enqueue

Returns a new instance of Enqueue.

Yields:

  • (_self)

Yield Parameters:


892
893
894
895
896
897
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 892

def initialize(name: nil, **keyword_args)
  super(**keyword_args)
  @name = 'Enqueue'
  @value = name unless name.nil?
  yield(self) if block_given?
end

Instance Method Details

#task(body, priority: nil, timeout: nil, **keyword_args) ⇒ Object

Create a new <Task> element

body

TaskRouter task attributes

priority

Task priority

timeout

Timeout associated with task

keyword_args

additional attributes


905
906
907
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 905

def task(body, priority: nil, timeout: nil, **keyword_args)
  append(Task.new(body, priority: priority, timeout: timeout, **keyword_args))
end