Skip to content

Commit f536304

Browse files
committed
Add the pool_id parameter to Domain::create()
1 parent 330ab10 commit f536304

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/Api/Domain.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,11 @@ public function show(string $domain)
8484
* @param bool $wildcard domain will accept email for subdomains
8585
* @param bool $forceDkimAuthority force DKIM authority
8686
* @param string[] $ips an array of ips to be assigned to the domain
87+
* @param ?string $pool_id pool id to assign to the domain
8788
*
8889
* @return CreateResponse|array|ResponseInterface
8990
*/
90-
public function create(string $domain, string $smtpPass = null, string $spamAction = null, bool $wildcard = null, bool $forceDkimAuthority = null, ?array $ips = null)
91+
public function create(string $domain, string $smtpPass = null, string $spamAction = null, bool $wildcard = null, bool $forceDkimAuthority = null, ?array $ips = null, ?string $pool_id = null)
9192
{
9293
Assert::stringNotEmpty($domain);
9394

@@ -125,6 +126,12 @@ public function create(string $domain, string $smtpPass = null, string $spamActi
125126
$params['ips'] = join(',', $ips);
126127
}
127128

129+
if (null !== $pool_id) {
130+
Assert::stringNotEmpty($pool_id);
131+
132+
$params['pool_id'] = $pool_id;
133+
}
134+
128135
$response = $this->httpPost('/v3/domains', $params);
129136

130137
return $this->hydrateResponse($response, CreateResponse::class);

0 commit comments

Comments
 (0)