예제 #1
0
 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;
 }
예제 #2
0
 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);
 }
예제 #3
0
 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;
 }