Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public final class TerminalRefundRequest
- Object
- TerminalRefundRequest
What a PaymentTerminal.refund(TerminalRefundRequest) should return.
A linked refund names the payment it returns money for, and goes back to
that card without the customer present where the provider allows it. An
unlinked refund names none: the customer presents a card on the
terminal, and the money goes to that card. Terminals that support only
one kind say so through TerminalOperation.REFUND and
TerminalOperation.UNLINKED_REFUND.
TerminalRefundRequest linked = new TerminalRefundRequest(500, "USD")
.setOriginalTransactionId("pi_3Nk...");Constructors
public TerminalRefundRequest(long amount, String currency) |
Methods
public long getAmount() | The amount to return, in the currency’s minor unit. |
public String getCurrency() | The ISO 4217 currency code. |
public String getOriginalTransactionId() | The transaction ID of the payment being refunded, as its TerminalResult.getTransactionId() reported it; null for an unlinked refund. |
public TerminalRefundRequest setOriginalTransactionId(String originalTransactionId) | Sets getOriginalTransactionId(). |
public boolean isUnlinked() | True when the refund names no earlier payment. |
public String getReference() | The app’s own identifier for the refund; may be null. |
public TerminalRefundRequest setReference(String reference) | Sets getReference(). |
Inherited methods
Constructor details
TerminalRefundRequest
public TerminalRefundRequest(long amount, String currency)Parameters
amountlong- the amount to return, in the currency’s minor unit; must be positive. A partial refund is an amount below the original’s.
currencyString- the ISO 4217 code, such as
USD
Method details
getAmount
public long getAmount()The amount to return, in the currency’s minor unit.
getCurrency
public String getCurrency()The ISO 4217 currency code.
getOriginalTransactionId
public String getOriginalTransactionId()The transaction ID of the payment being refunded, as its
TerminalResult.getTransactionId() reported it; null for an unlinked
refund.setOriginalTransactionId
public TerminalRefundRequest setOriginalTransactionId(String originalTransactionId)Returns
this request
isUnlinked
public boolean isUnlinked()True when the refund names no earlier payment.
getReference
public String getReference()The app’s own identifier for the refund; may be null.
setReference
public TerminalRefundRequest setReference(String reference)Sets
getReference().Returns
this request