Package api.mpba.rastvdmy.dto.request
Record Class PaymentRequest
java.lang.Object
java.lang.Record
api.mpba.rastvdmy.dto.request.PaymentRequest
- Record Components:
id
- The unique identifier for the payment.senderName
- The name of the payment sender.recipientName
- The name of the payment recipient.dateTime
- The date and time of the payment.description
- A description or note associated with the payment.amount
- The amount of the payment.type
- The type of the payment (e.g., transfer, purchase).status
- The financial status of the payment (e.g., pending, completed).currency
- The currency in which the payment is made.
public record PaymentRequest(UUID id, String senderName, String recipientName, LocalDate dateTime, String description, BigDecimal amount, PaymentType type, FinancialStatus status, Currency currency)
extends Record
This class represents a payment request in the banking system.
-
Constructor Summary
ConstructorDescriptionPaymentRequest
(UUID id, String senderName, String recipientName, LocalDate dateTime, String description, BigDecimal amount, PaymentType type, FinancialStatus status, Currency currency) Creates an instance of aPaymentRequest
record class. -
Method Summary
Modifier and TypeMethodDescriptionamount()
Returns the value of theamount
record component.currency()
Returns the value of thecurrency
record component.dateTime()
Returns the value of thedateTime
record component.Returns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.Returns the value of therecipientName
record component.Returns the value of thesenderName
record component.status()
Returns the value of thestatus
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.
-
Constructor Details
-
PaymentRequest
public PaymentRequest(UUID id, String senderName, String recipientName, LocalDate dateTime, String description, BigDecimal amount, PaymentType type, FinancialStatus status, Currency currency) Creates an instance of aPaymentRequest
record class.- Parameters:
id
- the value for theid
record componentsenderName
- the value for thesenderName
record componentrecipientName
- the value for therecipientName
record componentdateTime
- the value for thedateTime
record componentdescription
- the value for thedescription
record componentamount
- the value for theamount
record componenttype
- the value for thetype
record componentstatus
- the value for thestatus
record componentcurrency
- the value for thecurrency
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
senderName
Returns the value of thesenderName
record component.- Returns:
- the value of the
senderName
record component
-
recipientName
Returns the value of therecipientName
record component.- Returns:
- the value of the
recipientName
record component
-
dateTime
Returns the value of thedateTime
record component.- Returns:
- the value of the
dateTime
record component
-
description
Returns the value of thedescription
record component.- Returns:
- the value of the
description
record component
-
amount
Returns the value of theamount
record component.- Returns:
- the value of the
amount
record component
-
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
status
Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-
currency
Returns the value of thecurrency
record component.- Returns:
- the value of the
currency
record component
-