You are reading the documentation for SDK v2, which is no longer the latest version. Switch to current
updateCart
Updates user cart using provided actions. By default, it uses the updateCartDefaultQuery GraphQL query
Signature
export declare function updateCart(
context: SetupContext,
params: UpdateCartParams,
customQuery?: CustomQuery,
responseOptions?: ResponseOptions
): Promise<UpdateCartResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | SetupContext | Automatically injected context. Refer to SetupContext |
params | Required | UpdateCartParams | Cart and update actions information |
customQuery | Optional | CustomQuery | Custom queries included in the request |
responseOptions | Optional | ResponseOptions |
Returns
User cart information