com.ibm.retail.saf.provider
Interface PriceRequest

All Superinterfaces:
POSInfo, POSRequest, java.io.Serializable
All Known Implementing Classes:
DefaultPriceRequest

public interface PriceRequest
extends POSRequest

Provides information needed to determine prices for the list of items.

A PriceRequest contains a set of distinct item numbers which are used by a POSProvider to perform an item lookup on the point-of-sale system.

A price request may contain one or more distinct item numbers and may also contain other information such as loyalty ID which may affect the selling price of an item.


Field Summary
static byte DISCOUNT_PRICE
          Used to specify a price request for the discounted unit price.
static byte REGULAR_PRICE
          Used to specify a price request for regular non-discounted) unit prices.
 
Method Summary
 void addItem(com.ibm.retail.saf.provider.ItemIdentifier itemID)
          Adds an ItemIdentifier to the request.
 java.lang.String getAlternateLoyaltyID()
          Gets the alternate loyalty or customer number defined for this price request.
 java.lang.String getCustomerLoyaltyID()
          Gets the customer's loyalty identifier defined for this price request.
 java.util.Set getItemList()
          Gets the list of ItemIdentifiers contained in the request.
 byte getPriceType()
          Gets the price type of this request.
 void removeItem(com.ibm.retail.saf.provider.ItemIdentifier itemID)
          Removes an ItemIdentifier from the request.
 void setAlternateLoyaltyID(java.lang.String altID)
          Sets the alternate loyalty or customer number for this price request.
 void setCustomerLoyaltyID(java.lang.String customerID)
          Sets a customer's loyalty identifier for this price request.
 void setPriceType(byte priceType)
          Sets the price type of this request.
 
Methods inherited from interface com.ibm.retail.saf.provider.POSRequest
getClientID, getRequestIdentifier
 
Methods inherited from interface com.ibm.retail.saf.provider.POSInfo
getExtendedAttribute, getExtendedAttributeNames, removeExtendedAttribute, setExtendedAttribute
 

Field Detail

REGULAR_PRICE

public static final byte REGULAR_PRICE
Used to specify a price request for regular non-discounted) unit prices.

See Also:
Constant Field Values

DISCOUNT_PRICE

public static final byte DISCOUNT_PRICE
Used to specify a price request for the discounted unit price.

See Also:
Constant Field Values
Method Detail

getPriceType

public byte getPriceType()
Gets the price type of this request.

A REGULAR_PRICE request is used to determine the non-discounted unit price. A DISCOUNT_PRICE request is used to determine the discounted unit price.

Discounted prices incorporate discounts for loyalty programs and other discounts which may be applied to the regular price.

Returns:
price type

getCustomerLoyaltyID

public java.lang.String getCustomerLoyaltyID()
Gets the customer's loyalty identifier defined for this price request.

The loyalty identifier is used only for determining discounted prices. It is ignored for price type of REGULAR.

Returns:
loyalty ID

getAlternateLoyaltyID

public java.lang.String getAlternateLoyaltyID()
Gets the alternate loyalty or customer number defined for this price request. The alternate identifier is used as a substitute lookup to determine the customer loyalty number.

The alternate identifier is used only for determining discounted prices in the case that no loyalty ID is provided or the loyalty ID is invalid. It is ignored for price type of REGULAR.


setPriceType

public void setPriceType(byte priceType)
Sets the price type of this request.

A REGULAR_PRICE request is used to determine the non-discounted unit price. A DISCOUNT_PRICE request is used to determine the discounted unit price.

Discounted prices incorporate discounts for loyalty programs or other discounts which may be applied to the regular price.

Parameters:
priceType - the type of pricing desired.

setCustomerLoyaltyID

public void setCustomerLoyaltyID(java.lang.String customerID)
Sets a customer's loyalty identifier for this price request. This identifier is used to determine discounted prices.

Parameters:
customerID - the loyalty ID of the customer

setAlternateLoyaltyID

public void setAlternateLoyaltyID(java.lang.String altID)
Sets the alternate loyalty or customer number for this price request. This identifier is used as a substitute lookup to determine the customer loyalty number.

Parameters:
altID - alternate loyalty ID of the customer

addItem

public void addItem(com.ibm.retail.saf.provider.ItemIdentifier itemID)
Adds an ItemIdentifier to the request.

Duplicate item identifiers in a list are not allowed.

Parameters:
itemID - an ItemIdentifier to be added

removeItem

public void removeItem(com.ibm.retail.saf.provider.ItemIdentifier itemID)
Removes an ItemIdentifier from the request.

Parameters:
itemID - an ItemIdentifier to be removed.

getItemList

public java.util.Set getItemList()
Gets the list of ItemIdentifiers contained in the request.

If no item list exists, a null is returned.

Objects in the item list are of type ItemIdentifier. This identifier is the number used to sell the item at the point-of-sale register. Examples include UPC, SKU, or PLU codes.

Returns:
item list as a set of ItemIdentifiers