Home > @vsf-enterprise/commercetools-types > Cart

# Cart type

A shopping cart holds product variants and can be ordered. Each cart either belongs to a registered customer or is an anonymous cart.

Signature:

export declare type Cart = Versioned & {
    __typename?: 'Cart';
    customerId?: Maybe<Scalars['String']>;
    customer?: Maybe<Customer>;
    customerEmail?: Maybe<Scalars['String']>;
    anonymousId?: Maybe<Scalars['String']>;
    lineItems: Array<LineItem>;
    customLineItems: Array<CustomLineItem>;
    totalPrice: Money;
    taxedPrice?: Maybe<TaxedPrice>;
    shippingAddress?: Maybe<Address>;
    billingAddress?: Maybe<Address>;
    inventoryMode: InventoryMode;
    taxMode: TaxMode;
    taxRoundingMode: RoundingMode;
    taxCalculationMode: TaxCalculationMode;
    customerGroup?: Maybe<CustomerGroup>;
    customerGroupRef?: Maybe<Reference>;
    country?: Maybe<Scalars['Country']>;
    shippingInfo?: Maybe<ShippingInfo>;
    discountCodes: Array<DiscountCodeInfo>;
    refusedGifts: Array<CartDiscount>;
    refusedGiftsRefs: Array<Reference>;
    paymentInfo?: Maybe<PaymentInfo>;
    locale?: Maybe<Scalars['Locale']>;
    shippingRateInput?: Maybe<ShippingRateInput>;
    origin: CartOrigin;
    storeRef?: Maybe<KeyReference>;
    store?: Maybe<Store>;
    itemShippingAddresses: Array<Address>;
    cartState: CartState;
    key?: Maybe<Scalars['String']>;
    custom?: Maybe<CustomFieldsType>;
    deleteDaysAfterLastModification?: Maybe<Scalars['Int']>;
    totalLineItemQuantity?: Maybe<Scalars['Long']>;
    id: Scalars['String'];
    version: Scalars['Long'];
    createdAt: Scalars['DateTime'];
    lastModifiedAt: Scalars['DateTime'];
    createdBy?: Maybe<Initiator>;
    lastModifiedBy?: Maybe<Initiator>;
};

References: Versioned, Maybe, Scalars, Customer, LineItem, CustomLineItem, Money, TaxedPrice, Address, InventoryMode, TaxMode, RoundingMode, TaxCalculationMode, CustomerGroup, Reference, ShippingInfo, DiscountCodeInfo, CartDiscount, PaymentInfo, ShippingRateInput, CartOrigin, KeyReference, Store, CartState, CustomFieldsType, Initiator