Skip to main content
Skip to main content

LineItemsResource

line-items.LineItemsResource

Methods

create

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

Creates a line-item for a cart

Parameters

cart_idstringRequired
id of cart
details needed to create a line-item
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<StoreCartsRes>

ResponsePromiseResponsePromise<StoreCartsRes>Required

delete

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

Remove a line-item from a cart

Parameters

cart_idstringRequired
id of cart
line_idstringRequired
id of item to remove
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<StoreCartsRes>

ResponsePromiseResponsePromise<StoreCartsRes>Required

update

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

Updates a line-item. Only quantity updates are allowed

Parameters

cart_idstringRequired
id of cart
line_idstringRequired
id of item to update
details needed to update a line-item
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<StoreCartsRes>

ResponsePromiseResponsePromise<StoreCartsRes>Required
Was this section helpful?