Ejemplo n.º 1
0
        public async Task <IActionResult> GetEqualInstallmentResult(decimal amount, decimal annual, int months)
        {
            try
            {
                await _service.SetCreditAsync(amount, annual, months);

                await _service.SetCreditFlowAsync(new EqualInstallment());

                return(Ok(await _service.GetFinancialResultAsync()));
            }
            catch (Exception ex)
            {
                return(StatusCode(500, "Cannot create holiday request."));
            }
        }