com.twilio.sdk.resource.instance.taskrouter
Class Task

java.lang.Object
  extended by com.twilio.sdk.resource.Resource<C>
      extended by com.twilio.sdk.resource.InstanceResource<C>
          extended by com.twilio.sdk.resource.NextGenInstanceResource<TwilioTaskRouterClient>
              extended by com.twilio.sdk.resource.instance.taskrouter.Task

public class Task
extends NextGenInstanceResource<TwilioTaskRouterClient>

A Task resource represents a single item of work waiting to be processed. See the TaskRouter documentation.


Constructor Summary
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.
 
Method Summary
 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()
          The user-defined JSON string describing the custom attributes of this work.
 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).
 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.
 
Methods inherited from class com.twilio.sdk.resource.InstanceResource
getObject, getProperty, update, update
 
Methods inherited from class com.twilio.sdk.resource.Resource
setRequestAccountSid
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Task

public Task(TwilioTaskRouterClient client)
Instantiates a task.

Parameters:
client - the client

Task

public Task(TwilioTaskRouterClient client,
            Map<String,Object> properties)
Instantiates a task.

Parameters:
client - the client
properties - the properties

Task

public Task(TwilioTaskRouterClient client,
            String workspaceSid,
            String taskSid)
Instantiates a task.

Parameters:
client - the client
workspaceSid - the workspace sid
taskSid - the task sid
Method Detail

getAccountSid

public String getAccountSid()
The ID of the Account that owns this Task.

Returns:
the account sid

getAge

public int getAge()
The number of seconds since this Task was created.

Returns:
the age

getAssignmentStatus

public String getAssignmentStatus()
A string representing the Assignment State of the task. May be "pending", "reserved", "assigned" or "canceled".

Returns:
the assignment status

getAttributes

public String getAttributes()
The user-defined JSON string describing the custom attributes of this work.

Returns:
the attributes

getDateCreated

public Date getDateCreated()
Date and time this Task was created.

Returns:
the date created

getDateUpdated

public Date getDateUpdated()
Date and time this Task was last updated.

Returns:
the date updated

getPriority

public int getPriority()
The current priority score of the task, as assigned by the workflow. Tasks with higher values will be assigned before tasks with lower values.

Returns:
the priority

getTimeout

public int getTimeout()
The Task assignment request timeout, in seconds.

Returns:
the timeout

getQueueSid

public String getQueueSid()
The unique ID of the TaskQueue this Task occupies.

Returns:
the TaskQueue sid

getSid

public String getSid()
The unique ID of this Task.

Returns:
the sid

getWorkflowSid

public String getWorkflowSid()
The ID of the Workflow responsible for routing this Task.

Returns:
the workflow sid

getWorkspaceSid

public String getWorkspaceSid()
The ID of the Workspace containing this Task.

Returns:
the workspace sid

getReason

public String getReason()
The reason the Task was canceled (if applicable).

Returns:
cancellation reason


Copyright © 2011 Twilio, Inc. All Rights Reserved.