/// <summary>
        /// Fetch a specific End-User Type Instance.
        /// </summary>
        /// <param name="pathSid"> The unique string that identifies the End-User Type resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of EndUserType </returns>
        public static async System.Threading.Tasks.Task <EndUserTypeResource> FetchAsync(string pathSid,
                                                                                         ITwilioRestClient client = null)
        {
            var options = new FetchEndUserTypeOptions(pathSid);

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

            return(FromJson(response.Content));
        }
 private static Request BuildFetchRequest(FetchEndUserTypeOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Trusthub,
                "/v1/EndUserTypes/" + options.PathSid + "",
                queryParams: options.GetParams(),
                headerParams: null
                ));
 }
        /// <summary>
        /// Fetch a specific End-User Type Instance.
        /// </summary>
        /// <param name="pathSid"> The unique string that identifies the End-User Type resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of EndUserType </returns>
        public static EndUserTypeResource Fetch(string pathSid, ITwilioRestClient client = null)
        {
            var options = new FetchEndUserTypeOptions(pathSid);

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

            return(FromJson(response.Content));
        }