Package api.mpba.rastvdmy.dto.request
Record Class PaymentParamsRequest
java.lang.Object
java.lang.Record
api.mpba.rastvdmy.dto.request.PaymentParamsRequest
- Record Components:
recipientNumber
- The recipient's account or card number.description
- The description or note for the payment.amount
- The amount to be transferred.cardId
- The unique identifier of the card being used for the payment.type
- The type of payment being processed.
public record PaymentParamsRequest(@Nullable String recipientNumber, @Nullable String description, @Nullable BigDecimal amount, @Nullable UUID cardId, PaymentType type)
extends Record
This class represents the parameters required for processing a payment in the banking system.
-
Constructor Summary
ConstructorDescriptionPaymentParamsRequest
(String recipientNumber, String description, BigDecimal amount, UUID cardId, PaymentType type) Creates an instance of aPaymentParamsRequest
record class. -
Method Summary
Modifier and TypeMethodDescriptionamount()
Returns the value of theamount
record component.cardId()
Returns the value of thecardId
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.Returns the value of therecipientNumber
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.
-
Constructor Details
-
PaymentParamsRequest
public PaymentParamsRequest(@Nullable String recipientNumber, @Nullable String description, @Nullable BigDecimal amount, @Nullable UUID cardId, PaymentType type) Creates an instance of aPaymentParamsRequest
record class.- Parameters:
recipientNumber
- the value for therecipientNumber
record componentdescription
- the value for thedescription
record componentamount
- the value for theamount
record componentcardId
- the value for thecardId
record componenttype
- the value for thetype
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)
. -
recipientNumber
Returns the value of therecipientNumber
record component.- Returns:
- the value of the
recipientNumber
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
-
cardId
Returns the value of thecardId
record component.- Returns:
- the value of the
cardId
record component
-
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-