Skip to main content
Skip to main content

setShippingMethodTaxLines - Cart Module Reference

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

This method sets the shipping item tax lines in a cart. The shipping line item tax lines, except those included in the specified list, are removed and replaced with the specified tax lines.

Example

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

Parameters

cartIdstringRequired
The cart's ID.
The shipping item tax lines to add. If the id field is specified, the tax line is kept and its attributes can be updated.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ShippingMethodTaxLineDTO[]>Required
The added shipping method tax lines.
Was this section helpful?