示例#1
0
        /// <summary>
        /// Retrieve the newest available BrandInformation
        /// </summary>
        /// <param name="options"> Fetch BrandsInformation parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of BrandsInformation </returns>
        public static BrandsInformationResource Fetch(FetchBrandsInformationOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
示例#2
0
 private static Request BuildFetchRequest(FetchBrandsInformationOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Preview,
                "/TrustedComms/BrandsInformation",
                queryParams: options.GetParams()
                ));
 }
        /// <summary>
        /// Retrieve the newest available BrandInformation
        /// </summary>
        /// <param name="ifNoneMatch"> Standard `If-None-Match` HTTP header </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of BrandsInformation </returns>
        public static BrandsInformationResource Fetch(string ifNoneMatch = null, ITwilioRestClient client = null)
        {
            var options = new FetchBrandsInformationOptions()
            {
                IfNoneMatch = ifNoneMatch
            };

            return(Fetch(options, client));
        }
        /// <summary>
        /// Retrieve the newest available BrandInformation
        /// </summary>
        /// <param name="ifNoneMatch"> Standard `If-None-Match` HTTP header </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of BrandsInformation </returns>
        public static async System.Threading.Tasks.Task <BrandsInformationResource> FetchAsync(string ifNoneMatch       = null,
                                                                                               ITwilioRestClient client = null)
        {
            var options = new FetchBrandsInformationOptions()
            {
                IfNoneMatch = ifNoneMatch
            };

            return(await FetchAsync(options, client));
        }
示例#5
0
        /// <summary>
        /// Retrieve the newest available BrandInformation
        /// </summary>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of BrandsInformation </returns>
        public static BrandsInformationResource Fetch(ITwilioRestClient client = null)
        {
            var options = new FetchBrandsInformationOptions();

            return(Fetch(options, client));
        }
示例#6
0
        /// <summary>
        /// Retrieve the newest available BrandInformation
        /// </summary>
        /// <param name="options"> Fetch BrandsInformation parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of BrandsInformation </returns>
        public static async System.Threading.Tasks.Task <BrandsInformationResource> FetchAsync(FetchBrandsInformationOptions options,
                                                                                               ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }