public final class CartDiscountDraftBuilder extends Base
Modifier and Type | Method and Description |
---|---|
CartDiscountDraftBuilder |
active(boolean active) |
T |
active(Boolean active)
Sets the
active property of this builder. |
CartDiscountDraftDsl |
build()
Creates a new instance of
CartDiscountDraftDsl with the values of this builder. |
CartDiscountDraftBuilder |
cartPredicate(CartPredicate cartPredicate) |
T |
cartPredicate(String cartPredicate)
Sets the
cartPredicate property of this builder. |
T |
custom(CustomFieldsDraft custom)
Sets the
custom property of this builder. |
T |
description(LocalizedString description)
Sets the
description property of this builder. |
String |
getCartPredicate() |
CustomFieldsDraft |
getCustom() |
LocalizedString |
getDescription() |
String |
getKey() |
LocalizedString |
getName() |
String |
getSortOrder() |
StackingMode |
getStackingMode() |
CartDiscountTarget |
getTarget() |
ZonedDateTime |
getValidFrom() |
ZonedDateTime |
getValidUntil() |
CartDiscountValue |
getValue() |
Boolean |
isActive() |
CartDiscountDraftBuilder |
isActive(boolean active) |
T |
isActive(Boolean active)
Sets the
active property of this builder. |
Boolean |
isRequiresDiscountCode() |
T |
isRequiresDiscountCode(Boolean requiresDiscountCode)
Sets the
requiresDiscountCode property of this builder. |
T |
key(String key)
Sets the
key property of this builder. |
T |
name(LocalizedString name)
Sets the
name property of this builder. |
static CartDiscountDraftBuilder |
of(CartDiscountDraft template)
Creates a new object initialized with the fields of the template parameter.
|
static CartDiscountDraftBuilder |
of(LocalizedString name,
CartPredicate cartPredicate,
CartDiscountValue value,
CartDiscountTarget target,
String sortOrder,
boolean requiresDiscountCode) |
static CartDiscountDraftBuilder |
of(LocalizedString name,
String cartPredicate,
CartDiscountValue value,
CartDiscountTarget target,
String sortOrder,
boolean requiresDiscountCode)
Creates a new object initialized with the given values.
|
static CartDiscountDraftBuilder |
of(String cartPredicate,
LocalizedString name,
boolean requiresDiscountCode,
String sortOrder,
CartDiscountTarget target,
CartDiscountValue value) |
CartDiscountDraftBuilder |
requiresDiscountCode(boolean requiresDiscountCode) |
T |
requiresDiscountCode(Boolean requiresDiscountCode)
Sets the
requiresDiscountCode property of this builder. |
T |
sortOrder(String sortOrder)
Sets the
sortOrder property of this builder. |
T |
stackingMode(StackingMode stackingMode)
Sets the
stackingMode property of this builder. |
T |
target(CartDiscountTarget target)
Sets the
target property of this builder. |
T |
validFrom(ZonedDateTime validFrom)
Sets the
validFrom property of this builder. |
T |
validUntil(ZonedDateTime validUntil)
Sets the
validUntil property of this builder. |
T |
value(CartDiscountValue value)
Sets the
value property of this builder. |
public static CartDiscountDraftBuilder of(String cartPredicate, LocalizedString name, boolean requiresDiscountCode, String sortOrder, CartDiscountTarget target, CartDiscountValue value)
public static CartDiscountDraftBuilder of(LocalizedString name, CartPredicate cartPredicate, CartDiscountValue value, CartDiscountTarget target, String sortOrder, boolean requiresDiscountCode)
public CartDiscountDraftBuilder cartPredicate(CartPredicate cartPredicate)
public CartDiscountDraftBuilder active(boolean active)
public CartDiscountDraftBuilder isActive(boolean active)
public CartDiscountDraftBuilder requiresDiscountCode(boolean requiresDiscountCode)
public T active(@Nullable Boolean active)
active
property of this builder.active
- the value for CartDiscountDraft.isActive()
public T isActive(@Nullable Boolean active)
active
property of this builder.active
- the value for CartDiscountDraft.isActive()
public T cartPredicate(String cartPredicate)
cartPredicate
property of this builder.cartPredicate
- the value for CartDiscountDraft.getCartPredicate()
public T custom(@Nullable CustomFieldsDraft custom)
custom
property of this builder.custom
- the value for CartDiscountDraft.getCustom()
public T description(@Nullable LocalizedString description)
description
property of this builder.description
- the value for CartDiscountDraft.getDescription()
public T key(@Nullable String key)
key
property of this builder.key
- the value for CartDiscountDraft.getKey()
public T name(LocalizedString name)
name
property of this builder.name
- the value for CartDiscountDraft.getName()
public T requiresDiscountCode(Boolean requiresDiscountCode)
requiresDiscountCode
property of this builder.requiresDiscountCode
- the value for CartDiscountDraft.isRequiresDiscountCode()
public T isRequiresDiscountCode(Boolean requiresDiscountCode)
requiresDiscountCode
property of this builder.requiresDiscountCode
- the value for CartDiscountDraft.isRequiresDiscountCode()
public T sortOrder(String sortOrder)
sortOrder
property of this builder.sortOrder
- the value for CartDiscountDraft.getSortOrder()
public T stackingMode(@Nullable StackingMode stackingMode)
stackingMode
property of this builder.stackingMode
- the value for CartDiscountDraft.getStackingMode()
public T target(@Nullable CartDiscountTarget target)
target
property of this builder.target
- the value for CartDiscountDraft.getTarget()
public T validFrom(@Nullable ZonedDateTime validFrom)
validFrom
property of this builder.validFrom
- the value for CartDiscountDraft.getValidFrom()
public T validUntil(@Nullable ZonedDateTime validUntil)
validUntil
property of this builder.validUntil
- the value for CartDiscountDraft.getValidUntil()
public T value(CartDiscountValue value)
value
property of this builder.value
- the value for CartDiscountDraft.getValue()
public String getCartPredicate()
@Nullable public CustomFieldsDraft getCustom()
@Nullable public LocalizedString getDescription()
public LocalizedString getName()
public Boolean isRequiresDiscountCode()
public String getSortOrder()
@Nullable public StackingMode getStackingMode()
@Nullable public CartDiscountTarget getTarget()
@Nullable public ZonedDateTime getValidFrom()
@Nullable public ZonedDateTime getValidUntil()
public CartDiscountValue getValue()
public CartDiscountDraftDsl build()
CartDiscountDraftDsl
with the values of this builder.build
in interface Builder<CartDiscountDraftDsl>
public static CartDiscountDraftBuilder 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 CartDiscountDraftBuilder of(CartDiscountDraft template)
template
- the template