TaxDetailsResponse Class
Stores details of the tax values that an external tax engine calculates in response to a tax calculation request.
If your tax calculation request contains multiple line items, we recommend building your adapter using a list of TaxDetailsResponse instances. Each instance represents the tax details calculated for a given line item.
-
Learn more about the available methods with the
TaxDetailsResponseclass.
Learn more about the available methods with the TaxDetailsResponse class.
The TaxDetailsResponse class includes these methods.
-
setCustomTaxAttributes(customTaxAttributes)
Uses an instance of
CustomTaxAttributesResponseclass to include additional attributes in the tax response at the tax line item level. -
Sets the ExemptAmount field of the
TaxDetailsResponseclass. -
Sets the ExemptReason field of the
TaxDetailsResponseclass. -
Sets the Imposition field of the
TaxDetailsResponseclass using an instance of theImpositionResponseclass. -
Sets the Jurisdiction field of the
TaxDetailsResponseusing an instance of theJurisdictionResponseclass. -
Sets the Rate field of the
TaxDetailsResponseclass. -
Sets the Service Code field of the
TaxDetailsResponseclass. -
Sets the Tax field of the
TaxDetailsResponseclass. -
setTaxAuthorityTypeId(taxAuthorityTypeId)
Sets the TaxAuthorityTypeId field of the
TaxDetailsResponseclass. -
Sets the TaxId field of the
TaxDetailsResponseclass. -
Sets the TaxRegionId field on the
TaxDetailsResponseclass. -
setTaxRuleDetails(taxRuleDetails)
Sets the TaxRuleDetails field of the
TaxDetailsResponseclass. -
setTaxableAmount(taxableAmount)
Sets the TaxableAmount field of the
TaxDetailsResponse class.
Uses an instance of CustomTaxAttributesResponse class to include additional attributes in the tax response at the tax line item level.
global void setCustomTaxAttributes(commercetax.CustomTaxAttributesResponse customTaxAttributes)
-
customTaxAttributes:
Type: CustomTaxAttributesResponse
Additional
data or custom attributes to include in the tax response.
Type: void
Sets the ExemptAmount field of the TaxDetailsResponse class.
global void setExemptAmount(Double exemptAmount)
-
exemptAmount:
Type: Double
Amount of tax on a line item that is exempt from tax calculation.
Type: void
Sets the ExemptReason field of the TaxDetailsResponse class.
global void setExemptReason(String reason)
-
reason:
Type: String
Optional user-defined information on why a tax exemption applies to a line item.
Type: void
Sets the Imposition field of the TaxDetailsResponse class using an instance of the ImpositionResponse class.
global void setImposition(commercetax.ImpositionResponse imposition)
-
imposition:
Type: ImpositionResponse
Contains information about why tax was imposed on a line item.
Type: void
Sets the Jurisdiction field of the TaxDetailsResponse using an instance of the JurisdictionResponse class.
global void setJurisdiction(commercetax.JurisdictionResponse jurisdiction)
-
jurisdiction:
Type: JurisdictionResponse
Contains address information about the tax jurisdiction used in the tax calculation process.
Type: void
Sets the Rate field of the TaxDetailsResponse class.
global void setRate(Double rate)
-
rate:
Type: Double
Tax used during tax calculation.
This value is often a decimal amount, such as 0.1 or 0.06, based on the applied tax percentage.
Type: void
Sets the Service Code field of the TaxDetailsResponse class.
global void setSerCode(String serCode)
-
serCode:
Type: String
Service code used in tax calculation.
Type: void
Sets the Tax field of the TaxDetailsResponse class.
global void setTax(Double tax)
-
tax:
Type: Double
Amount of tax
for a line item.
Type: void
Sets the TaxAuthorityTypeId field of the TaxDetailsResponse class.
global void setTaxAuthorityTypeId(String taxAuthorityTypeId)
-
taxAuthorityTypeId:
Type: String
ID of the organization that oversees tax collection.
Type: void
Sets the TaxId field of the TaxDetailsResponse class.
global void setTaxId(String taxId)
-
taxId:
Type: String
ID value used to determine
the tax for an individual or business.
Type: void
Sets the TaxRegionId field on the TaxDetailsResponse class.
global void setTaxRegionId(String taxRegionId)
-
taxRegionId:
Type: String
ID of the tax region used in tax calculation. A tax region represents a geographical area where tax is applied.
Type: void
Sets the TaxRuleDetails field of the TaxDetailsResponse class.
global void setTaxRuleDetails(commercetax.RuleDetailsResponse taxRuleDetails)
-
taxRuleDetails:
Type: RuleDetailsResponse
Information about
the Salesforce tax rules used during tax calculation.
Type: void
Sets the TaxableAmount field of the TaxDetailsResponse class.
global void setTaxableAmount(Double taxableAmount)
-
taxableAmount:
Type: Double
Amount that c
an be taxed on a line item.
Type: void