/// <summary> /// challenge a specific Verification Check. /// </summary> /// /// <param name="options"> Create VerificationCheck parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of VerificationCheck </returns> public static VerificationCheckResource Create(CreateVerificationCheckOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// challenge a specific Verification Check. /// </summary> /// /// <param name="pathServiceSid"> The service_sid </param> /// <param name="code"> The verification string </param> /// <param name="to"> To phonenumber </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of VerificationCheck </returns> public static VerificationCheckResource Create(string pathServiceSid, string code, string to = null, ITwilioRestClient client = null) { var options = new CreateVerificationCheckOptions(pathServiceSid, code) { To = to }; return(Create(options, client)); }
/// <summary> /// challenge a specific Verification Check. /// </summary> /// /// <param name="pathServiceSid"> The service_sid </param> /// <param name="code"> The verification string </param> /// <param name="to"> To phonenumber </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of VerificationCheck </returns> public static async System.Threading.Tasks.Task <VerificationCheckResource> CreateAsync(string pathServiceSid, string code, string to = null, ITwilioRestClient client = null) { var options = new CreateVerificationCheckOptions(pathServiceSid, code) { To = to }; return(await CreateAsync(options, client)); }
private static Request BuildCreateRequest(CreateVerificationCheckOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Preview, "/Verification/Services/" + options.PathServiceSid + "/VerificationCheck", client.Region, postParams: options.GetParams() )); }
/// <summary> /// challenge a specific Verification Check. /// </summary> /// <param name="options"> Create VerificationCheck parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of VerificationCheck </returns> public static async System.Threading.Tasks.Task <VerificationCheckResource> CreateAsync(CreateVerificationCheckOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }