Interface TaxProvider
- All Superinterfaces:
ModuleProvider
- All Known Implementing Classes:
SimpleTaxProvider
- Author:
- Phillip Verheyden (phillipuniverse)
-
Method Summary
Modifier and TypeMethodDescriptioncalculateTaxForOrder(Order order, ModuleConfiguration config) Calculates taxes on an entire order.voidcancelTax(Order order, ModuleConfiguration config) Some tax providers store tax details from an order on an external system for reporting and tax reconcilliation.commitTaxForOrder(Order order, ModuleConfiguration config) This method provides the implementation an opportunity to finalize taxes on the order.Methods inherited from interface org.broadleafcommerce.common.config.service.ModuleProvider
canRespond
-
Method Details
-
calculateTaxForOrder
Calculates taxes on an entire order. Returns the order with taxes included.- Parameters:
order-config-- Returns:
- Throws:
TaxException
-
commitTaxForOrder
This method provides the implementation an opportunity to finalize taxes on the order. This is often required when tax sub systems require tax documents to be created on checkout. This method will typically be called by the checkout workflow, rather than by the pricing workflow. Some implementations may wish to do nothing in this method, except perhaps recalculate taxes.- Parameters:
order-config-- Returns:
- Throws:
TaxException
-
cancelTax
Some tax providers store tax details from an order on an external system for reporting and tax reconcilliation. This allows one to cancel or undo tax recording in an external system. Typically, this will be called to offset a call to commitTaxForOrder. This might be called, for example, in a rollback handler for a checkout workflow activity that calls commitTaxForOrder. Many implementations may wish to do nothing in this method.- Parameters:
order-config-- Throws:
TaxException
-