Package api.mpba.rastvdmy.service
Interface CardService
- All Known Implementing Classes:
- CardServiceImpl
public interface CardService
Card service interface for managing card-related operations.
- 
Method SummaryModifier and TypeMethodDescriptionaddAccountCard(String bankName, UUID accountId, jakarta.servlet.http.HttpServletRequest request) Adds a new card to the specified bank account.voidconnectCards(BankAccount account) Connects the specified bank account with a card.getAccountCardById(String bankName, UUID accountId, UUID cardId, jakarta.servlet.http.HttpServletRequest request, String type) Retrieves a specific card associated with a bank account by its unique identifier.getAccountCards(String bankName, UUID accountId, jakarta.servlet.http.HttpServletRequest request) Retrieves a list of cards associated with a specific bank account.voidremoveAccountCard(String bankName, UUID accountId, UUID cardId, jakarta.servlet.http.HttpServletRequest request) Removes a specific card from the specified bank account.voidremoveAllCards(BankAccount account) Removes all cards associated with the specified bank account.
- 
Method Details- 
getAccountCardsList<Card> getAccountCards(String bankName, UUID accountId, jakarta.servlet.http.HttpServletRequest request) Retrieves a list of cards associated with a specific bank account.- Parameters:
- bankName- the name of the bank associated with the account
- accountId- the unique identifier of the bank account
- request- the HTTP request containing user information
- Returns:
- a list of Cardobjects associated with the specified account
 
- 
getAccountCardByIdCard getAccountCardById(String bankName, UUID accountId, UUID cardId, jakarta.servlet.http.HttpServletRequest request, String type) Retrieves a specific card associated with a bank account by its unique identifier.- Parameters:
- bankName- the name of the bank associated with the account
- accountId- the unique identifier of the bank account
- cardId- the unique identifier of the card to retrieve
- request- the HTTP request containing user information
- type- the type of card (e.g., debit, credit)
- Returns:
- the Cardassociated with the specified account and card ID
 
- 
addAccountCardCard addAccountCard(String bankName, UUID accountId, jakarta.servlet.http.HttpServletRequest request) throws Exception Adds a new card to the specified bank account.
- 
connectCardsConnects the specified bank account with a card.- Parameters:
- account- the- BankAccountto connect with the card
- Throws:
- Exception- if an error occurs during the card connection process
 
- 
removeAccountCardvoid removeAccountCard(String bankName, UUID accountId, UUID cardId, jakarta.servlet.http.HttpServletRequest request) Removes a specific card from the specified bank account.- Parameters:
- bankName- the name of the bank associated with the account
- accountId- the unique identifier of the bank account
- cardId- the unique identifier of the card to be removed
- request- the HTTP request containing user information
 
- 
removeAllCardsRemoves all cards associated with the specified bank account.- Parameters:
- account- the- BankAccountfrom which all cards should be removed
 
 
-