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

    Interface CartSetDirectDiscountsAction

    Adds a DirectDiscount, but only if no DiscountCode has been added to the Cart. Either a Discount Code or a Direct Discount can exist on a Cart at the same time.

    interface CartSetDirectDiscountsAction {
        action: "setDirectDiscounts";
        discounts: DirectDiscountDraft[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    action: "setDirectDiscounts"
    discounts: DirectDiscountDraft[]
    • If set, all existing Direct Discounts are replaced. The discounts apply in the order they are added to the list.
      • If empty, all existing Direct Discounts are removed and all affected prices on the Cart or Order are recalculated.