Record Class VoucherRedemptionPort.RedemptionRecord
java.lang.Object
java.lang.Record
xyz.tcheeric.cashu.voucher.app.ports.VoucherRedemptionPort.RedemptionRecord
- Record Components:
fingerprint- the voucher fingerprintvoucherId- the original voucher IDredeemedBy- identifier of the redeeming partyredeemedAt- timestamp of redemption
- Enclosing interface:
VoucherRedemptionPort
public static record VoucherRedemptionPort.RedemptionRecord(String fingerprint, String voucherId, String redeemedBy, Instant redeemedAt)
extends Record
Redemption record containing details of when and by whom a voucher was redeemed.
-
Constructor Summary
ConstructorsConstructorDescriptionRedemptionRecord(String fingerprint, String voucherId, String redeemedBy, Instant redeemedAt) Creates an instance of aRedemptionRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefingerprintrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theredeemedAtrecord component.Returns the value of theredeemedByrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevoucherIdrecord component.
-
Constructor Details
-
RedemptionRecord
public RedemptionRecord(String fingerprint, String voucherId, String redeemedBy, Instant redeemedAt) Creates an instance of aRedemptionRecordrecord class.- Parameters:
fingerprint- the value for thefingerprintrecord componentvoucherId- the value for thevoucherIdrecord componentredeemedBy- the value for theredeemedByrecord componentredeemedAt- the value for theredeemedAtrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
fingerprint
Returns the value of thefingerprintrecord component.- Returns:
- the value of the
fingerprintrecord component
-
voucherId
Returns the value of thevoucherIdrecord component.- Returns:
- the value of the
voucherIdrecord component
-
redeemedBy
Returns the value of theredeemedByrecord component.- Returns:
- the value of the
redeemedByrecord component
-
redeemedAt
Returns the value of theredeemedAtrecord component.- Returns:
- the value of the
redeemedAtrecord component
-