Record Class CreateGiftVoucherRequest
java.lang.Object
java.lang.Record
be.appify.prefab.example.sale.application.CreateGiftVoucherRequest
public record CreateGiftVoucherRequest(@NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") @Size(max=255) String code, @NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") BigDecimal remainingValue)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCreateGiftVoucherRequest(@NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") @Size(max=255) String code, @NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") BigDecimal remainingValue) Creates an instance of aCreateGiftVoucherRequestrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") @Size(max=255) Stringcode()Returns the value of thecoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") BigDecimalReturns the value of theremainingValuerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CreateGiftVoucherRequest
public CreateGiftVoucherRequest(@NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") @Size(max=255) @NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") @Size(max=255) String code, @NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") @NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") BigDecimal remainingValue) Creates an instance of aCreateGiftVoucherRequestrecord class.- Parameters:
code- the value for thecoderecord componentremainingValue- the value for theremainingValuerecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
code
@NotNull(payload={}, groups={}, message="{jakarta.validation.constraints.NotNull.message}") @Size(max=255) public @NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") @Size(max=255) String code()Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
remainingValue
@NotNull(payload={}, groups={}, message="{jakarta.validation.constraints.NotNull.message}") public @NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") BigDecimal remainingValue()Returns the value of theremainingValuerecord component.- Returns:
- the value of the
remainingValuerecord component
-