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