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
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
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
Was this page helpful?