Skip to content

Commit

Permalink
Recreated GetDomainResponse, based on the Response base class. Added …
Browse files Browse the repository at this point in the history
…ReactivateDomain command.
  • Loading branch information
Marc committed Oct 17, 2024
1 parent 00568a1 commit 324f8b9
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions src/BNamed.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace Mvdgeijn\BNamed;

use Mvdgeijn\BNamed\Responses\GetDomainResponse;
use Mvdgeijn\BNamed\Responses\GetReactivatableDomainsResponse;
use Mvdgeijn\BNamed\Responses\ReactivateResponse;
use Mvdgeijn\BNamed\Responses\Response;
use Mvdgeijn\BNamed\Responses\TLDAllResponse;

Expand Down Expand Up @@ -145,12 +147,31 @@ public function getReactivatableDomains(): GetReactivatableDomainsResponse
}

/**
* Retrieve a domain by name.
* Reactivate a domain that is expired
*
* @param string $domainName
* @return Response
*/
public function getDomain( string $domainName ): Response
public function reactivateDomain( string $domainName ): ReactivateResponse
{
[$sld, $tld] = explode('.', $domainName, 2);

return $this->connector->get('Reactivate',
[
"SLD" => $sld,
"TLD" => $tld,
"IAgreeWithExtraReactivationCosts" => "YES"
]
);
}

/**
* Retrieve a domain by name.
*
* @param string $domainName
* @return GetDomainResponse
*/
public function getDomain( string $domainName ): GetDomainResponse
{
[$sld, $tld] = explode('.', $domainName, 2);

Expand Down

0 comments on commit 324f8b9

Please sign in to comment.