BasketEvent

public class BasketEvent

Fired when an item is added to the basket, modified, or removed from the basket.

Fields

TYPE

public static final String TYPE

The constant event type for basket.

Methods

generateTransactionEventResponse

public TransactionEventResponse generateTransactionEventResponse()

TransactionEventResponse from the event

getBasketAction

public BasketAction getBasketAction()

The action that triggered this event. The success/failure of the event should be determined from getStatus().

getBasketItems

public ArrayList<BasketItem> getBasketItems()

A copy of the items for which the action was performed.

getEventId

public String getEventId()

CommerceEvent methods

getInvoiceId

public String getInvoiceId()

Return invoice id from the event

getItemType

public ItemType getItemType()

The type of item for which the action was performed.

getMessage

public String getMessage()

Status methods

getSessionId

public String getSessionId()

Get the session ID for the session which triggered this event.

getStatus

public int getStatus()

Returns the event status

getTransaction

public Transaction getTransaction()

Returns Transaction from the event

getType

public String getType()

Returns the Event constants