/// <summary> /// Retrieve a specific Asset Version. /// </summary> /// <param name="options"> Fetch AssetVersion parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of AssetVersion </returns> public static AssetVersionResource Fetch(FetchAssetVersionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Retrieve a specific Asset Version. /// </summary> /// <param name="pathServiceSid"> Service Sid. </param> /// <param name="pathAssetSid"> Asset Sid. </param> /// <param name="pathSid"> Asset Version Sid. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of AssetVersion </returns> public static async System.Threading.Tasks.Task <AssetVersionResource> FetchAsync(string pathServiceSid, string pathAssetSid, string pathSid, ITwilioRestClient client = null) { var options = new FetchAssetVersionOptions(pathServiceSid, pathAssetSid, pathSid); return(await FetchAsync(options, client)); }
/// <summary> /// Retrieve a specific Asset Version. /// </summary> /// <param name="pathServiceSid"> Service Sid. </param> /// <param name="pathAssetSid"> Asset Sid. </param> /// <param name="pathSid"> Asset Version Sid. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of AssetVersion </returns> public static AssetVersionResource Fetch(string pathServiceSid, string pathAssetSid, string pathSid, ITwilioRestClient client = null) { var options = new FetchAssetVersionOptions(pathServiceSid, pathAssetSid, pathSid); return(Fetch(options, client)); }
private static Request BuildFetchRequest(FetchAssetVersionOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Serverless, "/v1/Services/" + options.PathServiceSid + "/Assets/" + options.PathAssetSid + "/Versions/" + options.PathSid + "", queryParams: options.GetParams() )); }
/// <summary> /// Retrieve a specific Asset Version. /// </summary> /// <param name="options"> Fetch AssetVersion parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of AssetVersion </returns> public static async System.Threading.Tasks.Task <AssetVersionResource> FetchAsync(FetchAssetVersionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }