Skip to main content
Skip to main content

deleteLineItems - Cart Module Reference

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

deleteLineItems(ids, sharedContext?): Promise<void>

This method deletes line items by their IDs.

Example

await cartModuleService.deleteLineItems([
"cali_123",
"cali_321",
])

Parameters

idsstring[]Required
The IDs of the line items.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<void>Required
Resolves when the line items are deleted successfully.

deleteLineItems(id, sharedContext?): Promise<void>

This method deletes a line item by its ID.

Example

await cartModuleService.deleteLineItems("cali_123")

Parameters

idstringRequired
The ID of the line item.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<void>Required
Resolves when a line item is deleted successfully.
Was this section helpful?