Class FulfillmentPricingItem
- All Implemented Interfaces:
Serializable
- Author:
- Chad Harchar (charchar)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe 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.MonetaryAmountThe total price of all the items.intThe number of units that make up this item.The sku code for this item.javax.money.MonetaryAmountDeprecated.The tax code for this item.javax.money.MonetaryAmountDeprecated.The weight per unit of the item.The units of measure forunitWeightandtotalWeightsuch as POUNDS or KILOGRAMS.inthashCode()voidsetDescription(String description) The description for this item.voidsetFulfillmentFlatRates(Map<String, javax.money.MonetaryAmount> fulfillmentFlatRates) Gets the flat rate for fulfilling this item for a particular fulfillment option type.voidThe unique identifier for this line item.voidsetMerchandiseTotalAmount(javax.money.MonetaryAmount merchandiseTotalAmount) The total price of all the items.voidsetQuantity(int quantity) The number of units that make up this item.voidsetSkuCode(String skuCode) The sku code for this item.voidsetSubtotal(javax.money.MonetaryAmount subtotal) The subtotal of this item being paid for by a customer.voidsetTaxCode(String taxCode) The tax code for this item.voidsetTotalWeight(BigDecimal totalWeight) The total weight of this item being paid for by a customer.voidsetUnitPrice(javax.money.MonetaryAmount unitPrice) Deprecated.this is deprecated as the accurate calculation of this value is not feasible for the bundle item, seegetMerchandiseTotalAmount()voidsetUnitWeight(BigDecimal unitWeight) The weight per unit of the item.voidsetWeightUnits(String weightUnits) The units of measure forunitWeightandtotalWeightsuch 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
quantitywould 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
unitPricewould be the price of just 1 of those shirts whereas thesubtotalwould 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 theunitPricebyquantitysince 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
unitWeightwould be the weight of just 1 of those shirts whereas thetotalWeightwould be the combined weight of all 3.- Returns:
- The weight per unit of the item.
- See Also:
-
weightUnits
-
getWeightUnits
The units of measure forunitWeightandtotalWeightsuch 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
quantitywould 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
unitPricewould be the price of just 1 of those shirts whereas thesubtotalwould 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 theunitPricebyquantitysince 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
unitWeightwould be the weight of just 1 of those shirts whereas thetotalWeightwould be the combined weight of all 3.- Parameters:
unitWeight- The weight per unit of the item.- See Also:
-
weightUnits
-
setWeightUnits
The units of measure forunitWeightandtotalWeightsuch 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:
-
unitWeightweightUnits
-
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()