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

            return(FromJson(response.Content));
        }
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="pathSid"> The SID that identifies the resource to fetch </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of BrandRegistration </returns>
        public static async System.Threading.Tasks.Task <BrandRegistrationResource> FetchAsync(string pathSid,
                                                                                               ITwilioRestClient client = null)
        {
            var options = new FetchBrandRegistrationOptions(pathSid);

            return(await FetchAsync(options, client));
        }
 private static Request BuildFetchRequest(FetchBrandRegistrationOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Messaging,
                "/v1/a2p/BrandRegistrations/" + options.PathSid + "",
                queryParams: options.GetParams(),
                headerParams: null
                ));
 }
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="pathSid"> The SID that identifies the resource to fetch </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of BrandRegistration </returns>
        public static BrandRegistrationResource Fetch(string pathSid, ITwilioRestClient client = null)
        {
            var options = new FetchBrandRegistrationOptions(pathSid);

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

            return(FromJson(response.Content));
        }