Logo
Developer SDK
Version 1.9.632.913d652c-152450467.
BasketManager Class Reference

Inherits IBasketManager.

Public Member Functions

Status startBasket ()
 
String getSessionId ()
 
Status registerBasket (@NonNull Basket basket, @NonNull AmountTotals totals)
 
Status finalizeBasket ()
 
Status purgeBasket ()
 
Basket getBasket ()
 
AmountTotals getCurrentAmountTotals ()
 
Status addMerchandise (@NonNull Merchandise[] merchandise, @NonNull AmountTotals amountTotals)
 
Status addMerchandise (@NonNull Merchandise merchandise, @NonNull AmountTotals amountTotals)
 
Status addMerchandise (OutputContent outputContent)
 
Status addMerchandiseContent (OutputContent outputContent)
 
Status removeMerchandise (@NonNull Merchandise[] merchandise, @NonNull AmountTotals amountTotals)
 
Status removeMerchandise (@NonNull Merchandise merchandise, @NonNull AmountTotals amountTotals)
 
Status modifyMerchandise (@NonNull Merchandise[] merchandise, @NonNull AmountTotals amountTotals)
 
Status modifyMerchandise (@NonNull Merchandise merchandise, @NonNull AmountTotals amountTotals)
 
Status addModifierToMerchandise (@NonNull Modifier modifier, @NonNull Merchandise merchandise, @NonNull AmountTotals amountTotals)
 
Status removeModifierFromMerchandise (@NonNull Modifier modifier, @NonNull Merchandise merchandise, @NonNull AmountTotals amountTotals)
 
Status addOffer (@NonNull Offer offer, @NonNull AmountTotals totals)
 
Status addOffers (@NonNull Offer[] offers, @NonNull AmountTotals totals)
 
Status removeOffer (@NonNull Offer offer, @NonNull AmountTotals totals)
 
Status removeOffers (@NonNull Offer[] offers, @NonNull AmountTotals totals)
 
Status modifyOffer (@NonNull Offer offer, @NonNull AmountTotals totals)
 
Status modifyOffers (@NonNull Offer[] offers, @NonNull AmountTotals totals)
 
Status addDonation (@NonNull Donation donation, @NonNull AmountTotals totals)
 
Status addDonations (@NonNull Donation[] donations, @NonNull AmountTotals totals)
 
Status removeDonation (@NonNull Donation donation, @NonNull AmountTotals totals)
 
Status removeDonations (@NonNull Donation[] donations, @NonNull AmountTotals totals)
 
Status modifyDonation (@NonNull Donation donation, @NonNull AmountTotals totals)
 
Status modifyDonations (@NonNull Donation[] donations, @NonNull AmountTotals totals)
 
Status registerBasket (@NonNull Basket basket)
 
Status addMerchandise (Merchandise merchandise)
 
Status removeMerchandise (Merchandise merchandise)
 
Status modifyMerchandise (Merchandise merchandise)
 
Status addModifierToMerchandise (Modifier modifier, Merchandise merchandise)
 
Status removeModifierFromMerchandise (Modifier modifier, Merchandise merchandise)
 
Status addModifierToMerchandise (Modifier modifier)
 
Status removeModifierFromMerchandise (Modifier modifier)
 
IBinder asBinder ()
 

Detailed Description

The manager for the basket attached to a transaction. This is used when a basket is involved in a transaction, but is not required to process a simple sale.

Definition at line 22 of file BasketManager.java.

Member Function Documentation

◆ addMerchandise() [1/4]

Status addMerchandise ( @NonNull Merchandise []  merchandise,
@NonNull AmountTotals  amountTotals 
)

Adds the items to the basket, notifying listening applications and updating the display.

Parameters
merchandiseThe items to add to the basket.
amountTotalsThe total running amounts to display on the customer-facing screen. If null, automatically calculated based on the merchandise.
Returns
The status indicating if the item was successfully added after sending the add request to the display. This does not return information regarding the display.

Definition at line 150 of file BasketManager.java.

◆ addMerchandise() [2/4]

Status addMerchandise ( @NonNull Merchandise  merchandise,
@NonNull AmountTotals  amountTotals 
)

◆ addMerchandise() [3/4]

Status addMerchandise ( OutputContent  outputContent)

Please use addMerchandise(Merchandise[], AmountTotals), or a similar method, instead. Expects a custom JSON serialization of merchandise information specific to the EPAS protocol.

Definition at line 173 of file BasketManager.java.

◆ addMerchandise() [4/4]

Status addMerchandise ( Merchandise  merchandise)

Please refer to addMerchandise(Merchandise merchandise, AmountTotals amountTotals). Automatically calculates the totals based on the merchandise object.

Definition at line 394 of file BasketManager.java.

◆ addMerchandiseContent()

Status addMerchandiseContent ( OutputContent  outputContent)

Please use addMerchandise(Merchandise[], AmountTotals), or a similar method, instead. Expects a custom JSON serialization of merchandise information specific to the EPAS protocol.

Definition at line 184 of file BasketManager.java.

◆ addModifierToMerchandise() [1/2]

Status addModifierToMerchandise ( Modifier  modifier,
Merchandise  merchandise 
)

Adds a modifier to a particular merchandise, updating the screen appropriately.

Definition at line 418 of file BasketManager.java.

◆ addModifierToMerchandise() [2/2]

Status addModifierToMerchandise ( Modifier  modifier)

Adds a modifier to the most recent merchandise object.

Definition at line 432 of file BasketManager.java.

◆ asBinder()

IBinder asBinder ( )

Retrieve the Binder object associated with this interface. You must use this instead of a plain cast, so that proxy objects can return the correct result.

Definition at line 447 of file BasketManager.java.

