/// <summary> /// Verify a specific Challenge. /// </summary> /// <param name="options"> Update Challenge parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Challenge </returns> public static ChallengeResource Update(UpdateChallengeOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateChallengeOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Verify, "/v2/Services/" + options.PathServiceSid + "/Entities/" + options.PathIdentity + "/Challenges/" + options.PathSid + "", postParams: options.GetParams() )); }
/// <summary> /// Verify a specific Challenge. /// </summary> /// <param name="pathServiceSid"> Service Sid. </param> /// <param name="pathIdentity"> Unique external identifier of the Entity </param> /// <param name="pathSid"> A string that uniquely identifies this Challenge. </param> /// <param name="authPayload"> Optional payload to verify the Challenge </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Challenge </returns> public static async System.Threading.Tasks.Task <ChallengeResource> UpdateAsync(string pathServiceSid, string pathIdentity, string pathSid, string authPayload = null, ITwilioRestClient client = null) { var options = new UpdateChallengeOptions(pathServiceSid, pathIdentity, pathSid) { AuthPayload = authPayload }; return(await UpdateAsync(options, client)); }
/// <summary> /// Verify a specific Challenge. /// </summary> /// <param name="pathServiceSid"> Service Sid. </param> /// <param name="pathIdentity"> Unique external identifier of the Entity </param> /// <param name="pathSid"> A string that uniquely identifies this Challenge. </param> /// <param name="authPayload"> Optional payload to verify the Challenge </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Challenge </returns> public static ChallengeResource Update(string pathServiceSid, string pathIdentity, string pathSid, string authPayload = null, ITwilioRestClient client = null) { var options = new UpdateChallengeOptions(pathServiceSid, pathIdentity, pathSid) { AuthPayload = authPayload }; return(Update(options, client)); }
/// <summary> /// Verify a specific Challenge. /// </summary> /// <param name="options"> Update Challenge parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Challenge </returns> public static async System.Threading.Tasks.Task <ChallengeResource> UpdateAsync(UpdateChallengeOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }