Example #1
0
        /// <summary>
        /// read
        /// </summary>
        ///
        /// <param name="pathWorkspaceSid"> The workspace_sid </param>
        /// <param name="endDate"> The end_date </param>
        /// <param name="friendlyName"> The friendly_name </param>
        /// <param name="minutes"> The minutes </param>
        /// <param name="startDate"> The start_date </param>
        /// <param name="pageSize"> Page size </param>
        /// <param name="limit"> Record limit </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of TaskQueuesStatistics </returns>
        public static ResourceSet <TaskQueuesStatisticsResource> Read(string pathWorkspaceSid, DateTime?endDate = null, string friendlyName = null, int?minutes = null, DateTime?startDate = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null)
        {
            var options = new ReadTaskQueuesStatisticsOptions(pathWorkspaceSid)
            {
                EndDate = endDate, FriendlyName = friendlyName, Minutes = minutes, StartDate = startDate, PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
 private static Request BuildReadRequest(ReadTaskQueuesStatisticsOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Taskrouter,
                "/v1/Workspaces/" + options.PathWorkspaceSid + "/TaskQueues/Statistics",
                queryParams: options.GetParams()
                ));
 }
Example #3
0
        /// <summary>
        /// read
        /// </summary>
        ///
        /// <param name="options"> Read TaskQueuesStatistics parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of TaskQueuesStatistics </returns>
        public static ResourceSet <TaskQueuesStatisticsResource> Read(ReadTaskQueuesStatisticsOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildReadRequest(options, client));

            var page = Page <TaskQueuesStatisticsResource> .FromJson("task_queues_statistics", response.Content);

            return(new ResourceSet <TaskQueuesStatisticsResource>(page, options, client));
        }
        /// <summary>
        /// read
        /// </summary>
        ///
        /// <param name="pathWorkspaceSid"> The workspace_sid </param>
        /// <param name="endDate"> The end_date </param>
        /// <param name="friendlyName"> The friendly_name </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="pageSize"> Page size </param>
        /// <param name="limit"> Record limit </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of TaskQueuesStatistics </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <TaskQueuesStatisticsResource> > ReadAsync(string pathWorkspaceSid, DateTime?endDate = null, string friendlyName = null, int?minutes = null, DateTime?startDate = null, string taskChannel = null, string splitByWaitTime = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null)
        {
            var options = new ReadTaskQueuesStatisticsOptions(pathWorkspaceSid)
            {
                EndDate = endDate, FriendlyName = friendlyName, Minutes = minutes, StartDate = startDate, TaskChannel = taskChannel, SplitByWaitTime = splitByWaitTime, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
Example #5
0
        /// <summary>
        /// read
        /// </summary>
        ///
        /// <param name="options"> Read TaskQueuesStatistics parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of TaskQueuesStatistics </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <TaskQueuesStatisticsResource> > ReadAsync(ReadTaskQueuesStatisticsOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildReadRequest(options, client));

            var page = Page <TaskQueuesStatisticsResource> .FromJson("task_queues_statistics", response.Content);

            return(new ResourceSet <TaskQueuesStatisticsResource>(page, options, client));
        }