Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "sdk-sales/src/sdk/getCart"

Index

Functions

Functions

getCart

  • getCart(): Promise<APIErrorResponse | Cart>
  • Returns Promise<APIErrorResponse | Cart>

    Promise which resolves to an object representing the current user's cart. When calling getCart, the cart property will be overwritten by the data fetched.

    On success (resolves)
    {
      "total": 0,
      "subtotal": 0,
      "tax": 0,
      "shipping": 0,
      "items": [
        {
          "sku": "string",
          "quantity": 0,
          "shortDescription": "string",
          "name": "string",
          "price": 0,
          "tax": 0,
          "subTotal": 0,
          "total": 0
        }
      ]
    }