/// <summary> /// Update a specific Factor. This endpoint can be used to Verify a Factor if passed an `AuthPayload` param. /// </summary> /// <param name="options"> Update Factor parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Factor </returns> public static FactorResource Update(UpdateFactorOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Update a specific Factor. This endpoint can be used to Verify a Factor if passed an `AuthPayload` param. /// </summary> /// <param name="options"> Update Factor parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Factor </returns> public static async System.Threading.Tasks.Task <FactorResource> UpdateAsync(UpdateFactorOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateFactorOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Verify, "/v2/Services/" + options.PathServiceSid + "/Entities/" + options.PathIdentity + "/Factors/" + options.PathSid + "", postParams: options.GetParams() )); }
/// <summary> /// Update a specific Factor. This endpoint can be used to Verify a Factor if passed an `AuthPayload` param. /// </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 Factor. </param> /// <param name="authPayload"> Optional payload to verify the Factor for the first time </param> /// <param name="friendlyName"> The friendly name of this Factor </param> /// <param name="config"> The config for this Factor as a json string </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Factor </returns> public static async System.Threading.Tasks.Task <FactorResource> UpdateAsync(string pathServiceSid, string pathIdentity, string pathSid, string authPayload = null, string friendlyName = null, string config = null, ITwilioRestClient client = null) { var options = new UpdateFactorOptions(pathServiceSid, pathIdentity, pathSid) { AuthPayload = authPayload, FriendlyName = friendlyName, Config = config }; return(await UpdateAsync(options, client)); }
/// <summary> /// Update a specific Factor. This endpoint can be used to Verify a Factor if passed an `AuthPayload` param. /// </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 Factor. </param> /// <param name="authPayload"> Optional payload to verify the Factor for the first time </param> /// <param name="friendlyName"> The friendly name of this Factor </param> /// <param name="config"> The config for this Factor as a json string </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Factor </returns> public static FactorResource Update(string pathServiceSid, string pathIdentity, string pathSid, string authPayload = null, string friendlyName = null, string config = null, ITwilioRestClient client = null) { var options = new UpdateFactorOptions(pathServiceSid, pathIdentity, pathSid) { AuthPayload = authPayload, FriendlyName = friendlyName, Config = config }; return(Update(options, client)); }
/// <summary> /// Update a specific Factor. This endpoint can be used to Verify a Factor if passed an `AuthPayload` param. /// </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 Factor. </param> /// <param name="authPayload"> Optional payload to verify the Factor for the first time </param> /// <param name="friendlyName"> The friendly name of this Factor </param> /// <param name="configNotificationToken"> For APN, the device token. For FCM the registration token </param> /// <param name="configSdkVersion"> The Verify Push SDK version used to configure the factor </param> /// <param name="twilioSandboxMode"> The Twilio-Sandbox-Mode HTTP request header </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Factor </returns> public static FactorResource Update(string pathServiceSid, string pathIdentity, string pathSid, string authPayload = null, string friendlyName = null, string configNotificationToken = null, string configSdkVersion = null, string twilioSandboxMode = null, ITwilioRestClient client = null) { var options = new UpdateFactorOptions(pathServiceSid, pathIdentity, pathSid) { AuthPayload = authPayload, FriendlyName = friendlyName, ConfigNotificationToken = configNotificationToken, ConfigSdkVersion = configSdkVersion, TwilioSandboxMode = twilioSandboxMode }; return(Update(options, client)); }