Exemple #1
0
        /// <summary>
        /// Fetch specific Supporting Document 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 SupportingDocument </returns>
        public static async System.Threading.Tasks.Task <SupportingDocumentResource> FetchAsync(string pathSid,
                                                                                                ITwilioRestClient client = null)
        {
            var options = new FetchSupportingDocumentOptions(pathSid);

            return(await FetchAsync(options, client));
        }
Exemple #2
0
        /// <summary>
        /// Fetch specific Supporting Document Instance.
        /// </summary>
        /// <param name="options"> Fetch SupportingDocument parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SupportingDocument </returns>
        public static SupportingDocumentResource Fetch(FetchSupportingDocumentOptions options,
                                                       ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
Exemple #3
0
 private static Request BuildFetchRequest(FetchSupportingDocumentOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Trusthub,
                "/v1/SupportingDocuments/" + options.PathSid + "",
                queryParams: options.GetParams(),
                headerParams: null
                ));
 }
Exemple #4
0
        /// <summary>
        /// Fetch specific Supporting Document 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 SupportingDocument </returns>
        public static SupportingDocumentResource Fetch(string pathSid, ITwilioRestClient client = null)
        {
            var options = new FetchSupportingDocumentOptions(pathSid);

            return(Fetch(options, client));
        }
Exemple #5
0
        /// <summary>
        /// Fetch specific Supporting Document Instance.
        /// </summary>
        /// <param name="options"> Fetch SupportingDocument parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SupportingDocument </returns>
        public static async System.Threading.Tasks.Task <SupportingDocumentResource> FetchAsync(FetchSupportingDocumentOptions options,
                                                                                                ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }