Interface TaxProvider


public interface TaxProvider
A TaxProvider encapsulates the logic required to make a request to some service (either internal or external) to determine the amount of tax due on a transaction. Any instance registered in the TaxService should be pre-initialized with the parameters required to execute such requests (including authentication details). Implementers should log the data being sent to an external service and the resulting response from that service. This cannot be done at the framework level; implementers of TaxProviders are responsible for this. This is to ensure in the case of a discrepancy, we can track down where the error occurred.
  • Method Summary

    Modifier and Type Method Description
    TaxResponse makeRequest​(TaxRequest request)
    Makes a request to the provider to determine the amount of tax due.