Interface TaxService
-
- All Known Implementing Classes:
DefaultTaxService
public interface TaxService
Service for calculating and applying taxes to aCart
, typically by integrating with one or moreTaxProviders
, depending if there should be estimated and actual taxes calculated.- Author:
- Chad Harchar (charchar)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
applyTaxes(com.broadleafcommerce.cart.client.domain.Cart cart, boolean estimated, boolean actual, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Calculates and applies taxes to a cart.boolean
canCalculateTaxes(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Whether the cart contains the information required to calculate taxes.
-
-
-
Method Detail
-
applyTaxes
void applyTaxes(com.broadleafcommerce.cart.client.domain.Cart cart, boolean estimated, boolean actual, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Calculates and applies taxes to a cart.- Parameters:
cart
- The cart to apply taxes against.estimated
- Whether to provide an estimateactual
- Whether to provide the actualcontextInfo
- Additional sandbox and tenant info
-
canCalculateTaxes
boolean canCalculateTaxes(com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Whether the cart contains the information required to calculate taxes.- Parameters:
cart
- The cart to determine whether taxes can be calculated for.contextInfo
- Additional sandbox and tenant info- Returns:
- Whether the cart contains the information required to calculate taxes.
-
-