Class FulfillmentPricingItem
- java.lang.Object
-
- com.broadleafcommerce.shipping.domain.FulfillmentPricingItem
-
- All Implemented Interfaces:
Serializable
public class FulfillmentPricingItem extends Object implements Serializable
An item to be fulfillment priced.- Author:
- Chad Harchar (charchar)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FulfillmentPricingItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
String
getDescription()
The description for this item.Map<String,javax.money.MonetaryAmount>
getFulfillmentFlatRates()
Gets the flat rate for fulfilling this item for a particular fulfillment option type.String
getItemId()
The unique identifier for this line item.javax.money.MonetaryAmount
getMerchandiseTotalAmount()
The total price of all the items.int
getQuantity()
The number of units that make up this item.String
getSkuCode()
The sku code for this item.javax.money.MonetaryAmount
getSubtotal()
Deprecated.String
getTaxCode()
The tax code for this item.BigDecimal
getTotalWeight()
javax.money.MonetaryAmount
getUnitPrice()
Deprecated.this is deprecated as the accurate calculation of this value is not feasible for the bundle item, seegetMerchandiseTotalAmount()
BigDecimal
getUnitWeight()
The weight per unit of the item.String
getWeightUnits()
The units of measure forunitWeight
andtotalWeight
such as POUNDS or KILOGRAMS.int
hashCode()
void
setDescription(String description)
The description for this item.void
setFulfillmentFlatRates(Map<String,javax.money.MonetaryAmount> fulfillmentFlatRates)
Gets the flat rate for fulfilling this item for a particular fulfillment option type.void
setItemId(String itemId)
The unique identifier for this line item.void
setMerchandiseTotalAmount(javax.money.MonetaryAmount merchandiseTotalAmount)
The total price of all the items.void
setQuantity(int quantity)
The number of units that make up this item.void
setSkuCode(String skuCode)
The sku code for this item.void
setSubtotal(javax.money.MonetaryAmount subtotal)
The subtotal of this item being paid for by a customer.void
setTaxCode(String taxCode)
The tax code for this item.void
setTotalWeight(BigDecimal totalWeight)
The total weight of this item being paid for by a customer.void
setUnitPrice(javax.money.MonetaryAmount unitPrice)
Deprecated.this is deprecated as the accurate calculation of this value is not feasible for the bundle item, seegetMerchandiseTotalAmount()
void
setUnitWeight(BigDecimal unitWeight)
The weight per unit of the item.void
setWeightUnits(String weightUnits)
The units of measure forunitWeight
andtotalWeight
such as POUNDS or KILOGRAMS.String
toString()
-
-
-
Method Detail
-
getTotalWeight
public BigDecimal getTotalWeight()
- Returns:
- The total weight of this item being paid for by a customer.
-
getSubtotal
@Deprecated public javax.money.MonetaryAmount getSubtotal()
Deprecated.- Returns:
- The subtotal of this item being paid for by a customer.
-
getItemId
public String getItemId()
The unique identifier for this line item.- Returns:
- The unique identifier for this line item.
-
getSkuCode
public String getSkuCode()
The sku code for this item.- Returns:
- The sku code for this item.
-
getTaxCode
public String getTaxCode()
The tax code for this item.- Returns:
- The tax code for this item.
-
getDescription
public String getDescription()
The description for this item.- Returns:
- The description for this item.
-
getQuantity
public int getQuantity()
The number of units that make up this item.An item can represent multiple units of the same product or variant such as 3 large, red t-shirts. The
quantity
would thus be 3.- Returns:
- The number of units that make up this item.
-
getUnitPrice
@Deprecated public javax.money.MonetaryAmount getUnitPrice()
Deprecated.this is deprecated as the accurate calculation of this value is not feasible for the bundle item, seegetMerchandiseTotalAmount()
The individual unit price for this item.An item can represent multiple units of the same product or variant such as 3 large, red t-shirts. The
unitPrice
would be the price of just 1 of those shirts whereas thesubtotal
would be the combined price of all 3.- Returns:
- The individual unit price for this item.
-
getMerchandiseTotalAmount
public javax.money.MonetaryAmount getMerchandiseTotalAmount()
The total price of all the items. This value is used instead of multiplying theunitPrice
byquantity
since calculating an accurate unit price from the fulfillment isn't feasible for the bundle products when the bundle's price is prorated to the bundle items.For example, the price of the bundle is $30, the first item has quantity 2 and price $9.99, the second has quantity 1 and price $15. The prorated price of the first 2 items will be $17.13 and the second $12.87. In this case if calculate $17.13 / 2 = $8,565, rounded value will be $8,57 and then $8,57 * 2 = $17,14 that is not the same as $17.13.
- Returns:
- the total price for this items.
-
getUnitWeight
public BigDecimal getUnitWeight()
The weight per unit of the item.An item can represent multiple units of the same product or variant such as 3 large, red t-shirts. The
unitWeight
would be the weight of just 1 of those shirts whereas thetotalWeight
would be the combined weight of all 3.- Returns:
- The weight per unit of the item.
- See Also:
weightUnits
-
getWeightUnits
public String getWeightUnits()
The units of measure forunitWeight
andtotalWeight
such as POUNDS or KILOGRAMS.- Returns:
- The units of weight of this item being paid for by a customer.
-
getFulfillmentFlatRates
public Map<String,javax.money.MonetaryAmount> getFulfillmentFlatRates()
Gets the flat rate for fulfilling this item for a particular fulfillment option type. Depending on if the option is configured to use flat rates, this flat rate will be used in calculating the cost of fulfilling this item.- Returns:
- Map of Fulfillment option types to flat rates for this item.
-
setItemId
public void setItemId(String itemId)
The unique identifier for this line item.- Parameters:
itemId
- The unique identifier for this line item.
-
setSkuCode
public void setSkuCode(String skuCode)
The sku code for this item.- Parameters:
skuCode
- The sku code for this item.
-
setTaxCode
public void setTaxCode(String taxCode)
The tax code for this item.- Parameters:
taxCode
- The tax code for this item.
-
setDescription
public void setDescription(String description)
The description for this item.- Parameters:
description
- The description for this item.
-
setQuantity
public void setQuantity(int quantity)
The number of units that make up this item.An item can represent multiple units of the same product or variant such as 3 large, red t-shirts. The
quantity
would thus be 3.- Parameters:
quantity
- The number of units that make up this item.
-
setUnitPrice
@Deprecated public void setUnitPrice(javax.money.MonetaryAmount unitPrice)
Deprecated.this is deprecated as the accurate calculation of this value is not feasible for the bundle item, seegetMerchandiseTotalAmount()
The individual unit price for this item.An item can represent multiple units of the same product or variant such as 3 large, red t-shirts. The
unitPrice
would be the price of just 1 of those shirts whereas thesubtotal
would be the combined price of all 3.- Parameters:
unitPrice
- The individual unit price for this item.
-
setMerchandiseTotalAmount
public void setMerchandiseTotalAmount(javax.money.MonetaryAmount merchandiseTotalAmount)
The total price of all the items. This value is used instead of multiplying theunitPrice
byquantity
since calculating an accurate unit price from the fulfillment isn't feasible for the bundle products when the bundle's price is prorated to the bundle items.For example, the price of the bundle is $30, the first item has quantity 2 and price $9.99, the second has quantity 1 and price $15. The prorated price of the first 2 items will be $17.13 and the second $12.87. In this case if calculate $17.13 / 2 = $8,565, rounded value will be $8,57 and then $8,57 * 2 = $17,14 that is not the same as $17.13.
- Parameters:
merchandiseTotalAmount
- the total price for this items.
-
setUnitWeight
public void setUnitWeight(BigDecimal unitWeight)
The weight per unit of the item.An item can represent multiple units of the same product or variant such as 3 large, red t-shirts. The
unitWeight
would be the weight of just 1 of those shirts whereas thetotalWeight
would be the combined weight of all 3.- Parameters:
unitWeight
- The weight per unit of the item.- See Also:
weightUnits
-
setWeightUnits
public void setWeightUnits(String weightUnits)
The units of measure forunitWeight
andtotalWeight
such as POUNDS or KILOGRAMS.- Parameters:
weightUnits
- The units of weight of this item being paid for by a customer.
-
setSubtotal
public void setSubtotal(javax.money.MonetaryAmount subtotal)
The subtotal of this item being paid for by a customer.- Parameters:
subtotal
- The subtotal of this item being paid for by a customer.- See Also:
unitPrice
-
setTotalWeight
public void setTotalWeight(BigDecimal totalWeight)
The total weight of this item being paid for by a customer.- Parameters:
weight
- The total weight of this item being paid for by a customer.- See Also:
unitWeight
,weightUnits
-
setFulfillmentFlatRates
public void setFulfillmentFlatRates(Map<String,javax.money.MonetaryAmount> fulfillmentFlatRates)
Gets the flat rate for fulfilling this item for a particular fulfillment option type. Depending on if the option is configured to use flat rates, this flat rate will be used in calculating the cost of fulfilling this item.- Parameters:
fulfillmentFlatRates
- Map of Fulfillment option types to flat rates for this item.
-
canEqual
protected boolean canEqual(Object other)
-
-