mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-22 12:36:02 +03:00
parent
f73445726f
commit
27d13d85fd
@ -62,18 +62,22 @@ class Complaint extends HttpApi
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $domain Domain to create complaint for
|
||||
* @param string $address Complaint address
|
||||
* @param array $params optional
|
||||
* @param string $domain Domain to create complaint for
|
||||
* @param string $address Complaint address
|
||||
* @param string $createdAt (optional) rfc2822 compliant format. (new \DateTime())->format('r')
|
||||
*
|
||||
* @return CreateResponse
|
||||
*/
|
||||
public function create($domain, $address, $code = null, $error = null, $createdAt = null)
|
||||
public function create($domain, $address, $createdAt = null)
|
||||
{
|
||||
Assert::stringNotEmpty($domain);
|
||||
Assert::stringNotEmpty($address);
|
||||
Assert::stringNotEmpty($createdAt);
|
||||
|
||||
$params['address'] = $address;
|
||||
if (null !== $createdAt) {
|
||||
$params['created_at'] = $createdAt;
|
||||
}
|
||||
|
||||
$response = $this->httpPost(sprintf('/v3/%s/complaints', $domain), $params);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user