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

    Interface CartDiscountDraft

    interface CartDiscountDraft {
        cartPredicate: string;
        custom?: CustomFieldsDraft;
        description?: LocalizedString;
        discountGroup?: DiscountGroupResourceIdentifier;
        isActive?: boolean;
        key?: string;
        name: LocalizedString;
        requiresDiscountCode?: boolean;
        sortOrder?: string;
        stackingMode?: StackingMode;
        stores?: StoreResourceIdentifier[];
        target?: CartDiscountTarget;
        validFrom?: string;
        validUntil?: string;
        value: CartDiscountValueDraft;
    }
    Index

    Properties

    cartPredicate: string

    Custom Fields of the CartDiscount.

    description?: LocalizedString

    Description of the CartDiscount.

    Reference to a DiscountGroup that the CartDiscount must belong to.

    isActive?: boolean

    Only active Discounts can be applied to the Cart. If the limit for active Cart Discounts is reached, a MaxCartDiscountsReached error is returned.

    key?: string

    User-defined unique identifier for the CartDiscount.

    Name of the CartDiscount.

    requiresDiscountCode?: boolean

    States whether the Discount can only be used in a connection with a DiscountCode.

    sortOrder?: string

    Value between 0 and 1 that determines the order in which the CartDiscounts will be applied; a CartDiscount with a higher value will be prioritized.

    It must be unique among all CartDiscounts and DiscountGroups.
    
    If the CartDiscount is part of a DiscountGroup, it will use the sort order of the DiscountGroup.
    
    stackingMode?: StackingMode

    Specifies whether the application of this discount causes the following discounts to be ignored.

    • If defined, the Cart Discount applies on Carts having a Store matching any Store defined for this field.

      • If not defined, the Cart Discount applies on all Carts, irrespective of a Store.

      If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.

      If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.

    Segment of the Cart that will be discounted.

    Must not be set if the `value` is `giftLineItem`.
    
    validFrom?: string

    Date and time (UTC) from which the Discount is effective.

    validUntil?: string

    Date and time (UTC) until which the Discount is effective.

    Effect of the CartDiscount on the target.