org.broadleafcommerce.core.pricing.service
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
 Order calculateTaxForOrder(Order order)
          Calculates tax for the order.
 void cancelTax(Order order)
          Some tax providers store tax details from an order on an external system for reporting and tax reconcilliation.
 Order commitTaxForOrder(Order order)
          Commits tax for the order.
 

Method Detail

calculateTaxForOrder

Order calculateTaxForOrder(Order order)
                           throws TaxException
Calculates tax for the order.

Parameters:
order -
Returns:
Throws:
TaxException

commitTaxForOrder

Order commitTaxForOrder(Order order)
                        throws TaxException
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

void cancelTax(Order order)
               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.

Parameters:
order -
Throws:
TaxException


Copyright © 2013. All Rights Reserved.