Package api.mpba.rastvdmy.dto.response
Record Class CardResponse
java.lang.Object
java.lang.Record
api.mpba.rastvdmy.dto.response.CardResponse
- Record Components:
id
- The unique identifier of the card.cardNumber
- The card number.cvv
- The CVV of the card.pin
- The PIN associated with the card.startDate
- The date the card becomes active.expirationDate
- The date the card expires.cardCategory
- The category of the card (e.g., credit, debit).cardType
- The type of the card (e.g., Visa, MasterCard).cardStatus
- The status of the card (e.g., active, blocked).
public record CardResponse(UUID id, String cardNumber, String cvv, String pin, LocalDate startDate, LocalDate expirationDate, CardCategory cardCategory, CardType cardType, CardStatus cardStatus)
extends Record
This class represents the response for a card in the banking system.
-
Constructor Summary
ConstructorDescriptionCardResponse
(UUID id, String cardNumber, String cvv, String pin, LocalDate startDate, LocalDate expirationDate, CardCategory cardCategory, CardType cardType, CardStatus cardStatus) Creates an instance of aCardResponse
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecardCategory
record component.Returns the value of thecardNumber
record component.Returns the value of thecardStatus
record component.cardType()
Returns the value of thecardType
record component.cvv()
Returns the value of thecvv
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexpirationDate
record component.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.pin()
Returns the value of thepin
record component.Returns the value of thestartDate
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
CardResponse
public CardResponse(UUID id, String cardNumber, String cvv, String pin, LocalDate startDate, LocalDate expirationDate, CardCategory cardCategory, CardType cardType, CardStatus cardStatus) Creates an instance of aCardResponse
record class.- Parameters:
id
- the value for theid
record componentcardNumber
- the value for thecardNumber
record componentcvv
- the value for thecvv
record componentpin
- the value for thepin
record componentstartDate
- the value for thestartDate
record componentexpirationDate
- the value for theexpirationDate
record componentcardCategory
- the value for thecardCategory
record componentcardType
- the value for thecardType
record componentcardStatus
- the value for thecardStatus
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
-
cardNumber
Returns the value of thecardNumber
record component.- Returns:
- the value of the
cardNumber
record component
-
cvv
Returns the value of thecvv
record component.- Returns:
- the value of the
cvv
record component
-
pin
Returns the value of thepin
record component.- Returns:
- the value of the
pin
record component
-
startDate
Returns the value of thestartDate
record component.- Returns:
- the value of the
startDate
record component
-
expirationDate
Returns the value of theexpirationDate
record component.- Returns:
- the value of the
expirationDate
record component
-
cardCategory
Returns the value of thecardCategory
record component.- Returns:
- the value of the
cardCategory
record component
-
cardType
Returns the value of thecardType
record component.- Returns:
- the value of the
cardType
record component
-
cardStatus
Returns the value of thecardStatus
record component.- Returns:
- the value of the
cardStatus
record component
-