Interface FulfillmentPricingService

All Known Implementing Classes:
DefaultFulfillmentPricingService

public interface FulfillmentPricingService
Defines a service that provides fulfillment pricing for a Cart, e.g., shipping price.
Author:
Chad Harchar (charchar)
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    applyFulfillmentPricing(com.broadleafcommerce.cart.client.domain.Cart cart)
    Deprecated, for removal: This API element is subject to removal in a future version.
    void
    applyFulfillmentPricing(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Service for calculating and applying fulfillment pricing to a Cart, typically by integrating with Shipping Services.
    boolean
    canCalculateFulfillmentPricing(com.broadleafcommerce.cart.client.domain.Cart cart)
    Whether the cart contains the information required to calculate fulfillment pricing.
    default List<com.broadleafcommerce.shipping.domain.FulfillmentOptionPricedResponse>
    getOptions(com.broadleafcommerce.cart.client.domain.Cart cart, String referenceNumber)
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 1.8.0, in favor of getOptions(Cart, String, ContextInfo)
    List<com.broadleafcommerce.shipping.domain.FulfillmentOptionPricedResponse>
    getOptions(com.broadleafcommerce.cart.client.domain.Cart cart, String referenceNumber, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    A list of all potential fulfillment options for the specified cart and fulfillment group.
    void
    prorateFulfillmentGroupsAdjustments(com.broadleafcommerce.cart.client.domain.Cart cart)
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 1.7.2, adjustment prorations are now done in OfferServices
  • Method Details

    • applyFulfillmentPricing

      @Deprecated(since="1.8.0", forRemoval=true) default void applyFulfillmentPricing(com.broadleafcommerce.cart.client.domain.Cart cart)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Service for calculating and applying fulfillment pricing to a Cart, typically by integrating with Shipping Services. Options are expected to be unique across all providers, once a provider is found that can handle an option, it will be the one used for calculation.
      Parameters:
      cart - The cart to apply fulfillment pricing against.
    • applyFulfillmentPricing

      void applyFulfillmentPricing(com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Service for calculating and applying fulfillment pricing to a Cart, typically by integrating with Shipping Services. Options are expected to be unique across all providers, once a provider is found that can handle an option, it will be the one used for calculation.
      Parameters:
      cart - The cart to apply fulfillment pricing against.
      contextInfo - Context information around sandbox and multitenant state.
    • canCalculateFulfillmentPricing

      boolean canCalculateFulfillmentPricing(com.broadleafcommerce.cart.client.domain.Cart cart)
      Whether the cart contains the information required to calculate fulfillment pricing.
      Parameters:
      cart - The cart to determine whether fulfillment pricing can be calculated for.
      Returns:
      Whether the cart contains the information required to calculate fulfillment pricing.
    • getOptions

      @Deprecated(since="1.8.0", forRemoval=true) default List<com.broadleafcommerce.shipping.domain.FulfillmentOptionPricedResponse> getOptions(com.broadleafcommerce.cart.client.domain.Cart cart, String referenceNumber)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1.8.0, in favor of getOptions(Cart, String, ContextInfo)
      A list of all potential fulfillment options for the specified cart and fulfillment group.
      Parameters:
      cart - The cart to determine which fulfillment options can be chosen.
      referenceNumber - The id of the fulfillment group we are retrieving options for.
      Returns:
      A list of all potential fulfillment options for the specified cart and fulfillment group.
    • getOptions

      List<com.broadleafcommerce.shipping.domain.FulfillmentOptionPricedResponse> getOptions(com.broadleafcommerce.cart.client.domain.Cart cart, String referenceNumber, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      A list of all potential fulfillment options for the specified cart and fulfillment group.
      Parameters:
      cart - The cart to determine which fulfillment options can be chosen.
      referenceNumber - The id of the fulfillment group we are retrieving options for.
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      A list of all potential fulfillment options for the specified cart and fulfillment group.
    • prorateFulfillmentGroupsAdjustments

      @Deprecated(since="1.7.2", forRemoval=true) void prorateFulfillmentGroupsAdjustments(com.broadleafcommerce.cart.client.domain.Cart cart)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1.7.2, adjustment prorations are now done in OfferServices
      Prorates the FulfillmentGroup level adjustments down to the items for the entire cart. This is useful for downstream services for calculating partial captures and refunds.
      Parameters:
      cart - The parent cart