Newer Version Available
CalculateTaxRequest Class
Represents a request to an external tax engine to calculate tax.
Extends the TaxTransactionRequest class and is the top-level request
class.
Namespace
Example
See TaxEngineAdapter Example Implementation for more details on how to access information from the CalculateTaxRequest class.
CalculateTaxRequest Constructors
Learn more about the constructors that are available with the CalculateTaxRequest class. This constructor is intended for test usage and throws an
exception if used outside of the Apex test context.
The CalculateTaxRequest class includes these constructors.
CalculateTaxRequest(taxType)
This constructor is intended for test usage only and throws an
exception if used outside of the Apex test context.
Signature
global CalculateTaxRequest(commercetax.CalculateTaxType taxType)
Parameters
- taxType
- Type: CalculateTaxType
- Indicates whether the tax calculation is for estimated tax or actual tax.
CalculateTaxRequest Properties
Learn more about the available properties with the CalculateTaxRequest class.
The CalculateTaxRequest class includes these properties.
taxTransactionType
Signature
global commercetax.TaxTransactionType taxTransactionType {get; set;}
Property Value
Type: TaxTransactionType
taxType
Shows whether the tax calculation is for estimated or actual tax
wherein only actual tax can be submitted.
Signature
global commercetax.CalculateTaxType taxType {get; set;}
Property Value
Type: CalculateTaxType
CalculateTaxRequest Methods
Learn more about the available methods with the CalculateTaxRequest class.
The CalculateTaxRequest class includes these methods.
equals(obj)
Maintains the integrity of lists of type CalculateTaxRequest by determining the equality of external objects in a list.
This method is dynamic and is based on the equals()
method in Java.
Signature
global Boolean equals(Object obj)
Parameters
- obj
- Type: Object
- External object whose key is to be validated.
Return Value
Type: Boolean
hashCode()
Maintains the integrity of lists of type CalculateTaxRequest by determining the uniqueness of the external object records
in a
list.
Signature
global Integer hashCode()
Return Value
Type: Integer