示例#1
0
        /// <summary>
        /// Retrieve details for specified Loan Field Ids. Retrieves value, type, description, etc. for the loan field ids in request against the specified loan Id.
        /// </summary>
        /// <exception cref="Elli.Api.Loans.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="loanId">Loan Id for which user wants to retrieve the value of certain fields.</param>
        /// <param name="includeMetadata">Flag to include field metadata or not, with default value as false. (optional)</param>
        /// <param name="fieldIds"> (optional)</param>
        /// <returns>Task of List&lt;LoanFieldDataContract&gt;</returns>
        public async System.Threading.Tasks.Task <List <LoanFieldDataContract> > GetLoanFieldValuesByFieldIdsAsync(string loanId, string includeMetadata = null, LoanFieldIdsContract fieldIds = null)
        {
            ApiResponse <List <LoanFieldDataContract> > localVarResponse = await GetLoanFieldValuesByFieldIdsAsyncWithHttpInfo(loanId, includeMetadata, fieldIds);

            return(localVarResponse.Data);
        }
示例#2
0
        /// <summary>
        /// Retrieve details for specified Loan Field Ids. Retrieves value, type, description, etc. for the loan field ids in request against the specified loan Id.
        /// </summary>
        /// <exception cref="Elli.Api.Loans.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="loanId">Loan Id for which user wants to retrieve the value of certain fields.</param>
        /// <param name="includeMetadata">Flag to include field metadata or not, with default value as false. (optional)</param>
        /// <param name="fieldIds"> (optional)</param>
        /// <returns>Task of ApiResponse (List&lt;LoanFieldDataContract&gt;)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <List <LoanFieldDataContract> > > GetLoanFieldValuesByFieldIdsAsyncWithHttpInfo(string loanId, string includeMetadata = null, LoanFieldIdsContract fieldIds = null)
        {
            // verify the required parameter 'loanId' is set
            if (loanId == null)
            {
                throw new ApiException(400, "Missing required parameter 'loanId' when calling FieldReaderApi->GetLoanFieldValuesByFieldIds");
            }

            var    localVarPath         = "/encompass/v1/loans/{loanId}/fieldReader";
            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 (loanId != null)
            {
                localVarPathParams.Add("loanId", Configuration.ApiClient.ParameterToString(loanId));                 // path parameter
            }
            if (includeMetadata != null)
            {
                localVarQueryParams.Add("includeMetadata", Configuration.ApiClient.ParameterToString(includeMetadata));                          // query parameter
            }
            if (fieldIds != null && fieldIds.GetType() != typeof(byte[]))
            {
                localVarPostBody = Configuration.ApiClient.Serialize(fieldIds); // http body (model) parameter
            }
            else
            {
                localVarPostBody = fieldIds; // 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("GetLoanFieldValuesByFieldIds", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <List <LoanFieldDataContract> >(localVarStatusCode,
                                                                   localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                                   (List <LoanFieldDataContract>)Configuration.ApiClient.Deserialize(localVarResponse, typeof(List <LoanFieldDataContract>))));
        }
示例#3
0
        /// <summary>
        /// Retrieve details for specified Loan Field Ids. Retrieves value, type, description, etc. for the loan field ids in request against the specified loan Id.
        /// </summary>
        /// <exception cref="Elli.Api.Loans.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="loanId">Loan Id for which user wants to retrieve the value of certain fields.</param>
        /// <param name="includeMetadata">Flag to include field metadata or not, with default value as false. (optional)</param>
        /// <param name="fieldIds"> (optional)</param>
        /// <returns>List&lt;LoanFieldDataContract&gt;</returns>
        public List <LoanFieldDataContract> GetLoanFieldValuesByFieldIds(string loanId, string includeMetadata = null, LoanFieldIdsContract fieldIds = null)
        {
            ApiResponse <List <LoanFieldDataContract> > localVarResponse = GetLoanFieldValuesByFieldIdsWithHttpInfo(loanId, includeMetadata, fieldIds);

            return(localVarResponse.Data);
        }