Interface TaxProvider
- All Superinterfaces:
org.broadleafcommerce.common.config.service.ModuleProvider
- All Known Implementing Classes:
SimpleTaxProvider
public interface TaxProvider
extends org.broadleafcommerce.common.config.service.ModuleProvider
- Author:
- Phillip Verheyden (phillipuniverse)
-
Method Summary
Modifier and TypeMethodDescriptioncalculateTaxForOrder(Order order, org.broadleafcommerce.common.config.domain.ModuleConfiguration config) Calculates taxes on an entire order.voidSome tax providers store tax details from an order on an external system for reporting and tax reconcilliation.commitTaxForOrder(Order order, org.broadleafcommerce.common.config.domain.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
Order calculateTaxForOrder(Order order, org.broadleafcommerce.common.config.domain.ModuleConfiguration config) throws TaxException Calculates taxes on an entire order. Returns the order with taxes included.- Parameters:
order-config-- Returns:
- Throws:
TaxException
-
commitTaxForOrder
Order commitTaxForOrder(Order order, org.broadleafcommerce.common.config.domain.ModuleConfiguration config) throws TaxException 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
void cancelTax(Order order, org.broadleafcommerce.common.config.domain.ModuleConfiguration config) throws TaxException 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
-