Skip to content

Commit

Permalink
Added check_regions for pool configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
HemeraOne committed Jun 3, 2019
1 parent 99c174b commit 1724b66
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Configurations/Pool.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ public function getMonitor():string
return $this->configs['monitor'] ?? '';
}

public function setCheckRegions(array $checkRegions)
{
$this->configs['check_regions'] = $checkRegions;
}

public function getCheckRegions():array
{
return $this->configs['check_regions'] ?? [];
}

public function setNotificationEmail(string $email)
{
if (filter_var($email, FILTER_VALIDATE_EMAIL) === false) {
Expand Down
4 changes: 4 additions & 0 deletions src/Endpoints/Pools.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ public function getPoolConfiguration(string $accountID, string $poolID)
$poolConfiguration->setMonitor($pool->monitor);
$poolConfiguration->setNotificationEmail($pool->notification_email);

if (is_array($pool->check_regions)) {
$poolConfiguration->setCheckRegions($pool->check_regions);
}

return $poolConfiguration;
}

Expand Down

0 comments on commit 1724b66

Please sign in to comment.