mirror of
https://github.com/envoyr/php-froxlor-client.git
synced 2026-04-28 04:06:19 +00:00
Initial commit
This commit is contained in:
30
src/Emails.php
Normal file
30
src/Emails.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Envoyr\Froxlor;
|
||||
|
||||
class Emails
|
||||
{
|
||||
public Customer $customer;
|
||||
|
||||
public function __construct(Customer $customer)
|
||||
{
|
||||
$this->customer = $customer;
|
||||
}
|
||||
|
||||
public function create(string $email_part, string $domain, string $description = null): array
|
||||
{
|
||||
return $this->customer->server->request('Emails.add', [
|
||||
'loginname' => $this->customer->loginname,
|
||||
'email_part' => $email_part,
|
||||
'domain' => $domain,
|
||||
'description' => $description,
|
||||
]);
|
||||
}
|
||||
|
||||
public function list(): array
|
||||
{
|
||||
return $this->customer->server->request('Emails.listing', [
|
||||
'loginname' => $this->customer->loginname,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user