TaxParameters Class

Contains a list of setters to populate the data needed for a tax calculation. The data is passed in the tax callout.

Namespace 

blng

TaxParameters Methods 

Learn more about the methods available with the TaxParameters class.

The TaxParameters class includes these methods.

getIsCommitOnGetTax() 

Returns the value of the isCommitOnGetTax parameter.

Signature 

global Boolean getIsCommitOnGetTax()

Parameters 

isCommitOnGetTax: Type: Boolean

Return Value 

Type: Void

getLegalEntityReferences() 

Returns the legal entity references.

Signature 

global static void getLegalEntityReferences()

Parameters 

legalEntityReference: Type: String

Return Value 

Type: void

getSObjectID() 

Returns the ID of a single object that requires tax calculation, if any.

Signature 

global static void getSObjectID()

Parameters 

sObjectId: Type: Id

Return Value 

Type: void

getSObjectListofIds() 

Returns the list of IDs for objects that require tax calculation.

Signature 

global List<Id> getSObjectListOfIds()

Parameters 

listOfSobjectIds: Type: List<Id>

Return Value 

Type: Void

getSObjectType() 

Returns the object type, which can be InvoiceLine, DebitNoteLine, CreditNoteLine, and OrderProduct object.

Signature 

global static void getSObjectType()

Parameters 

sObjectTypeInstance: Type: SObjectType

Return Value 

Type: void

getTaxMethod() 

Returns the type of tax method, which is POST or GET.

Signature 

global static void setTaxMethod()

Parameters 

taxMethod: Type: String

Return Value 

Type: void

setSObjectListofIds(listOfSobjectIds) 

Sets the list of IDs for objects that require tax calculation.

Signature 

global static Void setSObjectListofIds(List<Id> listOfSobjectIds)

Parameters 

listOfSobjectIds: Type: List<Id>

Return Value 

Type: Void

setSObjectID(sObjectId) 

Sets the ID of a single object that requires tax calculation., if any.

Signature 

global static void setSObjectID(Id sObjectId)

Parameters 

sObjectId: Type: Id

Return Value 

Type: void

setLegalEntityReferences(legalEntityReference) 

Sets the legal entity for the tax treatment. For example, a company can create legal entities to represent their different branches.

Signature 

global static void setLegalEntityReferences(String legalEntityReference)

Parameters 

legalEntityReference: Type: String Unique identification number of the legal entity.

Return Value 

Type: void

setSObjectType(sObjectTypeInstance) 

Sets the object type to InvoiceLine, DebitNoteLine, CreditNoteLine, or OrderProduct object.

Signature 

global static void setSObjectType(SObjectType sObjectTypeInstance)

Parameters 

sObjectTypeInstance: Type: SObjectType

Return Value 

Type: void

setTaxMethod(taxMethod) 

Sets the method to POST or GET.

Signature 

global static void setTaxMethod(String taxMethod)

Parameters 

taxMethod: Type: String

Return Value 

Type: void

setIsCommitOnGetTax(isCommitOnGetTax) 

Indicates to external tax providers whether to commit tax.

Usage 

If the Automatically Post Invoices checkbox is selected on the Invoice Scheduler, tax providers examine the isCommitOnGetTax parameter to commit the tax.

The isCommitOnGetTax parameter value is configured within the Taxparameter instance and transmitted to the external tax provider implementation.

Signature 

global static Void setIsCommitOnGetTax(Boolean isCommitOnGetTax)

Parameters 

isCommitOnGetTax: Type: Boolean Indicates to external tax providers whether to commit tax on the Get Tax method (true) or not (false).

Return Value 

Type: Void