Record Class SaleResponse
java.lang.Object
java.lang.Record
be.appify.prefab.example.sale.infrastructure.http.SaleResponse
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncustomer()Returns the value of thecustomerrecord component.final booleanIndicates whether some other object is "equal to" this one.static SaleResponsefinal inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.items()Returns the value of theitemsrecord component.payments()Returns the value of thepaymentsrecord component.returned()Returns the value of thereturnedrecord component.start()Returns the value of thestartrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.longversion()Returns the value of theversionrecord component.
-
Constructor Details
-
SaleResponse
public SaleResponse(String id, long version, Instant start, List<SaleItem> items, List<Payment> payments, BigDecimal returned, State state, Reference<Customer> customer, SaleType type) Creates an instance of aSaleResponserecord class.- Parameters:
id- the value for theidrecord componentversion- the value for theversionrecord componentstart- the value for thestartrecord componentitems- the value for theitemsrecord componentpayments- the value for thepaymentsrecord componentreturned- the value for thereturnedrecord componentstate- the value for thestaterecord componentcustomer- the value for thecustomerrecord componenttype- the value for thetyperecord 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
-
start
Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
items
-
payments
-
returned
Returns the value of thereturnedrecord component.- Returns:
- the value of the
returnedrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
customer
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-