Interface MiddlewareAccountManagementService


  • public interface MiddlewareAccountManagementService
    • Method Detail

      • createDepositAccount

        void createDepositAccount​(String userId,
                                  ScaInfoTO scaInfoTO,
                                  AccountDetailsTO depositAccount)
        Creates a new DepositAccount. This deposit account is then linked with the specified user.

        Call requires a bank staff access permission.

        Parameters:
        userId - : the identifier of the user for whom the account is created
        scaInfoTO - : SCA information
        depositAccount - : the deposit account to be crated.
      • listDepositAccounts

        List<AccountDetailsTO> listDepositAccounts​(String userId)
        Retrieve the list of account viewable by the connected user.
        Parameters:
        userId - : user identifier
        Returns:
        an empty list if user not linked with any deposit accounted.
      • listDepositAccountsByBranch

        List<AccountDetailsTO> listDepositAccountsByBranch​(String userId)
        Retrieve the list of account registered for the branch.
        Parameters:
        userId - : user identifier
        Returns:
        list of accounts registered for the branch, or an empty list otherwise
      • getDepositAccountById

        AccountDetailsTO getDepositAccountById​(String id,
                                               LocalDateTime time,
                                               boolean withBalance)
        Retrieves AccountDetails with Balance on demand
        Parameters:
        id - DepositAccount identifier
        time - the reference time.
        withBalance - boolean specifying if Balances has to be added to AccountDetails
        Returns:
        account details.
      • getTransactionById

        TransactionTO getTransactionById​(String accountId,
                                         String transactionId)
        Retrieves transaction by accountId and transactionId
        Parameters:
        accountId - the account id
        transactionId - the transaction id
        Returns:
        the corresponding transaction
      • getTransactionsByDates

        List<TransactionTO> getTransactionsByDates​(String accountId,
                                                   LocalDate dateFrom,
                                                   LocalDate dateTo)
        Retrieves a List of transactions by accountId and dates (from/to) if dateTo is empty it is considered that requested date is today
        Parameters:
        accountId - the account id
        dateFrom - from this time
        dateTo - to this time
        Returns:
        : List of transactions.
      • getTransactionsByDatesPaged

        CustomPageImpl<TransactionTO> getTransactionsByDatesPaged​(String accountId,
                                                                  LocalDate dateFrom,
                                                                  LocalDate dateTo,
                                                                  CustomPageableImpl pageable)
        Retrieves a List of transactions by accountId and dates (from/to) if dateTo is empty it is considered that requested date is today
        Parameters:
        accountId - the account id
        dateFrom - from this time
        dateTo - to this time
        Returns:
        : List of transactions.
      • confirmFundsAvailability

        boolean confirmFundsAvailability​(FundsConfirmationRequestTO request)
        Confirm the availability of funds on user account to perform the operation with specified amount
        Parameters:
        request - : teh fund confirmation request.
        Returns:
        : true if fund available else false.
      • startAisConsent

        SCAConsentResponseTO startAisConsent​(ScaInfoTO scaInfoTO,
                                             String consentId,
                                             AisConsentTO aisConsent)
        Start an account consent process.
        Parameters:
        scaInfoTO - SCA information
        consentId - : the cosent id.
        aisConsent - : the consent details
        Returns:
        the corresponding access token describing the account access
      • startPiisConsent

        SCAConsentResponseTO startPiisConsent​(ScaInfoTO scaInfoTO,
                                              AisConsentTO aisConsent)
        Provides a third party provider with necessary permission to read accounts and transaction information for the specified account.
        Parameters:
        scaInfoTO - : SCA information
        aisConsent - : the consent details
        Returns:
        the corresponding access token describing the account access
      • getAccountsFromConsent

        Set<String> getAccountsFromConsent​(String consentId)
      • depositCash

        void depositCash​(ScaInfoTO scaInfoTO,
                         String accountId,
                         AmountTO amount)
        Deposits given amount in cash into specified account. On the bank's books, the bank debits its cash account for the given amount in cash, and credits a "deposits" liability account for an equal amount.
        Parameters:
        scaInfoTO - SCA information
        accountId - id of the account deposited into
        amount - amount of cash deposited
      • changeStatus

        boolean changeStatus​(String accountId,
                             boolean systemBlock)
      • changeCreditLimit

        void changeCreditLimit​(String accountId,
                               BigDecimal creditLimit)