/// <summary> /// update /// </summary> /// <param name="options"> Update TaskChannel parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of TaskChannel </returns> public static TaskChannelResource Update(UpdateTaskChannelOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateTaskChannelOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Taskrouter, "/v1/Workspaces/" + options.PathWorkspaceSid + "/TaskChannels/" + options.PathSid + "", postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// <param name="pathWorkspaceSid"> The workspace_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="friendlyName"> Toggle the FriendlyName for the TaskChannel </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of TaskChannel </returns> public static async System.Threading.Tasks.Task <TaskChannelResource> UpdateAsync(string pathWorkspaceSid, string pathSid, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateTaskChannelOptions(pathWorkspaceSid, pathSid) { FriendlyName = friendlyName }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathWorkspaceSid"> The workspace_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="friendlyName"> Toggle the FriendlyName for the TaskChannel </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of TaskChannel </returns> public static TaskChannelResource Update(string pathWorkspaceSid, string pathSid, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateTaskChannelOptions(pathWorkspaceSid, pathSid) { FriendlyName = friendlyName }; return(Update(options, client)); }
/// <summary> /// update /// </summary> /// <param name="options"> Update TaskChannel parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of TaskChannel </returns> public static async System.Threading.Tasks.Task <TaskChannelResource> UpdateAsync(UpdateTaskChannelOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }