Class WorkspaceStatisticsFetcher
- java.lang.Object
-
- com.twilio.base.Fetcher<WorkspaceStatistics>
-
- com.twilio.rest.taskrouter.v1.workspace.WorkspaceStatisticsFetcher
-
public class WorkspaceStatisticsFetcher extends Fetcher<WorkspaceStatistics>
-
-
Constructor Summary
Constructors Constructor Description WorkspaceStatisticsFetcher(String pathWorkspaceSid)
Construct a new WorkspaceStatisticsFetcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WorkspaceStatistics
fetch(TwilioRestClient client)
Make the request to the Twilio API to perform the fetch.WorkspaceStatisticsFetcher
setEndDate(org.joda.time.DateTime endDate)
Filter cumulative statistics by an end date.WorkspaceStatisticsFetcher
setMinutes(Integer minutes)
Filter cumulative statistics by up to 'x' minutes in the past.WorkspaceStatisticsFetcher
setSplitByWaitTime(String splitByWaitTime)
A comma separated values for viewing splits of tasks canceled and accepted above the given threshold in seconds.WorkspaceStatisticsFetcher
setStartDate(org.joda.time.DateTime startDate)
Filter cumulative statistics by a start date.WorkspaceStatisticsFetcher
setTaskChannel(String taskChannel)
Filter real-time and cumulative statistics by TaskChannel.-
Methods inherited from class com.twilio.base.Fetcher
fetch, fetchAsync, fetchAsync
-
-
-
-
Constructor Detail
-
WorkspaceStatisticsFetcher
public WorkspaceStatisticsFetcher(String pathWorkspaceSid)
Construct a new WorkspaceStatisticsFetcher.- Parameters:
pathWorkspaceSid
- The workspace_sid
-
-
Method Detail
-
setMinutes
public WorkspaceStatisticsFetcher setMinutes(Integer minutes)
Filter cumulative statistics by up to 'x' minutes in the past. This is helpful for statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. Defaults to 15 minutes..- Parameters:
minutes
- Filter cumulative statistics by up to 'x' minutes in the past.- Returns:
- this
-
setStartDate
public WorkspaceStatisticsFetcher setStartDate(org.joda.time.DateTime startDate)
Filter cumulative statistics by a start date. This is helpful for defining a range of statistics to capture. Input is a GMT ISO 8601 Timestamp.- Parameters:
startDate
- Filter cumulative statistics by a start date.- Returns:
- this
-
setEndDate
public WorkspaceStatisticsFetcher setEndDate(org.joda.time.DateTime endDate)
Filter cumulative statistics by an end date. This is helpful for defining a range of statistics to capture. Input is a GMT ISO 8601 Timestamp.- Parameters:
endDate
- Filter cumulative statistics by an end date.- Returns:
- this
-
setTaskChannel
public WorkspaceStatisticsFetcher setTaskChannel(String taskChannel)
Filter real-time and cumulative statistics by TaskChannel. Takes in a Unique Name ("voice", "sms", "default", etc.) or a TaskChannelSid..- Parameters:
taskChannel
- Filter real-time and cumulative statistics by TaskChannel.- Returns:
- this
-
setSplitByWaitTime
public WorkspaceStatisticsFetcher setSplitByWaitTime(String splitByWaitTime)
A comma separated values for viewing splits of tasks canceled and accepted above the given threshold in seconds. Ex: "5,30" would show splits of tasks that were canceled or accepted before or after 5 seconds and respectively, 30 seconds. This is great for showing short abandoned tasks or tasks that failed to meet your SLA..- Parameters:
splitByWaitTime
- A comma separated values for viewing splits of tasks canceled and accepted above the given threshold in seconds.- Returns:
- this
-
fetch
public WorkspaceStatistics fetch(TwilioRestClient client)
Make the request to the Twilio API to perform the fetch.- Specified by:
fetch
in classFetcher<WorkspaceStatistics>
- Parameters:
client
- TwilioRestClient with which to make the request- Returns:
- Fetched WorkspaceStatistics
-
-