예제 #1
0
        /// <summary>
        /// fetch
        /// </summary>
        ///
        /// <param name="options"> Fetch WorkersCumulativeStatistics parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of WorkersCumulativeStatistics </returns>
        public static WorkersCumulativeStatisticsResource Fetch(FetchWorkersCumulativeStatisticsOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
예제 #2
0
        /// <summary>
        /// fetch
        /// </summary>
        ///
        /// <param name="pathWorkspaceSid"> The workspace_sid </param>
        /// <param name="endDate"> The end_date </param>
        /// <param name="minutes"> The minutes </param>
        /// <param name="startDate"> The start_date </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 WorkersCumulativeStatistics </returns>
        public static async System.Threading.Tasks.Task <WorkersCumulativeStatisticsResource> FetchAsync(string pathWorkspaceSid, DateTime?endDate = null, int?minutes = null, DateTime?startDate = null, string taskChannel = null, ITwilioRestClient client = null)
        {
            var options = new FetchWorkersCumulativeStatisticsOptions(pathWorkspaceSid)
            {
                EndDate = endDate, Minutes = minutes, StartDate = startDate, TaskChannel = taskChannel
            };

            return(await FetchAsync(options, client));
        }
예제 #3
0
        /// <summary>
        /// fetch
        /// </summary>
        ///
        /// <param name="pathWorkspaceSid"> The workspace_sid </param>
        /// <param name="endDate"> The end_date </param>
        /// <param name="minutes"> The minutes </param>
        /// <param name="startDate"> The start_date </param>
        /// <param name="taskChannel"> The task_channel </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of WorkersCumulativeStatistics </returns>
        public static WorkersCumulativeStatisticsResource Fetch(string pathWorkspaceSid, DateTime?endDate = null, int?minutes = null, DateTime?startDate = null, string taskChannel = null, ITwilioRestClient client = null)
        {
            var options = new FetchWorkersCumulativeStatisticsOptions(pathWorkspaceSid)
            {
                EndDate = endDate, Minutes = minutes, StartDate = startDate, TaskChannel = taskChannel
            };

            return(Fetch(options, client));
        }
예제 #4
0
 private static Request BuildFetchRequest(FetchWorkersCumulativeStatisticsOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Taskrouter,
                "/v1/Workspaces/" + options.PathWorkspaceSid + "/Workers/CumulativeStatistics",
                queryParams: options.GetParams()
                ));
 }
예제 #5
0
        /// <summary>
        /// fetch
        /// </summary>
        ///
        /// <param name="options"> Fetch WorkersCumulativeStatistics parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of WorkersCumulativeStatistics </returns>
        public static async System.Threading.Tasks.Task <WorkersCumulativeStatisticsResource> FetchAsync(FetchWorkersCumulativeStatisticsOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }