| 1 | <?php |
||
| 4 | class Postback |
||
| 5 | { |
||
| 6 | |||
| 7 | /** |
||
| 8 | * @var string |
||
| 9 | */ |
||
| 10 | protected $payload; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var null|\Kerox\Messenger\Model\Callback\Referral |
||
| 14 | */ |
||
| 15 | protected $referral; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Postback constructor. |
||
| 19 | * |
||
| 20 | * @param string $payload |
||
| 21 | * @param \Kerox\Messenger\Model\Callback\Referral $referral |
||
| 22 | */ |
||
| 23 | public function __construct(string $payload, Referral $referral = null) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | public function getPayload(): string |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return null|\Kerox\Messenger\Model\Callback\Referral |
||
| 39 | */ |
||
| 40 | public function getReferral() |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param array $payload |
||
| 47 | * @return static |
||
| 48 | */ |
||
| 49 | public static function create(array $payload) |
||
| 55 | } |
||
| 56 |