org.broadleafcommerce.core.pricing.service.tax.provider
Interface TaxProvider

All Superinterfaces:
ModuleProvider

public interface TaxProvider
extends ModuleProvider


Method Summary
 Order calculateTaxForOrder(Order order, ModuleConfiguration config)
          Calculates taxes on an entire order.
 void cancelTax(Order order, ModuleConfiguration config)
          Some tax providers store tax details from an order on an external system for reporting and tax reconcilliation.
 Order 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 Detail

calculateTaxForOrder

Order calculateTaxForOrder(Order order,
                           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,
                        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,
               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


Copyright © 2013. All Rights Reserved.