Class FulfillmentItem
- All Implemented Interfaces:
Serializable
FulfillmentGroup
for fulfillment.- Author:
- Chad Harchar (charchar)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Miscellaneous attributes for this fulfillment 1tem.A reference id to theCartItem
to 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.MonetaryAmount
The total fulfillment adjustment amount for this fulfillment item.The tax details associated with this item.javax.money.MonetaryAmount
The fulfillment price of the correspondingCartItem
before adjustments are applied.javax.money.MonetaryAmount
The 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.MonetaryAmount
The amount that can be taxed based on theCartItem
price and usually less any prorated order-adjustments.javax.money.MonetaryAmount
This represents the subtotal for the fulfillment item.javax.money.MonetaryAmount
The total tax of the item merchandise based on the price of the relatedCartItem
.com.broadleafcommerce.order.common.domain.PricedFulfillmentOption
javax.money.MonetaryAmount
The prorated shipping charge for this fulfillment item before adjustments are applied, derived from theFulfillmentGroup.getGroupFulfillmentPriceBeforeAdjustments()
.javax.money.MonetaryAmount
The amount prorated to this item from group adjustments.javax.money.MonetaryAmount
The amount prorated to this item from order adjustments.int
The quantity to be fulfilled by this item.The reference number for this fulfillment item.int
hashCode()
boolean
Whether or not this item is available online - ie inventory is available somewhere to fulfill this item.boolean
Whether or not any offers or promotions can be applied to the cart item.void
setAttributes
(Map<String, Object> attributes) Miscellaneous attributes for this fulfillment 1tem.void
setAvailableOnline
(boolean availableOnline) Whether or not this item is available online - ie inventory is available somewhere to fulfill this item.void
setCartItemDiscountable
(boolean isCartItemDiscountable) Whether or not any offers or promotions can be applied to the cart item.void
setCartItemId
(String cartItemId) A reference id to theCartItem
to be represented by this fulfillment item.void
setFulfillmentAdjustments
(List<com.broadleafcommerce.order.common.domain.Adjustment> fulfillmentAdjustments) Adjustments to item fulfillment pricing that should be applied togetFulfillmentPriceBeforeAdjustments()
.void
setFulfillmentAdjustmentsTotal
(javax.money.MonetaryAmount fulfillmentAdjustmentsTotal) The total fulfillment adjustment amount for this fulfillment item.void
setFulfillmentItemTaxDetails
(List<FulfillmentItemTaxDetail> fulfillmentItemTaxDetails) The tax details associated with this item.void
setFulfillmentPriceBeforeAdjustments
(javax.money.MonetaryAmount fulfillmentPriceBeforeAdjustments) The fulfillment price of the correspondingCartItem
before adjustments are applied.void
setFulfillmentTotal
(javax.money.MonetaryAmount fulfillmentTotal) The total fulfillment price of this item, including adjustments.void
setInternalAttributes
(Map<String, Object> internalAttributes) Internal attributes for this fulfillment item.void
setInventoryCheckStrategy
(String inventoryCheckStrategy) The inventory check strategy of the item.void
setInventoryReservationStrategy
(String inventoryReservationStrategy) The reservation strategy of the item.void
setMerchandiseTaxableAmount
(javax.money.MonetaryAmount merchandiseTaxableAmount) The amount that can be taxed based on theCartItem
price and usually less any prorated order-adjustments.void
setMerchandiseTotalAmount
(javax.money.MonetaryAmount merchandiseTotalAmount) This represents the subtotal for the fulfillment item.void
setMerchandiseTotalTax
(javax.money.MonetaryAmount merchandiseTotalTax) The total tax of the item merchandise based on the price of the relatedCartItem
.void
setPricedFulfillmentOption
(com.broadleafcommerce.order.common.domain.PricedFulfillmentOption pricedFulfillmentOption) void
setProratedFulfillmentCharge
(javax.money.MonetaryAmount proratedFulfillmentCharge) The prorated shipping charge for this fulfillment item before adjustments are applied, derived from theFulfillmentGroup.getGroupFulfillmentPriceBeforeAdjustments()
.void
setProratedFulfillmentGroupAdjustments
(javax.money.MonetaryAmount proratedFulfillmentGroupAdjustments) The amount prorated to this item from group adjustments.void
setProratedOrderAdjustments
(javax.money.MonetaryAmount proratedOrderAdjustments) The amount prorated to this item from order adjustments.void
setQuantity
(int quantity) The quantity to be fulfilled by this item.void
setReferenceNumber
(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 theCartItem
to be represented by this fulfillment item.- Returns:
- A reference id to the
CartItem
to 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 relatedCartItem
by 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
quantity
will be 2 andmerchandiseTotalAmount
will be $17.14 (i.e. 30 * (10 * 2 / (20 + 15))). The second item'squantity
will be 1 andmerchandiseTotalAmount
will 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 theCartItem
price and usually less any prorated order-adjustments.- Returns:
- The amount that can be taxed based on the
CartItem
price
-
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 correspondingCartItem
before adjustments are applied.- Returns:
- The fulfillment price of the corresponding
CartItem
before 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 theCartItem
to be represented by this fulfillment item.- Parameters:
cartItemId
- A reference id to theCartItem
to 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 relatedCartItem
by 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
quantity
will be 2 andmerchandiseTotalAmount
will be $17.14 (i.e. 30 * (10 * 2 / (20 + 15))). The second item'squantity
will be 1 andmerchandiseTotalAmount
will 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 theCartItem
price and usually less any prorated order-adjustments.- Parameters:
merchandiseTaxableAmount
- The amount that can be taxed based on theCartItem
price
-
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 correspondingCartItem
before adjustments are applied.- Parameters:
fulfillmentPriceBeforeAdjustments
- The fulfillment price of thisCartItem
before 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
-