/// <summary> /// update /// </summary> /// <param name="options"> Update FlowValidate parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of FlowValidate </returns> public static FlowValidateResource Update(UpdateFlowValidateOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateFlowValidateOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Studio, "/v2/Flows/Validate", postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// <param name="friendlyName"> The friendly_name </param> /// <param name="status"> The status </param> /// <param name="definition"> The definition </param> /// <param name="commitMessage"> The commit_message </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of FlowValidate </returns> public static FlowValidateResource Update(string friendlyName, FlowValidateResource.StatusEnum status, object definition, string commitMessage = null, ITwilioRestClient client = null) { var options = new UpdateFlowValidateOptions(friendlyName, status, definition) { CommitMessage = commitMessage }; return(Update(options, client)); }
/// <summary> /// update /// </summary> /// <param name="friendlyName"> The friendly_name </param> /// <param name="status"> The status </param> /// <param name="definition"> The definition </param> /// <param name="commitMessage"> The commit_message </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of FlowValidate </returns> public static async System.Threading.Tasks.Task <FlowValidateResource> UpdateAsync(string friendlyName, FlowValidateResource.StatusEnum status, object definition, string commitMessage = null, ITwilioRestClient client = null) { var options = new UpdateFlowValidateOptions(friendlyName, status, definition) { CommitMessage = commitMessage }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="options"> Update FlowValidate parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of FlowValidate </returns> public static async System.Threading.Tasks.Task <FlowValidateResource> UpdateAsync(UpdateFlowValidateOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }