public class DetailedItemPriceInfo extends AmountInfo
Example:
Let's say there exists a CommerceItem whose sku is a red pair of shorts and whose quantity is 5. This is equivalent to saying that someone has put 5 pairs of red shorts in their virtual shopping cart. Let's also say that a user has a promotion good for 10 percent off up to 3 pairs of shorts. This is where DetailedItemPriceInfo comes in. A single ItemPriceInfo can't capture all of the information needed. The ItemPriceInfo will have two DetailedItemPriceInfo entries in its currentPriceDetails List:
amount
by the quantity
.
ItemPriceInfo
,
Serialized FormModifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
FINAL_PRICE_MANUAL_ADJUSTMENT, mFinalReasonCode
Constructor and Description |
---|
DetailedItemPriceInfo()
Constructs an empty DetailedItemPriceInfo
|
DetailedItemPriceInfo(DetailedItemPriceInfo pDetailedItemPriceInfo)
Constructs a new DetailedItemPriceInfo that inherits the change history of the
input pDetailedItemPriceInfo.
|
Modifier and Type | Method and Description |
---|---|
void |
copyDetailProperties(DetailedItemPriceInfo pDetailedItemPriceInfo)
Copies the data from the given DetailedItemPriceInfo to this one.
|
double |
getDetailedUnitPrice()
the price for a quantity of one of this DetailedItemPriceInfo
Note: property is read - only.
|
ItemPriceInfo |
getItemPriceInfo()
the ItemPriceInfo to which this detailed info belongs
|
double |
getOrderDiscountShare()
The amount from all order discounts that apply to this item (and effect the taxable amount)
|
double |
getOrderManualAdjustmentShare()
The amount from all order manual adjustments that apply to this item (and effect the taxable amount)
|
long |
getQuantity()
how many of a commerceitem this object represents
|
long |
getQuantityAsQualifier()
the portion of this DetailedItemPriceInfo that has acted as a qualifier.
|
atg.core.util.Range |
getRange()
The range of items priced using this detail
|
double |
getTax()
The amount of tax paid for this item
|
void |
setItemPriceInfo(ItemPriceInfo pItemPriceInfo)
the ItemPriceInfo to which this detailed info belongs
|
void |
setOrderDiscountShare(double pOrderDiscountShare) |
void |
setOrderManualAdjustmentShare(double pOrderManualAdjustmentShare) |
void |
setQuantity(long pQuantity)
how many of a commerceitem this object represents
|
void |
setQuantityAsQualifier(long pQuantityAsQualifier)
the portion of this DetailedItemPriceInfo that has acted as a qualifier.
|
void |
setRange(atg.core.util.Range pRange) |
void |
setTax(double pTax) |
java.lang.String |
toString()
produces a String representation of the DetailedItemPriceInfo
|
getAdjustments, getAmount, getClosenessQualifiers, getCurrencyCode, getFinalReasonCode, isAmountIsFinal, isDiscounted, markAsFinal, markAsFinal, markAsFinal, setAmount, setAmountIsFinal, setClosenessQualifiers, setCurrencyCode, setDiscounted, setFinalReasonCode, unmarkAsFinal
public DetailedItemPriceInfo()
public DetailedItemPriceInfo(DetailedItemPriceInfo pDetailedItemPriceInfo)
pDetailedItemPriceInfo
- the details on which this new details will be basedpublic void setQuantity(long pQuantity)
pQuantity
- new value to set. Cannot be less than one.public long getQuantity()
public void setTax(double pTax)
public double getTax()
public void setOrderDiscountShare(double pOrderDiscountShare)
public double getOrderDiscountShare()
public void setOrderManualAdjustmentShare(double pOrderManualAdjustmentShare)
public double getOrderManualAdjustmentShare()
public void setRange(atg.core.util.Range pRange)
public atg.core.util.Range getRange()
public void setItemPriceInfo(ItemPriceInfo pItemPriceInfo)
pItemPriceInfo
- new value to setpublic ItemPriceInfo getItemPriceInfo()
public void setQuantityAsQualifier(long pQuantityAsQualifier)
pItemPriceInfo
- new value to setpublic long getQuantityAsQualifier()
public double getDetailedUnitPrice()
public void copyDetailProperties(DetailedItemPriceInfo pDetailedItemPriceInfo)
pDetailedItemPriceInfo
- the details on which this new details will be basedpublic java.lang.String toString()
toString
in class AmountInfo