| 1 |
<?php |
| 2 |
|
| 3 |
namespace Pushly\Models; |
| 4 |
|
| 5 |
class NotificationAudience implements \JsonSerializable { |
| 6 |
public ?bool $all_subscribers = null; |
| 7 |
public ?array $segment_ids = null; |
| 8 |
|
| 9 |
#[\ReturnTypeWillChange] |
| 10 |
public function jsonSerialize(): array { |
| 11 |
if ( $this->all_subscribers ) { |
| 12 |
return [ 'all_subscribers' => $this->all_subscribers ]; |
| 13 |
} |
| 14 |
|
| 15 |
return [ 'segment_ids' => $this->segment_ids ]; |
| 16 |
} |
| 17 |
} |
| 18 |
|