Beispiel #1
0
        /// <summary>
        /// Retrieve a list of Add-ons currently installed on this Account.
        /// </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 InstalledAddOn </returns>
        public static ResourceSet <InstalledAddOnResource> Read(int?pageSize = null, long?limit = null, ITwilioRestClient client = null)
        {
            var options = new ReadInstalledAddOnOptions {
                PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
Beispiel #2
0
        /// <summary>
        /// Retrieve a list of Add-ons currently installed on this Account.
        /// </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 InstalledAddOn </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <InstalledAddOnResource> > ReadAsync(int?pageSize = null, long?limit = null, ITwilioRestClient client = null)
        {
            var options = new ReadInstalledAddOnOptions {
                PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
 private static Request BuildReadRequest(ReadInstalledAddOnOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Preview,
                "/marketplace/InstalledAddOns",
                queryParams: options.GetParams()
                ));
 }
Beispiel #4
0
        /// <summary>
        /// Retrieve a list of Add-ons currently installed on this Account.
        /// </summary>
        ///
        /// <param name="options"> Read InstalledAddOn parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of InstalledAddOn </returns>
        public static ResourceSet <InstalledAddOnResource> Read(ReadInstalledAddOnOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildReadRequest(options, client));

            var page = Page <InstalledAddOnResource> .FromJson("installed_add_ons", response.Content);

            return(new ResourceSet <InstalledAddOnResource>(page, options, client));
        }
        /// <summary>
        /// Retrieve a list of Add-ons currently installed on this Account.
        /// </summary>
        /// <param name="options"> Read InstalledAddOn parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of InstalledAddOn </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <InstalledAddOnResource> > ReadAsync(ReadInstalledAddOnOptions options,
                                                                                                          ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildReadRequest(options, client));

            var page = Page <InstalledAddOnResource> .FromJson("installed_add_ons", response.Content);

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