Пример #1
0
        /// <summary>
        /// This call searches in address book with search and select DTO system This method is deprecated. Use api/v2/AddressBookSearches
        /// </summary>
        /// <exception cref="ACUtils.AXRepository.ArxivarNext.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="searchDto"></param>
        /// <param name="selectDto"></param>
        /// <returns>Task of ApiResponse (List&lt;RowSearchResult&gt;)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <List <RowSearchResult> > > AddressBookSearchPostSearchAsyncWithHttpInfo(AddressBookSearchConcreteDTO searchDto, SelectDTO selectDto)
        {
            // verify the required parameter 'searchDto' is set
            if (searchDto == null)
            {
                throw new ApiException(400, "Missing required parameter 'searchDto' when calling AddressBookSearchApi->AddressBookSearchPostSearch");
            }
            // verify the required parameter 'selectDto' is set
            if (selectDto == null)
            {
                throw new ApiException(400, "Missing required parameter 'selectDto' when calling AddressBookSearchApi->AddressBookSearchPostSearch");
            }

            var    localVarPath         = "/api/AddressBookSearches";
            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/xml",
                "text/xml",
                "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",
                "application/xml",
                "text/xml"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

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

            if (searchDto != null)
            {
                localVarFormParams.Add("searchDto", this.Configuration.ApiClient.ParameterToString(searchDto));                    // form parameter
            }
            if (selectDto != null)
            {
                localVarFormParams.Add("selectDto", this.Configuration.ApiClient.ParameterToString(selectDto));                    // form parameter
            }
            // authentication (Authorization) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
            {
                localVarHeaderParams["Authorization"] = this.Configuration.GetApiKeyWithPrefix("Authorization");
            }

            // 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("AddressBookSearchPostSearch", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <List <RowSearchResult> >(localVarStatusCode,
                                                             localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                                                             (List <RowSearchResult>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List <RowSearchResult>))));
        }
Пример #2
0
        /// <summary>
        /// This call searches in address book with search and select DTO system This method is deprecated. Use api/v2/AddressBookSearches
        /// </summary>
        /// <exception cref="ACUtils.AXRepository.ArxivarNext.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="searchDto"></param>
        /// <param name="selectDto"></param>
        /// <returns>List&lt;RowSearchResult&gt;</returns>
        public List <RowSearchResult> AddressBookSearchPostSearch(AddressBookSearchConcreteDTO searchDto, SelectDTO selectDto)
        {
            ApiResponse <List <RowSearchResult> > localVarResponse = AddressBookSearchPostSearchWithHttpInfo(searchDto, selectDto);

            return(localVarResponse.Data);
        }
Пример #3
0
        /// <summary>
        /// This call searches in address book with search and select DTO system This method is deprecated. Use api/v2/AddressBookSearches
        /// </summary>
        /// <exception cref="ACUtils.AXRepository.ArxivarNext.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="searchDto"></param>
        /// <param name="selectDto"></param>
        /// <returns>Task of List&lt;RowSearchResult&gt;</returns>
        public async System.Threading.Tasks.Task <List <RowSearchResult> > AddressBookSearchPostSearchAsync(AddressBookSearchConcreteDTO searchDto, SelectDTO selectDto)
        {
            ApiResponse <List <RowSearchResult> > localVarResponse = await AddressBookSearchPostSearchAsyncWithHttpInfo(searchDto, selectDto);

            return(localVarResponse.Data);
        }
Пример #4
0
        /// <summary>
        /// This call searches in address book with search and select DTO system.  This call could not be compatible with some programming language, in this case use the call api/AddressBookSearches
        /// </summary>
        /// <exception cref="ACUtils.AXRepository.ArxivarNext.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="searchDto"></param>
        /// <param name="selectDto"></param>
        /// <returns>Object</returns>
        public Object AddressBookSearchV3PostSearch(AddressBookSearchConcreteDTO searchDto, SelectDTO selectDto)
        {
            ApiResponse <Object> localVarResponse = AddressBookSearchV3PostSearchWithHttpInfo(searchDto, selectDto);

            return(localVarResponse.Data);
        }