/// <summary>
        /// read
        /// </summary>
        /// <param name="friendlyName"> Filter services by FriendlyName </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 Service </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <ServiceResource> > ReadAsync(string friendlyName      = null,
                                                                                                   int?pageSize             = null,
                                                                                                   long?limit               = null,
                                                                                                   ITwilioRestClient client = null)
        {
            var options = new ReadServiceOptions()
            {
                FriendlyName = friendlyName, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
        /// <summary>
        /// read
        /// </summary>
        /// <param name="friendlyName"> Filter services by FriendlyName </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 Service </returns>
        public static ResourceSet <ServiceResource> Read(string friendlyName      = null,
                                                         int?pageSize             = null,
                                                         long?limit               = null,
                                                         ITwilioRestClient client = null)
        {
            var options = new ReadServiceOptions()
            {
                FriendlyName = friendlyName, PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
Beispiel #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));
        }