/// <summary>
        /// Fetch a specific HostedNumberOrder.
        /// </summary>
        /// <param name="pathSid"> HostedNumberOrder sid. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of HostedNumberOrder </returns>
        public static async System.Threading.Tasks.Task <HostedNumberOrderResource> FetchAsync(string pathSid,
                                                                                               ITwilioRestClient client = null)
        {
            var options = new FetchHostedNumberOrderOptions(pathSid);

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

            return(FromJson(response.Content));
        }
 private static Request BuildFetchRequest(FetchHostedNumberOrderOptions options, ITwilioRestClient client)
 {
     return new Request(
         HttpMethod.Get,
         Rest.Domain.Preview,
         "/HostedNumbers/HostedNumberOrders/" + options.PathSid + "",
         queryParams: options.GetParams()
     );
 }
        /// <summary>
        /// Fetch a specific HostedNumberOrder.
        /// </summary>
        ///
        /// <param name="pathSid"> HostedNumberOrder sid. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of HostedNumberOrder </returns>
        public static HostedNumberOrderResource Fetch(string pathSid, ITwilioRestClient client = null)
        {
            var options = new FetchHostedNumberOrderOptions(pathSid);

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

            return(FromJson(response.Content));
        }