class AuthorisationController implements AuthorisationApi {

    @Override
    public ResponseEntity<CreateAuthorisationResponse> createConsentAuthorisation(AuthorisationType authorisationType, String parentId, CreateAuthorisationRequest authorisationRequest) {
        CmsResponse<CreateAuthorisationResponse> cmsResponse = authorisationServiceEncrypted.createAuthorisation(new AuthorisationParentHolder(authorisationType, parentId), authorisationRequest);

        if (cmsResponse.hasError()) {
            return new ResponseEntity<>(HttpStatus.NOT_FOUND);
        }

        return new ResponseEntity<>(cmsResponse.getPayload(), HttpStatus.CREATED);
    }

}