class ConsentAspectService extends BaseAspectService<ConsentController> {

    public ResponseObject<Xs2aConfirmationOfFundsResponse> createPiisConsentWithResponse(ResponseObject<Xs2aConfirmationOfFundsResponse> result, boolean explicitPreferred) {
        if (!result.hasError()) {

            Xs2aConfirmationOfFundsResponse body = result.getBody();
            boolean explicitMethod = authorisationMethodDecider.isExplicitMethod(explicitPreferred, body.isMultilevelScaRequired());
            boolean signingBasketModeActive = authorisationMethodDecider.isSigningBasketModeActive(explicitPreferred);

            body.setLinks(new CreatePiisConsentLinks(getHttpUrl(), scaApproachResolver, body, redirectLinkBuilder,
                                                     redirectIdService,
                                                     explicitMethod, signingBasketModeActive,
                                                     getScaRedirectFlow(),
                                                     isAuthorisationConfirmationRequestMandated(),
                                                     requestProviderService.getInstanceId()));
        }
        return result;
    }

    @Autowired public  ConsentAspectService(ScaApproachResolver scaApproachResolver,
                                AuthorisationMethodDecider authorisationMethodDecider,
                                RedirectLinkBuilder redirectLinkBuilder,
                                AspspProfileServiceWrapper aspspProfileServiceWrapper,
                                RedirectIdService redirectIdService,
                                RequestProviderService requestProviderService);

}