| 1 | <?php |
||
| 10 | class MobilyWsMessage |
||
| 11 | { |
||
| 12 | /** @var string */ |
||
| 13 | public $text; |
||
| 14 | |||
| 15 | /** @var Carbon */ |
||
| 16 | public $time; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Create new instance of mobilyWsMessage. |
||
| 20 | * |
||
| 21 | * @param string $text |
||
| 22 | * |
||
| 23 | * @return static |
||
| 24 | */ |
||
| 25 | 5 | public static function create($text = '') |
|
| 29 | |||
| 30 | /** |
||
| 31 | * MobilyWsMessage constructor. |
||
| 32 | * |
||
| 33 | * @param string $text |
||
| 34 | */ |
||
| 35 | 20 | public function __construct($text = '') |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Set the Content of the SMS message. |
||
| 42 | * |
||
| 43 | * @param $text |
||
| 44 | * |
||
| 45 | * @return $this |
||
| 46 | */ |
||
| 47 | 1 | public function text($text) |
|
| 53 | |||
| 54 | /** |
||
| 55 | * Set the message scheduled date and time. |
||
| 56 | * |
||
| 57 | * @param DateTime|Carbon|int $time |
||
| 58 | * |
||
| 59 | * @return $this |
||
| 60 | * |
||
| 61 | * @throws CouldNotSendMobilyWsNotification |
||
| 62 | */ |
||
| 63 | 6 | public function time($time) |
|
| 79 | |||
| 80 | /** |
||
| 81 | * Get the message schedule date. |
||
| 82 | * |
||
| 83 | * @return string |
||
| 84 | */ |
||
| 85 | 7 | public function dateSend() |
|
| 91 | |||
| 92 | /** |
||
| 93 | * Get the message schedule time. |
||
| 94 | * |
||
| 95 | * @return string |
||
| 96 | */ |
||
| 97 | 7 | public function timeSend() |
|
| 103 | } |
||
| 104 |