/// <summary> /// Fetch a specific a Brand. /// </summary> /// <param name="options"> Fetch Brand parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Brand </returns> public static BrandResource Fetch(FetchBrandOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Fetch a specific a Brand. /// </summary> /// <param name="pathBusinessSid"> Business Sid. </param> /// <param name="pathSid"> Brand Sid. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Brand </returns> public static async System.Threading.Tasks.Task <BrandResource> FetchAsync(string pathBusinessSid, string pathSid, ITwilioRestClient client = null) { var options = new FetchBrandOptions(pathBusinessSid, pathSid); return(await FetchAsync(options, client)); }
/// <summary> /// Fetch a specific a Brand. /// </summary> /// <param name="options"> Fetch Brand parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Brand </returns> public static async System.Threading.Tasks.Task <BrandResource> FetchAsync(FetchBrandOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildFetchRequest(FetchBrandOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Preview, "/TrustedComms/Businesses/" + options.PathBusinessSid + "/Brands/" + options.PathSid + "", queryParams: options.GetParams() )); }
/// <summary> /// Fetch a specific a Brand. /// </summary> /// <param name="pathBusinessSid"> Business Sid. </param> /// <param name="pathSid"> Brand Sid. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Brand </returns> public static BrandResource Fetch(string pathBusinessSid, string pathSid, ITwilioRestClient client = null) { var options = new FetchBrandOptions(pathBusinessSid, pathSid); return(Fetch(options, client)); }