public List <RepaymentPlanModel> CreateRepaymentPlan(RepaymentInput input)
        {
            var output = new List <RepaymentPlanModel>();

            var monthlyCapitalInstallment = input.LoanAmount / (input.InstallmentsYears * 12);

            var yearOfRepay       = DateTime.Today.Year;
            var monthOfRepayStart = DateTime.Today.Month;

            var capitalToRepay = input.LoanAmount;

            var repayYears = input.InstallmentsYears;

            while (repayYears > 0)
            {
                var monthlyInteresAmout = (capitalToRepay * (input.InterestRate / 100)) / 12;

                for (int j = 0; j < 12; j++)
                {
                    if (monthOfRepayStart > 11)
                    {
                        monthOfRepayStart = 0;
                        yearOfRepay++;
                    }

                    var installmentName = $"{(Months)monthOfRepayStart} {yearOfRepay}";

                    output.Add(new RepaymentPlanModel()
                    {
                        Month       = installmentName,
                        Installment = Math.Round((monthlyCapitalInstallment + monthlyInteresAmout), 3)
                    });
                    capitalToRepay -= monthlyCapitalInstallment;

                    monthOfRepayStart++;
                }
                repayYears--;
            }
            return(output);
        }
        public IActionResult CreateRepaymentPlan(RepaymentInput input)
        {
            var repaymentPlan = _calcRepo.CreateRepaymentPlan(input);

            return(Ok(repaymentPlan));
        }