atg.commerce.pricing.result
Class DetailedItemPrice

java.lang.Object
  extended by atg.commerce.pricing.result.DetailedItemPrice

public class DetailedItemPrice
extends java.lang.Object

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 DetailedItemPrice 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:
ItemPrice

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
DetailedItemPrice()
          Constructs an empty DetailedItemPrice
 
Method Summary
 PriceAdjustment[] getAdjustments()
          an array of all the discounts
 double getAmount()
          the price of all items
 double getDetailedUnitPrice()
          the price for a quantity of one of this DetailedItemPrice
 long getHighBound()
          The high bound of the range of commerce items described by this price detail
 long getLowBound()
          The low bound of the range of commerce items described by this price detail
 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 DetailedItemPrice that has acted as a qualifier.
 double getTax()
          The amount of tax paid for this item
 boolean isDiscounted()
          boolean indicating if any of the items were discounted
 void setAdjustments(PriceAdjustment[] pAdjustments)
          an array of all the discounts
 void setAmount(double pAmount)
          the price of all items
 void setDetailedUnitPrice(double pDetailedUnitPrice)
          the price for a quantity of one of this DetailedItemPrice
 void setDiscounted(boolean pDiscounted)
          boolean indicating if any of the items were discounted
 void setHighBound(long pHighBound)
           
 void setLowBound(long pLowBound)
           
 void setOrderDiscountShare(double pOrderDiscountShare)
           
 void setQuantity(long pQuantity)
          how many of a commerceitem this object represents
 void setQuantityAsQualifier(long pQuantityAsQualifier)
          the portion of this DetailedItemPrice that has acted as a qualifier.
 void setTax(double pTax)
           
 java.lang.String toString()
          produces a String representation of the DetailedItemPrice
 
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

DetailedItemPrice

public DetailedItemPrice()
Constructs an empty DetailedItemPrice

Method Detail

setAmount

public void setAmount(double pAmount)
the price of all items

Parameters:
pAmount - new value to set

getAmount

public double getAmount()
the price of all items

Returns:
property Amount

setDiscounted

public void setDiscounted(boolean pDiscounted)
boolean indicating if any of the items were discounted

Parameters:
pDiscounted - new value to set

isDiscounted

public boolean isDiscounted()
boolean indicating if any of the items were discounted

Returns:
property Discounted

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)


setLowBound

public void setLowBound(long pLowBound)

getLowBound

public long getLowBound()
The low bound of the range of commerce items described by this price detail


setHighBound

public void setHighBound(long pHighBound)

getHighBound

public long getHighBound()
The high bound of the range of commerce items described by this price detail


setQuantityAsQualifier

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

Parameters:
pItemPriceInfo - new value to set

getQuantityAsQualifier

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

Returns:
property QuantityAsQualifier

setDetailedUnitPrice

public void setDetailedUnitPrice(double pDetailedUnitPrice)
the price for a quantity of one of this DetailedItemPrice

Parameters:
pDetailedUnitPrice - new value to set

getDetailedUnitPrice

public double getDetailedUnitPrice()
the price for a quantity of one of this DetailedItemPrice

Returns:
property DetailedUnitPrice

setAdjustments

public void setAdjustments(PriceAdjustment[] pAdjustments)
an array of all the discounts

Parameters:
pAdjustments - new value to set

getAdjustments

public PriceAdjustment[] getAdjustments()
an array of all the discounts

Returns:
property Adjustments

toString

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

Overrides:
toString in class java.lang.Object
Returns:
a String representation of the DetailedItemPrice