public final class DiscountCodeDraftDsl extends Base
public DiscountCodeDraftDsl withCartDiscounts(Referenceable<CartDiscount> cartDiscount)
public static DiscountCodeDraftDsl of(String code, Referenceable<CartDiscount> cartDiscount)
public DiscountCodeDraftDsl withCartPredicate(@Nullable CartPredicate cartPredicate)
public Boolean isActive()
isActive in interface DiscountCodeDraftpublic List<Reference<CartDiscount>> getCartDiscounts()
getCartDiscounts in interface DiscountCodeDraft@Nullable public String getCartPredicate()
getCartPredicate in interface DiscountCodeDraftpublic String getCode()
getCode in interface DiscountCodeDraft@Nullable public CustomFieldsDraft getCustom()
getCustom in interface DiscountCodeDraft@Nullable public LocalizedString getDescription()
getDescription in interface DiscountCodeDraft@Nullable public List<String> getGroups()
getGroups in interface DiscountCodeDraft@Nullable public Long getMaxApplications()
getMaxApplications in interface DiscountCodeDraft@Nullable public Long getMaxApplicationsPerCustomer()
getMaxApplicationsPerCustomer in interface DiscountCodeDraft@Nullable public LocalizedString getName()
getName in interface DiscountCodeDraft@Nullable public ZonedDateTime getValidFrom()
getValidFrom in interface DiscountCodeDraft@Nullable public ZonedDateTime getValidUntil()
getValidUntil in interface DiscountCodeDraftpublic DiscountCodeDraftBuilder newBuilder()
public T withActive(Boolean active)
public T withCartDiscounts(List<Reference<CartDiscount>> cartDiscounts)
public T withCode(String code)
public T withCustom(@Nullable CustomFieldsDraft custom)
public T withDescription(@Nullable LocalizedString description)
public T withMaxApplicationsPerCustomer(@Nullable Long maxApplicationsPerCustomer)
public T withName(@Nullable LocalizedString name)
public T withValidFrom(@Nullable ZonedDateTime validFrom)
public T withValidUntil(@Nullable ZonedDateTime validUntil)
public T withIsActive(Boolean active)
public static DiscountCodeDraftDsl of(String code, List<Reference<CartDiscount>> cartDiscounts)
of in interface DiscountCodeDraftcode - initial value for the DiscountCodeDraft.getCode() propertycartDiscounts - initial value for the DiscountCodeDraft.getCartDiscounts() propertypublic static DiscountCodeDraftDsl of(DiscountCodeDraft template)
template - the template