Skip to main content

Class: LineItemsResource

Hierarchy

  • Copy to Clipboard

    Copy to Clipboard

Methods

create

create(Copy to Clipboard, Copy to Clipboard, Copy to Clipboard): Copy to Clipboard<Copy to Clipboard>

Creates a line-item for a cart

Parameters

NameTypeDescription
Copy to ClipboardCopy to Clipboardid of cart
Copy to ClipboardCopy to Clipboarddetails needed to create a line-item
Copy to ClipboardCopy to Clipboard<Copy to Clipboard, Copy to Clipboard>

Returns

Copy to Clipboard<Copy to Clipboard>

Defined in

medusa-js/src/resources/line-items.ts:17


delete

delete(Copy to Clipboard, Copy to Clipboard, Copy to Clipboard): Copy to Clipboard<Copy to Clipboard>

Remove a line-item from a cart

Parameters

NameTypeDescription
Copy to ClipboardCopy to Clipboardid of cart
Copy to ClipboardCopy to Clipboardid of item to remove
Copy to ClipboardCopy to Clipboard<Copy to Clipboard, Copy to Clipboard>

Returns

Copy to Clipboard<Copy to Clipboard>

Defined in

medusa-js/src/resources/line-items.ts:50


update

update(Copy to Clipboard, Copy to Clipboard, Copy to Clipboard, Copy to Clipboard): Copy to Clipboard<Copy to Clipboard>

Updates a line-item. Only quantity updates are allowed

Parameters

NameTypeDescription
Copy to ClipboardCopy to Clipboardid of cart
Copy to ClipboardCopy to Clipboardid of item to update
Copy to ClipboardCopy to Clipboarddetails needed to update a line-item
Copy to ClipboardCopy to Clipboard<Copy to Clipboard, Copy to Clipboard>

Returns

Copy to Clipboard<Copy to Clipboard>

Defined in

medusa-js/src/resources/line-items.ts:34