com.ibm.commerce.returns.commands

Class CalculateReturnItemAdjustmentPercentagePolicyCmdImpl

  • All Implemented Interfaces:
    BusinessPolicyCommand, com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, CalculateReturnItemAdjustmentPolicyCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class CalculateReturnItemAdjustmentPercentagePolicyCmdImpl
    extends CalculateReturnItemAdjustmentPolicyCmdImpl
    implements CalculateReturnItemAdjustmentPolicyCmd
    Calculate the adjustment for a return merchandise authorization (RMA) item based on a percentage. The properties passed to this policy may be of the following form:
    • default=-15 (this value is used if no other days_i/percent_i pair applies).
    • days_i=30&percent_i=10 (where i changes).
    If a days property is specified and no percent property, then percent=0 is assumed (that is, no adjustment). If the number of days since the item was shipped is more than any of the days_i properties. Then percent = 0 is assumed (unless a default value is specified).

    An example property string is:

    • days_1=30&percent_1=0&days_2=90&percent_2=-10&default=-20
    This translates into "If the item is returned within 30 days of it being shipped then there is no charge. If it is returned within 90 days then there is a 10% charge. Otherwise, there is a 20% charge."
    See Also:
    Serialized Form