Record Class GiftVoucherResponse
java.lang.Object
java.lang.Record
be.appify.prefab.example.sale.infrastructure.http.GiftVoucherResponse
public record GiftVoucherResponse(String id, long version, String code, BigDecimal remainingValue)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionGiftVoucherResponse(String id, long version, String code, BigDecimal remainingValue) Creates an instance of aGiftVoucherResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the value of thecoderecord component.final booleanIndicates whether some other object is "equal to" this one.static GiftVoucherResponsefrom(GiftVoucher aggregateRoot) final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theremainingValuerecord component.final StringtoString()Returns a string representation of this record class.longversion()Returns the value of theversionrecord component.
-
Constructor Details
-
GiftVoucherResponse
Creates an instance of aGiftVoucherResponserecord class.- Parameters:
id- the value for theidrecord componentversion- the value for theversionrecord componentcode- the value for thecoderecord componentremainingValue- the value for theremainingValuerecord component
-
-
Method Details
-
from
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
version
public long version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
remainingValue
Returns the value of theremainingValuerecord component.- Returns:
- the value of the
remainingValuerecord component
-