public function cancel($params = null, $apiKey = null) { $requestor = new SweetTooth_ApiRequestor($apiKey); $url = $this->instanceUrl() . '/cancel'; list($response, $apiKey) = $requestor->request('post', $url, $params); $this->refreshFrom($response, $apiKey); return $this; }
public function retrieve($id, $params = null) { $requestor = new SweetTooth_ApiRequestor($this->_apiKey); $base = $this['url']; $id = SweetTooth_ApiRequestor::utf8($id); $extn = urlencode($id); list($response, $apiKey) = $requestor->request('get', "{$base}/{$extn}", $params); return SweetTooth_Util::convertToSweetToothObject($response, $apiKey); }
protected function _scopedDelete($class, $params = null, $apiKey = null) { self::_validateCall('delete', null, $apiKey); $requestor = new SweetTooth_ApiRequestor($apiKey); $url = $this->instanceUrl(); list($response, $apiKey) = $requestor->request('delete', $url, $params); $this->refreshFrom($response, $apiKey); return $this; }