class Xs2aConsentAuthorisationMapper {

    public CreateAuthorisationRequest mapToAuthorisationRequest(ScaStatus scaStatus, PsuIdData psuData, ScaApproach scaApproach, String tppRedirectURI, String tppNOKRedirectURI) {
        return Optional.ofNullable(scaStatus)
                   .map(st -> {
                       CreateAuthorisationRequest consentAuthorization = new CreateAuthorisationRequest();
                       consentAuthorization.setPsuData(psuData);
                       consentAuthorization.setScaApproach(scaApproach);
                       consentAuthorization.setTppRedirectURIs(tppRedirectUriMapper.mapToTppRedirectUri(tppRedirectURI,tppNOKRedirectURI));
                       return consentAuthorization;
                   })
                   .orElse(null);
    }

}