Пример #1
0
        public async Task <IActionResult> SimularAgendamentoVeiculo([FromRoute] string placa, [FromQuery] DateTime dataRetirada, [FromQuery] DateTime dataDevolucao, CancellationToken ctx)
        {
            var input = new AgendamentoInputModel
            {
                DataDevolucao = dataDevolucao,
                DataRetirada  = dataRetirada,
                Placa         = placa
            };

            var result = await _veiculoApplication.SimularAluguelVeiculo(input, ctx);

            if (result.Valid)
            {
                return(Ok(result.Object));
            }

            return(UnprocessableEntity(result.Notifications));
        }