public InitiateApplicationsResponseData GetInitiateApplications(InitiateApplicationsRequestHeader initiateApplicationsRequestHeader, InitiateApplicationsRequestBody initiateApplicationsRequestBody)
        {
            var client = new RestClient(OpenAPI.LoanOrigination.InitiateApplications(_remoteServiceBaseUrl))
            {
                Timeout = -1
            };
            var request = new RestRequest(Method.POST);

            request.AddHeader("content-type", initiateApplicationsRequestHeader.AcceptLanguage);
            request.AddHeader("resourceOwnerId", initiateApplicationsRequestHeader.ResourceOwnerId);
            request.AddHeader("requestUId", initiateApplicationsRequestHeader.RequestUId);
            request.AddHeader("authorization", initiateApplicationsRequestHeader.Authorization);
            request.AddHeader("accept-language", initiateApplicationsRequestHeader.AcceptLanguage);
            request.AddJsonBody(JsonConvert.SerializeObject(initiateApplicationsRequestBody));

            IRestResponse response           = client.Execute(request);
            var           responseContent    = JsonConvert.DeserializeObject <InitiateApplicationsResponseData>(response.Content);
            var           responseJsonString = JsonConvert.DeserializeObject(response.Content);
            var           results            = responseContent;

            results.jsonString = responseJsonString;
            return(results);
        }
Esempio n. 2
0
 /// <summary>
 /// This endpoint requests loan application initiate.
 /// </summary>
 /// <param name="initiateApplicationsRequestHeader">Request Header</param>
 /// <param name="initiateApplicationsRequestBody">Request Body</param>
 /// <returns>Loan application initiate</returns>
 public async Task <InitiateApplicationsResponseData> GetInitiateApplicationsAsync(InitiateApplicationsRequestHeader initiateApplicationsRequestHeader, InitiateApplicationsRequestBody initiateApplicationsRequestBody)
 {
     return(await _loanOriginationService.GetInitiateApplicationsAsync(initiateApplicationsRequestHeader, initiateApplicationsRequestBody));
 }
Esempio n. 3
0
 /// <summary>
 /// This endpoint requests loan application initiate.
 /// </summary>
 /// <param name="initiateApplicationsRequestHeader">Request Header</param>
 /// <param name="initiateApplicationsRequestBody">Request Body</param>
 /// <returns>Loan application initiate</returns>
 public InitiateApplicationsResponseData GetInitiateApplications(InitiateApplicationsRequestHeader initiateApplicationsRequestHeader, InitiateApplicationsRequestBody initiateApplicationsRequestBody)
 {
     return(_loanOriginationService.GetInitiateApplications(initiateApplicationsRequestHeader, initiateApplicationsRequestBody));
 }