Interface PaymentService

All Known Implementing Classes:
PaymentServiceImpl

public interface PaymentService
Service interface for managing payment operations within the application.
  • Method Summary

    Modifier and Type
    Method
    Description
    createBankTransfer(jakarta.servlet.http.HttpServletRequest request, UUID accountId, String recipientNumber, BigDecimal amount, String description)
    Creates a bank transfer payment.
    createCardPayment(jakarta.servlet.http.HttpServletRequest request, UUID accountId, UUID cardId)
    Creates a card payment.
    getAllPayments(jakarta.servlet.http.HttpServletRequest request, String bankName, UUID accountId)
    Retrieves all payments associated with a specific bank account.
    getPaymentById(jakarta.servlet.http.HttpServletRequest request, String bankName, UUID accountId, UUID paymentId)
    Retrieves a specific payment by its unique identifier.
  • Method Details

    • getAllPayments

      List<Payment> getAllPayments(jakarta.servlet.http.HttpServletRequest request, String bankName, UUID accountId)
      Retrieves all payments associated with a specific bank account.
      Parameters:
      request - the HTTP request containing context information
      bankName - the name of the bank associated with the payments
      accountId - the unique identifier of the bank account
      Returns:
      a list of payments associated with the specified bank account
    • getPaymentById

      Payment getPaymentById(jakarta.servlet.http.HttpServletRequest request, String bankName, UUID accountId, UUID paymentId)
      Retrieves a specific payment by its unique identifier.
      Parameters:
      request - the HTTP request containing context information
      bankName - the name of the bank associated with the payment
      accountId - the unique identifier of the bank account
      paymentId - the unique identifier of the payment
      Returns:
      the payment associated with the specified payment ID
    • createBankTransfer

      Payment createBankTransfer(jakarta.servlet.http.HttpServletRequest request, UUID accountId, String recipientNumber, BigDecimal amount, String description) throws Exception
      Creates a bank transfer payment.
      Parameters:
      request - the HTTP request containing context information
      accountId - the unique identifier of the bank account initiating the transfer
      recipientNumber - the account number of the payment recipient
      amount - the amount to be transferred
      description - a description of the payment
      Returns:
      the created Payment object
      Throws:
      Exception - if there is an error while creating the bank transfer
    • createCardPayment

      Payment createCardPayment(jakarta.servlet.http.HttpServletRequest request, UUID accountId, UUID cardId) throws Exception
      Creates a card payment.
      Parameters:
      request - the HTTP request containing context information
      accountId - the unique identifier of the bank account used for the card payment
      cardId - the unique identifier of the card being used for the payment
      Returns:
      the created Payment object
      Throws:
      Exception - if there is an error while creating the card payment