private void SetParameters(FilterInvoicesRequest request, Dictionary <string, string> localVarQueryParams)
        {
            if (request.DocumentState != null)
            {
                localVarQueryParams.Add("DocumentState", Configuration.ApiClient.ParameterToString(request.DocumentState));
            }

            if (request.SearchText != null)
            {
                localVarQueryParams.Add("SearchText", Configuration.ApiClient.ParameterToString(request.SearchText));
            }

            localVarQueryParams.Add("IncludeDetectInvoiceResponse", Configuration.ApiClient.ParameterToString(request.IncludeDetectInvoiceResponse));
        }
        /// <summary>
        ///
        /// </summary>
        /// <exception>Thrown when fails to make API call <cref>IO.Swagger.Client.ApiException</cref></exception>
        /// <returns>Task of StandardInvoiceContainerResponse</returns>
        public async System.Threading.Tasks.Task <StandardInvoiceContainerResponse> FilterInvoicesRequestinvoicesGetAsync(FilterInvoicesRequest request)
        {
            var localVarResponse = await FilterInvoicesRequestinvoicesGetAsyncWithHttpInfo(request);

            return(localVarResponse.Data);
        }
        /// <summary>
        ///
        /// </summary>
        /// <exception>Thrown when fails to make API call <cref>IO.Swagger.Client.ApiException</cref></exception>
        /// <returns>Task of ApiResponse (StandardInvoiceContainerResponse)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <StandardInvoiceContainerResponse> > FilterInvoicesRequestinvoicesGetAsyncWithHttpInfo(FilterInvoicesRequest request)
        {
            var localVarPath         = "/filter/invoices/";
            var localVarPathParams   = new Dictionary <string, string>();
            var localVarQueryParams  = new Dictionary <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
            var localVarHttpContentTypes = new[] { "application/json" };
            var localVarHttpContentType  = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            string[] localVarHttpHeaderAccepts = { "application/json" };
            var      localVarHttpHeaderAccept  = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            SetParameters(request, localVarQueryParams);


            // make the HTTP request
            var localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                             Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                             localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("FilterInvoicesRequestinvoicesGet", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <StandardInvoiceContainerResponse>(localVarStatusCode,
                                                                      localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                                      (StandardInvoiceContainerResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(StandardInvoiceContainerResponse))));
        }
        /// <summary>
        ///
        /// </summary>
        /// <exception>Thrown when fails to make API call <cref>IO.Swagger.Client.ApiException</cref> </exception>
        /// <returns>StandardInvoiceContainerResponse</returns>
        public StandardInvoiceContainerResponse FilterInvoicesRequestinvoicesGet(FilterInvoicesRequest request)
        {
            var localVarResponse = FilterInvoicesRequestinvoicesGetWithHttpInfo(request);

            return(localVarResponse.Data);
        }