Beispiel #1
0
        /// <summary>
        /// Retrieve Business Contacts Retrieve and paginate through business contacts
        /// </summary>
        /// <exception cref="Elli.Api.Contacts.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="start">Start index or record number to retrieve a set of borrower contacts. This is defaulted to 1. (optional)</param>
        /// <param name="limit">This is the maximum number of records user wants to fetch. Response size is limited to 6 MB hence this is recalculated if response size exceeds 6 MB. Default value is 1000 and max value for this parameter is limited to 10000 in any case. (optional)</param>
        /// <param name="cursorType">This should be passed when user wants to create a new cursor. Only RandomAccess cursor type is supported. (optional)</param>
        /// <param name="cursor">Id of the cursor from which data needs to be retrieved. This is responded in location header while creating a new cursor. (optional)</param>
        /// <param name="request">Business contact query object (optional)</param>
        /// <returns>Task of ApiResponse (List&lt;BusinessContactSelectorContract&gt;)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <List <BusinessContactSelectorContract> > > QueryBusinessContactsAsyncWithHttpInfo(string start = null, string limit = null, string cursorType = null, string cursor = null, BusinessContactQueryContract request = null)
        {
            var    localVarPath         = "/encompass/v1/businessContactSelector/";
            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
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

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

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

            if (start != null)
            {
                localVarQueryParams.Add("start", Configuration.ApiClient.ParameterToString(start));                // query parameter
            }
            if (limit != null)
            {
                localVarQueryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit));                // query parameter
            }
            if (cursorType != null)
            {
                localVarQueryParams.Add("cursorType", Configuration.ApiClient.ParameterToString(cursorType));                     // query parameter
            }
            if (cursor != null)
            {
                localVarQueryParams.Add("cursor", Configuration.ApiClient.ParameterToString(cursor));                 // query parameter
            }
            if (request != null && request.GetType() != typeof(byte[]))
            {
                localVarPostBody = Configuration.ApiClient.Serialize(request); // http body (model) parameter
            }
            else
            {
                localVarPostBody = request; // byte array
            }

            // authentication (bearerAuth) required
            // oauth required
            if (!String.IsNullOrEmpty(Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
            }

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

            return(new ApiResponse <List <BusinessContactSelectorContract> >(localVarStatusCode,
                                                                             localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                                             (List <BusinessContactSelectorContract>)Configuration.ApiClient.Deserialize(localVarResponse, typeof(List <BusinessContactSelectorContract>))));
        }
Beispiel #2
0
        /// <summary>
        /// Retrieve Business Contacts Retrieve and paginate through business contacts
        /// </summary>
        /// <exception cref="Elli.Api.Contacts.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="start">Start index or record number to retrieve a set of borrower contacts. This is defaulted to 1. (optional)</param>
        /// <param name="limit">This is the maximum number of records user wants to fetch. Response size is limited to 6 MB hence this is recalculated if response size exceeds 6 MB. Default value is 1000 and max value for this parameter is limited to 10000 in any case. (optional)</param>
        /// <param name="request">Business contact query object (optional)</param>
        /// <returns>List&lt;BusinessContactSelectorContract&gt;</returns>
        public List <BusinessContactSelectorContract> QueryBusinessContacts(string start = null, string limit = null, BusinessContactQueryContract request = null)
        {
            ApiResponse <List <BusinessContactSelectorContract> > localVarResponse = QueryBusinessContactsWithHttpInfo(start, limit, request);

            return(localVarResponse.Data);
        }
Beispiel #3
0
        /// <summary>
        /// Retrieve Business Contacts Retrieve and paginate through business contacts
        /// </summary>
        /// <exception cref="Elli.Api.Contacts.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="start">Start index or record number to retrieve a set of borrower contacts. This is defaulted to 1. (optional)</param>
        /// <param name="limit">This is the maximum number of records user wants to fetch. Response size is limited to 6 MB hence this is recalculated if response size exceeds 6 MB. Default value is 1000 and max value for this parameter is limited to 10000 in any case. (optional)</param>
        /// <param name="cursorType">This should be passed when user wants to create a new cursor. Only RandomAccess cursor type is supported. (optional)</param>
        /// <param name="cursor">Id of the cursor from which data needs to be retrieved. This is responded in location header while creating a new cursor. (optional)</param>
        /// <param name="request">Business contact query object (optional)</param>
        /// <returns>Task of List&lt;BusinessContactSelectorContract&gt;</returns>
        public async System.Threading.Tasks.Task <List <BusinessContactSelectorContract> > QueryBusinessContactsAsync(string start = null, string limit = null, string cursorType = null, string cursor = null, BusinessContactQueryContract request = null)
        {
            ApiResponse <List <BusinessContactSelectorContract> > localVarResponse = await QueryBusinessContactsAsyncWithHttpInfo(start, limit, cursorType, cursor, request);

            return(localVarResponse.Data);
        }