setApiKey('auth_token', 'ISNWF0P30WM0CMK'); $api_instance = new Braango\braangoapi\PhonesApi(); $number = "4087653312"; // string | number returned during creation process or braango number itself // 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"; try { $result = $api_instance->getLineType($number, $apiKey, $accountType); if ($result != null) { // 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(); if ($rspBdy != null) { $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"); $lineTypeOutputBodyData = new model\LineTypeOutputBodyData(); $lineTypeOutputBodyData = $rspBdy->getData(); print_r("Braango Numbers : " . $lineTypeOutputBodyData->getLineType()); } } } catch (Exception $e) { echo 'Exception when calling PhonesApi->getLineType: ', $e->getMessage(), PHP_EOL; } ?>