Ejemplo n.º 1
0
        /// <summary>
        /// fetch
        /// </summary>
        ///
        /// <param name="options"> Fetch TaskQueueCumulativeStatistics parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of TaskQueueCumulativeStatistics </returns>
        public static TaskQueueCumulativeStatisticsResource Fetch(FetchTaskQueueCumulativeStatisticsOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
 private static Request BuildFetchRequest(FetchTaskQueueCumulativeStatisticsOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Taskrouter,
                "/v1/Workspaces/" + options.PathWorkspaceSid + "/TaskQueues/" + options.PathTaskQueueSid + "/CumulativeStatistics",
                queryParams: options.GetParams()
                ));
 }
Ejemplo n.º 3
0
        /// <summary>
        /// fetch
        /// </summary>
        ///
        /// <param name="pathWorkspaceSid"> The workspace_sid </param>
        /// <param name="pathTaskQueueSid"> The task_queue_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="splitByWaitTime"> The split_by_wait_time </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of TaskQueueCumulativeStatistics </returns>
        public static TaskQueueCumulativeStatisticsResource Fetch(string pathWorkspaceSid, string pathTaskQueueSid, DateTime?endDate = null, int?minutes = null, DateTime?startDate = null, string taskChannel = null, string splitByWaitTime = null, ITwilioRestClient client = null)
        {
            var options = new FetchTaskQueueCumulativeStatisticsOptions(pathWorkspaceSid, pathTaskQueueSid)
            {
                EndDate = endDate, Minutes = minutes, StartDate = startDate, TaskChannel = taskChannel, SplitByWaitTime = splitByWaitTime
            };

            return(Fetch(options, client));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="options"> Fetch TaskQueueCumulativeStatistics parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of TaskQueueCumulativeStatistics </returns>
        public static async System.Threading.Tasks.Task <TaskQueueCumulativeStatisticsResource> FetchAsync(FetchTaskQueueCumulativeStatisticsOptions options,
                                                                                                           ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }