class AccountReferenceInConsentUpdater {

    public void rewriteAccountAccess(@NotNull String consentId, @NotNull AccountAccess newAccountAccess, ConsentType consentType) {
        if (consentType == ConsentType.AIS) {
            aisConsentService.updateAspspAccountAccess(consentId, newAccountAccess);
        } else {
            xs2aPiisConsentService.updateAspspAccountAccess(consentId, newAccountAccess);
        }
    }

}