Class EnhancedFulfillmentPricingItem

java.lang.Object
com.broadleafcommerce.fulfillment.service.dto.EnhancedFulfillmentPricingItem

public class EnhancedFulfillmentPricingItem extends Object
Decorates a FulfillmentPricingItem to allow processing state to be stored on the item. Specifically, if a calculator is able to price the item, it will store a FulfillmentItemPriceResult for the priced service level.
  • Constructor Details

    • EnhancedFulfillmentPricingItem

      public EnhancedFulfillmentPricingItem(EnhancedFulfillmentPricingGroup group, com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingItem item)
  • Method Details

    • hasResult

      public boolean hasResult(String serviceLevel)
      Checks if this item already has a FulfillmentItemPriceResult for the passed in service level.
      Parameters:
      serviceLevel -
      Returns:
      true if this item already has a result for the passed in service level.
    • addResult

      public void addResult(String serviceLevel, FulfillmentItemPriceResult result)
      Checks if this item already has a FulfillmentItemPriceResult for the passed in service level.
      Parameters:
      serviceLevel -
    • getPossibleOrigins

      public List<com.broadleafcommerce.fulfillment.common.domain.FulfillmentOriginInfo> getPossibleOrigins()
      Some implementations price shipping costs differently based on where the items is coming from. For example, when shipping from the US warehouse versus the Europe warehouse. An implementation may also choose to check the inventory in these locations to determine that an item can be shipped from either US or Europe in this case. This data is only used for calculators that restrict pricing based on origin. See DBFulfillmentCalculator#matchesInventoryRef(String) for example usage.
      Returns:
    • getFulfillmentType

      public String getFulfillmentType()
      Return the items fulfillment type
      Returns:
    • getInventoryType

      public String getInventoryType()
      Return the items inventory type
      Returns:
    • getSubtotal

      public javax.money.MonetaryAmount getSubtotal()
    • getItemReference

      public String getItemReference()
    • getItem

      public com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingItem getItem()
    • getParentGroup

      public EnhancedFulfillmentPricingGroup getParentGroup()
    • getServiceLevelFulfillmentMap

      public Map<String,FulfillmentItemPriceResult> getServiceLevelFulfillmentMap()