@gradientedge/commercetools-utils
    Preparing search index...

    Interface MyCartDraft

    The customerId is determined by a password flow token and automatically set on the resulting Cart. The anonymousId is determined by a token for an anonymous session and automatically set on the resulting Cart.

    interface MyCartDraft {
        billingAddress?: _BaseAddress;
        businessUnit?: BusinessUnitResourceIdentifier;
        country?: string;
        currency: string;
        custom?: CustomFieldsDraft;
        customerEmail?: string;
        deleteDaysAfterLastModification?: number;
        discountCodes?: string[];
        inventoryMode?: InventoryMode;
        itemShippingAddresses?: BaseAddress[];
        lineItems?: MyLineItemDraft[];
        locale?: string;
        shippingAddress?: _BaseAddress;
        shippingMethod?: ShippingMethodResourceIdentifier;
        shippingMode?: ShippingMode;
        store?: StoreResourceIdentifier;
        taxMode?: TaxMode;
    }
    Index

    Properties

    billingAddress?: _BaseAddress

    Billing address associated with the Cart.

    ResourceIdentifier to the Business Unit the Cart should belong to. The Customer must be an Associate of the Business Unit. Only available for B2B-enabled Projects.

    country?: string

    Used for Line Item price selection. If used for Create Cart in Store, the provided country must be one of the Store's countries.

    currency: string

    Currency the Cart uses.

    Custom Fields for the Cart.

    customerEmail?: string

    Email address of the Customer the Cart belongs to.

    deleteDaysAfterLastModification?: number

    Number of days after the last modification before a Cart is deleted. If not provided, the default value for this field configured in Project settings is assigned.

    Create a [ChangeSubscription](ctp:api:type:ChangeSubscription) for Carts to receive a [ResourceDeletedDeliveryPayload](ctp:api:type:ResourceDeletedDeliveryPayload) upon deletion of the Cart.
    
    discountCodes?: string[]

    code of the existing DiscountCodes to add to the Cart.

    inventoryMode?: InventoryMode

    Determines how stock quantities are tracked for Line Items in the Cart.

    itemShippingAddresses?: BaseAddress[]

    Multiple shipping addresses of the Cart. Each address must contain a key that is unique in this Cart. The keys are used by LineItems to reference these addresses under their shippingDetails.

    Eligible Shipping Methods or applicable Tax Rates are determined by the [Cart](ctp:api:type:Cart) `shippingAddress`, and not `itemShippingAddresses`.
    
    lineItems?: MyLineItemDraft[]

    Line Items to add to the Cart.

    locale?: string

    Languages of the Cart. Can only contain languages supported by the Project.

    shippingAddress?: _BaseAddress

    Shipping address associated with the Cart. Determines eligible ShippingMethod rates and Tax Rates of Line Items.

    Shipping Method for the Cart. If the referenced ShippingMethod has a predicate that does not match the Cart, an InvalidOperation error is returned when creating a Cart.

    shippingMode?: ShippingMode
    • If set to Single, only a single Shipping Method can be added to the Cart.
      • If set to Multiple, multiple Shipping Methods can be added to the Cart.

    ResourceIdentifier to the Store the Cart should belong to. Once set, it cannot be updated.

    taxMode?: TaxMode

    Determines how Tax Rates are set. The Disabled TaxMode cannot be set.