Class FulfillmentGroup

java.lang.Object
com.broadleafcommerce.cart.client.domain.FulfillmentGroup
All Implemented Interfaces:
Serializable

public class FulfillmentGroup extends Object implements Serializable
A group of items designated to a certain fulfillment location and type.
Author:
Chad Harchar (charchar)
See Also:
  • Field Details

  • Constructor Details

    • FulfillmentGroup

      public FulfillmentGroup()
  • Method Details

    • getServiceLevelFulfillmentPrices

      public Map<String,javax.money.MonetaryAmount> getServiceLevelFulfillmentPrices()
      Gets a map of total prices for all Service Levels for FulfillmentItems in this group. This will aggregate the fulfillment prices for all items that have the same service level.
      Returns:
      A map of Service Level to the combined fulfillment total for that service level.
    • getReferenceNumber

      public String getReferenceNumber()
      The reference number for this fulfillment group.
      Returns:
      The reference number for this fulfillment group.
    • getType

      public String getType()
      The type of means by which this fulfillment group is fulfilled. This could be SHIP, PICKUP, or VIRTUAL, for example.
      Returns:
      The type of means by which this fulfillment group is fulfilled.
      See Also:
      • FulfillmentType
    • getFulfillmentOption

      @Nullable public com.broadleafcommerce.order.common.domain.FulfillmentOption getFulfillmentOption()
      The fulfillment option chosen for the getType().
    • getPricedFulfillmentOption

      @Nullable public com.broadleafcommerce.order.common.domain.PricedFulfillmentOption getPricedFulfillmentOption()
    • getInventoryLocationReference

      public String 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 this FulfillmentGroup 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 group.
      Returns:
      The shipping address for this fulfillment group.
    • getTaxAddressSource

      public String getTaxAddressSource()
      Where to find the address to be used for tax calculation on this fulfillment group. Defaults to the shipping address for this fulfillment group.
      Returns:
      Which address should be used for tax calculations.
    • getGroupFulfillmentPriceBeforeAdjustments

      public javax.money.MonetaryAmount getGroupFulfillmentPriceBeforeAdjustments()
      The shipping price of this fulfillment group before adjustments are applied. This is pricing specifically at the group level and does not include pricing from FulfillmentItems.
      Returns:
      The shipping price of this fulfillment group before adjustments are applied.
    • getFulfillmentItemsSubtotal

      public javax.money.MonetaryAmount getFulfillmentItemsSubtotal()
      The total shipping price of this fulfillment group's FulfillmentItems. This does not include taxes on the item shipping price.
      Returns:
      The total shipping price of this fulfillment group's FulfillmentItems.
    • getFulfillmentAdjustmentsTotal

      public javax.money.MonetaryAmount getFulfillmentAdjustmentsTotal()
      Sum of the group's adjustments.
      Returns:
      Sum of the group's adjustments.
    • getProratedFulfillmentAdjustments

      public javax.money.MonetaryAmount getProratedFulfillmentAdjustments()
      Prorated amount of the fulfillment adjustments that applies to the groupFulfillmentPriceBeforeAdjustments. Fulfillment-level adjustments are prorated between the charges of the group and those of the individual items.
      Returns:
      Prorated amount of the fulfillment adjustments that applies to the groupFulfillmentPriceBeforeAdjustments.
    • getFulfillmentTaxableAmount

      public javax.money.MonetaryAmount getFulfillmentTaxableAmount()
      The amount of the total fulfillment price that can be taxed, including item shipping prices.
      Returns:
      The amount of the total fulfillment price that can be taxed, including item shipping prices.
    • getTotalFulfillmentPrice

      public javax.money.MonetaryAmount getTotalFulfillmentPrice()
      The total shipping price of this fulfillment group, including adjustments and item shipping prices. This does not include taxes on the fulfillment price. This does not include taxes.
      Returns:
      The total shipping price of this fulfillment group, including adjustments and item shipping prices.
    • isOverrideFulfillmentPriceFlag

      public boolean isOverrideFulfillmentPriceFlag()
      Whether the total fulfillment price of this FulfillmentGroup was specifically overridden, whether from a CSR or an automatic process.
      Returns:
      Whether the total fulfillment price of this FulfillmentGroup was specifically overridden, whether from a CSR or an automatic process.
    • getTotalTax

      public javax.money.MonetaryAmount getTotalTax()
      The total tax of this fulfillment group, including merchandise and fulfillment tax.
      Returns:
      The total tax price of this fulfillment group.
    • getAdjustments

      public List<com.broadleafcommerce.order.common.domain.Adjustment> getAdjustments()
      Adjustments to fulfillment pricing that should be applied to getGroupFulfillmentPriceBeforeAdjustments().
      Returns:
      Adjustments to fulfillment pricing that should be applied to getGroupFulfillmentPriceBeforeAdjustments().
    • getFulfillmentItems

      public List<FulfillmentItem> getFulfillmentItems()
      Items for fulfillment within this group, each of which should relate back to a cart item.
      Returns:
      Items for fulfillment within this group.
    • isPriced

      public boolean isPriced()
      Flag to indicate whether this group has been priced.
      Returns:
      Flag to indicate whether this group has been priced.
    • getOverrideDetails

      public List<com.broadleafcommerce.order.common.domain.OverrideDetail> getOverrideDetails()
      List of details about any price overrides which have been performed on this group.
      Returns:
      List of details about any price overrides which have been performed on this group.
    • getAttributes

      public Map<String,Object> getAttributes()
      Attributes for this fulfillment group.
      Returns:
      Attributes for this fulfillment group
    • setReferenceNumber

      public void setReferenceNumber(String referenceNumber)
      The reference number for this fulfillment group.
      Parameters:
      id - The reference number for this fulfillment group.
    • setType

      public void setType(String type)
      The type of means by which this fulfillment group is fulfilled. This could be SHIP, PICKUP, or VIRTUAL, for example.
      Parameters:
      type - The type of means by which this fulfillment group is fulfilled.
      See Also:
      • FulfillmentType
    • setFulfillmentOption

      public void setFulfillmentOption(@Nullable com.broadleafcommerce.order.common.domain.FulfillmentOption fulfillmentOption)
      The fulfillment option chosen for the getType().
    • setPricedFulfillmentOption

      public void setPricedFulfillmentOption(@Nullable com.broadleafcommerce.order.common.domain.PricedFulfillmentOption pricedFulfillmentOption)
    • setInventoryLocationReference

      public void setInventoryLocationReference(String inventoryLocationReference)
      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 this FulfillmentGroup 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 group.
      Parameters:
      address - The shipping address for this fulfillment group.
    • setTaxAddressSource

      public void setTaxAddressSource(String taxAddressSource)
      Where to find the address to be used for tax calculation on this fulfillment group. Defaults to the shipping address for this fulfillment group.
      Parameters:
      taxAddressSource - Which address should be used for tax calculations.
    • setGroupFulfillmentPriceBeforeAdjustments

      public void setGroupFulfillmentPriceBeforeAdjustments(javax.money.MonetaryAmount groupFulfillmentPriceBeforeAdjustments)
      The shipping price of this fulfillment group before adjustments are applied. This is pricing specifically at the group level and does not include pricing from FulfillmentItems.
      Parameters:
      groupFulfillmentPriceBeforeAdjustments - The shipping price of this fulfillment group before adjustments are applied.
    • setFulfillmentItemsSubtotal

      public void setFulfillmentItemsSubtotal(javax.money.MonetaryAmount fulfillmentItemsSubtotal)
      The total shipping price of this fulfillment group's FulfillmentItems. This does not include taxes on the item shipping price.
      Parameters:
      fulfillmentItemsSubtotal - The total shipping price of this fulfillment group's FulfillmentItems.
    • setFulfillmentAdjustmentsTotal

      public void setFulfillmentAdjustmentsTotal(javax.money.MonetaryAmount fulfillmentAdjustmentsTotal)
      Sum of the group's adjustments.
      Parameters:
      fulfillmentAdjustmentsTotal - Sum of the group's adjustments.
    • setProratedFulfillmentAdjustments

      public void setProratedFulfillmentAdjustments(javax.money.MonetaryAmount proratedFulfillmentAdjustments)
      Prorated amount of the fulfillment adjustments that applies to the groupFulfillmentPriceBeforeAdjustments. Fulfillment-level adjustments are prorated between the charges of the group and those of the individual items.
      Parameters:
      proratedFulfillmentAdjustments - Prorated amount of the fulfillment adjustments that applies to the groupFulfillmentPriceBeforeAdjustments.
    • setFulfillmentTaxableAmount

      public void setFulfillmentTaxableAmount(javax.money.MonetaryAmount fulfillmentTaxableAmount)
      The amount of the total fulfillment price that can be taxed, including item shipping prices.
      Parameters:
      fulfillmentTaxableAmount - The amount of the total fulfillment price that can be taxed, including item shipping prices.
    • setTotalFulfillmentPrice

      public void setTotalFulfillmentPrice(javax.money.MonetaryAmount totalFulfillmentPrice)
      The total shipping price of this fulfillment group, including adjustments and item shipping prices. This does not include taxes on the fulfillment price. This does not include taxes.
      Parameters:
      totalFulfillmentPrice - The total shipping price of this fulfillment group, including adjustments and item shipping prices.
    • setOverrideFulfillmentPriceFlag

      public void setOverrideFulfillmentPriceFlag(boolean overrideFulfillmentPriceFlag)
      Whether the total fulfillment price of this FulfillmentGroup was specifically overridden, whether from a CSR or an automatic process.
      Parameters:
      overrideFulfillmentPriceFlag - Whether the total fulfillment price of this FulfillmentGroup was specifically overridden, whether from a CSR or an automatic process.
    • setTotalTax

      public void setTotalTax(javax.money.MonetaryAmount totalTax)
      The total tax of this fulfillment group, including merchandise and fulfillment tax.
      Parameters:
      totalFulfillmentPrice - The total tax price of this fulfillment group.
    • setAdjustments

      public void setAdjustments(List<com.broadleafcommerce.order.common.domain.Adjustment> adjustments)
      Adjustments to fulfillment pricing that should be applied to getGroupFulfillmentPriceBeforeAdjustments().
      Parameters:
      adjustments - Adjustments to fulfillment pricing that should be applied to getGroupFulfillmentPriceBeforeAdjustments().
    • setFulfillmentItems

      public void setFulfillmentItems(List<FulfillmentItem> fulfillmentItems)
      Items for fulfillment within this group, each of which should relate back to a cart item.
      Parameters:
      fulfillmentItems - Items for fulfillment within this group.
    • setPriced

      public void setPriced(boolean isPriced)
      Flag to indicate whether this group has been priced.
      Parameters:
      isPriced - Flag to indicate whether this group has been priced.
    • 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 group.
      Parameters:
      overrideDetails - List of details about any price overrides which have been performed on this group.
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Attributes for this fulfillment group.
      Parameters:
      attributes - Attributes for this fulfillment group
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object