public class PercentOffShippingAdjustment extends PercentOffAdjustment
PercentOffShippingAdjustment
offers a percentage off the
shipping charges. It provides implementation for PercentOffShipping
adjustment. This class implements Adjustment
interface and
extends PercentOffAdjustment
. XML Snippet for this type of
Adjustment
:
<p> <Adjustment impl="com.ibm.commerce.marketing.promotion.reward.PercentOffShippingAdjustment"> <PercentOff>10</PercentOff> <!-- wholeOrder or AllAffectedItems or IndividualAffectedItems --> <AdjustmentType>wholeOrder</AdjustmentType> </Adjustment> </p>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
CONTRACT_PRICE, DISCOUNTED_PRICE, STANDARD_OFFER_PRICE
MAX_SCALE_FOR_DIVIDE, PRICE, SHIPPING, SHIPPING_TAX, TAX, ZERO
ALL_AFFECTED_ITEMS, INDIVIDUAL_AFFECTED_ITEMS, WHOLE_ORDER
Constructor and Description |
---|
PercentOffShippingAdjustment()
Constructor for PercentOffShippingAdjustment.
|
Modifier and Type | Method and Description |
---|---|
void |
fromXML(org.w3c.dom.Node anXMLNode)
Transforms the XML node into its corresponding real Object.
|
java.lang.Integer |
getPercentOff()
Deprecated.
USE getPercent() in PercentOffAdjustment.
|
int |
getPriceAdjustmentBasis()
This method always return -3 as the DISCOUNTED_PRICE.
|
int |
getTheTypeOfMonetaryValueToBeAdjusted()
Returns the target as SHIPPING=2.
|
void |
setPercentOff(java.lang.Integer tempPercentOff)
Deprecated.
USE setPercent() in PercentOffAdjustment.
|
java.lang.String |
toXML()
Converts the object into its corresponding XML format representation.
|
apply, clone, getAdjustmentType, getCurrency, getMaxAmount, getPercent, getPerUnitAdjustment, setAdjustmentType, setCurrency, setMaxAmount, setPercent, setPriceAdjustmentBasis
public static final java.lang.String COPYRIGHT
public PercentOffShippingAdjustment()
public int getTheTypeOfMonetaryValueToBeAdjusted()
getTheTypeOfMonetaryValueToBeAdjusted
in interface MonetaryAdjustment
getTheTypeOfMonetaryValueToBeAdjusted
in class PercentOffAdjustment
com.ibm.commerce.marketing.promotion.reward.MonetaryAdjustment#getAdjustmentTarget()
public java.lang.Integer getPercentOff()
public void setPercentOff(java.lang.Integer tempPercentOff)
tempPercentOff
- The percent to set.public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException
XMLizable
fromXML
in interface XMLizable
fromXML
in class PercentOffAdjustment
anXMLNode
- The node that represents an XMLizable objectDeXMLizationException
- when this process failsPercentOffAdjustment.fromXML(org.w3c.dom.Node)
public java.lang.String toXML() throws XMLizationException
XMLizable
toXML
in interface XMLizable
toXML
in class PercentOffAdjustment
XMLizationException
- when this process failsPercentOffAdjustment.toXML()
public int getPriceAdjustmentBasis()
getPriceAdjustmentBasis
in class PercentOffAdjustment
PercentOffAdjustment.getPriceAdjustmentBasis()