CalculateTaxResponse Class
Sets the values of the tax transaction following a response from the external tax engine. Extends the AbstractTransactionResponse class and is the top-level response class.
-
Learn more about the available methods with the
CalculateTaxResponseclass.
Learn more about the available methods with the CalculateTaxResponse class.
The CalculateTaxResponse class includes these methods.
-
Sets the value of the Addresses field using the addresses contained in an instance of the AddressesResponse class.
-
setAmountDetails(amountDetails)
Sets the value of the AmountDetails field using an instance of
AmountDetailsResponse. -
setCurrencyIsoCode(currencyIsoCode)
Sets the value of the CurrencyIsoCode field of the
CalculateTaxResponseobject. -
Sets the value of the Description field of the
CalculateTaxResponseobject. -
Sets the value of the DocumentCode field of the
CalculateTaxResponseobject. -
setEffectiveDate(effectiveDate)
Sets the value of the EffectiveDate field of the
CalculateTaxResponseobject. -
Sets the value of the LineItems field of the
CalculateTaxResponseobject. -
setReferenceDocumentCode(referenceDocumentCode)
Sets the value of the ReferenceDocumentCode field of the
CalculateTaxResponseobject. -
setReferenceEntityId(referenceEntityId)
Sets the value of the ReferenceEntityId field of the
CalculateTaxResponseobject. -
Sets the value of the Status field of the
CalculateTaxResponseobject. -
setStatusDescription(statusDescription)
Sets the value of the StatusDescription field of the
CalculateTaxResponseobject. -
setTaxTransactionId(taxTrxnId)
Sets the value of the TaxTransactionId field of the
CalculateTaxResponseobject. -
setTaxTransactionType(taxTransactionType)
Sets the value of the TaxTransactionType field of the
CalculateTaxResponseobject. -
Sets the value of the TaxType field of the
CalculateTaxResponseobject. -
setTransactionDate(transactionDate)
Sets the value of the TransactionDate field of the
CalculateTaxResponseobject.
Sets the value of the Addresses field using the addresses contained in an instance of the AddressesResponse class.
global void setAddresses(commercetax.AddressesResponse addresses)
-
addresses:
Type: AddressesResponse
Contains Ship To, Ship From, and Sold To addresses.
Type: void
Sets the value of the AmountDetails field using an instance of AmountDetailsResponse.
global void setAmountDetails(commercetax.AmountDetailsResponse amountDetails)
-
amountDetails:
Type: AmountDetailsResponse
The tax amount details for a line item on which tax was calculated.
Type: void
Sets the value of the CurrencyIsoCode field of the CalculateTaxResponse object.
global void setCurrencyIsoCode(String currencyIsoCode)
-
currencyIsoCode:
Type: String
Three-letter ISO 4217 currency code associated with a tax object.
Type: void
Sets the value of the Description field of the CalculateTaxResponse object.
global void setDescription(String dscptn)
-
dscptn:
Type: String
Optional description for providing more information about the calculate tax response.
Type: void
Sets the value of the DocumentCode field of the CalculateTaxResponse object.
global void setDocumentCode(String documentCode)
-
documentCode:
Type: String
Code
for a tax document that’s created by the tax engine for the calculation process.
Type: void
Sets the value of the EffectiveDate field of the CalculateTaxResponse object.
global void setEffectiveDate(Datetime effectiveDate)
-
effectiveDate:
Type: Datetime
The date a tax calculation action takes effect. This parameter is optional and is provided only for recordkeeping purpose. Additionally, this parameter is used to determine the tax rates or rules and overrides the transaction date. For example, if the tax calculation request is placed on January 3 and the transaction date is January 1, you can set the effective date as January 1.
Type: void
Sets the value of the LineItems field of the CalculateTaxResponse object.
global void setLineItems(List<commercetax.LineItemResponse> lineItems)
-
lineItems:
Type: List<LineItemResponse>
Response object that the tax adapter populates from the response of the external tax engine.
Type: void
Sets the value of the ReferenceDocumentCode field of the CalculateTaxResponse object.
global void setReferenceDocumentCode(String referenceDocumentCode)
-
referenceDocumentCode:
Type: String
Code
for a reference document used in the tax calculation process.
Type: void
Sets the value of the ReferenceEntityId field of the CalculateTaxResponse object.
global void setReferenceEntityId(String referenceEntityId)
-
referenceEntityId:
Type: String
ID of an entity related to the line items submitted for tax calculation. For example, if order items were sent for tax calculation, you could use the ID of their parent order.
Type: void
Sets the value of the Status field of the CalculateTaxResponse object.
global void setStatus(commercetax.TaxTransactionStatus status)
-
status:
Type: TaxTransactionStatus
Indicates whether a tax transaction has been committed.
Type: void
Sets the value of the StatusDescription field of the CalculateTaxResponse object.
global void setStatusDescription(String statusDescription)
-
statusDescription:
Type: String
Optional value for providing more information about a tax transaction’s status.
Type: void
Sets the value of the TaxTransactionId field of the CalculateTaxResponse object.
public void setTaxTransactionId(String taxTrxnId)
-
taxTrxnId:
Type: String
The ID of the Salesforce tax transaction entity that stores information about the tax calculation transaction.
Type: void
Sets the value of the TaxTransactionType field of the CalculateTaxResponse object.
global void setTaxTransactionType(commercetax.TaxTransactionType taxTransactionType)
-
taxTransactionType:
Type: TaxTransactionType
Whether the tax transaction was for a credit, debit, or voided transaction.
Type: void
Sets the value of the TaxType field of the CalculateTaxResponse object.
global void setTaxType(commercetax.CalculateTaxType taxType)
-
taxType:
Type: CalculateTaxType
Indicates whether a tax calculation request is for estimated or actual tax.
Type: void
Sets the value of the TransactionDate field of the CalculateTaxResponse object.
global void setTransactionDate(Datetime transactionDate)
-
transactionDate:
Type: Datetime
The date that the tax transaction occurred.
Type: void