/** * Delete collection * * @param $values * * @return mixed */ public function deleteAll($values = array()) { $values = BatchValidator::formatBatch($values); return $this->gateway->delete($this->collectionUrl(), $values); }
protected function getFormattedBatchParams($values) { $values = !empty($values) ? BatchValidator::formatBatch($values) : $values; $url = !empty($this->params) ? BatchValidator::formatUrlWithHttpParams($this->collectionUrl(), $this->params) : $this->collectionUrl(); return array($url, $values); }
public function testJSONParametersWrappedCorrectly() { $json = '[{"id": "20607982","optionlist_id": "405328"}]'; $params = json_decode($json, true); $this->assertEquals($params, BatchValidator::formatBatch($params)); }