/// <summary> /// This call updates a process note /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="taskWorkNoteId">Taskwork identifier</param> /// <param name="note">Note to update</param> /// <returns>Task of TaskWorkNoteDTO</returns> public async System.Threading.Tasks.Task <TaskWorkNoteDTO> TaskWorkNotesUpdateNoteAsync(int?taskWorkNoteId, TaskWorkNoteDTO note) { ApiResponse <TaskWorkNoteDTO> localVarResponse = await TaskWorkNotesUpdateNoteAsyncWithHttpInfo(taskWorkNoteId, note); return(localVarResponse.Data); }
/// <summary> /// This call updates a process note /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="taskWorkNoteId">Taskwork identifier</param> /// <param name="note">Note to update</param> /// <returns>Task of ApiResponse (TaskWorkNoteDTO)</returns> public async System.Threading.Tasks.Task <ApiResponse <TaskWorkNoteDTO> > TaskWorkNotesUpdateNoteAsyncWithHttpInfo(int?taskWorkNoteId, TaskWorkNoteDTO note) { // verify the required parameter 'taskWorkNoteId' is set if (taskWorkNoteId == null) { throw new ApiException(400, "Missing required parameter 'taskWorkNoteId' when calling TaskWorkNotesApi->TaskWorkNotesUpdateNote"); } // verify the required parameter 'note' is set if (note == null) { throw new ApiException(400, "Missing required parameter 'note' when calling TaskWorkNotesApi->TaskWorkNotesUpdateNote"); } var localVarPath = "/api/TaskNotes/{taskWorkNoteId}"; var localVarPathParams = new Dictionary <String, String>(); var localVarQueryParams = new List <KeyValuePair <String, String> >(); var localVarHeaderParams = new Dictionary <String, String>(Configuration.DefaultHeader); var localVarFormParams = new Dictionary <String, String>(); var localVarFileParams = new Dictionary <String, FileParameter>(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (taskWorkNoteId != null) { localVarPathParams.Add("taskWorkNoteId", Configuration.ApiClient.ParameterToString(taskWorkNoteId)); // path parameter } if (note != null && note.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(note); // http body (model) parameter } else { localVarPostBody = note; // byte array } // authentication (Authorization) required if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("Authorization"))) { localVarHeaderParams["Authorization"] = Configuration.GetApiKeyWithPrefix("Authorization"); } // make the HTTP request IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("TaskWorkNotesUpdateNote", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <TaskWorkNoteDTO>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (TaskWorkNoteDTO)Configuration.ApiClient.Deserialize(localVarResponse, typeof(TaskWorkNoteDTO)))); }
/// <summary> /// This call updates a process note /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="taskWorkNoteId">Taskwork identifier</param> /// <param name="note">Note to update</param> /// <returns>TaskWorkNoteDTO</returns> public TaskWorkNoteDTO TaskWorkNotesUpdateNote(int?taskWorkNoteId, TaskWorkNoteDTO note) { ApiResponse <TaskWorkNoteDTO> localVarResponse = TaskWorkNotesUpdateNoteWithHttpInfo(taskWorkNoteId, note); return(localVarResponse.Data); }