Example #1
0
        /// <summary>
        /// read
        /// </summary>
        /// <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 Service </returns>
        public static ResourceSet <ServiceResource> Read(int?pageSize             = null,
                                                         long?limit               = null,
                                                         ITwilioRestClient client = null)
        {
            var options = new ReadServiceOptions()
            {
                PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
Example #2
0
        /// <summary>
        /// read
        /// </summary>
        /// <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 Service </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <ServiceResource> > ReadAsync(int?pageSize             = null,
                                                                                                   long?limit               = null,
                                                                                                   ITwilioRestClient client = null)
        {
            var options = new ReadServiceOptions()
            {
                PageSize = pageSize, Limit = limit
            };

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

            var page = Page <ServiceResource> .FromJson("services", response.Content);

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