Package com.inteliqua.rest.couponset.dto
Class CouponSetDto
- java.lang.Object
-
- com.inteliqua.rest.couponset.dto.CouponSetDto
-
- All Implemented Interfaces:
EliquaAbstractRequestPayload,Serializable
- Direct Known Subclasses:
AmountCouponSetDto,DiscountCouponSetDto,RedemptionCouponSetDto
public class CouponSetDto extends Object implements EliquaAbstractRequestPayload, Serializable
Base Data Transfer Object representing a Coupon Set in the system.This class is the parent of various coupon set types (e.g. Amount, Discount, Redemption), and defines common fields such as title, code, duration, and attributes. It also includes validation logic and metadata required for coupon generation.
It is used during creation and update operations and supports JSON type info for polymorphic serialization.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CouponSetDto()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisDateSelectionValid()Validates that either `duration` or `activeUntil` is set, but not both or neither.
-
-
-
Method Detail
-
isDateSelectionValid
@AssertTrue(groups=CouponSetCreationConstraint.class, message="system.liquid.couponset.date.selection.mandatory") public boolean isDateSelectionValid()
Validates that either `duration` or `activeUntil` is set, but not both or neither. Also validates the same rule for `durationInMonths` and `activeUntil`.- Returns:
- true if the date selection is valid, false otherwise
-
-