change Citycom OAN Api Helper updateService() to get only single service before update
This commit is contained in:
@@ -177,6 +177,33 @@ class Citycom_OanApiClient {
|
||||
|
||||
}
|
||||
|
||||
public function getService($service_id) {
|
||||
if(!$this->token) {
|
||||
$this->getAuthToken();
|
||||
if(!$this->token) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//$url = $this->baseurl.CITYCOM_OAN_API_EP_GET_SERVICES;
|
||||
$url = str_replace("{service_id}", $service_id, $this->baseurl.CITYCOM_OAN_API_EP_GET_SERVICE);
|
||||
|
||||
$ctx_options = [
|
||||
"http" => [
|
||||
"ignore_errors" => true,
|
||||
"method" => "GET",
|
||||
"header" => [
|
||||
"Accept: application/json",
|
||||
"Authorization: Bearer ".$this->token,
|
||||
],
|
||||
]
|
||||
];
|
||||
|
||||
$service = $this->runApiRequest($url, $ctx_options);
|
||||
return $service;
|
||||
|
||||
}
|
||||
|
||||
public function createService($data) {
|
||||
if(!$this->token) {
|
||||
$this->getAuthToken();
|
||||
|
||||
Reference in New Issue
Block a user