public class PercentOffVolumeDiscountAdjustment extends java.lang.Object implements MonetaryAdjustment
XML Snippet for PercentOffVolumeDiscountAdjustment:
<Adjustment impl="com.ibm.commerce.marketing.promotion.reward.PercentOffVolumeDiscountAdjustment"> <!-- wholeOrder or IndividualAffectedItems or AllAffectedItems --> <AdjustmentType>wholeOrder</AdjustmentType> <!-- Possible values are: -1: Standard offer price -2: Contract price -3: Discounted price --> <PriceAdjustmentBase>-3</PriceAdjustmentBase> <Range> <AmountOff>10</AmountOff> <Currency>CAD</Currency> <LowerBound>1</LowerBound> <UpperBound>5</UpperBound> <LowerBoundIncluded>true</LowerBoundIncluded> <UpperBoundIncluded>true</UpperBoundIncluded> </Range> <Range> <AmountOff>25</AmountOff> <Currency>CAD</Currency> <LowerBound>6</LowerBound> <!-- -1 indicates unlimited --> <UpperBound>-1</UpperBound> <LowerBoundIncluded>true</LowerBoundIncluded> <UpperBoundIncluded>false</UpperBoundIncluded> </Range> </Adjustment>
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
PercentOffVolumeDiscountAdjustment()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean | apply(LineItemSet targeted, java.math.BigDecimal targetedAmount, int targetedAmountTypes, LineItemSet affected, java.util.Vector affectedVector, java.util.Vector adjustmentVector, PromotionContext context)
This method evaluates the targeted order items to see if they fulfill the conditions of this adjustment ( for example, if the quantity of the order items falls into one of the ranges of the adjustment).
|
java.lang.Object | clone()
Returns null if the CloneNotSupportedException is thrown.
|
void | fromXML(org.w3c.dom.Node anXMLNode)
Transforms the XML node into its corresponding real Object.
|
java.lang.Integer | getAdjustmentType()
This method gets the type of Adjustment.
|
java.math.BigDecimal | getPerUnitAdjustment(AssociatedOrderItem one, AssociatedOrderItem[] all, PromotionContext context)
Returns 0.
|
int | getPriceAdjustmentBasis()
Returns the basis for price adjustment.
|
Range[] | getRanges()
Gets the ranges
|
int | getTheTypeOfMonetaryValueToBeAdjusted()
Returns the target as PRICE=1.
|
void | setAdjustmentType(java.lang.Integer _adjustmentType)
This method sets the type of Adjustment.
|
void | setPriceAdjustmentBasis(int i)
Sets the basis for price adjustment.
|
void | setRanges(Range[] ranges)
Sets ranges
|
java.lang.String | toXML()
Converts the object into its corresponding XML format representation.
|
public static final java.lang.String COPYRIGHT
public PercentOffVolumeDiscountAdjustment()
public int getTheTypeOfMonetaryValueToBeAdjusted()
public java.math.BigDecimal getPerUnitAdjustment(AssociatedOrderItem one, AssociatedOrderItem[] all, PromotionContext context)
public java.lang.Integer getAdjustmentType()
public void setAdjustmentType(java.lang.Integer _adjustmentType)
public boolean apply(LineItemSet targeted, java.math.BigDecimal targetedAmount, int targetedAmountTypes, LineItemSet affected, java.util.Vector affectedVector, java.util.Vector adjustmentVector, PromotionContext context) throws PromotionRuntimeException
public java.lang.String toXML() throws XMLizationException
public java.lang.Object clone()
public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException
public Range[] getRanges()
public void setRanges(Range[] ranges)
public int getPriceAdjustmentBasis()
public void setPriceAdjustmentBasis(int i)