Class OrderFulfillmentItem
java.lang.Object
com.broadleafcommerce.order.client.domain.OrderFulfillmentItem
- All Implemented Interfaces:
Serializable
Represents an
OrderItem
designated to a particular OrderFulfillment
for
fulfillment.- Author:
- Chad Harchar (charchar), Samarth Dhruva (samarthd)
- See Also:
-
FulfillmentItem
- Serialized Form
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Miscellaneous attributes for this fulfillment item.List<com.broadleafcommerce.order.common.domain.Adjustment>
Adjustments to item fulfillment pricing that should be applied to the total ofunitFulfillmentCharge
.javax.money.MonetaryAmount
The total of all the item fulfillment adjustments for this item.javax.money.MonetaryAmount
The fulfillment amount to refund when this item is returned, note that prorated fulfillment group adjustments are included.javax.money.MonetaryAmount
The total fulfillment price of this item, including adjustments.getId()
The context ID of this fulfillment item.javax.money.MonetaryAmount
The amount of fulfillment taxes that are included in the item subtotal (VAT).javax.money.MonetaryAmount
The amount of merchandise taxes that are included in the item subtotal (VAT).Miscellaneous internal attributes for this fulfillment item.The inventory check strategy of the item.The reservation strategy of the item.javax.money.MonetaryAmount
The total amount attributed to this fulfillment item.javax.money.MonetaryAmount
The total of all the item adjustments for the merchandise.javax.money.MonetaryAmount
The merchandise amount to refund when this item is returned, note that prorated order adjustments are included.javax.money.MonetaryAmount
TheunitMerchandisePrice
multiplied byquantity
.javax.money.MonetaryAmount
The total tax of the item merchandise based on the price of the relatedOrderItem
.javax.money.MonetaryAmount
The merchandise total for the item quantity, includingmerchandiseSubtotal
and itemmerchandiseAdjustmentsTotal
.javax.money.MonetaryAmount
The amount of fulfillment taxes that are not included in the item subtotal.javax.money.MonetaryAmount
The amount of merchandise taxes that are not included in the item subtotal.javax.money.MonetaryAmount
The total amount of taxes that are not included in the item subtotal.The owning order fulfillment of this item.The id of theOrderItem
to be represented by this fulfillment item.com.broadleafcommerce.order.common.domain.PricedFulfillmentOption
ThePricedFulfillmentOption
chosen for this item.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 order adjustments.javax.money.MonetaryAmount
The amount prorated to this item from order fulfillment adjustments.int
The quantity of the item to be fulfilled by this fulfillment.The reference number for this fulfillment item.The tax details for this fulfillment item.javax.money.MonetaryAmount
The unit shipping charge of each item before adjustments are applied.javax.money.MonetaryAmount
The individual unit price for the merchandise.int
hashCode()
boolean
Whether or not this product is available online - ie inventory is available somewhere to fulfill this product.void
setAttributes
(Map<String, Object> attributes) Miscellaneous attributes for this fulfillment item.void
setAvailableOnline
(boolean availableOnline) Whether or not this product is available online - ie inventory is available somewhere to fulfill this product.void
setFulfillmentAdjustments
(List<com.broadleafcommerce.order.common.domain.Adjustment> fulfillmentAdjustments) Adjustments to item fulfillment pricing that should be applied to the total ofunitFulfillmentCharge
.void
setFulfillmentAdjustmentsTotal
(javax.money.MonetaryAmount fulfillmentAdjustmentsTotal) The total of all the item fulfillment adjustments for this item.void
setFulfillmentRefundAmount
(javax.money.MonetaryAmount fulfillmentRefundAmount) The fulfillment amount to refund when this item is returned, note that prorated fulfillment group adjustments are included.void
setFulfillmentTotal
(javax.money.MonetaryAmount fulfillmentTotal) The total fulfillment price of this item, including adjustments.void
The context ID of this fulfillment item.void
setIncludedFulfillmentTax
(javax.money.MonetaryAmount includedFulfillmentTax) The amount of fulfillment taxes that are included in the item subtotal (VAT).void
setIncludedMerchandiseTax
(javax.money.MonetaryAmount includedMerchandiseTax) The amount of merchandise taxes that are included in the item subtotal (VAT).void
setInternalAttributes
(Map<String, Object> internalAttributes) Miscellaneous 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
setItemTotal
(javax.money.MonetaryAmount itemTotal) The total amount attributed to this fulfillment item.void
setMerchandiseAdjustmentsTotal
(javax.money.MonetaryAmount merchandiseAdjustmentsTotal) The total of all the item adjustments for the merchandise.void
setMerchandiseRefundAmount
(javax.money.MonetaryAmount merchandiseRefundAmount) The merchandise amount to refund when this item is returned, note that prorated order adjustments are included.void
setMerchandiseSubtotal
(javax.money.MonetaryAmount merchandiseSubtotal) TheunitMerchandisePrice
multiplied byquantity
.void
setMerchandiseTaxTotal
(javax.money.MonetaryAmount merchandiseTaxTotal) The total tax of the item merchandise based on the price of the relatedOrderItem
.void
setMerchandiseTotal
(javax.money.MonetaryAmount merchandiseTotal) The merchandise total for the item quantity, includingmerchandiseSubtotal
and itemmerchandiseAdjustmentsTotal
.void
setNonIncludedFulfillmentTax
(javax.money.MonetaryAmount nonIncludedFulfillmentTax) The amount of fulfillment taxes that are not included in the item subtotal.void
setNonIncludedMerchandiseTax
(javax.money.MonetaryAmount nonIncludedMerchandiseTax) The amount of merchandise taxes that are not included in the item subtotal.void
setNonIncludedTaxTotal
(javax.money.MonetaryAmount nonIncludedTaxTotal) The total amount of taxes that are not included in the item subtotal.void
setOrderFulfillment
(OrderFulfillment orderFulfillment) The owning order fulfillment of this item.void
setOrderItemId
(String orderItemId) The id of theOrderItem
to be represented by this fulfillment item.void
setPricedFulfillmentOption
(com.broadleafcommerce.order.common.domain.PricedFulfillmentOption pricedFulfillmentOption) ThePricedFulfillmentOption
chosen for this item.void
setProratedFulfillmentCharge
(javax.money.MonetaryAmount proratedFulfillmentCharge) The prorated shipping charge for this fulfillment item before adjustments are applied, derived from theFulfillmentGroup.getGroupFulfillmentPriceBeforeAdjustments()
.void
setProratedOrderAdjustments
(javax.money.MonetaryAmount proratedOrderAdjustments) The amount prorated to this item from order adjustments.void
setProratedOrderFulfillmentAdjustments
(javax.money.MonetaryAmount proratedOrderFulfillmentAdjustments) The amount prorated to this item from order fulfillment adjustments.void
setQuantity
(int quantity) The quantity of the item to be fulfilled by this fulfillment.void
setReferenceNumber
(String referenceNumber) The reference number for this fulfillment item.void
setTaxDetails
(List<OrderFulfillmentItemTaxDetail> taxDetails) The tax details for this fulfillment item.void
setUnitFulfillmentCharge
(javax.money.MonetaryAmount unitFulfillmentCharge) The unit shipping charge of each item before adjustments are applied.void
setUnitMerchandisePrice
(javax.money.MonetaryAmount unitMerchandisePrice) The individual unit price for the merchandise.toString()
-
Constructor Details
-
OrderFulfillmentItem
public OrderFulfillmentItem()
-
-
Method Details
-
getId
The context ID of this fulfillment item.- Returns:
- the context ID of the fulfillment item
-
getReferenceNumber
The reference number for this fulfillment item. This reference number should stay the same even if this item is split, so it could be shared between multiple items.- Returns:
- The reference number for this fulfillment item.
-
getOrderFulfillment
The owning order fulfillment of this item.- Returns:
- the order fulfillment that owns this item
-
getOrderItemId
The id of theOrderItem
to be represented by this fulfillment item.- Returns:
- the id of the order item to be represented by this fulfillment item
-
getQuantity
public int getQuantity()The quantity of the item to be fulfilled by this fulfillment. This isn't necessarily going to equalOrderItem.getQuantity()
since anOrderItem
can be split across multipleOrderFulfillments
.- Returns:
- the quantity of the item to be fulfilled by this fulfillment
-
getUnitMerchandisePrice
public javax.money.MonetaryAmount getUnitMerchandisePrice()The individual unit price for the merchandise. This is the same asOrderItem.unitPrice
.- Returns:
- The individual unit price for the merchandise
-
getMerchandiseSubtotal
public javax.money.MonetaryAmount getMerchandiseSubtotal()TheunitMerchandisePrice
multiplied byquantity
.- Returns:
- the unit merchandise price multiplied by quantity
-
getMerchandiseAdjustmentsTotal
public javax.money.MonetaryAmount getMerchandiseAdjustmentsTotal()The total of all the item adjustments for the merchandise. Does not includeproratedOrderAdjustments
.- Returns:
- The total adjustments for the merchandise
-
getMerchandiseTotal
public javax.money.MonetaryAmount getMerchandiseTotal()The merchandise total for the item quantity, includingmerchandiseSubtotal
and itemmerchandiseAdjustmentsTotal
. Does not includeproratedOrderAdjustments
.- Returns:
- the unit price of the related
OrderItem
multiplied byquantity
-
getMerchandiseRefundAmount
public javax.money.MonetaryAmount getMerchandiseRefundAmount()The merchandise amount to refund when this item is returned, note that prorated order adjustments are included. For example, if this item has a merchandise amount of $10 and has a prorated order adjustment of $2, the merchandise refund amount would be $8.This amount is calculated by default when
Order
is being generated and populated from the correspondingOrderItem
.- Returns:
- the merchandise amount to refund when this item is returned
- See Also:
-
getFulfillmentRefundAmount
public javax.money.MonetaryAmount getFulfillmentRefundAmount()The fulfillment amount to refund when this item is returned, note that prorated fulfillment group adjustments are included. For example, if this item has a fulfillment amount of $5 and has a prorated fulfillment group adjustment of $1, the fulfillment refund amount would be $4.This amount is calculated by default when
OrderFulfillment
is being generated and populated from the correspondingOrderFulfillmentItem
.- Returns:
- the fulfillment amount to refund when this item is returned
-
getProratedOrderAdjustments
public javax.money.MonetaryAmount getProratedOrderAdjustments()The amount prorated to this item from order adjustments.- Returns:
- the amount prorated to this item from order adjustments
-
getMerchandiseTaxTotal
public javax.money.MonetaryAmount getMerchandiseTaxTotal()The total tax of the item merchandise based on the price of the relatedOrderItem
.- Returns:
- the total tax for the item merchandise based on the price of the related
OrderItem
-
getUnitFulfillmentCharge
public javax.money.MonetaryAmount getUnitFulfillmentCharge()The unit shipping charge of each item before adjustments are applied. This is likeOrderItem.getUnitPrice()
but for fulfillment.- Returns:
- the shipping charge of this
OrderItem
before adjustments are applied
-
getFulfillmentAdjustmentsTotal
public javax.money.MonetaryAmount getFulfillmentAdjustmentsTotal()The total of all the item fulfillment adjustments for this item.- Returns:
- the total item fulfillment adjustments for this item
-
getProratedOrderFulfillmentAdjustments
public javax.money.MonetaryAmount getProratedOrderFulfillmentAdjustments()The amount prorated to this item from order fulfillment adjustments.- Returns:
- the amount prorated to this item from order fulfillment 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 to the total ofunitFulfillmentCharge
.- Returns:
- adjustments to item fulfillment pricing that should be applied to the total of
unitFulfillmentCharge
-
isAvailableOnline
public boolean isAvailableOnline()Whether or not this product is available online - ie inventory is available somewhere to fulfill this product.- Returns:
- Whether or not this product 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.
-
getTaxDetails
The tax details for this fulfillment item. This is a granular breakdown of tax, describing individual taxes, such as city, state, county, etc. The totals here should equalmerchandiseTaxTotal
.- Returns:
- The tax details for this fulfillment item
-
getIncludedMerchandiseTax
public javax.money.MonetaryAmount getIncludedMerchandiseTax()The amount of merchandise taxes that are included in the item subtotal (VAT). -
getIncludedFulfillmentTax
public javax.money.MonetaryAmount getIncludedFulfillmentTax()The amount of fulfillment taxes that are included in the item subtotal (VAT). -
getNonIncludedMerchandiseTax
public javax.money.MonetaryAmount getNonIncludedMerchandiseTax()The amount of merchandise taxes that are not included in the item subtotal. -
getNonIncludedFulfillmentTax
public javax.money.MonetaryAmount getNonIncludedFulfillmentTax()The amount of fulfillment taxes that are not included in the item subtotal. -
getNonIncludedTaxTotal
public javax.money.MonetaryAmount getNonIncludedTaxTotal()The total amount of taxes that are not included in the item subtotal. -
getItemTotal
public javax.money.MonetaryAmount getItemTotal()The total amount attributed to this fulfillment item. This is themerchandiseTotal
includingproratedOrderAdjustments
and thenonIncludedTaxTotal
. -
getAttributes
Miscellaneous attributes for this fulfillment item.- Returns:
- Miscellaneous attributes for this fulfillment item
-
getInternalAttributes
Miscellaneous 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
-
getPricedFulfillmentOption
@Nullable public com.broadleafcommerce.order.common.domain.PricedFulfillmentOption getPricedFulfillmentOption()ThePricedFulfillmentOption
chosen for this item.- Returns:
- the
PricedFulfillmentOption
chosen for this item. - See Also:
-
PricedFulfillmentOption
-
setId
The context ID of this fulfillment item.- Parameters:
id
- the context ID of the fulfillment item
-
setReferenceNumber
The reference number for this fulfillment item. This reference number should stay the same even if this item is split, so it could be shared between multiple items.- Parameters:
referenceNumber
- The reference number for this fulfillment item.
-
setOrderFulfillment
The owning order fulfillment of this item.- Parameters:
orderFulfillment
- the order fulfillment that should own this item
-
setOrderItemId
The id of theOrderItem
to be represented by this fulfillment item.- Parameters:
orderItemId
- the id of the order item to be represented by this fulfillment item
-
setQuantity
public void setQuantity(int quantity) The quantity of the item to be fulfilled by this fulfillment. This isn't necessarily going to equalOrderItem.getQuantity()
since anOrderItem
can be split across multipleOrderFulfillments
.- Parameters:
quantity
- the quantity of the item to be fulfilled by this fulfillment
-
setUnitMerchandisePrice
public void setUnitMerchandisePrice(javax.money.MonetaryAmount unitMerchandisePrice) The individual unit price for the merchandise. This is the same asOrderItem.unitPrice
.- Parameters:
unitPrice
- The individual unit price for the merchandise
-
setMerchandiseSubtotal
public void setMerchandiseSubtotal(javax.money.MonetaryAmount merchandiseSubtotal) TheunitMerchandisePrice
multiplied byquantity
.- Parameters:
merchandiseSubtotal
- the unit merchandise price multiplied by quantity
-
setMerchandiseAdjustmentsTotal
public void setMerchandiseAdjustmentsTotal(javax.money.MonetaryAmount merchandiseAdjustmentsTotal) The total of all the item adjustments for the merchandise. Does not includeproratedOrderAdjustments
.- Parameters:
adjustmentsTotal
- The total adjustments for the merchandise
-
setMerchandiseTotal
public void setMerchandiseTotal(javax.money.MonetaryAmount merchandiseTotal) The merchandise total for the item quantity, includingmerchandiseSubtotal
and itemmerchandiseAdjustmentsTotal
. Does not includeproratedOrderAdjustments
.- Parameters:
merchandiseTotal
- the merchandise total for the item quantity, includingmerchandiseSubtotal
and itemmerchandiseAdjustmentsTotal
-
setMerchandiseRefundAmount
public void setMerchandiseRefundAmount(javax.money.MonetaryAmount merchandiseRefundAmount) The merchandise amount to refund when this item is returned, note that prorated order adjustments are included. For example, if this item has a merchandise amount of $10 and has a prorated order adjustment of $2, the merchandise refund amount would be $8.This amount is calculated by default when
Order
is being generated and populated from the correspondingOrderItem
.- Parameters:
refundAmount
- the merchandise amount to refund when this item is returned- See Also:
-
setFulfillmentRefundAmount
public void setFulfillmentRefundAmount(javax.money.MonetaryAmount fulfillmentRefundAmount) The fulfillment amount to refund when this item is returned, note that prorated fulfillment group adjustments are included. For example, if this item has a fulfillment amount of $5 and has a prorated fulfillment group adjustment of $1, the fulfillment refund amount would be $4.This amount is calculated by default when
OrderFulfillment
is being generated and populated from the correspondingOrderFulfillmentItem
.- Parameters:
fulfillmentRefundAmount
- the fulfillment amount to refund when this item is returned
-
setProratedOrderAdjustments
public void setProratedOrderAdjustments(javax.money.MonetaryAmount proratedOrderAdjustments) The amount prorated to this item from order adjustments.- Parameters:
proratedOrderAdjustments
- the amount prorated to this item from order adjustments
-
setMerchandiseTaxTotal
public void setMerchandiseTaxTotal(javax.money.MonetaryAmount merchandiseTaxTotal) The total tax of the item merchandise based on the price of the relatedOrderItem
.- Parameters:
merchandiseTotalTax
- the total tax for the item merchandise based on the price of the relatedOrderItem
-
setUnitFulfillmentCharge
public void setUnitFulfillmentCharge(javax.money.MonetaryAmount unitFulfillmentCharge) The unit shipping charge of each item before adjustments are applied. This is likeOrderItem.getUnitPrice()
but for fulfillment.- Parameters:
unitFulfillmentCharge
- the unit shipping charge of thisOrderItem
before adjustments are applied
-
setFulfillmentAdjustmentsTotal
public void setFulfillmentAdjustmentsTotal(javax.money.MonetaryAmount fulfillmentAdjustmentsTotal) The total of all the item fulfillment adjustments for this item.- Parameters:
fulfillmentAdjustmentsTotal
- the total item fulfillment adjustments for this item
-
setProratedOrderFulfillmentAdjustments
public void setProratedOrderFulfillmentAdjustments(javax.money.MonetaryAmount proratedOrderFulfillmentAdjustments) The amount prorated to this item from order fulfillment adjustments.- Parameters:
proratedOrderAdjustments
- the amount prorated to this item from order fulfillment 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 to the total ofunitFulfillmentCharge
.- Parameters:
fulfillmentAdjustments
- adjustments to item fulfillment pricing that should be applied to the total ofunitFulfillmentCharge
-
setAvailableOnline
public void setAvailableOnline(boolean availableOnline) Whether or not this product is available online - ie inventory is available somewhere to fulfill this product.- Parameters:
availableOnline
- Whether or not this product 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.
-
setTaxDetails
The tax details for this fulfillment item. This is a granular breakdown of tax, describing individual taxes, such as city, state, county, etc. The totals here should equalmerchandiseTaxTotal
.- Parameters:
taxDetails
- The tax details for this fulfillment item
-
setIncludedMerchandiseTax
public void setIncludedMerchandiseTax(javax.money.MonetaryAmount includedMerchandiseTax) The amount of merchandise taxes that are included in the item subtotal (VAT). -
setIncludedFulfillmentTax
public void setIncludedFulfillmentTax(javax.money.MonetaryAmount includedFulfillmentTax) The amount of fulfillment taxes that are included in the item subtotal (VAT). -
setNonIncludedMerchandiseTax
public void setNonIncludedMerchandiseTax(javax.money.MonetaryAmount nonIncludedMerchandiseTax) The amount of merchandise taxes that are not included in the item subtotal. -
setNonIncludedFulfillmentTax
public void setNonIncludedFulfillmentTax(javax.money.MonetaryAmount nonIncludedFulfillmentTax) The amount of fulfillment taxes that are not included in the item subtotal. -
setNonIncludedTaxTotal
public void setNonIncludedTaxTotal(javax.money.MonetaryAmount nonIncludedTaxTotal) The total amount of taxes that are not included in the item subtotal. -
setItemTotal
public void setItemTotal(javax.money.MonetaryAmount itemTotal) The total amount attributed to this fulfillment item. This is themerchandiseTotal
includingproratedOrderAdjustments
and thenonIncludedTaxTotal
. -
setAttributes
Miscellaneous attributes for this fulfillment item.- Parameters:
attributes
- Miscellaneous attributes for this fulfillment item
-
setInternalAttributes
Miscellaneous 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
-
setPricedFulfillmentOption
public void setPricedFulfillmentOption(@Nullable com.broadleafcommerce.order.common.domain.PricedFulfillmentOption pricedFulfillmentOption) ThePricedFulfillmentOption
chosen for this item.- Parameters:
pricedFulfillmentOption
- The fulfillment option chosen for this item.- See Also:
-
PricedFulfillmentOption
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-