/// <summary>
        /// Update a Verification status
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the verification Service to update the resource from </param>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="status"> The new status of the resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Verification </returns>
        public static async System.Threading.Tasks.Task <VerificationResource> UpdateAsync(string pathServiceSid,
                                                                                           string pathSid,
                                                                                           VerificationResource.StatusEnum status,
                                                                                           ITwilioRestClient client = null)
        {
            var options = new UpdateVerificationOptions(pathServiceSid, pathSid, status);

            return(await UpdateAsync(options, client));
        }
예제 #2
0
        /// <summary>
        /// Update a Verification status
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the verification Service to update the resource from </param>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="status"> The new status of the resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Verification </returns>
        public static VerificationResource Update(string pathServiceSid,
                                                  string pathSid,
                                                  VerificationResource.StatusEnum status,
                                                  ITwilioRestClient client = null)
        {
            var options = new UpdateVerificationOptions(pathServiceSid, pathSid, status);

            return(Update(options, client));
        }
 private static Request BuildUpdateRequest(UpdateVerificationOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Verify,
                "/v2/Services/" + options.PathServiceSid + "/Verifications/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
        /// <summary>
        /// Update a Verification status
        /// </summary>
        /// <param name="options"> Update Verification parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Verification </returns>
        public static async System.Threading.Tasks.Task <VerificationResource> UpdateAsync(UpdateVerificationOptions options,
                                                                                           ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }