public ActionResult <Guid> CreateAnticipation([FromBody] IEnumerable <AnticipationRequest> anticipations)
 {
     try
     {
         return(Ok(_anticipationService.CreateAnticipation(
                       _transactionService.CheckAvailable(anticipations.Select(a => a.nsu)))));
     }
     catch (ForbiddenException n)
     {
         return(Forbid(n.Message));
     }
     catch (NotFoundException n)
     {
         return(NotFound(n.Message));
     }
 }
Exemplo n.º 2
0
 public void TestCreateAnticipationOk()
 {
     Assert.NotNull(_anticipationService.CreateAnticipation(_transactionMock));
 }