public async Task <ActionResult <JurosViewModel> > CalcularJuros(JurosViewModel fornecedorViewModel) { fornecedorViewModel = _mapper.Map <JurosViewModel>(await _jurosService.CalcularJuros(_mapper.Map <Juros>(fornecedorViewModel))); if (!OperacaoValida()) { return(CustomResponse(fornecedorViewModel)); } return(CustomResponse(fornecedorViewModel)); }
public async Task <ResponseResult <JurosViewModel> > CalcularJuros(JurosViewModel juros) { var jurosContent = ObterConteudo(juros); var response = await _httpClient.PostAsync($"/api/v1/calculajuros", jurosContent); if (!TratarErrosResponse(response)) { return(await DeserializarObjetoResponse <ResponseResult <JurosViewModel> >(response)); } return(await DeserializarObjetoResponse <ResponseResult <JurosViewModel> >(response)); }