Enum TerminalOperation
- All Implemented Interfaces:
Comparable<TerminalOperation>
The operations a PaymentTerminal can perform, as reported by
PaymentTerminal.supports(TerminalOperation).
A terminal asked for an operation it does not support completes the
request with an UnsupportedOperationException and never touches the
card, so checking first is a courtesy to the user rather than a safety
requirement.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionTake money reserved by a pre-authorization:PaymentTerminal.capture(String, long, String).Hand the customer cash on top of the purchase:TerminalPaymentRequest.setCashbackAmount(long).Find out what became of a payment, by the app's own reference:PaymentTerminal.lookup(String).Reserve an amount to capture later, as a hotel or a bar tab does:TerminalPaymentRequest.setPreAuthorization(boolean).Report the data a card receipt must print, throughTerminalResult.getReceipt().Close the day's batch and report its totals:PaymentTerminal.reconcile().Return money for an earlier payment, by its transaction ID:PaymentTerminal.refund(TerminalRefundRequest).Cancel a payment that has not settled yet, so it never shows on the statement:PaymentTerminal.reverse(String).Charge the card now:PaymentTerminal.collect(TerminalPaymentRequest).Let the customer add a tip on the terminal:TerminalPaymentRequest.setAskForTip(boolean).Return money to a card presented now, with no earlier payment to refer to. -
Method Summary
Modifier and TypeMethodDescriptionstatic TerminalOperationReturns the enum constant of this type with the specified name.static TerminalOperation[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
SALE
Charge the card now:PaymentTerminal.collect(TerminalPaymentRequest). -
PRE_AUTHORIZATION
Reserve an amount to capture later, as a hotel or a bar tab does:TerminalPaymentRequest.setPreAuthorization(boolean). -
CAPTURE
Take money reserved by a pre-authorization:PaymentTerminal.capture(String, long, String). -
REVERSAL
Cancel a payment that has not settled yet, so it never shows on the statement:PaymentTerminal.reverse(String). -
REFUND
Return money for an earlier payment, by its transaction ID:PaymentTerminal.refund(TerminalRefundRequest). -
UNLINKED_REFUND
Return money to a card presented now, with no earlier payment to refer to. -
LOOKUP
Find out what became of a payment, by the app's own reference:PaymentTerminal.lookup(String). -
RECONCILIATION
Close the day's batch and report its totals:PaymentTerminal.reconcile(). -
TIPPING
Let the customer add a tip on the terminal:TerminalPaymentRequest.setAskForTip(boolean). -
CASHBACK
Hand the customer cash on top of the purchase:TerminalPaymentRequest.setCashbackAmount(long). -
RECEIPT_DATA
Report the data a card receipt must print, throughTerminalResult.getReceipt().
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-