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 Details

    • BankAccountResponse

      public BankAccountResponse(UUID id, String accountNumber, BigDecimal balance, Currency currency, String iban)
      Creates an instance of a BankAccountResponse record class.
      Parameters:
      id - the value for the id record component
      accountNumber - the value for the accountNumber record component
      balance - the value for the balance record component
      currency - the value for the currency record component
      iban - the value for the iban record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public UUID id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • accountNumber

      public String accountNumber()
      Returns the value of the accountNumber record component.
      Returns:
      the value of the accountNumber record component
    • balance

      public BigDecimal balance()
      Returns the value of the balance record component.
      Returns:
      the value of the balance record component
    • currency

      public Currency currency()
      Returns the value of the currency record component.
      Returns:
      the value of the currency record component
    • iban

      public String iban()
      Returns the value of the iban record component.
      Returns:
      the value of the iban record component