/// <summary> /// Fetch an instance of an Extension for the Installed Add-on. /// </summary> /// /// <param name="options"> Fetch InstalledAddOnExtension parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of InstalledAddOnExtension </returns> public static InstalledAddOnExtensionResource Fetch(FetchInstalledAddOnExtensionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Fetch an instance of an Extension for the Installed Add-on. /// </summary> /// <param name="pathInstalledAddOnSid"> The SID of the InstalledAddOn resource with the extension to fetch </param> /// <param name="pathSid"> The SID of the InstalledAddOn Extension resource to fetch </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of InstalledAddOnExtension </returns> public static InstalledAddOnExtensionResource Fetch(string pathInstalledAddOnSid, string pathSid, ITwilioRestClient client = null) { var options = new FetchInstalledAddOnExtensionOptions(pathInstalledAddOnSid, pathSid); return(Fetch(options, client)); }
/// <summary> /// Fetch an instance of an Extension for the Installed Add-on. /// </summary> /// <param name="pathInstalledAddOnSid"> The SID of the InstalledAddOn resource with the extension to fetch </param> /// <param name="pathSid"> The SID of the InstalledAddOn Extension resource to fetch </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 <InstalledAddOnExtensionResource> FetchAsync(string pathInstalledAddOnSid, string pathSid, ITwilioRestClient client = null) { var options = new FetchInstalledAddOnExtensionOptions(pathInstalledAddOnSid, pathSid); return(await FetchAsync(options, client)); }
private static Request BuildFetchRequest(FetchInstalledAddOnExtensionOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Preview, "/marketplace/InstalledAddOns/" + options.PathInstalledAddOnSid + "/Extensions/" + options.PathSid + "", queryParams: options.GetParams() )); }
/// <summary> /// Fetch an instance of an Extension for the Installed Add-on. /// </summary> /// /// <param name="options"> Fetch 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 <InstalledAddOnExtensionResource> FetchAsync(FetchInstalledAddOnExtensionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }