Citycom API WIP

This commit is contained in:
Frank Schubert
2025-08-07 13:29:40 +02:00
parent 25fe5c2ffe
commit 4a64ebbf12
2 changed files with 5 additions and 2 deletions
@@ -71,11 +71,12 @@ class SnoppCitycom extends Modules\ApiControllerModule
$cc_api_client = new \Citycom_OanApiClient(CITYCOM_OAN_API_USER, CITYCOM_OAN_API_PASS); $cc_api_client = new \Citycom_OanApiClient(CITYCOM_OAN_API_USER, CITYCOM_OAN_API_PASS);
$cc_api = new \Citycom_OanApiHelper($cc_api_client); $cc_api = new \Citycom_OanApiHelper($cc_api_client);
if(!$cc_api->orderServices($preorder, $cc_home_id, $data)) { $services = $cc_api->orderServices($preorder, $cc_home_id, $data);
if(!$services) {
return \mfResponse::InternalServerError(["message" => "Error activating service"]); return \mfResponse::InternalServerError(["message" => "Error activating service"]);
} }
return \mfResponse::Ok(); return \mfResponse::Ok(["message" => "Services ordered successfully", "activation_status" => "active"]);
} }
+2
View File
@@ -165,6 +165,7 @@ class Citycom_OanApiHelper {
} }
$service_return[] = [ $service_return[] = [
"service_number" => $new_service->service_number,
"sublocation_id" => $sublocation_id, "sublocation_id" => $sublocation_id,
"service_type" => $ctag_service_type, "service_type" => $ctag_service_type,
"ctag" => $ctag, "ctag" => $ctag,
@@ -176,6 +177,7 @@ class Citycom_OanApiHelper {
$service_return[] = [ $service_return[] = [
"sublocation_id" => $sublocation_id, "sublocation_id" => $sublocation_id,
"service_number" => "30-fggreger-01",
"service_type" => $ctag_service_type, "service_type" => $ctag_service_type,
"ctag" => $ctag, "ctag" => $ctag,
"ont" => [ "ont" => [