Class FulfillmentPricingItem
- All Implemented Interfaces:
Serializable
- Author:
- Chad Harchar (charchar)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The description for this item.Gets the flat rate for fulfilling this item for a particular fulfillment option type.The unique identifier for this line item.javax.money.MonetaryAmount
The total price of all the items.int
The number of units that make up this item.The sku code for this item.javax.money.MonetaryAmount
Deprecated.The tax code for this item.javax.money.MonetaryAmount
Deprecated.The weight per unit of the item.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
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.toString()
-
Constructor Details
-
FulfillmentPricingItem
public FulfillmentPricingItem()
-
-
Method Details
-
getTotalWeight
- Returns:
- The total weight of this item being paid for by a customer.
-
getSubtotal
Deprecated.- Returns:
- The subtotal of this item being paid for by a customer.
-
getItemId
The unique identifier for this line item.- Returns:
- The unique identifier for this line item.
-
getSkuCode
The sku code for this item.- Returns:
- The sku code for this item.
-
getTaxCode
The tax code for this item.- Returns:
- The tax code for this item.
-
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.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
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
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
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
The unique identifier for this line item.- Parameters:
itemId
- The unique identifier for this line item.
-
setSkuCode
The sku code for this item.- Parameters:
skuCode
- The sku code for this item.
-
setTaxCode
The tax code for this item.- Parameters:
taxCode
- The tax code for this item.
-
setDescription
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.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
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
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
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
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.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getMerchandiseTotalAmount()