public class PurchaseRequest extends TransactionRequest
PurchaseResponse
Constructor and Description |
---|
PurchaseRequest()
Constructor.
|
PurchaseRequest(int currencyId,
long totalAmount)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
SkipTipOptions |
getAllowSkipTip() |
long |
getCashBackAmount() |
long |
getMaximumTipAmount() |
int |
getMaximumTipPercent() |
long |
getTipAmount() |
void |
setAllowSkipTip(SkipTipOptions value) |
void |
setCashBackAmount(long value) |
void |
setMaximumTipAmount(long value) |
void |
setMaximumTipPercent(int value) |
void |
setTipAmount(long amount) |
getCurrencyId, getDisabledFeatures, getLoyaltyApplications, getPaymentMethod, getSaleId, getTotalAmount, setCurrencyId, setDisabledFeatures, setLoyaltyApplications, setPaymentMethod, setSaleId, setTotalAmount
public PurchaseRequest()
public PurchaseRequest(int currencyId, long totalAmount)
currencyId
- The preferred currency of the transaction.totalAmount
- The total amount of the transaction.public long getCashBackAmount()
public void setCashBackAmount(long value)
value
- The cash back amount. This amount must be included in totalAmount
,
and specified in the small units of the currency.public long getMaximumTipAmount()
public void setMaximumTipAmount(long value)
value
- The maximum tip amount allowed. If this value is set, it overrides the
maximum percent. The value must be the tip amount only, it should not include
the main amount of the transaction.
If neither the maximum tip amount, nor the maximum tip percent, is set,
then tipping is decided by how the payment application is configured.
If both maximum tip amount, and the maximum tip percent, is set to 0,
then tipping is disabled, regardless of how the payment application is
configured.
The maximum tip amount takes precedence over the maximum tip percent, so
if both values are set, then the percent is ignored.public int getMaximumTipPercent()
public void setMaximumTipPercent(int value)
value
- The maximum tip amount allowed in percent of the main amount.
If a specific maximum amount has been specified
(setMaximumTipAmount(long)
) then the maximum percent is ignored.
If neither the maximum tip amount, nor the maximum tip percent, is set,
then tipping is decided by how the payment application is configured.
If both maximum tip amount, and the maximum tip percent, is set to 0,
then tipping is disabled, regardless of how the payment application is
configured.
The maximum tip amount takes precedence over the maximum tip percent, so
if both values are set, then the percent is ignored.public SkipTipOptions getAllowSkipTip()
public void setAllowSkipTip(SkipTipOptions value)
value
- Determines if the customer is allowed to skip tipping, or not.public long getTipAmount()
public void setTipAmount(long amount)
amount
- A pre-determined tip amount, in the small units of the current currency.
If this is non-zero, then the tipping dialogue will be skipped automatically.