Beispiel #1
0
        /// <summary>
        /// Fetch a specific Customer-Profile instance.
        /// </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 TrustProducts </returns>
        public static async System.Threading.Tasks.Task <TrustProductsResource> FetchAsync(string pathSid,
                                                                                           ITwilioRestClient client = null)
        {
            var options = new FetchTrustProductsOptions(pathSid);

            return(await FetchAsync(options, client));
        }
Beispiel #2
0
        /// <summary>
        /// Fetch a specific Customer-Profile instance.
        /// </summary>
        /// <param name="options"> Fetch TrustProducts parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of TrustProducts </returns>
        public static TrustProductsResource Fetch(FetchTrustProductsOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
Beispiel #3
0
 private static Request BuildFetchRequest(FetchTrustProductsOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Trusthub,
                "/v1/TrustProducts/" + options.PathSid + "",
                queryParams: options.GetParams(),
                headerParams: null
                ));
 }
Beispiel #4
0
        /// <summary>
        /// Fetch a specific Customer-Profile instance.
        /// </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 TrustProducts </returns>
        public static TrustProductsResource Fetch(string pathSid, ITwilioRestClient client = null)
        {
            var options = new FetchTrustProductsOptions(pathSid);

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

            return(FromJson(response.Content));
        }