public class Task extends NextGenInstanceResource<TwilioTaskRouterClient>
| Constructor and Description |
|---|
Task(TwilioTaskRouterClient client)
Instantiates a task.
|
Task(TwilioTaskRouterClient client,
Map<String,Object> properties)
Instantiates a task.
|
Task(TwilioTaskRouterClient client,
String workspaceSid,
String taskSid)
Instantiates a task.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(String reason)
Cancel a task with an optional reason
|
String |
getAccountSid()
The ID of the
Account that owns this Task. |
int |
getAge()
The number of seconds since this Task was created.
|
String |
getAssignmentStatus()
A string representing the Assignment State of the task.
|
String |
getAttributes()
A user-defined JSON object describing this Task.
|
Date |
getDateCreated()
Date and time this Task was created.
|
Date |
getDateUpdated()
Date and time this Task was last updated.
|
int |
getPriority()
The current priority score of the task, as assigned by the workflow.
|
String |
getQueueSid()
The unique ID of the
TaskQueue this Task occupies. |
String |
getReason()
The reason the Task was canceled (if applicable).
|
ReservationList |
getReservations()
Retrieve the
ReservationList for this Task. |
String |
getSid()
The unique ID of this Task.
|
int |
getTimeout()
The Task assignment request timeout, in seconds.
|
String |
getWorkflowSid()
The ID of the
Workflow responsible for routing this Task. |
String |
getWorkspaceSid()
The ID of the
Workspace containing this Task. |
Map<String,Object> |
parseAttributes()
A map that represents the JSON describing this Task.
|
void |
update(Map<String,String> attributes,
Integer priority)
Update a task with new attributes and/or priority
|
getCastedObject, getObject, getProperty, toJSON, update, updatesetRequestAccountSidpublic Task(TwilioTaskRouterClient client)
client - the clientpublic Task(TwilioTaskRouterClient client, Map<String,Object> properties)
client - the clientproperties - the propertiespublic Task(TwilioTaskRouterClient client, String workspaceSid, String taskSid)
client - the clientworkspaceSid - the workspace sidtaskSid - the task sidpublic void update(Map<String,String> attributes, Integer priority) throws TwilioRestException
attributes - new attributes for the taskpriority - new priority of the taskTwilioRestExceptionpublic void cancel(String reason) throws TwilioRestException
reason - optional reason for cancellationTwilioRestExceptionpublic String getAccountSid()
Account that owns this Task.public int getAge()
public String getAssignmentStatus()
public String getAttributes()
public Map<String,Object> parseAttributes() throws org.json.simple.parser.ParseException
org.json.simple.parser.ParseExceptionpublic Date getDateCreated()
public Date getDateUpdated()
public int getPriority()
public int getTimeout()
public String getQueueSid()
TaskQueue this Task occupies.TaskQueue sidpublic String getSid()
public String getWorkflowSid()
Workflow responsible for routing this Task.public String getWorkspaceSid()
Workspace containing this Task.public String getReason()
public ReservationList getReservations()
ReservationList for this Task.Copyright © 2011 Twilio, Inc. All Rights Reserved.