| 1 | <?php |
||
| 4 | class Message |
||
| 5 | { |
||
| 6 | |||
| 7 | /** |
||
| 8 | * @var string |
||
| 9 | */ |
||
| 10 | protected $messageId; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var int |
||
| 14 | */ |
||
| 15 | protected $sequence; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var null|string |
||
| 19 | */ |
||
| 20 | protected $text; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var null|string |
||
| 24 | */ |
||
| 25 | protected $quickReply; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var array |
||
| 29 | */ |
||
| 30 | protected $attachments; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Message constructor. |
||
| 34 | * |
||
| 35 | * @param string $messageId |
||
| 36 | * @param int $sequence |
||
| 37 | * @param string $text |
||
| 38 | * @param string $quickReply |
||
| 39 | * @param array $attachments |
||
| 40 | */ |
||
| 41 | public function __construct( |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | public function getMessageId(): string |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @return int |
||
| 65 | */ |
||
| 66 | public function getSequence(): int |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @return null|string |
||
| 73 | */ |
||
| 74 | public function getText() |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @return null|string |
||
| 81 | */ |
||
| 82 | public function getQuickReply() |
||
| 86 | |||
| 87 | /** |
||
| 88 | * @return array |
||
| 89 | */ |
||
| 90 | public function getAttachments(): array |
||
| 94 | |||
| 95 | /** |
||
| 96 | * @param array $payload |
||
| 97 | * @return static |
||
| 98 | */ |
||
| 99 | public static function create(array $payload) |
||
| 107 | } |
||
| 108 |