| 1 | <?php |
||
| 7 | class EngageSparkMessage |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * The mode. |
||
| 11 | * |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | public $mode = 'sms'; //sms or topup |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The air_time. |
||
| 18 | * |
||
| 19 | * @var double |
||
| 20 | */ |
||
| 21 | public $air_time = 0; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * The phone number the message should be sent from. |
||
| 25 | * |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | public $from = ''; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * The recipient type. |
||
| 32 | * |
||
| 33 | * @var string |
||
| 34 | */ |
||
| 35 | public $recipient_type = 'mobile_number'; //mobile_number or contact_id |
||
| 36 | |||
| 37 | /** |
||
| 38 | * The message content. |
||
| 39 | * |
||
| 40 | * @var string |
||
| 41 | */ |
||
| 42 | public $content; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * The sender id. |
||
| 46 | * |
||
| 47 | * @var string |
||
| 48 | */ |
||
| 49 | public $sender_id; |
||
| 50 | |||
| 51 | |||
| 52 | /** |
||
| 53 | * Create a message object. |
||
| 54 | * @param string $content |
||
| 55 | * @return static |
||
| 56 | */ |
||
| 57 | public static function create($content = '') |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Create a new message instance. |
||
| 64 | * |
||
| 65 | * @param string $content |
||
| 66 | */ |
||
| 67 | public function __construct($content = '') |
||
| 71 | |||
| 72 | public function mode($mode) |
||
| 78 | |||
| 79 | public function transfer($amount) |
||
| 85 | |||
| 86 | /** |
||
| 87 | * Set the message content. |
||
| 88 | * |
||
| 89 | * @param string $content |
||
| 90 | * @return $this |
||
| 91 | */ |
||
| 92 | public function content($content) |
||
| 98 | |||
| 99 | /** |
||
| 100 | * Set the phone number or sender name the message should be sent from. |
||
| 101 | * |
||
| 102 | * @param string $from |
||
| 103 | * |
||
| 104 | * @return $this |
||
| 105 | */ |
||
| 106 | public function from($from) |
||
| 112 | |||
| 113 | public function recipient_type($recipient_type) |
||
| 119 | |||
| 120 | public function sender_id($sender_id) |
||
| 126 | |||
| 127 | public function generateClientReference() |
||
| 131 | } |
||
| 132 |