/// <summary> /// fetch /// </summary> /// /// <param name="options"> Fetch WorkflowRealTimeStatistics parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of WorkflowRealTimeStatistics </returns> public static WorkflowRealTimeStatisticsResource Fetch(FetchWorkflowRealTimeStatisticsOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// fetch /// </summary> /// /// <param name="pathWorkspaceSid"> The workspace_sid </param> /// <param name="pathWorkflowSid"> The workflow_sid </param> /// <param name="taskChannel"> The task_channel </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of WorkflowRealTimeStatistics </returns> public static async System.Threading.Tasks.Task <WorkflowRealTimeStatisticsResource> FetchAsync(string pathWorkspaceSid, string pathWorkflowSid, string taskChannel = null, ITwilioRestClient client = null) { var options = new FetchWorkflowRealTimeStatisticsOptions(pathWorkspaceSid, pathWorkflowSid) { TaskChannel = taskChannel }; return(await FetchAsync(options, client)); }
/// <summary> /// fetch /// </summary> /// /// <param name="pathWorkspaceSid"> The workspace_sid </param> /// <param name="pathWorkflowSid"> The workflow_sid </param> /// <param name="taskChannel"> The task_channel </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of WorkflowRealTimeStatistics </returns> public static WorkflowRealTimeStatisticsResource Fetch(string pathWorkspaceSid, string pathWorkflowSid, string taskChannel = null, ITwilioRestClient client = null) { var options = new FetchWorkflowRealTimeStatisticsOptions(pathWorkspaceSid, pathWorkflowSid) { TaskChannel = taskChannel }; return(Fetch(options, client)); }
private static Request BuildFetchRequest(FetchWorkflowRealTimeStatisticsOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Taskrouter, "/v1/Workspaces/" + options.PathWorkspaceSid + "/Workflows/" + options.PathWorkflowSid + "/RealTimeStatistics", queryParams: options.GetParams() )); }
/// <summary> /// fetch /// </summary> /// <param name="options"> Fetch WorkflowRealTimeStatistics parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of WorkflowRealTimeStatistics </returns> public static async System.Threading.Tasks.Task <WorkflowRealTimeStatisticsResource> FetchAsync(FetchWorkflowRealTimeStatisticsOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }