Skip to content

Commit f27bf9f

Browse files
author
Glamazda Sergey
committed
remove method sendSms
1 parent 87540d4 commit f27bf9f

File tree

2 files changed

+0
-52
lines changed

2 files changed

+0
-52
lines changed

src/ApiClient.php

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,48 +1203,4 @@ public function startEventAutomation360($eventName, array $variables)
12031203

12041204
return $this->handleResult($requestResult);
12051205
}
1206-
1207-
/**
1208-
* @param array $data
1209-
* Parameter keys:
1210-
* Required parameters:
1211-
* string 'sender' => Sender name
1212-
* string 'body' => Message text
1213-
* array|string 'phones' => ['1234565', '4567895', ...] or '{"1234565","4567895", ...}'
1214-
*
1215-
* Optional parameters:
1216-
* int 'transliterate' => 1 or 0
1217-
* string 'date' => 'Y-m-d H:i:s' or null
1218-
* array|string 'route' => ['UA'=>'international', 'BY' => 'national', ...]
1219-
* or '{"UA":"international","BY":"international", ...}'
1220-
*
1221-
* @return stdClass
1222-
* @throws \InvalidArgumentException
1223-
*/
1224-
public function sendSms(array $data)
1225-
{
1226-
//Required parameters
1227-
$request['sender'] = isset($data['sender']) ? trim( (string)$data['sender']) : '';
1228-
$request['body'] = isset($data['body']) ? trim( (string)$data['body']) : '';
1229-
$request['phones'] = isset($data['phones'])
1230-
? (\is_array($data['phones']) ? \json_encode($data['phones']) : trim( (string)$data['phones']) )
1231-
: '';
1232-
1233-
//Optional parameters
1234-
$request['transliterate'] = empty($data['transliterate']) ? 0 : 1;
1235-
$request['date'] = isset($data['date']) ? trim( (string)$data['date']) : null;
1236-
$request['route'] = isset($data['route'])
1237-
? (\is_array($data['route']) ? \json_encode($data['route']) : trim( (string)$data['route']) )
1238-
: null;
1239-
1240-
if(empty($request['sender']) || empty($request['body']) || empty($request['phones']) )
1241-
{
1242-
$msg = print_r($request, true);
1243-
throw new \InvalidArgumentException("One or more required parameters are missing:\n$msg");
1244-
}
1245-
1246-
$requestResult = $this->sendRequest('sms/send', 'POST', $request);
1247-
1248-
return $this->handleResult($requestResult);
1249-
}
12501206
}

src/ApiInterface.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -386,12 +386,4 @@ public function getPushIntegrationCode($websiteID);
386386
* @return \stdClass
387387
*/
388388
public function startEventAutomation360($eventName, array $variables);
389-
390-
/**
391-
* @param array $data
392-
*
393-
* @return \stdClass
394-
* @throws \InvalidArgumentException
395-
*/
396-
public function sendSms(array $data);
397389
}

0 commit comments

Comments
 (0)