芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/bit-alphas-ltd.com/user/project/vendor/vonage/client-core/src/SMS/Client.php
api = $api; } public function getAPIResource(): APIResource { return $this->api; } /** * @throws ClientExceptionInterface * @throws ClientException */ public function send(Message $message): Collection { try { $response = $this->api->create($message->toArray(), '/sms/json'); return new Collection($response); } catch (ThrottleException $e) { sleep($e->getTimeout()); return $this->send($message); } } /** * @throws ClientExceptionInterface * @throws ClientException */ public function sendTwoFactor(string $number, int $pin): SentSMS { $response = $this->api->create( ['to' => $number, 'pin' => $pin], '/sc/us/2fa/json' ); return new SentSMS($response['messages'][0]); } /** * @throws ClientExceptionInterface * @throws ClientException */ public function sendAlert(string $number, array $templateReplacements): Collection { $response = $this->api->create( ['to' => $number] + $templateReplacements, '/sc/us/alert/json' ); return new Collection($response); } }