Esempio n. 1
0
        public async Task <IActionResult> CalculaJuros([FromBody] CalcularTaxaJurosModel model)
        {
            if (!model.IsValid)
            {
                return(BadRequest());
            }

            var taxaJuros = await _service.BuscarTaxaJuros();

            var calculoTaxaJuros = new CalculoTaxaJuros(model.ValorInicial, model.Tempo, taxaJuros.Valor);

            return(Ok((CalcularTaxaJurosModelResult)calculoTaxaJuros));
        }