com.ibm.commerce.discount.rules
Class Discount

java.lang.Object
  |
  +--com.ibm.commerce.discount.rules.Discount
All Implemented Interfaces:
DiscountConst

public class Discount
extends java.lang.Object
implements DiscountConst

This class represents a general discount type.


Field Summary
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 
Fields inherited from interface com.ibm.commerce.discount.rules. DiscountConst
COMPONENT_RULE_BASED_DISCOUNT, DISCOUNT_SERVICE, FIXED_VALUE, ORDER_LEVEL, PERCENTAGE_OFF, PRODUCT_LEVEL, SHIPPING, VALUE_OFF
 
Constructor Summary
Discount()
          Constructor for Discount.
 
Method Summary
 java.lang.String getDiscountCode()
          Get the discount code, which is unique within one store to represent a discount.
 java.lang.Integer getDiscountLevel()
          Get the discount level, which could be product level or order level based on the discount target.
  FixedPriceItem[] getFixedPriceItems()
          Get the fixed price items.
  FreebieItem[] getFreebieItems()
          Get the freebie items.
  MixedDiscount getMixedDiscount()
          Get the mixed discount.
  MonetaryDiscount getMonetaryDiscount()
          Get the monetary discount
 java.lang.String[] getProfileNames()
          Get the profile names
  ServiceDiscount[] getServiceDiscounts()
          Get the service discounts.
 void setDiscountCode(java.lang.String newDiscountCode)
          Set the discount code.
 void setDiscountLevel(java.lang.Integer newDiscountLevel)
          Set the discount level.
 void setFixedPriceItems( FixedPriceItem[] newFixedPriceItems)
          Set the fixed price items
 void setFreebieItems( FreebieItem[] newFreebieItems)
          Set the freebie items
 void setMixedDiscount( MixedDiscount newMixedDiscount)
          Set the mixed discount.
 void setMonetaryDiscount( MonetaryDiscount newMonetaryDiscount)
          Set the monetary discount
 void setProfileNames(java.lang.String[] newProfileNames)
          Set the profile names
 void setServiceDiscounts( ServiceDiscount[] newServiceDiscounts)
          Set the service discounts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM copyright notice field.
See Also:
Constant Field Values
Constructor Detail

Discount

public Discount()
Constructor for Discount.
Method Detail

getDiscountCode

public java.lang.String getDiscountCode()
Get the discount code, which is unique within one store to represent a discount.
Returns:
java.lang.Integer

getDiscountLevel

public java.lang.Integer getDiscountLevel()
Get the discount level, which could be product level or order level based on the discount target.
Returns:
java.lang.Integer

getFixedPriceItems

public FixedPriceItem[] getFixedPriceItems()
Get the fixed price items.
Returns:
com.ibm.commerce.discount.rules.FixedPriceItem[]

getFreebieItems

public FreebieItem[] getFreebieItems()
Get the freebie items.
Returns:
com.ibm.commerce.discount.rules.FreebieItem[]

getMixedDiscount

public MixedDiscount getMixedDiscount()
Get the mixed discount.
Returns:
com.ibm.commerce.discount.rules.MixedDiscount

getMonetaryDiscount

public MonetaryDiscount getMonetaryDiscount()
Get the monetary discount
Returns:
com.ibm.commerce.discount.rules.MonetaryDiscount

getProfileNames

public java.lang.String[] getProfileNames()
Get the profile names
Returns:
java.lang.String[]

getServiceDiscounts

public ServiceDiscount[] getServiceDiscounts()
Get the service discounts.
Returns:
com.ibm.commerce.discount.rules.ServiceDiscount[]

setDiscountCode

public void setDiscountCode(java.lang.String newDiscountCode)
Set the discount code.
Parameters:
newDiscountCode - java.lang.String

setDiscountLevel

public void setDiscountLevel(java.lang.Integer newDiscountLevel)
Set the discount level.

setFixedPriceItems

public void setFixedPriceItems(FixedPriceItem[] newFixedPriceItems)
Set the fixed price items

setFreebieItems

public void setFreebieItems(FreebieItem[] newFreebieItems)
Set the freebie items

setMixedDiscount

public void setMixedDiscount(MixedDiscount newMixedDiscount)
Set the mixed discount.

setMonetaryDiscount

public void setMonetaryDiscount(MonetaryDiscount newMonetaryDiscount)
Set the monetary discount

setProfileNames

public void setProfileNames(java.lang.String[] newProfileNames)
Set the profile names
Parameters:
newProfileNames - java.lang.String[]

setServiceDiscounts

public void setServiceDiscounts(ServiceDiscount[] newServiceDiscounts)
Set the service discounts
Parameters:
newServiceDiscounts - com.ibm.commerce.discount.rules.ServiceDiscount[]