Methods
# async getCartByUserId(userId) → {Object}
Get a cart by user ID.
Parameters:
| Name | Type | Description |
|---|---|---|
userId |
Number
|
The user ID. |
- If an error occurs.
Error
- The cart object.
Object
# async getCartWithItems(cartId) → {Object}
Get a cart by ID and fetch related data.
Parameters:
| Name | Type | Description |
|---|---|---|
cartId |
Number
|
The cart ID. |
- If an error occurs.
Error
- The cart object.
Object