public class PercentOffPriceAdjustment extends PercentOffAdjustment
XML Snippet for this type of Adjustment:
<Adjustment impl="com.ibm.commerce.marketing.promotion.reward.PercentOffPriceAdjustment"> <!-- -1 for Standard Offer Price, -2 for Contract Price, -3 for Discounted Price --> <PriceAdjustmentBase>-3</PriceAdjustmentBase> <Percentage>15</Percentage> <AdjustmentType>IndividualAffectedItems</AdjustmentType> </Adjustment>
Modifier and Type | Field and Description |
---|---|
static int | CONTRACT_PRICE
The basis for price adjustment.
|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static int | DISCOUNTED_PRICE
The basis for price adjustment.
|
static int | STANDARD_OFFER_PRICE
The basis for price adjustment.
|
Constructor and Description |
---|
PercentOffPriceAdjustment()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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()
Returns the adjustment type Individual Affected Items with value 3.
|
java.math.BigDecimal | getPerUnitAdjustment(AssociatedOrderItem one, AssociatedOrderItem[] all, PromotionContext context)
This method returns the monetary adjustment that needs to be applied to each unit.
|
int | getPriceAdjustmentBasis()
Returns the basis for price adjustment.
|
void | setAdjustmentType(java.lang.Integer adjustmentType)
This method sets the type of Adjustment.
|
void | setPriceAdjustmentBasis(int i)
Sets the basis for price adjustment.
|
java.lang.String | toXML()
Converts the object into its corresponding XML format representation.
|
public static final java.lang.String COPYRIGHT
public static final int STANDARD_OFFER_PRICE
public static final int CONTRACT_PRICE
public static final int DISCOUNTED_PRICE
public java.math.BigDecimal getPerUnitAdjustment(AssociatedOrderItem one, AssociatedOrderItem[] all, PromotionContext context)
public java.lang.Integer getAdjustmentType()
public void setAdjustmentType(java.lang.Integer adjustmentType)
public java.lang.Object clone()
public java.lang.String toXML() throws XMLizationException
public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException
public int getPriceAdjustmentBasis()
public void setPriceAdjustmentBasis(int i)