- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- User Guide
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- User Guide
updateLineItems - Cart Module Reference
This documentation provides a reference to the updateLineItems
method. This belongs to the Cart Module.
Note: You should only use this methods when implementing complex customizations. For common cases, check out available workflows instead.
updateLineItems(data): Promise<CartLineItemDTO[]>#
This method updates existing line items.
Example#
Parameters#
A list of objects, each holding the filters that specify which items
to update, and the attributes to update in the items.
Returns#
Promise
Promise<CartLineItemDTO[]>The updated line items.
Promise
Promise<CartLineItemDTO[]>updateLineItems(selector, data, sharedContext?): Promise<CartLineItemDTO[]>#
This method updates existing line items matching the specified filters.
Example#
Parameters#
selector
Partial<CartLineItemDTO>The filters that specify which line items to update.
selector
Partial<CartLineItemDTO>data
Partial<UpdateLineItemDTO>The attributes to update in the line items.
data
Partial<UpdateLineItemDTO>Returns#
Promise
Promise<CartLineItemDTO[]>The updated line items.
Promise
Promise<CartLineItemDTO[]>updateLineItems(lineId, data, sharedContext?): Promise<CartLineItemDTO>#
This method updates an existing line item.
Example#
Parameters#
lineId
stringThe line item's ID.
data
Partial<UpdateLineItemDTO>The attributes to update in the line item.
data
Partial<UpdateLineItemDTO>Returns#
Promise
Promise<CartLineItemDTO>The updated line item.
Promise
Promise<CartLineItemDTO>Was this page helpful?