class SeyrenRepository {

    public void addSubscription(final Subscription subscription, final String alarmId) {
        final ResponseEntity<Object> response =
            restTemplate.postForEntity(seyrenUrl + API_ALARMS + "/" + alarmId + "/subscriptions/", subscription, Object.class);

        if (!response.getStatusCode().is2xxSuccessful()) {
            throw new SeyrenException("addSubscription", response.getStatusCode().value());
        }

        LOGGER.info("Add subscription for alarm {}. Response {}", alarmId, response.getStatusCode());
    }

}