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 booleanbooleanAll additional shipment details for this fulfillment.com.broadleafcommerce.order.common.domain.AddressThe 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.ContextStateA subset ofTrackinginformation to expose the context state for this object.javax.money.CurrencyUnitThe 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.MonetaryAmountSum of the fulfillment's adjustments.javax.money.MonetaryAmountThe 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.FulfillmentOptionThe fulfillment option chosen for thegetType().javax.money.MonetaryAmountThe total shipping price of this fulfillment, including adjustments and item shipping prices.javax.money.MonetaryAmountThe grand total of this fulfillment, including merchandise costs, all shipping costs including items, and tax.The reference number of theFulfillmentGroupthis fulfillment was created from.getId()The unique identifier for this fulfillment.javax.money.MonetaryAmountThe amount of fulfillment taxes that are included in the item subtotal (VAT).javax.money.MonetaryAmountThe 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.MonetaryAmountSum up theOrderFulfillmentItem#merchandiseTotalAmountacross all of the fulfillment's items.javax.money.MonetaryAmountThe 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 parentOrderthis fulfillment belongs to.javax.money.MonetaryAmountTotal up theOrderFulfillmentItem.proratedOrderAdjustmentsfor 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.PricedFulfillmentOptionThePricedFulfillmentOptionchosen for thegetType().javax.money.MonetaryAmountProrated amount of the fulfillment adjustments that applies to thefulfillmentCharge.The primary shipment details for this fulfillment.The status of this fulfillment.javax.money.MonetaryAmountThe 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.inthashCode()booleanWhether the total fulfillment price of thisOrderFulfillmentwas specifically overridden, whether from a CSR or an automatic process.booleanWhether thisOrderFulfillmentrequires at least part of the payment to be collected on delivery.voidsetAdditionalShipments(List<Shipment> additionalShipments) All additional shipment details for this fulfillment.voidsetAddress(com.broadleafcommerce.order.common.domain.Address address) The shipping address for this fulfillment.voidsetAdjustments(List<com.broadleafcommerce.order.common.domain.Adjustment> adjustments) Adjustments to fulfillment pricing that should be applied togetFulfillmentCharge().voidsetAttributes(Map<String, Object> attributes) Additional attributes for this order fulfillment.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetCurrency(javax.money.CurrencyUnit currency) The currency unit used for the pricing of thisOrderFulfillment.voidsetExternalId(String externalId) Intended to hold any unique identifier for this fulfillment as assigned by an external system.voidsetFulfillmentAdjustmentsTotal(javax.money.MonetaryAmount fulfillmentAdjustmentsTotal) Sum of the fulfillment's adjustments.voidsetFulfillmentCharge(javax.money.MonetaryAmount fulfillmentCharge) The shipping charge for this fulfillment before adjustments are applied.voidsetFulfillmentItems(List<OrderFulfillmentItem> fulfillmentItems) Items within this fulfillment, each of which should relate back to aOrderItem.voidsetFulfillmentOption(com.broadleafcommerce.order.common.domain.FulfillmentOption fulfillmentOption) The fulfillment option chosen for thegetType().voidsetFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal) The total shipping price of this fulfillment, including adjustments and item shipping prices.voidsetGrandTotal(javax.money.MonetaryAmount grandTotal) The grand total of this fulfillment, including merchandise costs, all shipping costs including items, and tax.voidsetGroupReferenceNumber(String groupReferenceNumber) The reference number of theFulfillmentGroupthis fulfillment was created from.voidThe unique identifier for this fulfillment.voidsetIncludedFulfillmentTax(javax.money.MonetaryAmount includedFulfillmentTax) The amount of fulfillment taxes that are included in the item subtotal (VAT).voidsetIncludedMerchandiseTax(javax.money.MonetaryAmount includedMerchandiseTax) The amount of merchandise taxes that are included in the item subtotal (VAT).voidsetInventoryLocationReference(String inventoryLocationReference) This is an optional field where the ID or reference number of the expected InventoryLocation is stored.voidsetMerchandiseTotal(javax.money.MonetaryAmount merchandiseTotal) The merchandise total for all items in the fulfillment, including item adjustments and prorated order adjustments.voidsetOrderFulfillmentNumber(String orderFulfillmentNumber) The number for this individual fulfillment, unique within the order.voidsetOrderId(String orderId) A soft reference to the parentOrderthis fulfillment belongs to.voidsetOverrideDetails(List<com.broadleafcommerce.order.common.domain.OverrideDetail> overrideDetails) List of details about any price overrides which have been performed on this fulfillment.voidsetOverrideFulfillmentPriceFlag(boolean overrideFulfillmentPriceFlag) Whether the total fulfillment price of thisOrderFulfillmentwas specifically overridden, whether from a CSR or an automatic process.voidsetPricedFulfillmentOption(com.broadleafcommerce.order.common.domain.PricedFulfillmentOption pricedFulfillmentOption) ThePricedFulfillmentOptionchosen for thegetType().voidsetProratedOrderFulfillmentAdjustments(javax.money.MonetaryAmount proratedOrderFulfillmentAdjustments) Prorated amount of the fulfillment adjustments that applies to thefulfillmentCharge.voidsetRequiresCollectOnDelivery(boolean requiresCollectOnDelivery) Whether thisOrderFulfillmentrequires at least part of the payment to be collected on delivery.voidsetShipment(Shipment shipment) The primary shipment details for this fulfillment.voidThe status of this fulfillment.voidsetTaxTotal(javax.money.MonetaryAmount taxTotal) The total tax of this fulfillment, including merchandise and fulfillment tax.voidThe type of means by which this fulfillment is fulfilled.voidsetVendorRef(String vendorRef) A reference to the corresponding vendor for this fulfillment.voidsetVersion(Integer version) The version of this OrderFulfillment.toString()
-
Constructor Details
-
OrderFulfillment
public OrderFulfillment()
-
-
Method Details
-
getItemMerchandiseSubtotal
public javax.money.MonetaryAmount getItemMerchandiseSubtotal()Sum up theOrderFulfillmentItem#merchandiseTotalAmountacross 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.proratedOrderAdjustmentsfor 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 theFulfillmentGroupthis fulfillment was created from.By default, only one
OrderFulfillmentis created perFulfillmentGroup, but certain implementations may wish to create multipleOrderFulfillmentsfrom a singleFulfillmentGroup(ex: to support fulfillment splitting, multi-vendor fulfillment, etc).This field would provide traceability into finding which
OrderFulfillmentscame from the sameFulfillmentGroup.- Returns:
- the reference number of the
FulfillmentGroupthis fulfillment was created from - See Also:
-
FulfillmentGroup.referenceNumber
-
getOrderId
A soft reference to the parentOrderthis fulfillment belongs to.- Returns:
- the id of the parent
Orderthis 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()ThePricedFulfillmentOptionchosen for thegetType().- Returns:
- the
PricedFulfillmentOptionchosen 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 thisFulfillmentGroupshould 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
additionalShipmentsare 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 thisOrderFulfillmentwas specifically overridden, whether from a CSR or an automatic process.- Returns:
- whether the total fulfillment price of this
OrderFulfillmentwas 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:
getCurrencyin interfacejavax.money.CurrencySupplier- Returns:
- The currency unit used for the pricing of this
OrderFulfillment.
-
isRequiresCollectOnDelivery
public boolean isRequiresCollectOnDelivery()Whether thisOrderFulfillmentrequires at least part of the payment to be collected on delivery.- Returns:
- true if this
OrderFulfillmentrequires 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 ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation 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 theFulfillmentGroupthis fulfillment was created from.By default, only one
OrderFulfillmentis created perFulfillmentGroup, but certain implementations may wish to create multipleOrderFulfillmentsfrom a singleFulfillmentGroup(ex: to support fulfillment splitting, multi-vendor fulfillment, etc).This field would provide traceability into finding which
OrderFulfillmentscame from the sameFulfillmentGroup.- Parameters:
groupReferenceNumber- the reference number of theFulfillmentGroupthis fulfillment was created from- See Also:
-
FulfillmentGroup.referenceNumber
-
setOrderId
A soft reference to the parentOrderthis fulfillment belongs to.- Parameters:
orderId- the id of the parentOrderthis 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) ThePricedFulfillmentOptionchosen 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 thisFulfillmentGroupshould 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
additionalShipmentsare 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 thisOrderFulfillmentwas specifically overridden, whether from a CSR or an automatic process.- Parameters:
overrideFulfillmentPriceFlag- whether the total fulfillment price of thisOrderFulfillmentwas 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:
setCurrencyin interfacecom.broadleafcommerce.money.CurrencyConsumer- Parameters:
currency- The currency unit used for the pricing of thisOrderFulfillment.
-
setRequiresCollectOnDelivery
public void setRequiresCollectOnDelivery(boolean requiresCollectOnDelivery) Whether thisOrderFulfillmentrequires at least part of the payment to be collected on delivery.- Parameters:
requiresCollectOnDelivery- Whether thisOrderFulfillmentrequires 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 ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-