com.ibm.retail.AEF.event
Interface DiscountEvent

All Superinterfaces:
LineItemEvent, POSAppEvent, POSAppEventElement, SAXElementHandler, java.io.Serializable

public interface DiscountEvent
extends LineItemEvent

A DiscountEvent is generated by a POS transaction when a discount is applied to the transaction or an item. The DiscountEvent object contains details about the discount including the amount and type of the discount.


Method Summary
 java.lang.String getAmount()
          Returns the discount amount.
 java.lang.String getAppliesTo()
          Returns indication of what line item this discount is applied to.
 java.lang.String getDiscountMethod()
          Returns the discount method.
 java.lang.String getDiscountRate()
          Returns the discount rate (percentage off).
 java.lang.String getDiscountReason()
          Returns the reason for the discount (may be application specific).
 java.lang.String getDiscountType()
          Returns the type of discount (may be application specific).
 boolean isTransactionDiscount()
          Indicates if this is a transaction or line item discount.
 boolean isVoided()
          Indicates if this is discount was voided.
 boolean reducesTaxBalanceDue()
          Indicates whether the discount reduces the tax balance due.
 
Methods inherited from interface com.ibm.retail.AEF.event.LineItemEvent
getDescription, getItemModifier, getPrintLines, getRawPrintLines, isDeposit, isRefunded
 
Methods inherited from interface com.ibm.retail.AEF.event.POSAppEvent
getEventType, getPropertyChangeCategory, getTerminalNumber, setEventType, setTerminalNumber
 
Methods inherited from interface com.ibm.retail.AEF.event.POSAppEventElement
getBooleanPropertyValue, getData, getIntegerPropertyValue, getProperty, getPropertyEntries, setData, setProperty, toString
 
Methods inherited from interface com.ibm.retail.AEF.xml.SAXElementHandler
endElement, startElement
 

Method Detail

getAppliesTo

public java.lang.String getAppliesTo()
Returns indication of what line item this discount is applied to. (Note: Used for line item discounts only) Examples are: "previous", "next", "1", "10".

Returns:
indication of what line item this discount is applied to - returns null if the property is undefined

getDiscountMethod

public java.lang.String getDiscountMethod()
Returns the discount method. The discount method is either "percent" or "allowance".

Returns:
discount method - returns null if the property is undefined

getDiscountRate

public java.lang.String getDiscountRate()
Returns the discount rate (percentage off). Applies only to discounts with discount method of "percent". Example: "25.0" for a 25% discount.

Returns:
string representation of the discount rate - returns null if the property is undefined

getAmount

public java.lang.String getAmount()
Returns the discount amount. Applies only to discounts with discount method of "allowance". Example: "0.50" for a fifty cent reduction.

Returns:
string representation of the discount amount - returns null if the property is undefined

getDiscountType

public java.lang.String getDiscountType()
Returns the type of discount (may be application specific).

Returns:
string representation of the discount type - returns null if the property is undefined

getDiscountReason

public java.lang.String getDiscountReason()
Returns the reason for the discount (may be application specific).

Returns:
reason for discount - returns null if the property is undefined

reducesTaxBalanceDue

public boolean reducesTaxBalanceDue()
                             throws AEFException
Indicates whether the discount reduces the tax balance due.

Returns:
true if the discount reduces the tax balance due.
Throws:
AEFException - Among the possible AEFException error codes are:
AEFConst.NO_SUCH_PROPERTY
AEFConst.INVALID_PROPERTY_VALUE

isTransactionDiscount

public boolean isTransactionDiscount()
                              throws AEFException
Indicates if this is a transaction or line item discount.

Returns:
true if this is a transaction level discount, false if it is a line item discount.
Throws:
AEFException - Among the possible AEFException error codes are:
AEFConst.NO_SUCH_PROPERTY
AEFConst.INVALID_PROPERTY_VALUE

isVoided

public boolean isVoided()
                 throws AEFException
Indicates if this is discount was voided.

Specified by:
isVoided in interface LineItemEvent
Returns:
true if this is discount was voided.
Throws:
AEFException - Among the possible AEFException error codes are:
AEFConst.NO_SUCH_PROPERTY
AEFConst.INVALID_PROPERTY_VALUE


Copyright © 2004 IBM. All Rights Reserved.
Generated: July 19 2004