/// <summary> /// Insert an outcome notification The description is mandatory only for reject /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="aooUID">Aoo unique identifier</param> /// <param name="uoUID">UO unique identifier</param> /// <param name="invoiceUID">Invoice unique identifier</param> /// <param name="request">Outcome request</param> /// <param name="accept">Accept or reject the invoice</param> /// <param name="xAuthorization">access_token</param> /// <returns>Task of ReceptionInsertNotificationOutcomeResponse</returns> public async System.Threading.Tasks.Task <ReceptionInsertNotificationOutcomeResponse> ReceptionInsertNotificationOutcomeAsync(Guid?aooUID, string uoUID, string invoiceUID, ReceptionInsertNotificationOutcomeRequest request, bool?accept, string xAuthorization) { ApiResponse <ReceptionInsertNotificationOutcomeResponse> localVarResponse = await ReceptionInsertNotificationOutcomeAsyncWithHttpInfo(aooUID, uoUID, invoiceUID, request, accept, xAuthorization); return(localVarResponse.Data); }
/// <summary> /// Insert an outcome notification The description is mandatory only for reject /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="aooUID">Aoo unique identifier</param> /// <param name="uoUID">UO unique identifier</param> /// <param name="invoiceUID">Invoice unique identifier</param> /// <param name="request">Outcome request</param> /// <param name="accept">Accept or reject the invoice</param> /// <param name="xAuthorization">access_token</param> /// <returns>Task of ApiResponse (ReceptionInsertNotificationOutcomeResponse)</returns> public async System.Threading.Tasks.Task <ApiResponse <ReceptionInsertNotificationOutcomeResponse> > ReceptionInsertNotificationOutcomeAsyncWithHttpInfo(Guid?aooUID, string uoUID, string invoiceUID, ReceptionInsertNotificationOutcomeRequest request, bool?accept, string xAuthorization) { // verify the required parameter 'aooUID' is set if (aooUID == null) { throw new ApiException(400, "Missing required parameter 'aooUID' when calling ReceptionInvoicesManagementApi->ReceptionInsertNotificationOutcome"); } // verify the required parameter 'uoUID' is set if (uoUID == null) { throw new ApiException(400, "Missing required parameter 'uoUID' when calling ReceptionInvoicesManagementApi->ReceptionInsertNotificationOutcome"); } // verify the required parameter 'invoiceUID' is set if (invoiceUID == null) { throw new ApiException(400, "Missing required parameter 'invoiceUID' when calling ReceptionInvoicesManagementApi->ReceptionInsertNotificationOutcome"); } // verify the required parameter 'request' is set if (request == null) { throw new ApiException(400, "Missing required parameter 'request' when calling ReceptionInvoicesManagementApi->ReceptionInsertNotificationOutcome"); } // verify the required parameter 'accept' is set if (accept == null) { throw new ApiException(400, "Missing required parameter 'accept' when calling ReceptionInvoicesManagementApi->ReceptionInsertNotificationOutcome"); } // verify the required parameter 'xAuthorization' is set if (xAuthorization == null) { throw new ApiException(400, "Missing required parameter 'xAuthorization' when calling ReceptionInvoicesManagementApi->ReceptionInsertNotificationOutcome"); } var localVarPath = "/api/v3.1/reception/management/aoos/{aooUID}/uos/{uoUID}/invoices/{invoiceUID}/notifications"; var localVarPathParams = new Dictionary <String, String>(); var localVarQueryParams = new List <KeyValuePair <String, String> >(); var localVarHeaderParams = new Dictionary <String, String>(this.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/x-www-form-urlencoded" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json", "text/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (aooUID != null) { localVarPathParams.Add("aooUID", this.Configuration.ApiClient.ParameterToString(aooUID)); // path parameter } if (uoUID != null) { localVarPathParams.Add("uoUID", this.Configuration.ApiClient.ParameterToString(uoUID)); // path parameter } if (invoiceUID != null) { localVarPathParams.Add("invoiceUID", this.Configuration.ApiClient.ParameterToString(invoiceUID)); // path parameter } if (accept != null) { localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "accept", accept)); // query parameter } if (xAuthorization != null) { localVarHeaderParams.Add("X-Authorization", this.Configuration.ApiClient.ParameterToString(xAuthorization)); // header parameter } if (request != null && request.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(request); // http body (model) parameter } else { localVarPostBody = request; // byte array } // make the HTTP request IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ReceptionInsertNotificationOutcome", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <ReceptionInsertNotificationOutcomeResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (ReceptionInsertNotificationOutcomeResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReceptionInsertNotificationOutcomeResponse)))); }
/// <summary> /// Insert an outcome notification The description is mandatory only for reject /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="aooUID">Aoo unique identifier</param> /// <param name="uoUID">UO unique identifier</param> /// <param name="invoiceUID">Invoice unique identifier</param> /// <param name="request">Outcome request</param> /// <param name="accept">Accept or reject the invoice</param> /// <param name="xAuthorization">access_token</param> /// <returns>ReceptionInsertNotificationOutcomeResponse</returns> public ReceptionInsertNotificationOutcomeResponse ReceptionInsertNotificationOutcome(Guid?aooUID, string uoUID, string invoiceUID, ReceptionInsertNotificationOutcomeRequest request, bool?accept, string xAuthorization) { ApiResponse <ReceptionInsertNotificationOutcomeResponse> localVarResponse = ReceptionInsertNotificationOutcomeWithHttpInfo(aooUID, uoUID, invoiceUID, request, accept, xAuthorization); return(localVarResponse.Data); }