AmountAdjustment

public class AmountAdjustment

This represents the data that is shared between the terminal and the application while processing CP Triggers. Setting the fields is only relevant when sending the data to the terminal, and conversely, getting the fields is only relevant when receiving this object from the terminal.

Methods

create

public static AmountAdjustment create()

getAdjustmentPercentage

public Decimal getAdjustmentPercentage()

Refer to the setAdjustmentPercentage(BigDecimal).

getAdjustmentValue

public Decimal getAdjustmentValue()

Refer to setAdjustmentValue( BigDecimal).

getDescription

public String getDescription()

Refer to setDescription(String).

setAdjustmentPercentage

public void setAdjustmentPercentage(Decimal percentage)

The percentage to adjust the total as a GAAP-standard BigDecimal. Can be positive or negative. Either this or adjustmentValue is required, setting one will overwrite the other if both are set. Can be set to null to remove this adjustment.

setAdjustmentValue

public void setAdjustmentValue(Decimal value)

Set the amount to adjust the total as a GAAP-standard BigDecimal. Can be positive or negative. Either this or adjustmentPercentage is required, setting one will overwrite the other if both are set. Can be set to null to remove this adjustment.

setDescription

public void setDescription(String description)

A short description of the adjustment. This is optional.

shouldUsePercentageForAdjustment

public boolean shouldUsePercentageForAdjustment()

boolean which indicates whether the percentage or value of the total should be used for adjustment.