Interface FeePricingService

All Known Implementing Classes:
DefaultFeePricingService

public interface FeePricingService
Service for pricing operations related to Fees.
Since:
Cart Operation Services 2.3.0, Release Train 2.3.0
Author:
Julia Lopez-Pozas (jlopezpozas)
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends Fee>
    void
    applyFeesAfterAdjustments(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Fetches Fees for the ContextInfo's application, then calculates and applies them to the given Cart.
    <T extends Fee>
    void
    applyFeesBeforeAdjustments(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Fetches Fees for the ContextInfo's application, then calculates and applies them to the given Cart.
    <T extends Fee>
    void
    calculateAndApplyFees(com.broadleafcommerce.cart.client.domain.Cart cart, List<T> feesToBeApplied, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Calculates the Fees passed in and applies them to the Cart by adding CartItems of type DefaultCartItemTypes.EXTRA_FEE, which should update the CartPricing.feesTotal when totals are calculated for the cart.
    <T extends Fee>
    List<T>
    getFeesByApplication(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Fetches and returns a list of Fees matching the passed in ContextInfo's application information.
  • Method Details

    • applyFeesBeforeAdjustments

      <T extends Fee> void applyFeesBeforeAdjustments(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Fetches Fees for the ContextInfo's application, then calculates and applies them to the given Cart. Expected to be called before adjustments / offers are applied onto the cart.
      Type Parameters:
      T - The domain type for the fees to be applied
      Parameters:
      cart - the Cart to apply the fees to
      contextInfo - Context information around sandbox and multitenant state
    • applyFeesAfterAdjustments

      <T extends Fee> void applyFeesAfterAdjustments(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Fetches Fees for the ContextInfo's application, then calculates and applies them to the given Cart. Expected to be called after adjustments / offers have been applied onto the cart.
      Type Parameters:
      T - The domain type for the fees to be applied
      Parameters:
      cart - the Cart to apply the fees to
      contextInfo - Context information around sandbox and multitenant state
    • calculateAndApplyFees

      <T extends Fee> void calculateAndApplyFees(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull List<T> feesToBeApplied, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Calculates the Fees passed in and applies them to the Cart by adding CartItems of type DefaultCartItemTypes.EXTRA_FEE, which should update the CartPricing.feesTotal when totals are calculated for the cart.
      Type Parameters:
      T - The domain type for the fees to be applied
      Parameters:
      cart - the Cart to apply the fees to
      feesToBeApplied - the list of Fees to apply onto the cart
      contextInfo - Context information around sandbox and multitenant state
    • getFeesByApplication

      <T extends Fee> List<T> getFeesByApplication(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Fetches and returns a list of Fees matching the passed in ContextInfo's application information. The list is either fetched from the cache or fetched by the external Pricing provider.
      Type Parameters:
      T - The domain type for the fees being fetched
      Parameters:
      contextInfo - Context information around sandbox and multitenant state
      Returns:
      the list of Fees matching the context's application that is fetched from the cache or fetched by the external Pricing provider