Beispiel #1
0
        /// <summary>
        /// This call updates a process note
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="note">Note information to update</param>
        /// <returns>Task of ProcessNoteDTO</returns>
        public async System.Threading.Tasks.Task <ProcessNoteDTO> ProcessNotesUpdateAsync(ProcessNoteDTO note)
        {
            ApiResponse <ProcessNoteDTO> localVarResponse = await ProcessNotesUpdateAsyncWithHttpInfo(note);

            return(localVarResponse.Data);
        }
Beispiel #2
0
        /// <summary>
        /// This call updates a process note
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="note">Note information to update</param>
        /// <returns>Task of ApiResponse (ProcessNoteDTO)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <ProcessNoteDTO> > ProcessNotesUpdateAsyncWithHttpInfo(ProcessNoteDTO note)
        {
            // verify the required parameter 'note' is set
            if (note == null)
            {
                throw new ApiException(400, "Missing required parameter 'note' when calling ProcessNotesApi->ProcessNotesUpdate");
            }

            var    localVarPath         = "/api/ProcessNotes/update";
            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 (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("ProcessNotesUpdate", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <ProcessNoteDTO>(localVarStatusCode,
                                                    localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                    (ProcessNoteDTO)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProcessNoteDTO))));
        }
Beispiel #3
0
        /// <summary>
        /// This call updates a process note
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="note">Note information to update</param>
        /// <returns>ProcessNoteDTO</returns>
        public ProcessNoteDTO ProcessNotesUpdate(ProcessNoteDTO note)
        {
            ApiResponse <ProcessNoteDTO> localVarResponse = ProcessNotesUpdateWithHttpInfo(note);

            return(localVarResponse.Data);
        }