public IActionResult DebitPost([FromBody] DebitoRequest request)
        {
            ConfiguraUsuario(request);
            ConfiguraEmpresa(request);

            var grpc = new integracao_grpc.TransacaoDebitar(request);

            return(IntegrarGRPC <comum_dto.externo.DebitoResponse>(grpc));
        }
Esempio n. 2
0
        public override Task <DebitoResponse> Debitar(DebitoRequest request, ServerCallContext context)
        {
            var response = new DebitoResponse();

            try
            {
                var envelope = debitoServico.Processar(
                    request.UsuarioId.ToGuid(),
                    request.ParceiroId.ToGuid(),
                    request.Descricao,
                    request.ParceiroTransacaoId,
                    request.Pontos);

                response = debitoParser.Response(envelope);
            }
            catch (Exception ex)
            {
                //## TODO log

                response.HttpStatusCode = (int)HttpStatusCode.InternalServerError;
            }

            return(Task.FromResult(response));
        }
Esempio n. 3
0
 public TransacaoDebitar(DebitoRequest request)
 {
     this.request = request;
 }