Interface FulfillmentPricingService
-
- All Known Implementing Classes:
DefaultFulfillmentPricingService
public interface FulfillmentPricingServiceDefines a service that provides fulfillment pricing for aCart, e.g., shipping price.- Author:
- Chad Harchar (charchar)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidapplyFulfillmentPricing(com.broadleafcommerce.cart.client.domain.Cart cart)Service for calculating and applying fulfillment pricing to aCart, typically by integrating with Shipping Services.booleancanCalculateFulfillmentPricing(com.broadleafcommerce.cart.client.domain.Cart cart)Whether the cart contains the information required to calculate fulfillment pricing.List<com.broadleafcommerce.shipping.domain.FulfillmentOptionPricedResponse>getOptions(com.broadleafcommerce.cart.client.domain.Cart cart, String referenceNumber)A list of all potential fulfillment options for the specified cart and fulfillment group.voidprorateFulfillmentGroupsAdjustments(com.broadleafcommerce.cart.client.domain.Cart cart)Prorates theFulfillmentGrouplevel adjustments down to the items for the entire cart.
-
-
-
Method Detail
-
applyFulfillmentPricing
void applyFulfillmentPricing(com.broadleafcommerce.cart.client.domain.Cart cart)
Service for calculating and applying fulfillment pricing to aCart, 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.
-
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
List<com.broadleafcommerce.shipping.domain.FulfillmentOptionPricedResponse> getOptions(com.broadleafcommerce.cart.client.domain.Cart cart, String referenceNumber)
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.
-
prorateFulfillmentGroupsAdjustments
void prorateFulfillmentGroupsAdjustments(com.broadleafcommerce.cart.client.domain.Cart cart)
Prorates theFulfillmentGrouplevel 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
-
-