Interface TaxService
- All Known Implementing Classes:
TaxServiceImpl
public interface TaxService
Generic service to calculate taxes. Those implementing tax calculation logic should, more likely,
use the default Broadleaf TaxService implementation, and implement TaxProvider.
- Author:
- Kelly Tisdell
-
Method Summary
Modifier and TypeMethodDescriptioncalculateTaxForOrder(Order order) Calculates tax for the order.voidSome tax providers store tax details from an order on an external system for reporting and tax reconcilliation.commitTaxForOrder(Order order) Commits tax for the order.
-
Method Details
-
calculateTaxForOrder
Calculates tax for the order.- Parameters:
order-- Returns:
- Throws:
TaxException
-
commitTaxForOrder
Commits tax for the order. Some implemenations may do nothing. Others may delegate to a tax provider that stores taxes in another system for reporting or reconcilliation.- Parameters:
order-- 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.- Parameters:
order-- Throws:
TaxException
-