class RedirectLinkBuilder {

    public String buildConsentScaRedirectLink(String encryptedConsentId, String redirectId, String internalRequestId,
                                              String instanceId, ConsentType consentType) {
        String redirectUrl = getRedirectUrlByConsentType(consentType);

        String scaRedirectLink = redirectUrl
                                     .replace(REDIRECT_URL, redirectId)
                                     .replace(ENCRYPTED_CONSENT_ID, encryptedConsentId)
                                     .replace(INTERNAL_REQUEST_ID, internalRequestId);
        return enrichByInstanceId(scaRedirectLink, instanceId);
    }

}