public class Discount extends java.lang.Object implements DiscountConst
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
COMPONENT_RULE_BASED_DISCOUNT, DISCOUNT_SERVICE, FIXED_VALUE, ORDER_LEVEL, PERCENTAGE_OFF, PRODUCT_LEVEL, SHIPPING, VALUE_OFF
Constructor and Description |
---|
Discount()
Constructor for Discount.
|
Modifier and Type | Method and Description |
---|---|
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 associated with the discount.
|
FreebieItem[] |
getFreebieItems()
Get the freebie items associated with the discount.
|
MixedDiscount |
getMixedDiscount()
Get the mixed discount object.
|
MonetaryDiscount |
getMonetaryDiscount()
Get the monetary discount object.
|
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 segment names.
|
void |
setServiceDiscounts(ServiceDiscount[] newServiceDiscounts)
Set the service discounts.
|
public static final java.lang.String COPYRIGHT
public java.lang.String getDiscountCode()
public java.lang.Integer getDiscountLevel()
DiscountConst.PRODUCT_LEVEL
or DiscountConst.ORDER_LEVEL
.public FixedPriceItem[] getFixedPriceItems()
public FreebieItem[] getFreebieItems()
public MixedDiscount getMixedDiscount()
public MonetaryDiscount getMonetaryDiscount()
public java.lang.String[] getProfileNames()
public ServiceDiscount[] getServiceDiscounts()
public void setDiscountCode(java.lang.String newDiscountCode)
newDiscountCode
- java.lang.Stringpublic void setDiscountLevel(java.lang.Integer newDiscountLevel)
newLevel
- java.lang.Integerpublic void setFixedPriceItems(FixedPriceItem[] newFixedPriceItems)
newOrderItemFixedPrices
- com.ibm.commerce.discount.rules.FixedPriceItem[]public void setFreebieItems(FreebieItem[] newFreebieItems)
newOrderItemFreebies
- com.ibm.commerce.discount.rules.FreebieItem[]public void setMixedDiscount(MixedDiscount newMixedDiscount)
newOrderDiscounts
- com.ibm.commerce.discount.rules.MixedDiscountpublic void setMonetaryDiscount(MonetaryDiscount newMonetaryDiscount)
newOrderItemDiscounts
- com.ibm.commerce.discount.rules.MonetaryDiscountpublic void setProfileNames(java.lang.String[] newProfileNames)
newProfileNames
- java.lang.String[]public void setServiceDiscounts(ServiceDiscount[] newServiceDiscounts)
newServiceDiscounts
- com.ibm.commerce.discount.rules.ServiceDiscount[]