public final class CartDiscountDraftDsl extends Base
@Deprecated public CartDiscountDraftDsl withIsRequiresDiscountCode(Boolean requiresDiscountCode)
withRequiresDiscountCode(Boolean)
insteadrequiresDiscountCode
- the requiresDiscountCode valueisRequiresDiscountCode()
()} field set to the given value@Nullable public Boolean isActive()
isActive
in interface CartDiscountDraft
public String getCartPredicate()
getCartPredicate
in interface CartDiscountDraft
@Nullable public CustomFieldsDraft getCustom()
CartDiscountDraft
CustomFields
to a CartDiscount
getCustom
in interface CartDiscountDraft
getCustom
in interface CustomDraft
CustomFields
defined at this CartDiscountDraft
@Nullable public LocalizedString getDescription()
getDescription
in interface CartDiscountDraft
@Nullable public String getKey()
getKey
in interface CartDiscountDraft
getKey
in interface WithKey
public LocalizedString getName()
getName
in interface CartDiscountDraft
public Boolean isRequiresDiscountCode()
isRequiresDiscountCode
in interface CartDiscountDraft
public String getSortOrder()
getSortOrder
in interface CartDiscountDraft
@Nullable public StackingMode getStackingMode()
CartDiscountDraft
StackingMode.STACKING
.getStackingMode
in interface CartDiscountDraft
@Nullable public CartDiscountTarget getTarget()
getTarget
in interface CartDiscountDraft
@Nullable public ZonedDateTime getValidFrom()
getValidFrom
in interface CartDiscountDraft
@Nullable public ZonedDateTime getValidUntil()
getValidUntil
in interface CartDiscountDraft
public CartDiscountValue getValue()
getValue
in interface CartDiscountDraft
public CartDiscountDraftBuilder newBuilder()
public T withCartPredicate(String cartPredicate)
public T withCustom(@Nullable CustomFieldsDraft custom)
public T withDescription(@Nullable LocalizedString description)
public T withName(LocalizedString name)
public T withRequiresDiscountCode(Boolean requiresDiscountCode)
public T withSortOrder(String sortOrder)
public T withStackingMode(@Nullable StackingMode stackingMode)
public T withTarget(@Nullable CartDiscountTarget target)
public T withValidFrom(@Nullable ZonedDateTime validFrom)
public T withValidUntil(@Nullable ZonedDateTime validUntil)
public T withValue(CartDiscountValue value)
public static CartDiscountDraftDsl of(LocalizedString name, String cartPredicate, CartDiscountValue value, @Nullable CartDiscountTarget target, String sortOrder, boolean requiresDiscountCode)
name
- initial value for the CartDiscountDraft.getName()
propertycartPredicate
- initial value for the CartDiscountDraft.getCartPredicate()
propertyvalue
- initial value for the CartDiscountDraft.getValue()
propertytarget
- initial value for the CartDiscountDraft.getTarget()
propertysortOrder
- initial value for the CartDiscountDraft.getSortOrder()
propertyrequiresDiscountCode
- initial value for the CartDiscountDraft.isRequiresDiscountCode()
propertypublic static CartDiscountDraftDsl of(CartDiscountDraft template)
template
- the template