public function delete($url, $query_parameters = array(), $data = array())
{
if (is_array($url)) {
$data = $query_parameters;
$query_parameters = $url;
$url = $this->baseUrl;
}
$this->setUrl($url, $query_parameters);
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'DELETE');
$this->setOpt(CURLOPT_POSTFIELDS, $this->buildPostData($data));
return $this->exec();
}
/** * @param string $apiKey * @param string $apiSecret * @param int $subAccountId * * @return AccountResponse */ public static function deleteSubAccount($apiKey, $apiSecret, $subAccountId) { $apiEndpoint = sprintf('%s/subaccounts/%s', self::API_URL, $subAccountId); $curl = new Curl(); $curl->delete($apiEndpoint, json_encode(['api_key' => $apiKey, 'api_secret' => $apiSecret])); return self::parseResponse($curl); }