◆ finalizeBasket()

Status finalizeBasket ( )

Lets the payment application know that the POS has finished with the initial basket and can allow other applications to make adjustments via the REQUEST_BASKET_ADJUSTMENT trigger. The attached transaction listeners will be notified if any changes are made, and can respond with a finalized basket directly to the event. After closing the basket, no further actions should be performed on it using the basket manager.

Returns
The status indicating success or failure.

Definition at line 87 of file BasketManager.java.

◆ getBasket()

Basket getBasket ( )

Returns the current basket that is associated with the transaction.

Returns
The current basket for the transaction.

Definition at line 118 of file BasketManager.java.

◆ getCurrentAmountTotals()

AmountTotals getCurrentAmountTotals ( )

Returns the current tracked Amount Totals.

Definition at line 131 of file BasketManager.java.

◆ getSessionId()

String getSessionId ( )

Returns the session ID associated with this basket.

Definition at line 57 of file BasketManager.java.

◆ modifyDonation()

Status modifyDonation ( @NonNull Donation  donation,
@NonNull AmountTotals  totals 
)

Modifies the donation based on the item ID, and updates the displayed total amount.

Definition at line 365 of file BasketManager.java.

◆ modifyDonations()

Status modifyDonations ( @NonNull Donation []  donations,
@NonNull AmountTotals  totals 
)

Modifies the donations based on the item ID, and updates the displayed total amount.

Definition at line 373 of file BasketManager.java.

◆ modifyMerchandise() [1/3]

Status modifyMerchandise ( @NonNull Merchandise []  merchandise,
@NonNull AmountTotals  amountTotals 
)

Modifies the items in the basket, notifying listening applications and updating the display. Uses the Basket Item ID to apply the new values.

Parameters
merchandiseThe items to modify with the new values, but containing the existing Basket Item ID.
amountTotalsThe total running amounts to display on the customer-facing screen. This should be explicitly set, as the basket cannot automatically calculate the difference when modifying the item as it exists in the basket.
Returns
The status indicating if the modification was successfully sent to the display. This does not return information regarding the display.

Definition at line 233 of file BasketManager.java.

◆ modifyMerchandise() [2/3]

Status modifyMerchandise ( @NonNull Merchandise  merchandise,
@NonNull AmountTotals  amountTotals 
)

◆ modifyMerchandise() [3/3]

Status modifyMerchandise ( Merchandise  merchandise)

Please refer to modifyMerchandise(Merchandise merchandise, AmountTotals amountTotals). Automatically calculates the totals based on the merchandise object.

Definition at line 412 of file BasketManager.java.

◆ purgeBasket()

Status purgeBasket ( )

Removes all items in the basket and resets the basket state to open.

Returns
The status indicating success or failure.

Definition at line 102 of file BasketManager.java.

◆ registerBasket() [1/2]

Status registerBasket ( @NonNull Basket  basket,
@NonNull AmountTotals  totals 
)

Allows attaching a pre-existing basket to the current transaction. This returns an error if a basket has already been opened and has items.

Returns
The status indicating success or failure.

Definition at line 68 of file BasketManager.java.

◆ registerBasket() [2/2]

Status registerBasket ( @NonNull Basket  basket)

Refer to registerBasket(Basket, AmountTotals).

Definition at line 385 of file BasketManager.java.

◆ removeMerchandise() [1/3]

Status removeMerchandise ( @NonNull Merchandise []  merchandise,
@NonNull AmountTotals  amountTotals 
)

Removes the items from the basket, notifying listening applications and updating the display. Uses the Basket Item ID to remove the proper items.

Parameters
merchandiseThe items to remove.
amountTotalsThe total running amounts to display on the customer-facing screen. If null, automatically calculated based on the merchandise.
Returns
The status indicating if the item was successfully removed after sending the removal request to the display. This does not return information regarding the display.

Definition at line 204 of file BasketManager.java.

◆ removeMerchandise() [2/3]

Status removeMerchandise ( @NonNull Merchandise  merchandise,
@NonNull AmountTotals  amountTotals 
)

◆ removeMerchandise() [3/3]

Status removeMerchandise ( Merchandise  merchandise)

Please refer to removeMerchandise(Merchandise merchandise, AmountTotals amountTotals). Automatically calculates the totals based on the merchandise object.

Definition at line 403 of file BasketManager.java.

◆ removeModifierFromMerchandise() [1/2]

Status removeModifierFromMerchandise ( Modifier  modifier,
Merchandise  merchandise 
)

Removes a modifier from a particular merchandise, updating the screen appropriately.

Definition at line 425 of file BasketManager.java.

◆ removeModifierFromMerchandise() [2/2]

Status removeModifierFromMerchandise ( Modifier  modifier)

Adds a modifier from the most recent merchandise object.

Definition at line 438 of file BasketManager.java.

◆ startBasket()

Status startBasket ( )

This used to be required to start the process, but now we expect an item to be added to the cart to start the basket instead.

Definition at line 48 of file BasketManager.java.


The documentation for this class was generated from the following file:

This document is the confidential property of Verifone, Inc. Any reproduction or distribution of this document, in whole or in part, or the disclosure of any of the information contained herein, without the prior written consent of Verifone, Inc. is prohibited. This document and any supplemental material supplied as part of any review must be returned to Verifone, Inc. upon request. Notice: This document may go through material revisions over time. While the Company will make every effort to keep readers updated as changes occur, care must be taken by the reader to make sure they are reading the latest version. Version numbers appear in the title page and revision history page of this document. All rights reserved. Verifone, the Verifone logo are either trademarks or registered trademarks of Verifone in the United States and/or other countries. All other trademarks or brand names are properties of their respective holders.