Record Class InvoiceResponse
java.lang.Object
java.lang.Record
be.appify.prefab.example.sale.invoice.infrastructure.http.InvoiceResponse
public record InvoiceResponse(String id, long version, BigDecimal total, Instant created, String invoiceNumber)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionInvoiceResponse(String id, long version, BigDecimal total, Instant created, String invoiceNumber) Creates an instance of aInvoiceResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptioncreated()Returns the value of thecreatedrecord component.final booleanIndicates whether some other object is "equal to" this one.static InvoiceResponsefinal inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theinvoiceNumberrecord component.final StringtoString()Returns a string representation of this record class.total()Returns the value of thetotalrecord component.longversion()Returns the value of theversionrecord component.
-
Constructor Details
-
InvoiceResponse
public InvoiceResponse(String id, long version, BigDecimal total, Instant created, String invoiceNumber) Creates an instance of aInvoiceResponserecord class.- Parameters:
id- the value for theidrecord componentversion- the value for theversionrecord componenttotal- the value for thetotalrecord componentcreated- the value for thecreatedrecord componentinvoiceNumber- the value for theinvoiceNumberrecord 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
-
total
Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-
created
Returns the value of thecreatedrecord component.- Returns:
- the value of the
createdrecord component
-
invoiceNumber
Returns the value of theinvoiceNumberrecord component.- Returns:
- the value of the
invoiceNumberrecord component
-