Package api.mpba.rastvdmy.dto.response
Record Class BankAccountResponse
java.lang.Object
java.lang.Record
api.mpba.rastvdmy.dto.response.BankAccountResponse
- Record Components:
id
- The unique identifier of the bank account.accountNumber
- The number associated with the bank account.balance
- The current balance of the bank account.currency
- The currency used for the bank account.iban
- The IBAN (International Bank Account Number) of the account.
public record BankAccountResponse(UUID id, String accountNumber, BigDecimal balance, Currency currency, String iban)
extends Record
This class represents the response for a bank account in the system.
-
Constructor Summary
ConstructorDescriptionBankAccountResponse
(UUID id, String accountNumber, BigDecimal balance, Currency currency, String iban) Creates an instance of aBankAccountResponse
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccountNumber
record component.balance()
Returns the value of thebalance
record component.currency()
Returns the value of thecurrency
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.iban()
Returns the value of theiban
record component.id()
Returns the value of theid
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
BankAccountResponse
public BankAccountResponse(UUID id, String accountNumber, BigDecimal balance, Currency currency, String iban) Creates an instance of aBankAccountResponse
record class.- Parameters:
id
- the value for theid
record componentaccountNumber
- the value for theaccountNumber
record componentbalance
- the value for thebalance
record componentcurrency
- the value for thecurrency
record componentiban
- the value for theiban
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
-
accountNumber
Returns the value of theaccountNumber
record component.- Returns:
- the value of the
accountNumber
record component
-
balance
Returns the value of thebalance
record component.- Returns:
- the value of the
balance
record component
-
currency
Returns the value of thecurrency
record component.- Returns:
- the value of the
currency
record component
-
iban
Returns the value of theiban
record component.- Returns:
- the value of the
iban
record component
-