TaxEngines Interface
Your tax engine implements this interface. It contains methods for
calculating tax, clearing in-memory entities from the previous call, and clearing legal
references from the previous call.
Namespace
blng
TaxEngines Methods
Learn more about the methods available with the TaxEngines interface.
The TaxEngines interface includes these methods.
calculateTax(taxParametersInstance)
Signature
global static Map<Id,TaxResults> calculateTax(TaxParameters taxParametersInstance)
Parameters
- taxParametersInstance
- Type: TaxParameters
-
The taxParametersInstance parameter is populated based on the process that uses tax calculation. These examples show the sample values for each process.
- Order is created
-
TaxParameters:[ isCommitOnGetTax=false, isStandardFromBatch=false, legalEntityReference=80105000000i1MqAAI, listOfSObjectIds=(), listOfSObjects=(), mapOfSObjectByUniqueId={}, mapOfTaxResultsById={}, mapOfTaxTreatmentById={}, sObjectId=null, sObjectTypeInstance=OrderItem, sobjectInstance=null, taxMethod=null ]
- Bill Now or Invoice is created
-
TaxParameters:[ isCommitOnGetTax=false, isStandardFromBatch=false, legalEntityReference=a2305000000BKIoAAO, listOfSObjectIds=(), listOfSObjects=(), mapOfSObjectByUniqueId={}, mapOfTaxResultsById={}, mapOfTaxTreatmentById={}, sObjectId=null, sObjectTypeInstance=blng__InvoiceLine__c, sobjectInstance=null, taxMethod=null ]
- Invoice is manually posted
-
TaxParameters:[ isCommitOnGetTax=false, isStandardFromBatch=false, legalEntityReference=null, listOfSObjectIds=(a2305000000BKIoAAO), listOfSObjects=(), mapOfSObjectByUniqueId={}, mapOfTaxResultsById={}, mapOfTaxTreatmentById={}, sObjectId=null, sObjectTypeInstance=blng__Invoice__c, sobjectInstance=null, taxMethod=postTax ]
Return Value
Type: Map<Id,TaxResults>