mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-25 14:26:04 +03:00
parent
a79b8bb86f
commit
cbb13527b9
@ -28,7 +28,6 @@ class Bounce
|
||||
public static function create(array $data): self
|
||||
{
|
||||
$model = new self();
|
||||
|
||||
$model->address = $data['address'] ?? null;
|
||||
$model->code = $data['code'] ?? null;
|
||||
$model->error = $data['error'] ?? null;
|
||||
|
@ -38,7 +38,6 @@ final class IndexResponse implements ApiResponse, PagingProvider
|
||||
}
|
||||
|
||||
$model = new self();
|
||||
|
||||
$model->items = $bounces;
|
||||
$model->paging = $data['paging'];
|
||||
|
||||
|
@ -26,7 +26,6 @@ class Complaint
|
||||
public static function create(array $data): self
|
||||
{
|
||||
$model = new self();
|
||||
|
||||
$model->address = $data['address'] ?? null;
|
||||
$model->createdAt = isset($data['created_at']) ? new \DateTimeImmutable($data['created_at']) : null;
|
||||
|
||||
|
@ -38,7 +38,6 @@ final class IndexResponse implements ApiResponse, PagingProvider
|
||||
}
|
||||
|
||||
$model = new self();
|
||||
|
||||
$model->items = $complaints;
|
||||
$model->paging = $data['paging'];
|
||||
|
||||
|
@ -55,7 +55,6 @@ final class IndexResponse implements ApiResponse, PagingProvider
|
||||
}
|
||||
|
||||
$model = new self();
|
||||
|
||||
$model->items = $unsubscribes;
|
||||
$model->paging = $data['paging'];
|
||||
|
||||
|
@ -27,14 +27,10 @@ class Unsubscribe
|
||||
public static function create(array $data): self
|
||||
{
|
||||
$model = new self();
|
||||
|
||||
$model->tags = $data['tags'] ?? [];
|
||||
$model->address = $data['address'] ?? null;
|
||||
$model->createdAt = isset($data['created_at']) ? new \DateTimeImmutable($data['created_at']) : null;
|
||||
|
||||
if (isset($data['tags'])) {
|
||||
$model->tags = $data['tags'];
|
||||
}
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,6 @@ final class IndexResponse implements ApiResponse, PagingProvider
|
||||
}
|
||||
|
||||
$model = new self();
|
||||
|
||||
$model->items = $items;
|
||||
$model->paging = $data['paging'];
|
||||
|
||||
|
@ -27,8 +27,9 @@ final class UpdateResponse implements ApiResponse
|
||||
public static function create(array $data): self
|
||||
{
|
||||
$model = new self();
|
||||
|
||||
$model->message = $data['message'] ?? '';
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function getMessage(): string
|
||||
|
Loading…
Reference in New Issue
Block a user