Feature: add lock and unlock domain

This commit is contained in:
Kyle Yee
2019-12-14 15:24:43 +08:00
parent b04abe73bc
commit f4c2f546b0

View File

@@ -58,4 +58,18 @@ class Accounts implements API
return $this->body->result; return $this->body->result;
} }
public function lockDomain(string $accountID, string $domainName): array
{
$response = $this->adapter->put('accounts/' . $accountID . '/registrar/domains' . $domainName, ["locked" => true]);
$this->body = json_decode($response->getBody());
return $this->body;
}
public function unlockDomain(string $accountID, string $domainName): array
{
$response = $this->adapter->put('accounts/' . $accountID . '/registrar/domains' . $domainName, ["locked" => false]);
$this->body = json_decode($response->getBody());
return $this->body;
}
} }