+require_once (__DIR__ . '/../../vendor/autoload.php');
+ * Sample code showing how to delete all Voice numbers for
+// TEST auth token. Please contact
+// sales@braango.com to have one
+Braango\Configuration::getDefaultConfiguration()->setApiKey('auth_token', 'ISNWF0P30WM0CMK');
+$api_instance = new Braango\braangoapi\VoiceApi();
+// string | id of _sub_account_
+$subdealerid = "subdealers2002";
+// string | id of salesperson
+$salespersonid = "945cddce-6ef6-46e4-ac70-09375cf5165a";
+// string | API Key to access this dealer's resources.
+// Value was returned when create_account api was called and dealer was created first time
+$apiKey = "ISNMdzuNiKG7jhl9d9v";
+// string | Dealer or partner is accessing this API
+$accountType = "partner";
+ $result = $api_instance->deleteVoice($subdealerid, $salespersonid, $apiKey, $accountType);
+ // Extract out response hdr and bdy
+ $rspHdr = $result->getHeader();
+ if ($requestHdr = ! null) {
+ $rspId = $rspHdr->getId();
+ $braangoRequestId = $rspHdr->getIsnRequestId();
+ print_r("Response ID = " . $rspId . ", API Request Id = " . $braangoRequestId . "\n");
+ $rspBdy = $result->getBody();
+ $status = $rspBdy->getStatus();
+ // Typically this value should be always SUCCESS else exception will be thrown
+ // Sometimes, this can be WARNING to indicate if any resource conflicted or not
+ // In case of SUCCESS or WARNING, resources are always created (excepting warned sub-resources)
+ print_r("Status = " . $status . "\n");
+ $voiceOutputBodyData = $rspBdy->getData();
+ $voiceOutputBodyDataVoiceList = array();
+ $voiceList = $voiceOutputBodyData->getVoiceList();
+ print_r(array_values($voiceList));
+} catch (Exception $e) {
+ echo 'Exception when calling VoiceApi->deleteVoice: ', $e->getMessage(), PHP_EOL;