atg.commerce.pricing
Class DetailedItemPriceInfo

java.lang.Object
  extended by atg.commerce.pricing.AmountInfo
      extended by atg.commerce.pricing.DetailedItemPriceInfo
All Implemented Interfaces:
java.io.Serializable

public class DetailedItemPriceInfo
extends AmountInfo

Represents a breakdown of a CommerceItem's price. Different quantities of a single CommerceItem may be priced differently, depending on how each qualifies for different promotions.

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:

Properties: A DetailedItemPriceInfo represents the way at least a quantity of 1 was priced. In DCS, this object appears in the List currentPriceDetails in the ItemPriceInfo class.

See Also:
ItemPriceInfo, Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
DetailedItemPriceInfo()
          Constructs an empty DetailedItemPriceInfo
DetailedItemPriceInfo(DetailedItemPriceInfo pDetailedItemPriceInfo)
          Constructs a new DetailedItemPriceInfo that inherits the change history of the input pDetailedItemPriceInfo.
 
Method Summary
 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)
 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 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
 
Methods inherited from class atg.commerce.pricing.AmountInfo
getAdjustments, getAmount, getClosenessQualifiers, getCurrencyCode, isAmountIsFinal, isDiscounted, markAsFinal, markAsFinal, setAmount, setAmountIsFinal, setClosenessQualifiers, setCurrencyCode, setDiscounted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

DetailedItemPriceInfo

public DetailedItemPriceInfo()
Constructs an empty DetailedItemPriceInfo


DetailedItemPriceInfo

public DetailedItemPriceInfo(DetailedItemPriceInfo pDetailedItemPriceInfo)
Constructs a new DetailedItemPriceInfo that inherits the change history of the input pDetailedItemPriceInfo. The new details also inherits the CurrencyCode and isDiscounted flag value from pDetailedItemPriceInfo. Note: the input pDetailedItemPriceInfo must have a quantity that is not less than one.

Parameters:
pDetailedItemPriceInfo - the details on which this new details will be based
Method Detail

setQuantity

public void setQuantity(long pQuantity)
how many of a commerceitem this object represents

Parameters:
pQuantity - new value to set. Cannot be less than one.

getQuantity

public long getQuantity()
how many of a commerceitem this object represents

Returns:
property Quantity

setTax

public void setTax(double pTax)

getTax

public double getTax()
The amount of tax paid for this item


setOrderDiscountShare

public void setOrderDiscountShare(double pOrderDiscountShare)

getOrderDiscountShare

public double getOrderDiscountShare()
The amount from all order discounts that apply to this item (and effect the taxable amount)


setRange

public void setRange(atg.core.util.Range pRange)

getRange

public atg.core.util.Range getRange()
The range of items priced using this detail


setItemPriceInfo

public void setItemPriceInfo(ItemPriceInfo pItemPriceInfo)
the ItemPriceInfo to which this detailed info belongs

Parameters:
pItemPriceInfo - new value to set

getItemPriceInfo

public ItemPriceInfo getItemPriceInfo()
the ItemPriceInfo to which this detailed info belongs

Returns:
property ItemPriceInfo

setQuantityAsQualifier

public void setQuantityAsQualifier(long pQuantityAsQualifier)
the portion of this DetailedItemPriceInfo that has acted as a qualifier.

Parameters:
pItemPriceInfo - new value to set

getQuantityAsQualifier

public long getQuantityAsQualifier()
the portion of this DetailedItemPriceInfo that has acted as a qualifier.

Returns:
property QuantityAsQualifier

getDetailedUnitPrice

public double getDetailedUnitPrice()
the price for a quantity of one of this DetailedItemPriceInfo Note: property is read - only.

Returns:
the unit price for this details.

copyDetailProperties

public void copyDetailProperties(DetailedItemPriceInfo pDetailedItemPriceInfo)
Copies the data from the given DetailedItemPriceInfo to this one. The properties that get copied are adjustments, currencyCode, and discounted. The given details must have a quantity of not less than 1.

Parameters:
pDetailedItemPriceInfo - the details on which this new details will be based

toString

public java.lang.String toString()
produces a String representation of the DetailedItemPriceInfo

Overrides:
toString in class AmountInfo
Returns:
a String representation of the DetailedItemPriceInfo