TaxTransactionRequest Class
Namespace
Usage
Specify the CommerceTax namespace when creating an instance of this class. The constructor of this class takes no arguments. For example, let's say you create an instance of CalculateTaxRequest class, which extends the TaxTransactionRequest class.
TaxTransactionRequest Constructors
The TaxTransactionRequest class includes these constructors.
TaxTransactionRequest(addresses, currencyIsoCode, customerDetails, description, documentCode, referenceDocumentCode, transactionDate, effectiveDate, lineItems, referenceEntityId, sellerDetails, customTaxAttributes)
Signature
global TaxTransactionRequest(commercetax.HeaderTaxAddressesRequest addresses, String currencyIsoCode, commercetax.TaxCustomerDetailsRequest customerDetails, String description, String documentCode, String referenceDocumentCode, Datetime transactionDate, Datetime effectiveDate, List<commercetax.TaxLineItemRequest> lineItems, String referenceEntityId, commercetax.TaxSellerDetailsRequest sellerDetails,Map<String,Object> customTaxAttributes)
Parameters
-
addresses:
Type: HeaderTaxAddressesRequest
Tax addresses, such as Ship To and Bill From.
-
currencyIsoCode:
Type: String
Three-letter ISO 4217 currency code associated with the TaxTransactionRequest.
-
customerDetails:
Type: TaxCustomerDetailsRequest
Customer information used in tax calculation.
-
description:
Type: String
Optional user-defined description for providing more information about the tax transaction request.
-
documentCode:
Type: String
Code
for documents that are used to provide more information in the tax calculation process.
-
referenceDocumentCode:
Type: String
Identifier that combines
the original invoice ID, previous tax transaction type, and tax engine ID, used in tax calculations for negative invoice lines. For example, a referenceDocumentCode parameter value 3ttxx00000004Bh_Debit-4wAxx0000000001EAA indicates 3ttxx00000004Bh is the original invoice ID and 4wAxx0000000001EAA is the tax engine ID.
-
transactionDate:
Type: Datetime
The date that the tax transaction occurred.
-
effectiveDate:
Type: Datetime
The date that the tax transaction takes effect. User-defined and used only for reporting purposes.
-
lineItems:
Type: List<TaxLineItemRequest>
A list of line items on which tax is calculated.
-
referenceEntityId:
Type: String
ID of an object related to the line items sent for tax calculation.
-
sellerDetails:
Type: TaxSellerDetailsRequest
Contains tax code information used in a tax calculation request.
-
customTaxAttributes:
Type: Map<String, Object> Customised tax contract to include additional attributes at the header level.
TaxTransactionRequest Properties
The TaxTransactionRequest class includes these properties.
addresses
Signature
global commercetax.HeaderTaxAddressesRequest addresses {get; set;}
Property Value
customerDetails
Signature
global CommerceTax.TaxCustomerDetailsRequest customerDetails {get; set;}
Property Value
customTaxAttributes
Signature
global commercetax.TaxTransactionRequest customTaxAttributes {get; set;}
Property Value
Type: Map<String, Object>
lineItems
Signature
global List<CommerceTax.TaxLineItemRequest> lineItems {get; set;}
Property Value
Type: List<TaxLineItemRequest>
referenceDocumentCode
For example, a referenceDocumentCode parameter value 3ttxx00000004Bh_Debit-4wAxx0000000001EAA indicates 3ttxx00000004Bh is the original invoice ID and 4wAxx0000000001EAA is the tax engine ID.
Signature
global String referenceDocumentCode {get; set;}
Property Value
Type: String
sellerDetails
Signature
global commercetax.TaxSellerDetailsRequest sellerDetails {get; set;}
Property Value
Type: TaxSellerDetailsRequest
TaxTransactionRequest Methods
The following are methods for TaxTransactionRequest.
equals(obj)
Signature
global Boolean equals(Object obj)
Parameters
-
obj:
Type: Object
Return Value
Type: Boolean
hashCode()
Signature
global Integer hashCode()
Return Value
Type: Integer