Skip to main content
Skip to main content

delete - Cart Module Reference

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

delete(cartIds, sharedContext?): Promise<void>

This method deletes carts by their IDs.

Example

await cartModuleService.delete(["cart_123", "cart_321"])

Parameters

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

Returns

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

delete(cartId, sharedContext?): Promise<void>

This method deletes a cart by its ID.

Example

await cartModuleService.delete("cart_123")

Parameters

cartIdstringRequired
The cart's ID.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

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

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

This method deletes carts by their IDs.

Example

await cartModuleService.delete(["cart_123", "cart_321"])

Parameters

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

Returns

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

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

This method deletes a cart by its ID.

Example

await cartModuleService.delete("cart_123")

Parameters

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

Returns

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