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
ConstructorsConstructorDescriptionBankAccountResponse(UUID id, String accountNumber, BigDecimal balance, Currency currency, String iban) Creates an instance of aBankAccountResponserecord class. - 
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccountNumberrecord component.balance()Returns the value of thebalancerecord component.currency()Returns the value of thecurrencyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.iban()Returns the value of theibanrecord component.id()Returns the value of theidrecord component.final StringtoString()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 aBankAccountResponserecord class.- Parameters:
 id- the value for theidrecord componentaccountNumber- the value for theaccountNumberrecord componentbalance- the value for thebalancerecord componentcurrency- the value for thecurrencyrecord componentiban- the value for theibanrecord 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 
 - 
accountNumber
Returns the value of theaccountNumberrecord component.- Returns:
 - the value of the 
accountNumberrecord component 
 - 
balance
Returns the value of thebalancerecord component.- Returns:
 - the value of the 
balancerecord component 
 - 
currency
Returns the value of thecurrencyrecord component.- Returns:
 - the value of the 
currencyrecord component 
 - 
iban
Returns the value of theibanrecord component.- Returns:
 - the value of the 
ibanrecord component 
 
 -