Interface FulfillmentCalculatorService
- All Known Implementing Classes:
DefaultFulfillmentCalculatorService
public interface FulfillmentCalculatorService
Service interface to find, qualify, and process fulfillment pricing using
FulfillmentCalculators.-
Method Summary
Modifier and TypeMethodDescriptionfindEligibleFulfillmentPricingCalculators(FulfillmentPricingContext context, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Given theFulfillmentPricingContext, this method returns a list of eligibleFulfillmentCalculatorcalculators that can be used to compute option pricing.voidpriceFulfillmentGroups(FulfillmentPricingContext context, List<FulfillmentCalculator> calculators) Price the passed inFulfillmentPricingContext.getPricingGroups()using the passed in calculators.voidpriceFulfillmentItems(FulfillmentPricingContext context, List<FulfillmentCalculator> calculators) Price the passed inFulfillmentPricingContext.getPricingGroups()using the passed in calculators.
-
Method Details
-
findEligibleFulfillmentPricingCalculators
List<FulfillmentCalculator> findEligibleFulfillmentPricingCalculators(@NonNull FulfillmentPricingContext context, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Given theFulfillmentPricingContext, this method returns a list of eligibleFulfillmentCalculatorcalculators that can be used to compute option pricing.- Parameters:
context- the pricing context containing the items and originating requestcontextInfo- the context info providing tenancy and application data- Returns:
- List of
Fulfillment Calculatorssorted in default order.
-
priceFulfillmentGroups
void priceFulfillmentGroups(FulfillmentPricingContext context, List<FulfillmentCalculator> calculators) Price the passed inFulfillmentPricingContext.getPricingGroups()using the passed in calculators. Modifies the passed inEnhancedFulfillmentPricingGroupand its containedItemswith the computed price information. Adds aGroupServiceLevelPriceResulttoEnhancedFulfillmentPricingGroup.getServiceLevelPriceMap()where the map key is the service level (e.g. "STANDARD") as defined inFulfillmentPricingConfig#getSupportedFulfillmentOptions()- Parameters:
context- the pricing context containing the items and originating requestcalculators- the list of calculators to use for pricing
-
priceFulfillmentItems
void priceFulfillmentItems(FulfillmentPricingContext context, List<FulfillmentCalculator> calculators) Price the passed inFulfillmentPricingContext.getPricingGroups()using the passed in calculators. Modifies the passed inEnhancedFulfillmentPricingGroupand its containedItemswith the computed price information. Adds aFulfillmentItemPriceResultto each item for each applicable service level (e.g. "STANDARD")- Parameters:
context- the pricing context containing the items and originating requestcalculators- the list of calculators to use for pricing
-