/// <summary> /// Retrieve a list of Extensions for the Installed Add-on. /// </summary> /// /// <param name="pathInstalledAddOnSid"> The installed_add_on_sid </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 InstalledAddOnExtension </returns> public static async System.Threading.Tasks.Task <ResourceSet <InstalledAddOnExtensionResource> > ReadAsync(string pathInstalledAddOnSid, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadInstalledAddOnExtensionOptions(pathInstalledAddOnSid) { PageSize = pageSize, Limit = limit }; return(await ReadAsync(options, client)); }
/// <summary> /// Retrieve a list of Extensions for the Installed Add-on. /// </summary> /// /// <param name="pathInstalledAddOnSid"> The installed_add_on_sid </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 InstalledAddOnExtension </returns> public static ResourceSet <InstalledAddOnExtensionResource> Read(string pathInstalledAddOnSid, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadInstalledAddOnExtensionOptions(pathInstalledAddOnSid) { PageSize = pageSize, Limit = limit }; return(Read(options, client)); }
/// <summary> /// Retrieve a list of Extensions for the Installed Add-on. /// </summary> /// /// <param name="options"> Read InstalledAddOnExtension parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of InstalledAddOnExtension </returns> public static ResourceSet <InstalledAddOnExtensionResource> Read(ReadInstalledAddOnExtensionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildReadRequest(options, client)); var page = Page <InstalledAddOnExtensionResource> .FromJson("extensions", response.Content); return(new ResourceSet <InstalledAddOnExtensionResource>(page, options, client)); }
private static Request BuildReadRequest(ReadInstalledAddOnExtensionOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Preview, "/marketplace/InstalledAddOns/" + options.PathInstalledAddOnSid + "/Extensions", queryParams: options.GetParams() )); }
/// <summary> /// Retrieve a list of Extensions for the Installed Add-on. /// </summary> /// /// <param name="options"> Read InstalledAddOnExtension parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of InstalledAddOnExtension </returns> public static async System.Threading.Tasks.Task <ResourceSet <InstalledAddOnExtensionResource> > ReadAsync(ReadInstalledAddOnExtensionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildReadRequest(options, client)); var page = Page <InstalledAddOnExtensionResource> .FromJson("extensions", response.Content); return(new ResourceSet <InstalledAddOnExtensionResource>(page, options, client)); }