Esempio n. 1
0
 /**
  * @param array|null $params
  *
  * @return Printfection_Order The placed order.
  */
 public function place()
 {
     $requestor = new Printfection_ApiRequestor($this->_apiKey);
     $url = $this->instanceUrl() . '/place';
     list($response, $apiKey) = $requestor->request('post', $url);
     $this->refreshFrom($response, $apiKey);
     return $this;
 }
Esempio n. 2
0
 public function next()
 {
     list($url, $params) = $this->extractPathAndUpdateParams($params);
     $requestor = new Printfection_ApiRequestor($this->_apiKey);
     $id = Printfection_ApiRequestor::utf8($id);
     $extn = urlencode($id);
     $params['limit'] = isset($params['limit']) ? $params['limit'] : 100;
     $params['offset'] = isset($params['offset']) ? $params['offset'] + $params['limit'] : $params['limit'];
     list($response, $apiKey) = $requestor->request('get', "{$url}/{$extn}", $params);
     return Printfection_Util::convertToPrintfectionObject($response, $apiKey);
 }
 protected function _scopedDelete($class, $params = null)
 {
     self::_validateCall('delete');
     $requestor = new Printfection_ApiRequestor($this->_apiKey);
     $url = $this->instanceUrl();
     list($response, $apiKey) = $requestor->request('delete', $url, $params);
     $this->refreshFrom($response, $apiKey);
     return $this;
 }