/** * {@inheritdoc} */ public function updateCentile($chartIdentifier, Centile $centile) { if (!$centile->getCentileIdentifier()) { throw new BadMethodCallException(sprintf("This measurement has not been saved before. Use addMeasurement to add.", $centile->getCentileIdentifier())); } $url = sprintf('/api/Storage/Chart/%s/Centile/%s', $chartIdentifier, $centile->getCentileIdentifier()); $data = $this->doRequest($url, $centile->toJson(), 'PUT'); return $centile->updateFromJson($data); }