Beispiel #1
0
        /// <summary>
        /// Fetch specific Evaluation Instance.
        /// </summary>
        /// <param name="options"> Fetch Evaluation parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Evaluation </returns>
        public static EvaluationResource Fetch(FetchEvaluationOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
Beispiel #2
0
        /// <summary>
        /// Fetch specific Evaluation Instance.
        /// </summary>
        /// <param name="pathBundleSid"> The unique string that identifies the resource </param>
        /// <param name="pathSid"> The unique string that identifies the Evaluation resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Evaluation </returns>
        public static async System.Threading.Tasks.Task <EvaluationResource> FetchAsync(string pathBundleSid,
                                                                                        string pathSid,
                                                                                        ITwilioRestClient client = null)
        {
            var options = new FetchEvaluationOptions(pathBundleSid, pathSid);

            return(await FetchAsync(options, client));
        }
 private static Request BuildFetchRequest(FetchEvaluationOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Numbers,
                "/v2/RegulatoryCompliance/Bundles/" + options.PathBundleSid + "/Evaluations/" + options.PathSid + "",
                queryParams: options.GetParams()
                ));
 }
Beispiel #4
0
        /// <summary>
        /// Fetch specific Evaluation Instance.
        /// </summary>
        /// <param name="pathBundleSid"> The unique string that identifies the resource </param>
        /// <param name="pathSid"> The unique string that identifies the Evaluation resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Evaluation </returns>
        public static EvaluationResource Fetch(string pathBundleSid, string pathSid, ITwilioRestClient client = null)
        {
            var options = new FetchEvaluationOptions(pathBundleSid, pathSid);

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

            return(FromJson(response.Content));
        }