class CmsConsentController implements CmsConsentApi {

    @Override
    public ResponseEntity<Object> updateMultilevelScaRequired(String encryptedConsentId, boolean multilevelSca) {
        CmsResponse<Boolean> response;

        try {
            response = consentServiceEncrypted.updateMultilevelScaRequired(encryptedConsentId, multilevelSca);
        } catch (WrongChecksumException e) {
            return new ResponseEntity<>(CmsError.CHECKSUM_ERROR, HttpStatus.BAD_REQUEST);
        }

        if (response.isSuccessful() && BooleanUtils.isTrue(response.getPayload())) {
            return new ResponseEntity<>(true, HttpStatus.OK);
        }

        return new ResponseEntity<>(HttpStatus.NOT_FOUND);
    }

}