ResponseEntity process()

in service/src/main/java/org/apache/fineract/cn/cheque/service/rest/ChequeTransactionRestController.java [70:82]


  ResponseEntity<Void> process(@RequestBody @Valid final ChequeTransaction chequeTransaction) {

    final Cheque cheque = chequeTransaction.getCheque();

    if (this.chequeService.chequeExists(chequeTransaction.getCheque())) {
      throw ServiceException.conflict("Cheque {0} already used.",
          MICRParser.toIdentifier(chequeTransaction.getCheque().getMicr()));
    }

    this.commandGateway.process(new ChequeTransactionCommand(cheque, chequeTransaction.getChequesReceivableAccount(),  chequeTransaction.getCreditorAccountNumber()));

    return ResponseEntity.accepted().build();
  }