1 | <?php |
||
8 | class Smsir extends Driver |
||
9 | { |
||
10 | /** |
||
11 | * Smsir Settings. |
||
12 | * |
||
13 | * @var null|object |
||
14 | */ |
||
15 | protected $settings; |
||
16 | |||
17 | /** |
||
18 | * Smsir Client. |
||
19 | * |
||
20 | * @var null|Client |
||
21 | */ |
||
22 | protected $client; |
||
23 | |||
24 | /** |
||
25 | * Construct the class with the relevant settings. |
||
26 | * |
||
27 | * SendSmsInterface constructor. |
||
28 | * @param $settings object |
||
29 | */ |
||
30 | public function __construct($settings) |
||
35 | |||
36 | /** |
||
37 | * Send text message and return response. |
||
38 | * |
||
39 | * @return object |
||
40 | * @throws \GuzzleHttp\Exception\GuzzleException |
||
41 | */ |
||
42 | public function send() |
||
58 | |||
59 | /** |
||
60 | * @param string $recipient |
||
61 | * @param string $token |
||
62 | * @return array |
||
63 | */ |
||
64 | protected function payload($recipient, $token) |
||
78 | |||
79 | /** |
||
80 | * Get token. |
||
81 | * |
||
82 | * @throws \Exception |
||
83 | * @return string |
||
84 | */ |
||
85 | protected function getToken() |
||
103 | } |
||
104 |