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