/// <summary>
        /// Fetch a specific Branded Channel.
        /// </summary>
        /// <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 pathSid,
                                                                                            ITwilioRestClient client = null)
        {
            var options = new FetchBrandedChannelOptions(pathSid);

            return(await FetchAsync(options, client));
        }
        /// <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));
        }
 private static Request BuildFetchRequest(FetchBrandedChannelOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Preview,
                "/TrustedComms/BrandedChannels/" + options.PathSid + "",
                queryParams: options.GetParams(),
                headerParams: null
                ));
 }
        /// <summary>
        /// Fetch a specific Branded Channel.
        /// </summary>
        /// <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 pathSid, ITwilioRestClient client = null)
        {
            var options = new FetchBrandedChannelOptions(pathSid);

            return(Fetch(options, client));
        }
        /// <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));
        }