@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * @var array |
| 18 | - */ |
|
| 18 | + */ |
|
| 19 | 19 | |
| 20 | 20 | private $useCase = ['Transactional', 'Marketing', 'Transactional & Marketing']; |
| 21 | 21 | |
@@ -39,14 +39,14 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * @var string |
| 42 | - */ |
|
| 42 | + */ |
|
| 43 | 43 | |
| 44 | 44 | protected $publicKey; |
| 45 | 45 | |
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | 48 | * @var string |
| 49 | - */ |
|
| 49 | + */ |
|
| 50 | 50 | |
| 51 | 51 | protected $client; |
| 52 | 52 | |
@@ -54,14 +54,14 @@ discard block |
||
| 54 | 54 | /** |
| 55 | 55 | * Response from sendchamp api |
| 56 | 56 | * @var mixed |
| 57 | - */ |
|
| 57 | + */ |
|
| 58 | 58 | |
| 59 | 59 | |
| 60 | 60 | protected $response; |
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | 63 | * @var string |
| 64 | - */ |
|
| 64 | + */ |
|
| 65 | 65 | |
| 66 | 66 | |
| 67 | 67 | protected $baseUrl; |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | 78 | * Get base url from sendchamp config |
| 79 | - */ |
|
| 79 | + */ |
|
| 80 | 80 | |
| 81 | 81 | public function getBaseUrl() |
| 82 | 82 | { |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | 88 | * Get public key from sendchamp cofig |
| 89 | - */ |
|
| 89 | + */ |
|
| 90 | 90 | |
| 91 | 91 | public function getKey() |
| 92 | 92 | { |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | /** |
| 98 | 98 | * Set request options |
| 99 | 99 | * @return SendChamp |
| 100 | - */ |
|
| 100 | + */ |
|
| 101 | 101 | |
| 102 | 102 | private function setRequestOptions() |
| 103 | 103 | { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * @param string $method |
| 125 | 125 | * @param array $data |
| 126 | 126 | * @return SendChamp |
| 127 | - */ |
|
| 127 | + */ |
|
| 128 | 128 | |
| 129 | 129 | |
| 130 | 130 | private function setHttpResponse($url, $method = null, $body = []) |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | /** |
| 146 | 146 | * Decode json response into an array |
| 147 | 147 | * @return array |
| 148 | - */ |
|
| 148 | + */ |
|
| 149 | 149 | |
| 150 | 150 | |
| 151 | 151 | private function getResponse() |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | * You should pass either of the following: Transactional, Marketing, or Transactional & Marketing |
| 162 | 162 | * @param string $sample_message |
| 163 | 163 | * @return array |
| 164 | - */ |
|
| 164 | + */ |
|
| 165 | 165 | |
| 166 | 166 | public function createSmsSender(string $sender_name, string $use_case, |
| 167 | 167 | string $sample_message){ |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | * To do that put numbers in an array |
| 198 | 198 | * (Example: [ '234somenumber', '234anothenumber' ]). |
| 199 | 199 | * @return array |
| 200 | - */ |
|
| 200 | + */ |
|
| 201 | 201 | |
| 202 | 202 | public function sendSms(string $message, string $sender_name, array $numbers, string $route = ""){ |
| 203 | 203 | |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | * @param string $sms_id |
| 225 | 225 | * ID of the SMS that was sent |
| 226 | 226 | * @return array |
| 227 | - */ |
|
| 227 | + */ |
|
| 228 | 228 | |
| 229 | 229 | public function fetchSmsStatus(string $sms_id){ |
| 230 | 230 | |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | * The number represents the destination phone number. |
| 244 | 244 | * The number must be in international format (E.g. 2348012345678) |
| 245 | 245 | * @return array |
| 246 | - */ |
|
| 246 | + */ |
|
| 247 | 247 | |
| 248 | 248 | |
| 249 | 249 | public function sendVoice(string $message, string $sender_name, string $number){ |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | * Whatsapp number of the customer you are sending the message to |
| 272 | 272 | * @param string $message |
| 273 | 273 | * @return array |
| 274 | - */ |
|
| 274 | + */ |
|
| 275 | 275 | |
| 276 | 276 | |
| 277 | 277 | public function sendWhatsappOtp(string $template_code, string $message, |
@@ -306,10 +306,10 @@ discard block |
||
| 306 | 306 | * when using SMS OR Whatsapp Channel or we will select a |
| 307 | 307 | * default sender from your account. Eg: KUDA OR +234810000000 |
| 308 | 308 | * @return array |
| 309 | - */ |
|
| 309 | + */ |
|
| 310 | 310 | |
| 311 | 311 | public function sendOtp(string $channel, string $token_type, int $token_length, |
| 312 | - int $expiry_day, string $customer_email, string $customer_mobile_number, array $meta_data, string $sender){ |
|
| 312 | + int $expiry_day, string $customer_email, string $customer_mobile_number, array $meta_data, string $sender){ |
|
| 313 | 313 | |
| 314 | 314 | if(!in_array($token_type, $this->tokenType)){ |
| 315 | 315 | |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | * @param string $otp |
| 348 | 348 | * The OTP that was sent to the customer. |
| 349 | 349 | * @return array |
| 350 | - */ |
|
| 350 | + */ |
|
| 351 | 351 | |
| 352 | 352 | |
| 353 | 353 | public function confirmOtp(string $reference, string $otp){ |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | /** |
| 366 | 366 | * Get contacts list |
| 367 | 367 | * @return array |
| 368 | - */ |
|
| 368 | + */ |
|
| 369 | 369 | |
| 370 | 370 | public function getContactList(){ |
| 371 | 371 | |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | * @param string $email |
| 383 | 383 | * @param string $reference |
| 384 | 384 | * @return array |
| 385 | - */ |
|
| 385 | + */ |
|
| 386 | 386 | |
| 387 | 387 | public function createOrUpdateContact(string $lastname, string $firstname, string $phone, string $email, string $reference){ |
| 388 | 388 | |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | * Delete contact |
| 406 | 406 | * @param string $id |
| 407 | 407 | * @return array |
| 408 | - */ |
|
| 408 | + */ |
|
| 409 | 409 | |
| 410 | 410 | public function deleteContact(string $id){ |
| 411 | 411 | |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | * Get wallet report |
| 421 | 421 | * |
| 422 | 422 | * @return array |
| 423 | - */ |
|
| 423 | + */ |
|
| 424 | 424 | |
| 425 | 425 | public function getWalletReport(){ |
| 426 | 426 | |