Class EnhancedFulfillmentPricingItem
java.lang.Object
com.broadleafcommerce.fulfillment.service.dto.EnhancedFulfillmentPricingItem
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 Summary
ConstructorDescriptionEnhancedFulfillmentPricingItem
(EnhancedFulfillmentPricingGroup group, com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingItem item) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addResult
(String serviceLevel, FulfillmentItemPriceResult result) Checks if this item already has aFulfillmentItemPriceResult
for the passed in service level.Return the items fulfillment typeReturn the items inventory typecom.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingItem
getItem()
List<com.broadleafcommerce.fulfillment.common.domain.FulfillmentOriginInfo>
Some implementations price shipping costs differently based on where the items is coming from.javax.money.MonetaryAmount
boolean
Checks if this item already has aFulfillmentItemPriceResult
for the passed in service level.
-
Constructor Details
-
EnhancedFulfillmentPricingItem
public EnhancedFulfillmentPricingItem(EnhancedFulfillmentPricingGroup group, com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingItem item)
-
-
Method Details
-
hasResult
Checks if this item already has aFulfillmentItemPriceResult
for the passed in service level.- Parameters:
serviceLevel
-- Returns:
- true if this item already has a result for the passed in service level.
-
addResult
Checks if this item already has aFulfillmentItemPriceResult
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. SeeDBFulfillmentCalculator#matchesInventoryRef(String)
for example usage.- Returns:
-
getFulfillmentType
Return the items fulfillment type- Returns:
-
getInventoryType
Return the items inventory type- Returns:
-
getSubtotal
public javax.money.MonetaryAmount getSubtotal() -
getItemReference
-
getItem
public com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingItem getItem() -
getParentGroup
-
getServiceLevelFulfillmentMap
-