- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- User Guide
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- User Guide
setLineItemAdjustments - Cart Module Reference
This documentation provides a reference to the setLineItemAdjustments
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.
This method set the line item adjustments of line items in a cart. The existing line item adjustments, except those included in the specified list, of an item are removed and replaced with the specified adjustments.
Example#
Parameters#
cartId
stringThe cart's ID.
The line item adjustments to add to the line items.
The line item is specified by the item_id
field. If the id
field is specified, the adjustment
is kept in the line item's adjustment and its attributes can be updated.
item_id
field. If the id
field is specified, the adjustment
is kept in the line item's adjustment and its attributes can be updated.Returns#
Promise
Promise<LineItemAdjustmentDTO[]>The added line item adjustments.
Promise
Promise<LineItemAdjustmentDTO[]>Was this page helpful?