Skip to content

Commit

Permalink
Fix: NumYears is mandatory when reactivating a domain
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc committed Oct 17, 2024
1 parent 901d727 commit 970c571
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/BNamed.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,16 @@ public function getReactivatableDomains(): GetReactivatableDomainsResponse
* @param string $domainName
* @return ReactivateResponse
*/
public function reactivateDomain( string $domainName ): ReactivateResponse
public function reactivateDomain( string $domainName, int $numYears = 1 ): ReactivateResponse
{
[$sld, $tld] = explode('.', $domainName, 2);

return $this->connector->get('Reactivate',
[
"SLD" => $sld,
"TLD" => $tld,
"IAgreeWithExtraReactivationCosts" => "YES"
"IAgreeWithExtraReactivationCosts" => "YES",
"NumYears" => $numYears // bNamed API states it's optional, but nothing happens if not present
]
);
}
Expand Down

0 comments on commit 970c571

Please sign in to comment.