Class FulfillmentItem
- All Implemented Interfaces:
Serializable
FulfillmentGroup for fulfillment.- Author:
- Chad Harchar (charchar)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanMiscellaneous attributes for this fulfillment 1tem.A reference id to theCartItemto be represented by this fulfillment item.List<com.broadleafcommerce.order.common.domain.Adjustment>Adjustments to item fulfillment pricing that should be applied togetFulfillmentPriceBeforeAdjustments().javax.money.MonetaryAmountThe total fulfillment adjustment amount for this fulfillment item.The tax details associated with this item.javax.money.MonetaryAmountThe fulfillment price of the correspondingCartItembefore adjustments are applied.javax.money.MonetaryAmountThe total fulfillment price of this item, including adjustments.Internal attributes for this fulfillment item.The inventory check strategy of the item.The reservation strategy of the item.javax.money.MonetaryAmountThe amount that can be taxed based on theCartItemprice and usually less any prorated order-adjustments.javax.money.MonetaryAmountThis represents the subtotal for the fulfillment item.javax.money.MonetaryAmountThe total tax of the item merchandise based on the price of the relatedCartItem.com.broadleafcommerce.order.common.domain.PricedFulfillmentOptionjavax.money.MonetaryAmountThe prorated shipping charge for this fulfillment item before adjustments are applied, derived from theFulfillmentGroup.getGroupFulfillmentPriceBeforeAdjustments().javax.money.MonetaryAmountThe amount prorated to this item from group adjustments.javax.money.MonetaryAmountThe amount prorated to this item from order adjustments.intThe quantity to be fulfilled by this item.The reference number for this fulfillment item.inthashCode()booleanWhether or not this item is available online - ie inventory is available somewhere to fulfill this item.booleanWhether or not any offers or promotions can be applied to the cart item.voidsetAttributes(Map<String, Object> attributes) Miscellaneous attributes for this fulfillment 1tem.voidsetAvailableOnline(boolean availableOnline) Whether or not this item is available online - ie inventory is available somewhere to fulfill this item.voidsetCartItemDiscountable(boolean isCartItemDiscountable) Whether or not any offers or promotions can be applied to the cart item.voidsetCartItemId(String cartItemId) A reference id to theCartItemto be represented by this fulfillment item.voidsetFulfillmentAdjustments(List<com.broadleafcommerce.order.common.domain.Adjustment> fulfillmentAdjustments) Adjustments to item fulfillment pricing that should be applied togetFulfillmentPriceBeforeAdjustments().voidsetFulfillmentAdjustmentsTotal(javax.money.MonetaryAmount fulfillmentAdjustmentsTotal) The total fulfillment adjustment amount for this fulfillment item.voidsetFulfillmentItemTaxDetails(List<FulfillmentItemTaxDetail> fulfillmentItemTaxDetails) The tax details associated with this item.voidsetFulfillmentPriceBeforeAdjustments(javax.money.MonetaryAmount fulfillmentPriceBeforeAdjustments) The fulfillment price of the correspondingCartItembefore adjustments are applied.voidsetFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal) The total fulfillment price of this item, including adjustments.voidsetInternalAttributes(Map<String, Object> internalAttributes) Internal attributes for this fulfillment item.voidsetInventoryCheckStrategy(String inventoryCheckStrategy) The inventory check strategy of the item.voidsetInventoryReservationStrategy(String inventoryReservationStrategy) The reservation strategy of the item.voidsetMerchandiseTaxableAmount(javax.money.MonetaryAmount merchandiseTaxableAmount) The amount that can be taxed based on theCartItemprice and usually less any prorated order-adjustments.voidsetMerchandiseTotalAmount(javax.money.MonetaryAmount merchandiseTotalAmount) This represents the subtotal for the fulfillment item.voidsetMerchandiseTotalTax(javax.money.MonetaryAmount merchandiseTotalTax) The total tax of the item merchandise based on the price of the relatedCartItem.voidsetPricedFulfillmentOption(com.broadleafcommerce.order.common.domain.PricedFulfillmentOption pricedFulfillmentOption) voidsetProratedFulfillmentCharge(javax.money.MonetaryAmount proratedFulfillmentCharge) The prorated shipping charge for this fulfillment item before adjustments are applied, derived from theFulfillmentGroup.getGroupFulfillmentPriceBeforeAdjustments().voidsetProratedFulfillmentGroupAdjustments(javax.money.MonetaryAmount proratedFulfillmentGroupAdjustments) The amount prorated to this item from group adjustments.voidsetProratedOrderAdjustments(javax.money.MonetaryAmount proratedOrderAdjustments) The amount prorated to this item from order adjustments.voidsetQuantity(int quantity) The quantity to be fulfilled by this item.voidsetReferenceNumber(String referenceNumber) The reference number for this fulfillment item.toString()
-
Constructor Details
-
FulfillmentItem
public FulfillmentItem()
-
-
Method Details
-
getReferenceNumber
The reference number for this fulfillment item.- Returns:
- The reference number for this fulfillment item.
-
getCartItemId
A reference id to theCartItemto be represented by this fulfillment item.- Returns:
- A reference id to the
CartItemto be represented by this fulfillment item.
-
getQuantity
public int getQuantity()The quantity to be fulfilled by this item. This isn't necessarily going to equalCartItem.getQuantity()since a CartItem can be split across multipleFulfillmentGroups.- Returns:
- The quantity to be fulfilled by this item.
-
getMerchandiseTotalAmount
public javax.money.MonetaryAmount getMerchandiseTotalAmount()This represents the subtotal for the fulfillment item. In most cases, this value is determined by multiplying the unit price of the relatedCartItemby its quantity. In the case of a product bundle, the bundle declares an overall price, which is then prorated down to each bundle item. A fulfillment item is created for each of the bundle's dependent cart items and the prorated price is used to populate this field.For example, if the bundle price is $30 and it contains 2 included products with the price $10 and $15, and quantity 2 and 1 accordingly, the first fulfillment item's
quantitywill be 2 andmerchandiseTotalAmountwill be $17.14 (i.e. 30 * (10 * 2 / (20 + 15))). The second item'squantitywill be 1 andmerchandiseTotalAmountwill be $12.86 (i.e. 30 * (15 * 1 / (20 + 15))). The sum of 2 fulfillment items should be $30 (i.e. $17.14 + $12.86)- Returns:
- the subtotal for the fulfillment item.
-
getProratedOrderAdjustments
public javax.money.MonetaryAmount getProratedOrderAdjustments()The amount prorated to this item from order adjustments. This is primarily for calculatingmerchandiseTotalTax.- Returns:
- The amount prorated to this item from order adjustments
-
getMerchandiseTaxableAmount
public javax.money.MonetaryAmount getMerchandiseTaxableAmount()The amount that can be taxed based on theCartItemprice and usually less any prorated order-adjustments.- Returns:
- The amount that can be taxed based on the
CartItemprice
-
getMerchandiseTotalTax
public javax.money.MonetaryAmount getMerchandiseTotalTax()The total tax of the item merchandise based on the price of the relatedCartItem.- Returns:
- The total tax for the item merchandise.
-
getFulfillmentPriceBeforeAdjustments
public javax.money.MonetaryAmount getFulfillmentPriceBeforeAdjustments()The fulfillment price of the correspondingCartItembefore adjustments are applied.- Returns:
- The fulfillment price of the corresponding
CartItembefore adjustments are applied.
-
getFulfillmentAdjustmentsTotal
public javax.money.MonetaryAmount getFulfillmentAdjustmentsTotal()The total fulfillment adjustment amount for this fulfillment item. Used along withgetFulfillmentPriceBeforeAdjustments()to determinegetFulfillmentTotal().- Returns:
- The total fulfillment adjustment amount for this fulfillment item.
-
getProratedFulfillmentGroupAdjustments
public javax.money.MonetaryAmount getProratedFulfillmentGroupAdjustments()The amount prorated to this item from group adjustments.- Returns:
- The amount prorated to this item from group adjustments.
-
getFulfillmentTotal
public javax.money.MonetaryAmount getFulfillmentTotal()The total fulfillment price of this item, including adjustments. This does not include taxes.- Returns:
- The total fulfillment price of this item, including adjustments.
-
getProratedFulfillmentCharge
public javax.money.MonetaryAmount getProratedFulfillmentCharge()The prorated shipping charge for this fulfillment item before adjustments are applied, derived from theFulfillmentGroup.getGroupFulfillmentPriceBeforeAdjustments(). This does not include additional shipping charges specific to the item.- Returns:
- The prorated shipping charge for this item, not including adjustments.
-
getFulfillmentAdjustments
Adjustments to item fulfillment pricing that should be applied togetFulfillmentPriceBeforeAdjustments().- Returns:
- Adjustments to item fulfillment pricing that should be applied to
getFulfillmentPriceBeforeAdjustments().
-
isAvailableOnline
public boolean isAvailableOnline()Whether or not this item is available online - ie inventory is available somewhere to fulfill this item.- Returns:
- Whether or not this item is available online.
-
getInventoryCheckStrategy
The inventory check strategy of the item. This value helps to determine when an inventory check is required.- Returns:
- The inventory check strategy of the item.
-
getInventoryReservationStrategy
The reservation strategy of the item. This value helps to determine when an inventory reservation is required.- Returns:
- The reservation strategy of the item.
-
isCartItemDiscountable
public boolean isCartItemDiscountable()Whether or not any offers or promotions can be applied to the cart item.
Defaults to
true- Returns:
- whether or not any offers or promotions can be applied to the cart item
-
getFulfillmentItemTaxDetails
The tax details associated with this item.- Returns:
- The tax details for this item.
-
getPricedFulfillmentOption
@Nullable public com.broadleafcommerce.order.common.domain.PricedFulfillmentOption getPricedFulfillmentOption() -
getAttributes
Miscellaneous attributes for this fulfillment 1tem.- Returns:
- Miscellaneous attributes for this fulfillment item.
-
getInternalAttributes
Internal attributes for this fulfillment item. Distinguished fromgetAttributes()in that this map is used for attributes that assist in the internal working of Broadleaf Microservices. For example, attributes to help with returning free gift items.- Returns:
- Miscellaneous internal attributes for this fulfillment item.
-
setReferenceNumber
The reference number for this fulfillment item. -
setCartItemId
A reference id to theCartItemto be represented by this fulfillment item.- Parameters:
cartItemId- A reference id to theCartItemto be represented by this fulfillment item.
-
setQuantity
public void setQuantity(int quantity) The quantity to be fulfilled by this item. This isn't necessarily going to equalCartItem.getQuantity()since a CartItem can be split across multipleFulfillmentGroups.- Parameters:
quantity- The quantity to be fulfilled by this item.
-
setMerchandiseTotalAmount
public void setMerchandiseTotalAmount(javax.money.MonetaryAmount merchandiseTotalAmount) This represents the subtotal for the fulfillment item. In most cases, this value is determined by multiplying the unit price of the relatedCartItemby its quantity. In the case of a product bundle, the bundle declares an overall price, which is then prorated down to each bundle item. A fulfillment item is created for each of the bundle's dependent cart items and the prorated price is used to populate this field.For example, if the bundle price is $30 and it contains 2 included products with the price $10 and $15, and quantity 2 and 1 accordingly, the first fulfillment item's
quantitywill be 2 andmerchandiseTotalAmountwill be $17.14 (i.e. 30 * (10 * 2 / (20 + 15))). The second item'squantitywill be 1 andmerchandiseTotalAmountwill be $12.86 (i.e. 30 * (15 * 1 / (20 + 15))). The sum of 2 fulfillment items should be $30 (i.e. $17.14 + $12.86)- Parameters:
merchandiseTotalAmount- the subtotal for the fulfillment item.
-
setProratedOrderAdjustments
public void setProratedOrderAdjustments(javax.money.MonetaryAmount proratedOrderAdjustments) The amount prorated to this item from order adjustments. This is primarily for calculatingmerchandiseTotalTax.- Parameters:
proratedOrderAdjustments- The amount prorated to this item from order adjustments
-
setMerchandiseTaxableAmount
public void setMerchandiseTaxableAmount(javax.money.MonetaryAmount merchandiseTaxableAmount) The amount that can be taxed based on theCartItemprice and usually less any prorated order-adjustments.- Parameters:
merchandiseTaxableAmount- The amount that can be taxed based on theCartItemprice
-
setMerchandiseTotalTax
public void setMerchandiseTotalTax(javax.money.MonetaryAmount merchandiseTotalTax) The total tax of the item merchandise based on the price of the relatedCartItem.- Parameters:
merchandiseTotalTax- The total tax for the item merchandise.
-
setFulfillmentPriceBeforeAdjustments
public void setFulfillmentPriceBeforeAdjustments(javax.money.MonetaryAmount fulfillmentPriceBeforeAdjustments) The fulfillment price of the correspondingCartItembefore adjustments are applied.- Parameters:
fulfillmentPriceBeforeAdjustments- The fulfillment price of thisCartItembefore adjustments are applied.
-
setFulfillmentAdjustmentsTotal
public void setFulfillmentAdjustmentsTotal(javax.money.MonetaryAmount fulfillmentAdjustmentsTotal) The total fulfillment adjustment amount for this fulfillment item. Used along withgetFulfillmentPriceBeforeAdjustments()to determinegetFulfillmentTotal().- Parameters:
fulfillmentAdjustmentsTotal- The total fulfillment adjustment amount for this fulfillment item.
-
setProratedFulfillmentGroupAdjustments
public void setProratedFulfillmentGroupAdjustments(javax.money.MonetaryAmount proratedFulfillmentGroupAdjustments) The amount prorated to this item from group adjustments.- Parameters:
proratedFulfillmentGroupAdjustments- The amount prorated to this item from group adjustments.
-
setFulfillmentTotal
public void setFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal) The total fulfillment price of this item, including adjustments. This does not include taxes.- Parameters:
fulfillmentTotal- The total fulfillment price of this item, including adjustments.
-
setProratedFulfillmentCharge
public void setProratedFulfillmentCharge(javax.money.MonetaryAmount proratedFulfillmentCharge) The prorated shipping charge for this fulfillment item before adjustments are applied, derived from theFulfillmentGroup.getGroupFulfillmentPriceBeforeAdjustments(). This does not include additional shipping charges specific to the item.- Parameters:
proratedFulfillmentCharge- The prorated shipping charge for this item, not including adjustments.
-
setFulfillmentAdjustments
public void setFulfillmentAdjustments(List<com.broadleafcommerce.order.common.domain.Adjustment> fulfillmentAdjustments) Adjustments to item fulfillment pricing that should be applied togetFulfillmentPriceBeforeAdjustments().- Parameters:
fulfillmentAdjustments- Adjustments to item fulfillment pricing that should be applied togetFulfillmentPriceBeforeAdjustments().
-
setAvailableOnline
public void setAvailableOnline(boolean availableOnline) Whether or not this item is available online - ie inventory is available somewhere to fulfill this item.- Parameters:
availableOnline- Whether or not this item is available online.
-
setInventoryCheckStrategy
The inventory check strategy of the item. This value helps to determine when an inventory check is required.- Parameters:
inventoryCheckStrategy- The inventory check strategy of the item.
-
setInventoryReservationStrategy
The reservation strategy of the item. This value helps to determine when an inventory reservation is required.- Parameters:
inventoryReservationStrategy- The reservation strategy of the item.
-
setCartItemDiscountable
public void setCartItemDiscountable(boolean isCartItemDiscountable) Whether or not any offers or promotions can be applied to the cart item.
Defaults to
true- Parameters:
isCartItemDiscountable- whether or not any offers or promotions can be applied to the cart item
-
setFulfillmentItemTaxDetails
The tax details associated with this item.- Parameters:
taxDetails- The tax details for this item.
-
setPricedFulfillmentOption
public void setPricedFulfillmentOption(@Nullable com.broadleafcommerce.order.common.domain.PricedFulfillmentOption pricedFulfillmentOption) -
setAttributes
Miscellaneous attributes for this fulfillment 1tem.- Parameters:
attributes- Miscellaneous attributes for this fulfillment item.
-
setInternalAttributes
Internal attributes for this fulfillment item. Distinguished fromgetAttributes()in that this map is used for attributes that assist in the internal working of Broadleaf Microservices. For example, attributes to help with returning free gift items.- Parameters:
internalAttributes- Miscellaneous internal attributes for this fulfillment item.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-