public class FixedAmountOffInDifferentCurrencyAdjustment extends FixedAmountOffAdjustment
XML Snippet for the FixedAmountOffInDifferentCurrencyAdjustment:
<Adjustment impl="com.ibm.commerce.marketing.promotion.reward.FixedAmountOffInDifferentCurrencyAdjustment" > <TargetCurrency> <AmountOff>50</AmountOff> <Currency>USD</Currency> </TargetCurrency> <TargetCurrency> <AmountOff>55</AmountOff> <Currency>CAD</Currency> </TargetCurrency> <AdjustmentType>IndividualAffectedItems</AdjustmentType> </Adjustment>
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String | TAG_TARGETED_CURRENCY
XML Tag names
|
Constructor and Description |
---|
FixedAmountOffInDifferentCurrencyAdjustment()
Constructor for FixedAmountOffInDifferentCurrencyAdjustment.
|
Modifier and Type | Method and Description |
---|---|
void | fromXML(org.w3c.dom.Node anXMLNode)
Transforms the XML node into its corresponding real Object.
|
protected java.math.BigDecimal | getAmountOff(java.lang.String curr)
This method gets the Fixed amount to be given as discount.
|
java.lang.String[] | getCurrencies()
Gets the currencies
|
java.math.BigDecimal[] | getOffAmounts()
Gets the off amounts.
|
java.math.BigDecimal | getPerUnitAdjustment(AssociatedOrderItem one, AssociatedOrderItem[] all, PromotionContext context)
This method returns the monetary adjustment that needs to be applied to each unit.
|
void | setCurrencies(java.lang.String[] currencies)
Sets the array of currencies.
|
void | setOffAmounts(java.math.BigDecimal[] amountsOff)
Sets the array of off amounts.
|
java.lang.String | toXML()
Converts the object into its corresponding XML format representation.
|
protected static final java.lang.String TAG_TARGETED_CURRENCY
public FixedAmountOffInDifferentCurrencyAdjustment()
protected java.math.BigDecimal getAmountOff(java.lang.String curr)
public java.lang.String toXML() throws XMLizationException
public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException
public java.math.BigDecimal getPerUnitAdjustment(AssociatedOrderItem one, AssociatedOrderItem[] all, PromotionContext context)
public java.math.BigDecimal[] getOffAmounts()
public void setOffAmounts(java.math.BigDecimal[] amountsOff)
public java.lang.String[] getCurrencies()
public void setCurrencies(java.lang.String[] currencies)