class ConsentModelMapper {

    public Authorisations mapToAuthorisations(Xs2aPaymentCancellationAuthorisationSubResource idsContainer) {
        return Optional.ofNullable(idsContainer.getAuthorisationIds())
                   .map(this::buildAuthorisations)
                   .orElseGet(Authorisations::new);
    }

}