diff --git a/src/Model/MailingList/ValidateResponse.php b/src/Model/MailingList/ValidateResponse.php index 6dc8a48..a86e44e 100644 --- a/src/Model/MailingList/ValidateResponse.php +++ b/src/Model/MailingList/ValidateResponse.php @@ -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; } diff --git a/src/Model/MailingList/ValidationStatusDownloadUrl.php b/src/Model/MailingList/ValidationStatusDownloadUrl.php index 60f9958..f66d628 100644 --- a/src/Model/MailingList/ValidationStatusDownloadUrl.php +++ b/src/Model/MailingList/ValidationStatusDownloadUrl.php @@ -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; } diff --git a/src/Model/MailingList/ValidationStatusResponse.php b/src/Model/MailingList/ValidationStatusResponse.php index 5f3dc4a..30391f1 100644 --- a/src/Model/MailingList/ValidationStatusResponse.php +++ b/src/Model/MailingList/ValidationStatusResponse.php @@ -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; }