Skip to content

Commit

Permalink
Added CashoutInform to ticket protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
m.turk authored and zb-sr committed Nov 20, 2024
1 parent 0ee1c5c commit 4586b8c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ public CompletableFuture<CashoutResponse> sendCashoutAsync(final CashoutRequest
return engine.execute("ticket-cashout", request, CashoutResponse.class);
}

@Override
public CompletableFuture<CashoutInformResponse> sendCashoutInformAsync(final CashoutInformRequest request) {
return engine.execute("cashout-inform", request, CashoutInformResponse.class);
}

@Override
public CompletableFuture<CashoutAckResponse> sendCashoutAckAsync(final CashoutAckRequest request) {
return engine.execute("ticket-cashout-ack", request, CashoutAckResponse.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,19 @@ default CashoutResponse sendCashout(CashoutRequest request)
return this.sendCashoutAsync(request).get();
}

/**
* Sends a cashout inform request synchronously and returns the corresponding response.
*
* @param request a {@link CashoutInformRequest} to be sent
* @return a {@link CashoutInformResponse} received
* @throws ExecutionException if the execution of the request encounters an exception wrapping the cause exception
* @throws InterruptedException if the execution of the request is interrupted
*/
default CashoutInformResponse sendCashoutInform(CashoutInformRequest request)
throws ExecutionException, InterruptedException {
return this.sendCashoutInformAsync(request).get();
}

/**
* Sends a cashout acknowledgment request synchronously and returns the corresponding response.
*
Expand Down Expand Up @@ -177,6 +190,14 @@ default ExtSettlementAckResponse sendExtSettlementAck(ExtSettlementAckRequest re
*/
CompletableFuture<CashoutResponse> sendCashoutAsync(CashoutRequest request);

/**
* Sends a {@link CashoutInformRequest} asynchronously and returns a {@link CompletableFuture} of {@link CashoutInformResponse}.
*
* @param request the cashout inform request to be sent
* @return a CompletableFuture of CashoutInformResponse
*/
CompletableFuture<CashoutInformResponse> sendCashoutInformAsync(CashoutInformRequest request);

/**
* Sends a cashout acknowledgment request asynchronously and returns a CompletableFuture representing the response.
*
Expand Down

0 comments on commit 4586b8c

Please sign in to comment.