diff --git a/src/Endpoints/Accounts.php b/src/Endpoints/Accounts.php index 1bfd61f..4d4d80a 100644 --- a/src/Endpoints/Accounts.php +++ b/src/Endpoints/Accounts.php @@ -61,14 +61,14 @@ class Accounts implements API public function lockDomain(string $accountID, string $domainName): \stdClass { - $response = $this->adapter->put('accounts/' . $accountID . '/registrar/domains/' . $domainName, ["locked" => true]); + $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): \stdClass { - $response = $this->adapter->put('accounts/' . $accountID . '/registrar/domains/' . $domainName, ["locked" => false]); + $response = $this->adapter->put('accounts/' . $accountID . '/registrar/domains/' . $domainName, ['locked' => false]); $this->body = json_decode($response->getBody()); return $this->body; } diff --git a/src/Endpoints/Zones.php b/src/Endpoints/Zones.php index bbd3564..19390b1 100644 --- a/src/Endpoints/Zones.php +++ b/src/Endpoints/Zones.php @@ -58,12 +58,9 @@ class Zones implements API return false; } - public function pause(string $zoneID, bool $paused = true): bool + public function pause(string $zoneID): bool { - $options = [ - 'paused' => $paused, - ]; - $user = $this->adapter->patch('zones/' . $zoneID, $options); + $user = $this->adapter->patch('zones/' . $zoneID, ['paused' => true]); $this->body = json_decode($user->getBody()); if (isset($this->body->result->id)) { @@ -72,7 +69,19 @@ class Zones implements API return false; } - + + public function unpause(string $zoneID): bool + { + $user = $this->adapter->patch('zones/' . $zoneID, ['paused' => false]); + $this->body = json_decode($user->getBody()); + + if (isset($this->body->result->id)) { + return true; + } + + return false; + } + public function getZoneById( string $zoneId ): \stdClass {