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