1 | <?php |
||
21 | final class Mailgun |
||
22 | { |
||
23 | /** |
||
24 | * @var null|string |
||
25 | */ |
||
26 | private $apiKey; |
||
27 | |||
28 | /** |
||
29 | * @var HttpMethodsClient |
||
30 | */ |
||
31 | private $httpClient; |
||
32 | |||
33 | /** |
||
34 | * @var Hydrator |
||
35 | */ |
||
36 | private $hydrator; |
||
37 | |||
38 | /** |
||
39 | * @var RequestBuilder |
||
40 | */ |
||
41 | private $requestBuilder; |
||
42 | |||
43 | /** |
||
44 | * This is a object that holds the last response from the API. |
||
45 | * |
||
46 | * @var History |
||
47 | */ |
||
48 | private $responseHistory; |
||
49 | |||
50 | public function __construct( |
||
62 | |||
63 | public static function create(string $apiKey, string $endpoint = 'https://api.mailgun.net'): self |
||
71 | |||
72 | /** |
||
73 | * @return ResponseInterface|null |
||
74 | */ |
||
75 | public function getLastResponse() |
||
79 | |||
80 | public function stats(): Api\Stats |
||
84 | |||
85 | public function attachment(): Api\Attachment |
||
89 | |||
90 | public function domains(): Api\Domain |
||
94 | |||
95 | public function tags(): Api\Tag |
||
99 | |||
100 | public function events(): Api\Event |
||
104 | |||
105 | public function routes(): Api\Route |
||
109 | |||
110 | public function webhooks(): Api\Webhook |
||
114 | |||
115 | public function messages(): Api\Message |
||
119 | |||
120 | public function ips(): Api\Ip |
||
124 | |||
125 | public function suppressions(): Api\Suppression |
||
129 | } |
||
130 |