public class Cancelable
A Cancelable
represents an ongoing operation run by the Terminal SDK. While the operation
runs, the Cancelable allows the user to check whether it has completed or cancel it if necessary.
Use of this SDK is subject to the Stripe Terminal Terms: https://stripe.com/terminal/legal
Modifier and Type | Method and Description |
---|---|
void |
cancel(Callback callback)
Attempt to cancel the operation. If the operation cancels successfully, the callback will be
called with
null . If the cancellation fails for any reason, the callback will instead
be called with an Exception detailing the cause of failure. |
boolean |
isCompleted()
Whether the operation has already completed
|
public boolean isCompleted()
Whether the operation has already completed
public void cancel(@NotNull Callback callback)
Attempt to cancel the operation. If the operation cancels successfully, the callback will be
called with null
. If the cancellation fails for any reason, the callback will instead
be called with an Exception detailing the cause of failure.
callback
- The callback to call after cancel is complete