public List getCharges()

in service/src/main/java/org/apache/fineract/cn/interoperation/service/internal/service/helper/InteropDepositService.java [62:78]


    public List<Charge> getCharges(String accountIdentifier, TransactionType transactionType) {
        List<Action> actions = depositAccountManager.fetchActions();

        List<String> actionIds = actions
                .stream()
                .filter(action -> action.getTransactionType().equals(transactionType.getCode()))
                .map(Action::getIdentifier)
                .collect(Collectors.toList());

        ProductInstance productInstance = depositAccountManager.findProductInstance(accountIdentifier);
        ProductDefinition productDefinition = depositAccountManager.findProductDefinition(productInstance.getProductIdentifier());

        return productDefinition.getCharges()
                .stream()
                .filter(charge -> actionIds.contains(charge.getActionIdentifier()))
                .collect(Collectors.toList());
    }