TaxLineItemRequest Class

Contains line item details of a tax request.

CommerceTax

Learn more about the constructors available with the TaxLineItemRequest class.

The TaxLineItemRequest class includes these constructors.

Initializes the request for the tax line item. This constructor is intended for test usage and throws an exception if used outside of the Apex test context.

global TaxLineItemRequest(commercetax.LineTaxAddressesRequest addresses, Double amount, String description, String productCode, Double quantity, String lineNumber, String taxCode, Datetime effectiveDate)

  • addresses:

    Type: LineTaxAddressesRequest

    Information about

    the addresses applied to each line item in a tax calculation request.

  • amount:

    Type: Double

    Total amount (in

    a given currency) represented by a line item sent for tax calculation.

  • description:

    Type: String

    User-defined description

    for a tax line item.

  • productCode:

    Type: String

    Catalog code

    for the product represented by the tax line item.

  • quantity:

    Type: Double

    Number of units of a given product that the tax line item represents.

  • lineNumber:

    Type: String

    Unique number used to identify a tax line item.

  • taxCode:

    Type: String

    Code used to identify how tax is calculated

    for a tax line item.

  • effectiveDate:

    Type: Datetime

    This is a user-defined date used for reporting only. For negative invoice lines, this parameter represents the invoice date from the original invoice. In other cases, it represents the date when the tax transaction takes effect on the line item. The previous tax transaction type is always Debit for negative invoice lines.

Learn more about the available properties with the TaxLineItemRequest class.

The TaxLineItemRequest class includes these properties.

  • addresses

    Contains the list of addresses of a line item.

  • amount

    Total amount (in a given currency) represented by a line item sent for tax calculation.

  • customTaxAttributes

    Customised tax contract to include additional attributes at the line item level.

  • description

    User-defined description for a tax line item.

  • effectiveDate

    The date that a tax transaction takes effect on a line item. This is a user-defined date used for reporting only.

  • lineNumber

    Unique number used to identify a tax line item.

  • productCode

    Catalog code for the product represented by the tax line item.

  • productSKU

    Unique identifier of a product that can be used to identify products that are exempted from tax.

  • quantity

    Number of units of a given product that the tax line item represents.

  • referenceDocumentCode

    Identifier that combines the original invoice ID, previous tax transaction type, and tax engine ID, used in tax calculations for negative invoice lines.

  • taxCode

    Code used to identify how tax is calculated for a tax line item.

Contains the list of addresses of a line item.

public commercetax.LineTaxAddressesRequest addresses {get; set;}

Type: commercetax.LineTaxAddressesRequest

Total amount (in a given currency) represented by a line item sent for tax calculation.

global Double amount {get; set;}

Type: Double

Customised tax contract to include additional attributes at the line item level.

global commercetax.TaxLineItemRequest customTaxAttributes {get; set;}

Type: Map<String, Object>

User-defined description for a tax line item.

global String description {get; set;}

Type: String

The date that a tax transaction takes effect on a line item. This is a user-defined date used for reporting only.

global Datetime effectiveDate {get; set;}

Type: Datetime

Unique number used to identify a tax line item.

global String lineNumber {get; set;}

Type: String

Catalog code for the product represented by the tax line item.

global String productCode {get; set;}

Type: String

Unique identifier of a product that can be used to identify products that are exempted from tax.

global String productSKU {get; set;}

Type: String

Number of units of a given product that the tax line item represents.

global Double quantity {get; set;}

Type: Double

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. The previous tax transaction type is always Debit for negative invoice lines.

global String referenceDocumentCode {get; set;}

Type: String

Code used to identify how tax is calculated for a tax line item.

global String taxCode {get; set;}

Type: String

Learn more about the available methods with the TaxLineItemRequest class.

The TaxLineItemRequest class includes these methods.

  • equals(obj)

    Maintains the integrity of lists of type TaxLineItemRequest by determining the equality of external objects in a list. This method is dynamic and is based on the equals() method in Java.

  • hashCode()

    Maintains the integrity of lists of type TaxLineItemRequest by determining the uniqueness of the external object records in a list.

  • toString()

    Converts a value to a string.

Maintains the integrity of lists of type TaxLineItemRequest by determining the equality of external objects in a list. This method is dynamic and is based on the equals() method in Java.

global Boolean equals(Object obj)

  • obj:

    Type:

    Object External object whose key is to be validated.

Type: Boolean

Maintains the integrity of lists of type TaxLineItemRequest by determining the uniqueness of the external object records in a list.

global Integer hashCode()

Type: Integer

Converts a value to a string.

global String toString()

Type: String