Record Class PaymentProviderActionResource.Order
java.lang.Object
java.lang.Record
ch.tocco.nice2.optional.onlinepayment.impl.actions.PaymentProviderActionResource.Order
- Enclosing class:
PaymentProviderActionResource
public static record PaymentProviderActionResource.Order(String pk, boolean hasVat, BigDecimal totalNet, BigDecimal totalGross, List<PaymentProviderActionResource.VatTotal> vatTotals, List<PaymentProviderActionResource.OrderPosition> orderPositions)
extends Record
-
Constructor Summary
ConstructorDescriptionOrder
(String pk, boolean hasVat, BigDecimal totalNet, BigDecimal totalGross, List<PaymentProviderActionResource.VatTotal> vatTotals, List<PaymentProviderActionResource.OrderPosition> orderPositions) Creates an instance of aOrder
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
hasVat()
Returns the value of thehasVat
record component.Returns the value of theorderPositions
record component.pk()
Returns the value of thepk
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thetotalGross
record component.totalNet()
Returns the value of thetotalNet
record component.Returns the value of thevatTotals
record component.
-
Constructor Details
-
Order
public Order(String pk, boolean hasVat, BigDecimal totalNet, BigDecimal totalGross, List<PaymentProviderActionResource.VatTotal> vatTotals, List<PaymentProviderActionResource.OrderPosition> orderPositions) Creates an instance of aOrder
record class.- Parameters:
pk
- the value for thepk
record componenthasVat
- the value for thehasVat
record componenttotalNet
- the value for thetotalNet
record componenttotalGross
- the value for thetotalGross
record componentvatTotals
- the value for thevatTotals
record componentorderPositions
- the value for theorderPositions
record 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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
pk
Returns the value of thepk
record component.- Returns:
- the value of the
pk
record component
-
hasVat
public boolean hasVat()Returns the value of thehasVat
record component.- Returns:
- the value of the
hasVat
record component
-
totalNet
Returns the value of thetotalNet
record component.- Returns:
- the value of the
totalNet
record component
-
totalGross
Returns the value of thetotalGross
record component.- Returns:
- the value of the
totalGross
record component
-
vatTotals
Returns the value of thevatTotals
record component.- Returns:
- the value of the
vatTotals
record component
-
orderPositions
Returns the value of theorderPositions
record component.- Returns:
- the value of the
orderPositions
record component
-