LoyaltyReceivedEventResponse

public class LoyaltyReceivedEventResponse

Allows the POS application to edit the loyalty offers and accounts after they were linked by other applications.

Methods

applyLoyaltyOffers

public void applyLoyaltyOffers(ArrayList<Offer> loyaltyOffers)

Sets the offers and performs the calculations to change the appropriate amounts. Please note, this does not change the tax amount, only the total amounts for both the transaction and the current payment.

asCommerceResponse

public static CommerceResponse asCommerceResponse(LoyaltyReceivedEventResponse loyaltyReceivedEventResponse)

Generate CommerceResponse from the provided response

asTransactionEventResponse

public static TransactionEventResponse asTransactionEventResponse(LoyaltyReceivedEventResponse loyaltyReceivedEventResponse)

Return TransactionEventResponse from the provided response

getInvoiceId

public String getInvoiceId()

Returns invoice id from event

getLoyaltyOffers

public ArrayList<Offer> getLoyaltyOffers()

Returns the offers that will be applied to the cart.

getResponsePayment

public Payment getResponsePayment()

Returns the payment object that started the amount adjustment process. To update this, either update this object directly or use updatePayment(Payment);

getTransaction

public Transaction getTransaction()

Return Transaction from event

selectLoyaltyIdentifier

public void selectLoyaltyIdentifier(LoyaltyIdentifier loyaltyIdentifier)

Applies the information from the loyalty identifier to the overall transaction. Only one should be used per transaction.

setLoyaltyOffers

public void setLoyaltyOffers(ArrayList<Offer> loyaltyOffers)

Set the loyalty offers that are accepted and applicable for this transaction.

updatePayment

public void updatePayment(Payment payment)

Update the payment object with the appropriate amounts and set it here.

updateTransaction

public void updateTransaction(Transaction transaction)

Update transaction from response