public final class DiscountCodeDraftBuilder extends Base
Modifier and Type | Method and Description |
---|---|
T |
active(Boolean active)
Sets the
active property of this builder. |
DiscountCodeDraftDsl |
build()
Creates a new instance of
DiscountCodeDraftDsl with the values of this builder. |
T |
cartDiscounts(List<Reference<CartDiscount>> cartDiscounts)
Sets the
cartDiscounts property of this builder. |
DiscountCodeDraftBuilder |
cartPredicate(CartPredicate cartPredicate) |
T |
cartPredicate(String cartPredicate)
Sets the
cartPredicate property of this builder. |
T |
code(String code)
Sets the
code 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. |
List<Reference<CartDiscount>> |
getCartDiscounts() |
String |
getCartPredicate() |
String |
getCode() |
CustomFieldsDraft |
getCustom() |
LocalizedString |
getDescription() |
List<String> |
getGroups() |
Long |
getMaxApplications() |
Long |
getMaxApplicationsPerCustomer() |
LocalizedString |
getName() |
ZonedDateTime |
getValidFrom() |
ZonedDateTime |
getValidUntil() |
T |
groups(List<String> groups)
Sets the
groups property of this builder. |
Boolean |
isActive() |
DiscountCodeDraftBuilder |
isActive(boolean active) |
T |
isActive(Boolean active)
Sets the
active property of this builder. |
T |
maxApplications(Long maxApplications)
Sets the
maxApplications property of this builder. |
T |
maxApplicationsPerCustomer(Long maxApplicationsPerCustomer)
Sets the
maxApplicationsPerCustomer property of this builder. |
T |
name(LocalizedString name)
Sets the
name property of this builder. |
static DiscountCodeDraftBuilder |
of(DiscountCodeDraft template)
Creates a new object initialized with the fields of the template parameter.
|
static DiscountCodeDraftBuilder |
of(String code,
List<Reference<CartDiscount>> cartDiscounts)
Creates a new object initialized with the given values.
|
static DiscountCodeDraftBuilder |
of(String code,
Referenceable<CartDiscount> cartDiscount) |
T |
plusCartDiscounts(List<Reference<CartDiscount>> cartDiscounts)
Concatenate
cartDiscounts parameter to the cartDiscounts list property of this builder. |
T |
plusCartDiscounts(Reference<CartDiscount> cartDiscounts)
Adds
cartDiscounts parameter to the cartDiscounts list property of this builder. |
T |
plusGroups(List<String> groups)
Concatenate
groups parameter to the groups list property of this builder. |
T |
plusGroups(String groups)
Adds
groups parameter to the groups list 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. |
public DiscountCodeDraftBuilder cartPredicate(@Nullable CartPredicate cartPredicate)
public DiscountCodeDraftBuilder isActive(boolean active)
public static DiscountCodeDraftBuilder of(String code, Referenceable<CartDiscount> cartDiscount)
public T active(Boolean active)
active
property of this builder.active
- the value for DiscountCodeDraft.isActive()
public T isActive(Boolean active)
active
property of this builder.active
- the value for DiscountCodeDraft.isActive()
public T cartDiscounts(List<Reference<CartDiscount>> cartDiscounts)
cartDiscounts
property of this builder.cartDiscounts
- the value for DiscountCodeDraft.getCartDiscounts()
public T cartPredicate(@Nullable String cartPredicate)
cartPredicate
property of this builder.cartPredicate
- the value for DiscountCodeDraft.getCartPredicate()
public T code(String code)
code
property of this builder.code
- the value for DiscountCodeDraft.getCode()
public T custom(@Nullable CustomFieldsDraft custom)
custom
property of this builder.custom
- the value for DiscountCodeDraft.getCustom()
public T description(@Nullable LocalizedString description)
description
property of this builder.description
- the value for DiscountCodeDraft.getDescription()
public T groups(@Nullable List<String> groups)
groups
property of this builder.groups
- the value for DiscountCodeDraft.getGroups()
public T maxApplications(@Nullable Long maxApplications)
maxApplications
property of this builder.maxApplications
- the value for DiscountCodeDraft.getMaxApplications()
public T maxApplicationsPerCustomer(@Nullable Long maxApplicationsPerCustomer)
maxApplicationsPerCustomer
property of this builder.maxApplicationsPerCustomer
- the value for DiscountCodeDraft.getMaxApplicationsPerCustomer()
public T name(@Nullable LocalizedString name)
name
property of this builder.name
- the value for DiscountCodeDraft.getName()
public T validFrom(@Nullable ZonedDateTime validFrom)
validFrom
property of this builder.validFrom
- the value for DiscountCodeDraft.getValidFrom()
public T validUntil(@Nullable ZonedDateTime validUntil)
validUntil
property of this builder.validUntil
- the value for DiscountCodeDraft.getValidUntil()
public Boolean isActive()
public List<Reference<CartDiscount>> getCartDiscounts()
public String getCode()
@Nullable public CustomFieldsDraft getCustom()
@Nullable public LocalizedString getDescription()
@Nullable public LocalizedString getName()
@Nullable public ZonedDateTime getValidFrom()
@Nullable public ZonedDateTime getValidUntil()
public T plusCartDiscounts(List<Reference<CartDiscount>> cartDiscounts)
cartDiscounts
parameter to the cartDiscounts
list property of this builder.cartDiscounts
- the value for DiscountCodeDraft.getCartDiscounts()
public T plusGroups(List<String> groups)
groups
parameter to the groups
list property of this builder.groups
- the value for DiscountCodeDraft.getGroups()
public T plusCartDiscounts(Reference<CartDiscount> cartDiscounts)
cartDiscounts
parameter to the cartDiscounts
list property of this builder.cartDiscounts
- the value of the element to add to DiscountCodeDraft.getCartDiscounts()
public T plusGroups(String groups)
groups
parameter to the groups
list property of this builder.groups
- the value of the element to add to DiscountCodeDraft.getGroups()
public DiscountCodeDraftDsl build()
DiscountCodeDraftDsl
with the values of this builder.build
in interface Builder<DiscountCodeDraftDsl>
public static DiscountCodeDraftBuilder of(String code, List<Reference<CartDiscount>> cartDiscounts)
code
- initial value for the DiscountCodeDraft.getCode()
propertycartDiscounts
- initial value for the DiscountCodeDraft.getCartDiscounts()
propertypublic static DiscountCodeDraftBuilder of(DiscountCodeDraft template)
template
- the template