From f4c2f546b0ca75c70a5ca1cce50962003848fafb Mon Sep 17 00:00:00 2001 From: Kyle Yee Date: Sat, 14 Dec 2019 15:24:43 +0800 Subject: [PATCH] Feature: add lock and unlock domain --- src/Endpoints/Accounts.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Endpoints/Accounts.php b/src/Endpoints/Accounts.php index fd42189..2264534 100644 --- a/src/Endpoints/Accounts.php +++ b/src/Endpoints/Accounts.php @@ -58,4 +58,18 @@ class Accounts implements API 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; + } }