mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2025-02-18 05:43:15 +03:00
mailing list validation
This commit is contained in:
parent
0a9562e73c
commit
6e372e1e33
@ -21,8 +21,8 @@ final class ValidateResponse implements ApiResponse
|
||||
public static function create(array $data): self
|
||||
{
|
||||
$model = new self();
|
||||
$model->id = $data['id'] ?? '';
|
||||
$model->message = $data['message'] ?? '';
|
||||
$model->id = $data['id'] ?? null;
|
||||
$model->message = $data['message'] ?? null;
|
||||
|
||||
return $model;
|
||||
}
|
||||
@ -31,12 +31,12 @@ final class ValidateResponse implements ApiResponse
|
||||
{
|
||||
}
|
||||
|
||||
public function getMessage(): string
|
||||
public function getMessage(): ?string
|
||||
{
|
||||
return $this->message;
|
||||
}
|
||||
|
||||
public function getId(): string
|
||||
public function getId(): ?string
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
@ -21,8 +21,8 @@ final class ValidationStatusDownloadUrl implements ApiResponse
|
||||
public static function create(array $data): self
|
||||
{
|
||||
$model = new self();
|
||||
$model->csv = $data['csv'] ?? '';
|
||||
$model->json = $data['json'] ?? '';
|
||||
$model->csv = $data['csv'] ?? null;
|
||||
$model->json = $data['json'] ?? null;
|
||||
|
||||
return $model;
|
||||
}
|
||||
@ -31,12 +31,12 @@ final class ValidationStatusDownloadUrl implements ApiResponse
|
||||
{
|
||||
}
|
||||
|
||||
public function getCsv(): string
|
||||
public function getCsv(): ?string
|
||||
{
|
||||
return $this->csv;
|
||||
}
|
||||
|
||||
public function getJson(): string
|
||||
public function getJson(): ?string
|
||||
{
|
||||
return $this->json;
|
||||
}
|
||||
|
@ -26,13 +26,13 @@ final class ValidationStatusResponse implements ApiResponse
|
||||
public static function create(array $data): self
|
||||
{
|
||||
$model = new self();
|
||||
$model->id = $data['id'] ?? '';
|
||||
$model->id = $data['id'] ?? null;
|
||||
$model->createdAt = $data['created_at'] ?? null;
|
||||
$model->downloadUrl = ValidationStatusDownloadUrl::create($data['download_url']);
|
||||
$model->id = $data['id'] ?? '';
|
||||
$model->id = $data['id'] ?? null;
|
||||
$model->quantity = $data['quantity'] ?? 0;
|
||||
$model->recordsProcessed = $data['records_processed'] ?? 0;
|
||||
$model->status = $data['status'] ?? '';
|
||||
$model->recordsProcessed = $data['records_processed'] ?? null;
|
||||
$model->status = $data['status'] ?? null;
|
||||
$model->summary = ValidationStatusSummary::create($data['summary'] ?? []);
|
||||
|
||||
return $model;
|
||||
@ -42,7 +42,7 @@ final class ValidationStatusResponse implements ApiResponse
|
||||
{
|
||||
}
|
||||
|
||||
public function getCreatedAt(): string
|
||||
public function getCreatedAt(): ?string
|
||||
{
|
||||
return $this->createdAt;
|
||||
}
|
||||
@ -52,22 +52,22 @@ final class ValidationStatusResponse implements ApiResponse
|
||||
return $this->downloadUrl;
|
||||
}
|
||||
|
||||
public function getId(): string
|
||||
public function getId(): ?string
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getQuantity(): int
|
||||
public function getQuantity(): ?int
|
||||
{
|
||||
return $this->quantity;
|
||||
}
|
||||
|
||||
public function getRecordsProcessed(): int
|
||||
public function getRecordsProcessed(): ?int
|
||||
{
|
||||
return $this->recordsProcessed;
|
||||
}
|
||||
|
||||
public function getStatus(): string
|
||||
public function getStatus(): ?string
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user