/// <summary>
        /// fetch
        /// </summary>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of ByocTrunk </returns>
        public static async System.Threading.Tasks.Task <ByocTrunkResource> FetchAsync(string pathSid,
                                                                                       ITwilioRestClient client = null)
        {
            var options = new FetchByocTrunkOptions(pathSid);

            return(await FetchAsync(options, client));
        }
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="options"> Fetch ByocTrunk parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of ByocTrunk </returns>
        public static ByocTrunkResource Fetch(FetchByocTrunkOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
 private static Request BuildFetchRequest(FetchByocTrunkOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Voice,
                "/v1/ByocTrunks/" + options.PathSid + "",
                queryParams: options.GetParams()
                ));
 }
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of ByocTrunk </returns>
        public static ByocTrunkResource Fetch(string pathSid, ITwilioRestClient client = null)
        {
            var options = new FetchByocTrunkOptions(pathSid);

            return(Fetch(options, client));
        }
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="options"> Fetch ByocTrunk parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of ByocTrunk </returns>
        public static async System.Threading.Tasks.Task <ByocTrunkResource> FetchAsync(FetchByocTrunkOptions options,
                                                                                       ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }