class AccountServiceInternalEncrypted implements AccountServiceEncrypted {

    @Override
    public boolean saveNumberOfTransactions(String encryptedConsentId, String resourceId, int numberOfTransactions) {

        Optional<String> optionalId = securityDataService.decryptId(encryptedConsentId);

        if (optionalId.isPresent()) {
            return accountService.saveNumberOfTransactions(optionalId.get(), resourceId, numberOfTransactions);
        } else {
            log.info("Encrypted Consent ID: [{}]. Save number of transactions failed, couldn't decrypt consent ID",
                     encryptedConsentId);
            return false;
        }

    }

}