Skip to main content
Skip to main content

addLineItemTaxLines - Cart Module Reference

This documentation provides a reference to the addLineItemTaxLines method. This belongs to the Cart Module.

addLineItemTaxLines(taxLines): Promise<LineItemTaxLineDTO[]>

This method creates and adds line item tax lines.

Example

const lineItemTaxLines =
await cartModuleService.addLineItemTaxLines([
{
code: "1000",
rate: 10,
},
{
code: "1234",
rate: 20,
},
])

Parameters

taxLinesCreateLineItemTaxLineDTO[]Required
The line item tax lines to be created.

Returns

PromisePromise<LineItemTaxLineDTO[]>Required
The added line item tax lines.

addLineItemTaxLines(taxLine): Promise<LineItemTaxLineDTO>

This method creates and adds a line item tax line.

Example

const lineItemTaxLines =
await cartModuleService.addLineItemTaxLines({
code: "1000",
rate: 10,
})

Parameters

The line item tax line to be created.

Returns

PromisePromise<LineItemTaxLineDTO>Required
The added line item tax line.

addLineItemTaxLines(cartId, taxLines, sharedContext?): Promise<LineItemTaxLineDTO[]>

This method creates and adds one or more line item tax lines to a cart.

Example

const lineItemTaxLines =
await cartModuleService.addLineItemTaxLines("cart_123", {
code: "1000",
rate: 10,
})

Parameters

cartIdstringRequired
The cart's ID.
The line item tax lines to add. You can specify one or more items.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<LineItemTaxLineDTO[]>Required
The added line item tax lines.
Was this section helpful?