public class OrderQualifyingTotalBasedPurchaseCondition extends java.lang.Object implements Condition
<PurchaseCondition impl="com.ibm.commerce.marketing.promotion.condition.OrderQualifyingTotalBasedPurchaseCondition"> <!-- Options are: EXACT or MINIMUM --> <Qualifier>EXACT</Qualifier> <Amount>100</Amount> <Currency>CAD</Currency> <!-- One to four types of values or'd together, e.g. SUBTOTAL|TAX|SHIPPING|SHIPPING_TAX --> <Target>SUBTOTAL</Target> <!-- Reward is the same as any other reward object --> <Reward impl="com.ibm.commerce.marketing.promotion.reward.DefaultReward"> <AdjustmentFunction impl="com.ibm.commerce.marketing.promotion.reward.AdjustmentFunction"> <FilterChain impl="com.ibm.commerce.marketing.promotion.condition.FilterChain"> <Filter impl="com.ibm.commerce.marketing.promotion.condition.DummyFilter"/> </FilterChain> <Adjustment impl="com.ibm.commerce.marketing.promotion.reward.FixedAmountOffAdjustment"> <AmountOff>15</AmountOff> <Currency>CAD</Currency> <AdjustmentType>wholeOrder</AdjustmentType> </Adjustment> </AdjustmentFunction> </Reward> </PurchaseCondition>
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM Copyright
|
static int | EXACT
Targets exactly the amount of spending as specified in this purchase condition
|
static int | MINIMUM
Targets minimum this amount of spending as specified in the purchase condition, up to the entire order total
|
Constructor and Description |
---|
OrderQualifyingTotalBasedPurchaseCondition()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected PromotionExecutionRecord | createPromotionExecutionRecord(PromotionContext context, java.math.BigDecimal targetedAmount)
Creates and initializes a PromotionExecutionRecord
|
boolean | evaluate(PromotionContext context)
The evaluate method is used to determine if the condition has been satisfied successfully.
|
void | fromXML(org.w3c.dom.Node anXMLNode)
Transforms the XML node into its corresponding real Object.
|
java.math.BigDecimal | getAmount()
Amount Getter.
|
java.lang.String | getCurrency()
Currency Getter
|
int | getMask()
Mask Getter.
|
int | getQualifier()
Returns either EXACT or MINIMUM qualifier on the required amount in this purchase condition
|
Reward | getReward()
Returns the reward associated with this condition
|
void | setAmount(java.math.BigDecimal decimal)
Setter for amount
|
void | setCurrency(java.lang.String string)
Setter for currency
|
void | setMask(int i)
Sets for monetary value types bit pattern.
|
void | setQualifier(int i)
Setter for qualifier: EXACT or MINIMUM
|
void | setReward(Reward aReward)
Setter for the reward
|
java.lang.String | toXML()
Converts the object into its corresponding XML format representation.
|
public static final java.lang.String COPYRIGHT
public static final int EXACT
public static final int MINIMUM
public OrderQualifyingTotalBasedPurchaseCondition()
public boolean evaluate(PromotionContext context) throws PromotionConditionEvaluationException
protected PromotionExecutionRecord createPromotionExecutionRecord(PromotionContext context, java.math.BigDecimal targetedAmount)
public java.lang.String toXML() throws XMLizationException
public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException
public java.math.BigDecimal getAmount()
public java.lang.String getCurrency()
public int getMask()
public Reward getReward()
public int getQualifier()
public void setAmount(java.math.BigDecimal decimal)
public void setCurrency(java.lang.String string)
public void setMask(int i)
public void setReward(Reward aReward)
public void setQualifier(int i)