Record Class SaleAddPaymentRequest
java.lang.Object
java.lang.Record
be.appify.prefab.example.sale.application.SaleAddPaymentRequest
public record SaleAddPaymentRequest(@NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") BigDecimal amount, @NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") PaymentMethod method, @Valid String giftVoucher)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSaleAddPaymentRequest(@NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") BigDecimal amount, @NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") PaymentMethod method, @Valid String giftVoucher) Creates an instance of aSaleAddPaymentRequestrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") BigDecimalamount()Returns the value of theamountrecord component.final booleanIndicates whether some other object is "equal to" this one.@Valid StringReturns the value of thegiftVoucherrecord component.final inthashCode()Returns a hash code value for this object.@NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") PaymentMethodmethod()Returns the value of themethodrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SaleAddPaymentRequest
public SaleAddPaymentRequest(@NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") @NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") BigDecimal amount, @NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") @NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") PaymentMethod method, @Valid @Valid String giftVoucher) Creates an instance of aSaleAddPaymentRequestrecord class.- Parameters:
amount- the value for theamountrecord componentmethod- the value for themethodrecord componentgiftVoucher- the value for thegiftVoucherrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
amount
@NotNull(payload={}, groups={}, message="{jakarta.validation.constraints.NotNull.message}") public @NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") BigDecimal amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
method
@NotNull(payload={}, groups={}, message="{jakarta.validation.constraints.NotNull.message}") public @NotNull(payload={},groups={},message="{jakarta.validation.constraints.NotNull.message}") PaymentMethod method()Returns the value of themethodrecord component.- Returns:
- the value of the
methodrecord component
-
giftVoucher
Returns the value of thegiftVoucherrecord component.- Returns:
- the value of the
giftVoucherrecord component
-