コード例 #1
0
        /// <summary>
        /// Retrieve a list of Add-ons currently available to be installed.
        /// </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 AvailableAddOn </returns>
        public static ResourceSet <AvailableAddOnResource> Read(int?pageSize = null, long?limit = null, ITwilioRestClient client = null)
        {
            var options = new ReadAvailableAddOnOptions {
                PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
コード例 #2
0
        /// <summary>
        /// Retrieve a list of Add-ons currently available to be installed.
        /// </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 AvailableAddOn </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <AvailableAddOnResource> > ReadAsync(int?pageSize = null, long?limit = null, ITwilioRestClient client = null)
        {
            var options = new ReadAvailableAddOnOptions {
                PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
コード例 #3
0
 private static Request BuildReadRequest(ReadAvailableAddOnOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Preview,
                "/marketplace/AvailableAddOns",
                queryParams: options.GetParams()
                ));
 }
コード例 #4
0
        /// <summary>
        /// Retrieve a list of Add-ons currently available to be installed.
        /// </summary>
        ///
        /// <param name="options"> Read AvailableAddOn parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AvailableAddOn </returns>
        public static ResourceSet <AvailableAddOnResource> Read(ReadAvailableAddOnOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildReadRequest(options, client));

            var page = Page <AvailableAddOnResource> .FromJson("available_add_ons", response.Content);

            return(new ResourceSet <AvailableAddOnResource>(page, options, client));
        }
コード例 #5
0
        /// <summary>
        /// Retrieve a list of Add-ons currently available to be installed.
        /// </summary>
        /// <param name="options"> Read AvailableAddOn parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of AvailableAddOn </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <AvailableAddOnResource> > ReadAsync(ReadAvailableAddOnOptions options,
                                                                                                          ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildReadRequest(options, client));

            var page = Page <AvailableAddOnResource> .FromJson("available_add_ons", response.Content);

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