Example #1
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="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="searchCriteria"></param>
        /// <returns>Task of ApiResponse (Object)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <Object> > AddressBookSearchV3PostSearchAsyncWithHttpInfo(AddressBookSearchConcreteCriteriaDTO searchCriteria)
        {
            // verify the required parameter 'searchCriteria' is set
            if (searchCriteria == null)
            {
                throw new ApiException(400, "Missing required parameter 'searchCriteria' when calling AddressBookSearchV3Api->AddressBookSearchV3PostSearch");
            }

            var    localVarPath         = "/api/v3/AddressBookSearches";
            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 (searchCriteria != null && searchCriteria.GetType() != typeof(byte[]))
            {
                localVarPostBody = Configuration.ApiClient.Serialize(searchCriteria); // http body (model) parameter
            }
            else
            {
                localVarPostBody = searchCriteria; // 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.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                       localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

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

            return(new ApiResponse <Object>(localVarStatusCode,
                                            localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                            (Object)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))));
        }
Example #2
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="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="searchCriteria"></param>
        /// <returns>Task of Object</returns>
        public async System.Threading.Tasks.Task <Object> AddressBookSearchV3PostSearchAsync(AddressBookSearchConcreteCriteriaDTO searchCriteria)
        {
            ApiResponse <Object> localVarResponse = await AddressBookSearchV3PostSearchAsyncWithHttpInfo(searchCriteria);

            return(localVarResponse.Data);
        }
Example #3
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="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="searchCriteria"></param>
        /// <returns>Object</returns>
        public Object AddressBookSearchV3PostSearch(AddressBookSearchConcreteCriteriaDTO searchCriteria)
        {
            ApiResponse <Object> localVarResponse = AddressBookSearchV3PostSearchWithHttpInfo(searchCriteria);

            return(localVarResponse.Data);
        }
Example #4
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="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="searchCriteria"></param>
        /// <returns>List&lt;RowSearchResult&gt;</returns>
        public List <RowSearchResult> AddressBookSearchPostSearch(AddressBookSearchConcreteCriteriaDTO searchCriteria)
        {
            ApiResponse <List <RowSearchResult> > localVarResponse = AddressBookSearchPostSearchWithHttpInfo(searchCriteria);

            return(localVarResponse.Data);
        }
Example #5
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="body"></param>
        /// <returns>Task of List&lt;RowSearchResult&gt;</returns>
        public async System.Threading.Tasks.Task <List <RowSearchResult> > AddressBookSearchPostSearchAsync(AddressBookSearchConcreteCriteriaDTO body)
        {
            ApiResponse <List <RowSearchResult> > localVarResponse = await AddressBookSearchPostSearchAsyncWithHttpInfo(body);

            return(localVarResponse.Data);
        }
Example #6
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="body"></param>
        /// <returns>ApiResponse of List&lt;RowSearchResult&gt;</returns>
        public ApiResponse <List <RowSearchResult> > AddressBookSearchPostSearchWithHttpInfo(AddressBookSearchConcreteCriteriaDTO body)
        {
            // verify the required parameter 'body' is set
            if (body == null)
            {
                throw new ApiException(400, "Missing required parameter 'body' 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 (body != null && body.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
            }
            else
            {
                localVarPostBody = body; // byte array
            }
            // authentication (Authorization) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
            {
                localVarHeaderParams["Authorization"] = this.Configuration.GetApiKeyWithPrefix("Authorization");
            }

            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(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>))));
        }