Esempio n. 1
0
        public async Task <HttpResponseMessage> CreateCreditTransactionAsync(TransactionCreditRequest transactionCreditRequest)
        {
            try
            {
                var transactionDTO = await _transactionsService.CreateCreditTransaction(transactionCreditRequest);

                return(Request.CreateResponse(HttpStatusCode.OK, transactionDTO));
            }
            catch (IntercheckApiException apiException)
            {
                return(Request.CreateResponse(HttpStatusCode.InternalServerError, apiException.Error));
            }
            catch (Exception exception)
            {
                return(Request.CreateResponse(HttpStatusCode.InternalServerError, exception.Message));
            }
        }