Newer Version Available
CalculateTaxRequest Class
Namespace
Usage
Keep these considerations in mind when you use this class.
- If the shouldVoidTax property value is set to true, then the operation returns a response with documentCode property value updated to referenceDocumentCode property value that was originally sent in the request payload. The response also includes the taxTransactionType property value as Void. This indicates that the document specified in the referenceDocumentCode property value is voided.
- If document is locked or you can't void the tax transaction for any reason, then you can use the Tax Calculation request to perform another transaction such as a Credit Tax request. In this scenario, the response includes the documentCode property value that was sent in the request payload.
- If the document that's mentioned in the referenceDocumentCode property value isn't available in the tax engine, then an error response occurs with ResultCode value as ReferenceDocumentCodeMissing.
Example
See TaxEngineAdapter Example Implementation for more details on how to access information from the CalculateTaxRequest class.
CalculateTaxRequest Constructors
The CalculateTaxRequest class includes these constructors.
CalculateTaxRequest(taxType)
Signature
global CalculateTaxRequest(commercetax.CalculateTaxType taxType)
Parameters
- taxType
- Type: CalculateTaxType
- Indicates whether the tax calculation is for estimated tax or actual tax.
CalculateTaxRequest Properties
The CalculateTaxRequest class includes these properties.
shouldVoidTax
Signature
global commercetax.CalculateTaxType shouldVoidTax {get; set;}
Property Value
Type: Boolean
taxTransactionType
Signature
global commercetax.TaxTransactionType taxTransactionType {get; set;}
Property Value
Type: TaxTransactionType
taxType
Signature
global commercetax.CalculateTaxType taxType {get; set;}
Property Value
Type: CalculateTaxType
CalculateTaxRequest Methods
The CalculateTaxRequest class includes these methods.
equals(obj)
Signature
global Boolean equals(Object obj)
Parameters
- obj
- Type: Object
- External object whose key is to be validated.
Return Value
Type: Boolean
hashCode()
Signature
global Integer hashCode()
Return Value
Type: Integer