/// <summary> /// Add a Call to a TaskQueue /// </summary> /// <param name="attributes"></param> /// <param name="task"></param> /// <returns></returns> public TwilioResponse EnqueueTask(object attributes, Task task) { var enqueue = new Enqueue(String.Empty, attributes); Current.Push(enqueue); Add(task); Add(Current.Pop()); return(this); }
/// <summary> /// Create a new <Enqueue/> element and append it as a child of this element. /// </summary> /// <param name="name"> Friendly name, the body of the TwiML Element. </param> /// <param name="action"> Action URL </param> /// <param name="method"> Action URL method </param> /// <param name="waitUrl"> Wait URL </param> /// <param name="waitUrlMethod"> Wait URL method </param> /// <param name="workflowSid"> TaskRouter Workflow SID </param> public VoiceResponse Enqueue(string name = null, Uri action = null, Twilio.Http.HttpMethod method = null, Uri waitUrl = null, Twilio.Http.HttpMethod waitUrlMethod = null, string workflowSid = null) { var newChild = new Enqueue(name, action, method, waitUrl, waitUrlMethod, workflowSid); this.Append(newChild); return this; }
/// <summary> /// Add a Call to a TaskQueue /// </summary> /// <param name="name"></param> /// <returns></returns> public TwilioResponse Enqueue(object attributes, string taskAttributes) { var enqueue = new Enqueue(String.Empty, attributes); Current.Push(enqueue); if (!string.IsNullOrEmpty(taskAttributes)) { Add(new TaskAttributes(taskAttributes)); } Add(Current.Pop()); return(this); }
public VoiceResponse Enqueue(Enqueue enqueue) { this.Append(enqueue); return this; }
/// <summary> /// Add a Call to a TaskQueue /// </summary> /// <param name="attributes"></param> /// <param name="task"></param> /// <returns></returns> public TwilioResponse EnqueueTask(object attributes, Task task) { var enqueue = new Enqueue(String.Empty, attributes); Current.Push(enqueue); Add(task); Add(Current.Pop()); return this; }
/// <summary> /// Add a Call to a TaskQueue /// </summary> /// <param name="attributes"></param> /// <param name="taskAttributes">json blob for TaskRouter Task Attributes</param> /// <param name="taskProperties">additional parameters for a TaskRouter Task (priority, timeout)</param> /// <returns></returns> public TwilioResponse Enqueue(object attributes, string taskAttributes, object taskProperties) { var enqueue = new Enqueue(String.Empty, attributes); Current.Push(enqueue); if (!string.IsNullOrEmpty(taskAttributes)) { Add(new Task(taskAttributes, taskProperties)); } Add(Current.Pop()); return this; }