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>
MAX_SCALE_FOR_DIVIDE, PRICE, SHIPPING, SHIPPING_TAX, TAX, ZEROALL_AFFECTED_ITEMS, INDIVIDUAL_AFFECTED_ITEMS, WHOLE_ORDER| 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.
|
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.
|
apply, clone, getAdjustmentType, getAmountOff, getCurrency, getTheTypeOfMonetaryValueToBeAdjusted, setAdjustmentType, setAmountOff, setCurrencypublic FixedAmountOffInDifferentCurrencyAdjustment()
public java.lang.String toXML()
throws XMLizationException
XMLizabletoXML in interface XMLizabletoXML in class FixedAmountOffAdjustmentXMLizationException - when this process failsXMLizable.toXML()public void fromXML(org.w3c.dom.Node anXMLNode)
throws DeXMLizationException
XMLizablefromXML in interface XMLizablefromXML in class FixedAmountOffAdjustmentanXMLNode - The node that represents an XMLizable objectDeXMLizationException - when this process failsXMLizable.fromXML(Node)public java.math.BigDecimal getPerUnitAdjustment(AssociatedOrderItem one, AssociatedOrderItem[] all, PromotionContext context)
MonetaryAdjustmentAssociationOrderItem). It is guaranteed that all units in
one have been adjusted by exactly the same set of
monetary adjustments.getPerUnitAdjustment in interface MonetaryAdjustmentgetPerUnitAdjustment in class FixedAmountOffAdjustmentone - the order item or portion of an order item for which a per unit adjustment
amount needs to be calculated.all - all of the AssociatedOrderItems to which this adjustment applies.context - PromotionContextMonetaryAdjustment.getPerUnitAdjustment(AssociatedOrderItem,
AssociatedOrderItem[], PromotionContext)public java.math.BigDecimal[] getOffAmounts()
public void setOffAmounts(java.math.BigDecimal[] amountsOff)
amountsOff - the off amounts array to setpublic java.lang.String[] getCurrencies()
public void setCurrencies(java.lang.String[] currencies)
currencies - the currencies to set