/** * Register new domain * * @param Domain $domain prepared Domain object * @param int registrationPeriod registration period in years * * @return str json response */ public function create(Domain $domain, $registrationPeriod, $cltrid = false) { $domain->setRegistationPeriod($registrationPeriod); $requestData = $this->getRequestData(__FUNCTION__, $domain); $json = APIRequest::PUT("/domains/", $cltrid ?: ApiRequest::defaultClientTransactionID(), STRegistry::Session()->getAuthToken(), array(), $requestData); return $json; }
/** * Create new host * * @param Host $host prepared Host object * * @return str json response */ public function create(Host $host, $cltrid = false) { $requestData = $this->getRequestData(__FUNCTION__, $host); $json = APIRequest::PUT("/hosts/", $cltrid ?: ApiRequest::defaultClientTransactionID(), STRegistry::Session()->getAuthToken(), array(), $requestData); return $json; }