1 | <?php |
||
8 | class TotalVoice |
||
9 | { |
||
10 | /** |
||
11 | * @var TotalVoiceService |
||
12 | */ |
||
13 | protected $totalVoiceService; |
||
14 | |||
15 | /** |
||
16 | * @var TotalVoiceConfig |
||
17 | */ |
||
18 | private $config; |
||
19 | |||
20 | /** |
||
21 | * TotalVoice constructor. |
||
22 | * |
||
23 | * @param TotalVoiceService $totalVoiceService |
||
24 | * @param TotalVoiceConfig $config |
||
25 | */ |
||
26 | 8 | public function __construct(TotalVoiceService $totalVoiceService, TotalVoiceConfig $config) |
|
31 | |||
32 | /** |
||
33 | * Send a TotalVoiceMessage to the a phone number. |
||
34 | * |
||
35 | * @param TotalVoiceMessage $message |
||
36 | * @param string $to |
||
37 | * @return mixed |
||
38 | * @throws CouldNotSendNotification |
||
39 | */ |
||
40 | 3 | public function sendMessage(TotalVoiceMessage $message, $to) |
|
53 | |||
54 | /** |
||
55 | * Send an sms message using the TotalVoice Service. |
||
56 | * |
||
57 | * @param TotalVoiceSmsMessage $message |
||
58 | * @param string $to |
||
59 | * @return mixed |
||
60 | * @throws CouldNotSendNotification |
||
61 | */ |
||
62 | 1 | public function sendSmsMessage(TotalVoiceSmsMessage $message, $to) |
|
70 | |||
71 | /** |
||
72 | * Make a text-to-speech call using the TotalVoice Service. |
||
73 | * |
||
74 | * @param TotalVoiceTtsMessage $message |
||
75 | * @param string $to |
||
76 | * @return mixed |
||
77 | * @throws CouldNotSendNotification |
||
78 | */ |
||
79 | 1 | public function sendTtsMessage(TotalVoiceTtsMessage $message, $to) |
|
94 | |||
95 | /** |
||
96 | * Make a call using the TotalVoice Service. |
||
97 | * |
||
98 | * @param TotalVoiceAudioMessage $message |
||
99 | * @param string $to |
||
100 | * @return mixed |
||
101 | * @throws CouldNotSendNotification |
||
102 | */ |
||
103 | 1 | public function sendAudioMessage(TotalVoiceAudioMessage $message, $to) |
|
113 | } |
||
114 |