Class OrderFulfillment
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware
,com.broadleafcommerce.money.CurrencyConsumer
,Serializable
,javax.money.CurrencySupplier
Order
that are fulfilled together.- Author:
- Samarth Dhruva (samarthd)
- See Also:
-
FulfillmentGroup
- Serialized Form
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
All additional shipment details for this fulfillment.com.broadleafcommerce.order.common.domain.Address
The shipping address for this fulfillment.List<com.broadleafcommerce.order.common.domain.Adjustment>
Adjustments to fulfillment pricing that should be applied togetFulfillmentCharge()
.Additional attributes for this order fulfillment.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
A subset ofTracking
information to expose the context state for this object.javax.money.CurrencyUnit
The currency unit used for the pricing of thisOrderFulfillment
.Intended to hold any unique identifier for this fulfillment as assigned by an external system.javax.money.MonetaryAmount
Sum of the fulfillment's adjustments.javax.money.MonetaryAmount
The shipping charge for this fulfillment before adjustments are applied.Items within this fulfillment, each of which should relate back to aOrderItem
.com.broadleafcommerce.order.common.domain.FulfillmentOption
The fulfillment option chosen for thegetType()
.javax.money.MonetaryAmount
The total shipping price of this fulfillment, including adjustments and item shipping prices.javax.money.MonetaryAmount
The grand total of this fulfillment, including merchandise costs, all shipping costs including items, and tax.The reference number of theFulfillmentGroup
this fulfillment was created from.getId()
The unique identifier for this fulfillment.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).This is an optional field where the ID or reference number of the expected InventoryLocation is stored.javax.money.MonetaryAmount
Sum up theOrderFulfillmentItem#merchandiseTotalAmount
across all of the fulfillment's items.javax.money.MonetaryAmount
The merchandise total for all items in the fulfillment, including item adjustments and prorated order adjustments.The number for this individual fulfillment, unique within the order.A soft reference to the parentOrder
this fulfillment belongs to.javax.money.MonetaryAmount
Total up theOrderFulfillmentItem.proratedOrderAdjustments
for all the items in the fulfillment.List<com.broadleafcommerce.order.common.domain.OverrideDetail>
List of details about any price overrides which have been performed on this fulfillment.com.broadleafcommerce.order.common.domain.PricedFulfillmentOption
ThePricedFulfillmentOption
chosen for thegetType()
.javax.money.MonetaryAmount
Prorated amount of the fulfillment adjustments that applies to thefulfillmentCharge
.The primary shipment details for this fulfillment.The status of this fulfillment.javax.money.MonetaryAmount
The total tax of this fulfillment, including merchandise and fulfillment tax.getType()
The type of means by which this fulfillment is fulfilled.A reference to the corresponding vendor for this fulfillment.The version of this OrderFulfillment.int
hashCode()
boolean
Whether the total fulfillment price of thisOrderFulfillment
was specifically overridden, whether from a CSR or an automatic process.boolean
Whether thisOrderFulfillment
requires at least part of the payment to be collected on delivery.void
setAdditionalShipments
(List<Shipment> additionalShipments) All additional shipment details for this fulfillment.void
setAddress
(com.broadleafcommerce.order.common.domain.Address address) The shipping address for this fulfillment.void
setAdjustments
(List<com.broadleafcommerce.order.common.domain.Adjustment> adjustments) Adjustments to fulfillment pricing that should be applied togetFulfillmentCharge()
.void
setAttributes
(Map<String, Object> attributes) Additional attributes for this order fulfillment.void
setContextState
(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTracking
information to expose the context state for this object.void
setCurrency
(javax.money.CurrencyUnit currency) The currency unit used for the pricing of thisOrderFulfillment
.void
setExternalId
(String externalId) Intended to hold any unique identifier for this fulfillment as assigned by an external system.void
setFulfillmentAdjustmentsTotal
(javax.money.MonetaryAmount fulfillmentAdjustmentsTotal) Sum of the fulfillment's adjustments.void
setFulfillmentCharge
(javax.money.MonetaryAmount fulfillmentCharge) The shipping charge for this fulfillment before adjustments are applied.void
setFulfillmentItems
(List<OrderFulfillmentItem> fulfillmentItems) Items within this fulfillment, each of which should relate back to aOrderItem
.void
setFulfillmentOption
(com.broadleafcommerce.order.common.domain.FulfillmentOption fulfillmentOption) The fulfillment option chosen for thegetType()
.void
setFulfillmentTotal
(javax.money.MonetaryAmount fulfillmentTotal) The total shipping price of this fulfillment, including adjustments and item shipping prices.void
setGrandTotal
(javax.money.MonetaryAmount grandTotal) The grand total of this fulfillment, including merchandise costs, all shipping costs including items, and tax.void
setGroupReferenceNumber
(String groupReferenceNumber) The reference number of theFulfillmentGroup
this fulfillment was created from.void
The unique identifier for this fulfillment.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
setInventoryLocationReference
(String inventoryLocationReference) This is an optional field where the ID or reference number of the expected InventoryLocation is stored.void
setMerchandiseTotal
(javax.money.MonetaryAmount merchandiseTotal) The merchandise total for all items in the fulfillment, including item adjustments and prorated order adjustments.void
setOrderFulfillmentNumber
(String orderFulfillmentNumber) The number for this individual fulfillment, unique within the order.void
setOrderId
(String orderId) A soft reference to the parentOrder
this fulfillment belongs to.void
setOverrideDetails
(List<com.broadleafcommerce.order.common.domain.OverrideDetail> overrideDetails) List of details about any price overrides which have been performed on this fulfillment.void
setOverrideFulfillmentPriceFlag
(boolean overrideFulfillmentPriceFlag) Whether the total fulfillment price of thisOrderFulfillment
was specifically overridden, whether from a CSR or an automatic process.void
setPricedFulfillmentOption
(com.broadleafcommerce.order.common.domain.PricedFulfillmentOption pricedFulfillmentOption) ThePricedFulfillmentOption
chosen for thegetType()
.void
setProratedOrderFulfillmentAdjustments
(javax.money.MonetaryAmount proratedOrderFulfillmentAdjustments) Prorated amount of the fulfillment adjustments that applies to thefulfillmentCharge
.void
setRequiresCollectOnDelivery
(boolean requiresCollectOnDelivery) Whether thisOrderFulfillment
requires at least part of the payment to be collected on delivery.void
setShipment
(Shipment shipment) The primary shipment details for this fulfillment.void
The status of this fulfillment.void
setTaxTotal
(javax.money.MonetaryAmount taxTotal) The total tax of this fulfillment, including merchandise and fulfillment tax.void
The type of means by which this fulfillment is fulfilled.void
setVendorRef
(String vendorRef) A reference to the corresponding vendor for this fulfillment.void
setVersion
(Integer version) The version of this OrderFulfillment.toString()
-
Constructor Details
-
OrderFulfillment
public OrderFulfillment()
-
-
Method Details
-
getItemMerchandiseSubtotal
public javax.money.MonetaryAmount getItemMerchandiseSubtotal()Sum up theOrderFulfillmentItem#merchandiseTotalAmount
across all of the fulfillment's items.- Returns:
- the sum of the fulfillment's items' merchandise totals
-
getOrderMerchandiseAdjustmentsTotal
public javax.money.MonetaryAmount getOrderMerchandiseAdjustmentsTotal()Total up theOrderFulfillmentItem.proratedOrderAdjustments
for all the items in the fulfillment.- Returns:
- the total of prorated order adjustments for all items in the fulfillment
-
getId
The unique identifier for this fulfillment. -
getExternalId
Intended to hold any unique identifier for this fulfillment as assigned by an external system. For example, many implementations may integrate or import/export data from external systems that manage their own unique identifiers. -
getOrderFulfillmentNumber
The number for this individual fulfillment, unique within the order.- Returns:
- the number for this individual fulfillment
-
getGroupReferenceNumber
The reference number of theFulfillmentGroup
this fulfillment was created from.By default, only one
OrderFulfillment
is created perFulfillmentGroup
, but certain implementations may wish to create multipleOrderFulfillments
from a singleFulfillmentGroup
(ex: to support fulfillment splitting, multi-vendor fulfillment, etc).This field would provide traceability into finding which
OrderFulfillments
came from the sameFulfillmentGroup
.- Returns:
- the reference number of the
FulfillmentGroup
this fulfillment was created from - See Also:
-
FulfillmentGroup.referenceNumber
-
getOrderId
A soft reference to the parentOrder
this fulfillment belongs to.- Returns:
- the id of the parent
Order
this fulfillment belongs to
-
getStatus
The status of this fulfillment.- Returns:
- the status of this fulfillment
- See Also:
-
getType
The type of means by which this fulfillment is fulfilled. This could be SHIP, PICKUP, or VIRTUAL, for example.- Returns:
- the type of means by which this fulfillment is fulfilled
- See Also:
-
FulfillmentType
-
getVersion
The version of this OrderFulfillment. Used by components making use of the order fulfillment to ensure it is up-to-date and thus prevent race condition scenarios. This should never be manually incremented/decremented. -
getFulfillmentOption
@Nullable public com.broadleafcommerce.order.common.domain.FulfillmentOption getFulfillmentOption()The fulfillment option chosen for thegetType()
.- Returns:
- the fulfillment option chosen for the
getType()
- See Also:
-
FulfillmentOption
-
getPricedFulfillmentOption
@Nullable public com.broadleafcommerce.order.common.domain.PricedFulfillmentOption getPricedFulfillmentOption()ThePricedFulfillmentOption
chosen for thegetType()
.- Returns:
- the
PricedFulfillmentOption
chosen for thegetType()
- See Also:
-
PricedFulfillmentOption
-
getInventoryLocationReference
This is an optional field where the ID or reference number of the expected InventoryLocation is stored. Specifically, this is required in situations where a customer will pick up this FulfillmentGroup (i.e. type ==FulfillmentType.PICKUP
). This could also be provided as a hint in the case that this is a SHIP location and the application knows from where thisFulfillmentGroup
should be fulfilled.- Returns:
- the ID of the Inventory Location or null
-
getAddress
public com.broadleafcommerce.order.common.domain.Address getAddress()The shipping address for this fulfillment.- Returns:
- the shipping address for this fulfillment
-
getShipment
The primary shipment details for this fulfillment.Unused if the fulfillment does not require shipping, or if
additionalShipments
are being used exclusively.- Returns:
- primary shipment details for this fulfillment
-
getAdditionalShipments
All additional shipment details for this fulfillment.Use this when the fulfillment needs to be shipped in multiple parts. These can be defined in conjunction with a primary
shipment
, or on their own with no primaryshipment
.- Returns:
- additional shipment details for this fulfillment
-
getFulfillmentItems
Items within this fulfillment, each of which should relate back to aOrderItem
.- Returns:
- items within this fulfillment
-
getMerchandiseTotal
public javax.money.MonetaryAmount getMerchandiseTotal()The merchandise total for all items in the fulfillment, including item adjustments and prorated order adjustments.- Returns:
- merchandise total for all items in the fulfillment, including item adjustments and prorated order adjustments
-
getFulfillmentCharge
public javax.money.MonetaryAmount getFulfillmentCharge()The shipping charge for this fulfillment before adjustments are applied. This is a charge specifically at the fulfillment level and does not include charges fromgetFulfillmentItems()
.- Returns:
- the shipping charge of this fulfillment before adjustments are applied
-
getFulfillmentAdjustmentsTotal
public javax.money.MonetaryAmount getFulfillmentAdjustmentsTotal()Sum of the fulfillment's adjustments.- Returns:
- Sum of the fulfillment's adjustments.
-
getProratedOrderFulfillmentAdjustments
public javax.money.MonetaryAmount getProratedOrderFulfillmentAdjustments()Prorated amount of the fulfillment adjustments that applies to thefulfillmentCharge
. Fulfillment-level adjustments are prorated between the charges of the Fulfillment and those of the individual items.- Returns:
- Prorated amount of the fulfillment adjustments that applies to the
fulfillmentCharge
.
-
getFulfillmentTotal
public javax.money.MonetaryAmount getFulfillmentTotal()The total shipping price of this fulfillment, including adjustments and item shipping prices. This does not include taxes.- Returns:
- the total shipping price of this fulfillment, including adjustments and item shipping prices
-
getTaxTotal
public javax.money.MonetaryAmount getTaxTotal()The total tax of this fulfillment, including merchandise and fulfillment tax.- Returns:
- the total tax price of this fulfillment
-
getGrandTotal
public javax.money.MonetaryAmount getGrandTotal()The grand total of this fulfillment, including merchandise costs, all shipping costs including items, and tax.- Returns:
- the grand total of this fulfillment
-
getAdjustments
Adjustments to fulfillment pricing that should be applied togetFulfillmentCharge()
.- Returns:
- adjustments to fulfillment pricing that should be applied to
getFulfillmentCharge()
-
isOverrideFulfillmentPriceFlag
public boolean isOverrideFulfillmentPriceFlag()Whether the total fulfillment price of thisOrderFulfillment
was specifically overridden, whether from a CSR or an automatic process.- Returns:
- whether the total fulfillment price of this
OrderFulfillment
was specifically overridden, whether from a CSR or an automatic process
-
getOverrideDetails
List of details about any price overrides which have been performed on this fulfillment.- Returns:
- list of details about any price overrides which have been performed on this fulfillment
-
getVendorRef
A reference to the corresponding vendor for this fulfillment.- Returns:
- A reference to the corresponding vendor for this fulfillment.
-
getCurrency
public javax.money.CurrencyUnit getCurrency()The currency unit used for the pricing of thisOrderFulfillment
.- Specified by:
getCurrency
in interfacejavax.money.CurrencySupplier
- Returns:
- The currency unit used for the pricing of this
OrderFulfillment
.
-
isRequiresCollectOnDelivery
public boolean isRequiresCollectOnDelivery()Whether thisOrderFulfillment
requires at least part of the payment to be collected on delivery.- Returns:
- true if this
OrderFulfillment
requires at least part of the payment to be collected on delivery, or false if not.
-
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). -
getAttributes
Additional attributes for this order fulfillment.- Returns:
- Additional attributes for this order fulfillment.
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTracking
information to expose the context state for this object.- Specified by:
getContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Returns:
- a subset of
Tracking
information to expose the context state for this object
-
setId
The unique identifier for this fulfillment. -
setExternalId
Intended to hold any unique identifier for this fulfillment as assigned by an external system. For example, many implementations may integrate or import/export data from external systems that manage their own unique identifiers. -
setOrderFulfillmentNumber
The number for this individual fulfillment, unique within the order.- Parameters:
orderFulfillmentNumber
- the number for this individual fulfillment
-
setGroupReferenceNumber
The reference number of theFulfillmentGroup
this fulfillment was created from.By default, only one
OrderFulfillment
is created perFulfillmentGroup
, but certain implementations may wish to create multipleOrderFulfillments
from a singleFulfillmentGroup
(ex: to support fulfillment splitting, multi-vendor fulfillment, etc).This field would provide traceability into finding which
OrderFulfillments
came from the sameFulfillmentGroup
.- Parameters:
groupReferenceNumber
- the reference number of theFulfillmentGroup
this fulfillment was created from- See Also:
-
FulfillmentGroup.referenceNumber
-
setOrderId
A soft reference to the parentOrder
this fulfillment belongs to.- Parameters:
orderId
- the id of the parentOrder
this fulfillment belongs to
-
setStatus
The status of this fulfillment.- Parameters:
status
- the status of this fulfillment- See Also:
-
setType
The type of means by which this fulfillment is fulfilled. This could be SHIP, PICKUP, or VIRTUAL, for example.- Parameters:
type
- the type of means by which this fulfillment is fulfilled- See Also:
-
FulfillmentType
-
setVersion
The version of this OrderFulfillment. Used by components making use of the order fulfillment to ensure it is up-to-date and thus prevent race condition scenarios. This should never be manually incremented/decremented. -
setFulfillmentOption
public void setFulfillmentOption(@Nullable com.broadleafcommerce.order.common.domain.FulfillmentOption fulfillmentOption) The fulfillment option chosen for thegetType()
.- Parameters:
fulfillmentOption
- the fulfillment option chosen for thegetType()
- See Also:
-
FulfillmentOption
-
setPricedFulfillmentOption
public void setPricedFulfillmentOption(@Nullable com.broadleafcommerce.order.common.domain.PricedFulfillmentOption pricedFulfillmentOption) ThePricedFulfillmentOption
chosen for thegetType()
.- Parameters:
pricedFulfillmentOption
- The fulfillment option chosen for thegetType()
- See Also:
-
PricedFulfillmentOption
-
setInventoryLocationReference
This is an optional field where the ID or reference number of the expected InventoryLocation is stored. Specifically, this is required in situations where a customer will pick up this FulfillmentGroup (i.e. type ==FulfillmentType.PICKUP
). This could also be provided as a hint in the case that this is a SHIP location and the application knows from where thisFulfillmentGroup
should be fulfilled.- Parameters:
inventoryLocationReference
- the ID of the Inventory Location
-
setAddress
public void setAddress(com.broadleafcommerce.order.common.domain.Address address) The shipping address for this fulfillment.- Parameters:
address
- the shipping address for this fulfillment
-
setShipment
The primary shipment details for this fulfillment.Unused if the fulfillment does not require shipping, or if
additionalShipments
are being used exclusively.- Parameters:
shipment
- primary shipment details for this fulfillment
-
setAdditionalShipments
All additional shipment details for this fulfillment.Use this when the fulfillment needs to be shipped in multiple parts. These can be defined in conjunction with a primary
shipment
, or on their own with no primaryshipment
.- Parameters:
additionalShipments
- additional shipment details for this fulfillment
-
setFulfillmentItems
Items within this fulfillment, each of which should relate back to aOrderItem
.- Parameters:
fulfillmentItems
- items within this fulfillment
-
setMerchandiseTotal
public void setMerchandiseTotal(javax.money.MonetaryAmount merchandiseTotal) The merchandise total for all items in the fulfillment, including item adjustments and prorated order adjustments.- Parameters:
merchandiseTotal
- merchandise total for all items in the fulfillment, including item adjustments and prorated order adjustments
-
setFulfillmentCharge
public void setFulfillmentCharge(javax.money.MonetaryAmount fulfillmentCharge) The shipping charge for this fulfillment before adjustments are applied. This is a charge specifically at the fulfillment level and does not include charges fromgetFulfillmentItems()
.- Parameters:
fulfillmentCharge
- the shipping charge of this fulfillment before adjustments are applied
-
setFulfillmentAdjustmentsTotal
public void setFulfillmentAdjustmentsTotal(javax.money.MonetaryAmount fulfillmentAdjustmentsTotal) Sum of the fulfillment's adjustments.- Parameters:
fulfillmentAdjustmentsTotal
- Sum of the fulfillment's adjustments.
-
setProratedOrderFulfillmentAdjustments
public void setProratedOrderFulfillmentAdjustments(javax.money.MonetaryAmount proratedOrderFulfillmentAdjustments) Prorated amount of the fulfillment adjustments that applies to thefulfillmentCharge
. Fulfillment-level adjustments are prorated between the charges of the Fulfillment and those of the individual items.- Parameters:
proratedOrderFulfillmentAdjustments
- Prorated amount of the fulfillment adjustments that applies to thefulfillmentCharge
-
setFulfillmentTotal
public void setFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal) The total shipping price of this fulfillment, including adjustments and item shipping prices. This does not include taxes.- Parameters:
fulfillmentTotal
- the total shipping price of this fulfillment, including adjustments and item shipping prices
-
setTaxTotal
public void setTaxTotal(javax.money.MonetaryAmount taxTotal) The total tax of this fulfillment, including merchandise and fulfillment tax.- Parameters:
totalTax
- the total tax price of this fulfillment
-
setGrandTotal
public void setGrandTotal(javax.money.MonetaryAmount grandTotal) The grand total of this fulfillment, including merchandise costs, all shipping costs including items, and tax.- Parameters:
grandTotal
- the grand total of this fulfillment
-
setAdjustments
Adjustments to fulfillment pricing that should be applied togetFulfillmentCharge()
.- Parameters:
adjustments
- adjustments to fulfillment pricing that should be applied togetFulfillmentCharge()
-
setOverrideFulfillmentPriceFlag
public void setOverrideFulfillmentPriceFlag(boolean overrideFulfillmentPriceFlag) Whether the total fulfillment price of thisOrderFulfillment
was specifically overridden, whether from a CSR or an automatic process.- Parameters:
overrideFulfillmentPriceFlag
- whether the total fulfillment price of thisOrderFulfillment
was specifically overridden, whether from a CSR or an automatic process
-
setOverrideDetails
public void setOverrideDetails(List<com.broadleafcommerce.order.common.domain.OverrideDetail> overrideDetails) List of details about any price overrides which have been performed on this fulfillment.- Parameters:
overrideDetails
- list of details about any price overrides which have been performed on this fulfillment
-
setVendorRef
A reference to the corresponding vendor for this fulfillment.- Parameters:
vendorRef
- A reference to the corresponding vendor for this fulfillment.
-
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) The currency unit used for the pricing of thisOrderFulfillment
.- Specified by:
setCurrency
in interfacecom.broadleafcommerce.money.CurrencyConsumer
- Parameters:
currency
- The currency unit used for the pricing of thisOrderFulfillment
.
-
setRequiresCollectOnDelivery
public void setRequiresCollectOnDelivery(boolean requiresCollectOnDelivery) Whether thisOrderFulfillment
requires at least part of the payment to be collected on delivery.- Parameters:
requiresCollectOnDelivery
- Whether thisOrderFulfillment
requires at least part of the payment to be collected on delivery.
-
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). -
setAttributes
Additional attributes for this order fulfillment.- Parameters:
attributes
- Additional attributes for this order fulfillment.
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTracking
information to expose the context state for this object.- Specified by:
setContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Parameters:
contextState
- a subset ofTracking
information to expose the context state for this object
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-