Interface DirectDiscountDraft

All Superinterfaces:
io.vrap.rmf.base.client.Draft<DirectDiscountDraft>
All Known Implementing Classes:
DirectDiscountDraftImpl

public interface DirectDiscountDraft extends io.vrap.rmf.base.client.Draft<DirectDiscountDraft>

Represents a CartDiscount that can only be associated with a single Cart or Order.

Direct Discounts are always active and valid, and have the default Stacking StackingMode. They apply in the order in which they are listed in the directDiscounts array of Carts or Orders, and do not have a sorting order like Cart Discounts.

If a Direct Discount is present, any matching Cart Discounts in the Project are ignored. Additionally, a Cart or Order supports either Discount Codes or Direct Discounts at the same time.


Example to create an instance using the builder pattern

     DirectDiscountDraft directDiscountDraft = DirectDiscountDraft.builder()
             .value(valueBuilder -> valueBuilder)
             .build()