Class FulfillmentPricingContext

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

public class FulfillmentPricingContext extends Object
Manages the state of the groups and items to be priced. The fulfillment service receives a List of FulfillmentPricingGroup. The initialization of this object decorates the group and its contained items with EnhancedFulfillmentPricingGroup and EnhancedFulfillmentPricingItem respectively. To allow these objects to maintain the state of the calculations.
  • Constructor Details

    • FulfillmentPricingContext

      public FulfillmentPricingContext(com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionRequest request, com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig fulfillmentPricingConfig, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
  • Method Details

    • getCurrency

      public javax.money.CurrencyUnit getCurrency()
    • shouldPriceByGroup

      public boolean shouldPriceByGroup()
    • getDefaultServiceLevel

      public String getDefaultServiceLevel()
    • getPricingGroups

      public List<EnhancedFulfillmentPricingGroup> getPricingGroups()
    • getFulfillmentOptionRequest

      public com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionRequest getFulfillmentOptionRequest()
    • getFulfillmentPricingConfig

      public com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig getFulfillmentPricingConfig()
    • getRequestTime

      public Instant getRequestTime()
    • getContextInfo

      @Nullable public com.broadleafcommerce.data.tracking.core.context.ContextInfo getContextInfo()
    • getCalculatorPricedItemMap

      public Map<FulfillmentCalculator,EnhancedFulfillmentPricingItem> getCalculatorPricedItemMap()
      Map to hold Calculator and Items Priced by Calculator. This structure is used as a base result when building item options. It is not reliable for any purpose outside of this flow.
    • getContextAttributes

      public Map<String,Object> getContextAttributes()
      Map to hold arbitrary additional attributes.