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
ConstructorsConstructorDescriptionPaymentRequest(UUID id, String senderName, String recipientName, LocalDate dateTime, String description, BigDecimal amount, PaymentType type, FinancialStatus status, Currency currency) Creates an instance of aPaymentRequestrecord class. - 
Method Summary
Modifier and TypeMethodDescriptionamount()Returns the value of theamountrecord component.currency()Returns the value of thecurrencyrecord component.dateTime()Returns the value of thedateTimerecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of therecipientNamerecord component.Returns the value of thesenderNamerecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord 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 aPaymentRequestrecord class.- Parameters:
 id- the value for theidrecord componentsenderName- the value for thesenderNamerecord componentrecipientName- the value for therecipientNamerecord componentdateTime- the value for thedateTimerecord componentdescription- the value for thedescriptionrecord componentamount- the value for theamountrecord componenttype- the value for thetyperecord componentstatus- the value for thestatusrecord componentcurrency- the value for thecurrencyrecord 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 theidrecord component.- Returns:
 - the value of the 
idrecord component 
 - 
senderName
Returns the value of thesenderNamerecord component.- Returns:
 - the value of the 
senderNamerecord component 
 - 
recipientName
Returns the value of therecipientNamerecord component.- Returns:
 - the value of the 
recipientNamerecord component 
 - 
dateTime
Returns the value of thedateTimerecord component.- Returns:
 - the value of the 
dateTimerecord component 
 - 
description
Returns the value of thedescriptionrecord component.- Returns:
 - the value of the 
descriptionrecord component 
 - 
amount
Returns the value of theamountrecord component.- Returns:
 - the value of the 
amountrecord component 
 - 
type
Returns the value of thetyperecord component.- Returns:
 - the value of the 
typerecord component 
 - 
status
Returns the value of thestatusrecord component.- Returns:
 - the value of the 
statusrecord component 
 - 
currency
Returns the value of thecurrencyrecord component.- Returns:
 - the value of the 
currencyrecord component 
 
 -