Files
medusa-store/www/apps/docs/content/references/js-client/classes/LineItemsResource.md
github-actions[bot] daea35fe73 chore(docs): Generated JS Client Reference (#5334)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2023-10-10 17:47:07 +00:00

2.8 KiB

displayed_sidebar
displayed_sidebar
jsClientSidebar

Class: LineItemsResource

Hierarchy

  • default

    LineItemsResource

Methods

create

create(cart_id, payload, customHeaders?): ResponsePromise<StoreCartsRes>

Creates a line-item for a cart

Parameters

Name Type Description
cart_id string id of cart
payload StorePostCartsCartLineItemsReq details needed to create a line-item
customHeaders Record<string, any>

Returns

ResponsePromise<StoreCartsRes>

Defined in

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


delete

delete(cart_id, line_id, customHeaders?): ResponsePromise<StoreCartsRes>

Remove a line-item from a cart

Parameters

Name Type Description
cart_id string id of cart
line_id string id of item to remove
customHeaders Record<string, any>

Returns

ResponsePromise<StoreCartsRes>

Defined in

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


update

update(cart_id, line_id, payload, customHeaders?): ResponsePromise<StoreCartsRes>

Updates a line-item. Only quantity updates are allowed

Parameters

Name Type Description
cart_id string id of cart
line_id string id of item to update
payload StorePostCartsCartLineItemsItemReq details needed to update a line-item
customHeaders Record<string, any>

Returns

ResponsePromise<StoreCartsRes>

Defined in

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