コード例 #1
0
        public LoanResponseDetailsDto CalculateLoan(LoanRequestDetailsDto loanRequestDetails)
        {
            var response = new LoanResponseDetailsDto();

            response.MonthlyPayment    = _loanService.CalculateMonthlyPayment(loanRequestDetails);
            response.AdministrationFee = _loanService.CalculateAdministrationFee(loanRequestDetails);
            response.TotalInterestPaid = _loanService.CalculateTotalInterestPaid(
                response.MonthlyPayment,
                loanRequestDetails.LoanDuration,
                loanRequestDetails.LoanAmount);
            response.APR = _loanService.CalculateAPR(loanRequestDetails);

            return(response);
        }