1616 */
1717class LicenseeService
1818{
19+ /**
20+ * @deprecated
21+ * No longer used by internal code and not recommended, will be removed in future versions.
22+ * Use class Constants::LICENSEE_ENDPOINT_PATH instead.
23+ */
1924 const ENDPOINT_PATH = 'licensee ' ;
25+ /**
26+ * @deprecated
27+ * No longer used by internal code and not recommended, will be removed in future versions.
28+ * Use class Constants::LICENSEE_ENDPOINT_PATH_VALIDATE instead.
29+ */
2030 const ENDPOINT_PATH_VALIDATE = 'validate ' ;
31+ /**
32+ * @deprecated
33+ * No longer used by internal code and not recommended, will be removed in future versions.
34+ * Use class Constants::LICENSEE_ENDPOINT_PATH_TRANSFER instead.
35+ */
2136 const ENDPOINT_PATH_TRANSFER = 'transfer ' ;
2237
2338 /**
@@ -43,7 +58,7 @@ public static function create(Context $context, $productNumber, Licensee $licens
4358
4459 $ licensee ->setProperty ('productNumber ' , $ productNumber );
4560
46- return NetLicensingService::getInstance ()->post ($ context , self :: ENDPOINT_PATH , $ licensee ->asPropertiesMap (), $ licensee );
61+ return NetLicensingService::getInstance ()->post ($ context , Constants:: LICENSEE_ENDPOINT_PATH , $ licensee ->asPropertiesMap (), $ licensee );
4762 }
4863
4964 /**
@@ -63,7 +78,7 @@ public static function get(Context $context, $number)
6378 {
6479 CheckUtils::paramNotEmpty ($ number , 'number ' );
6580
66- return NetLicensingService::getInstance ()->get ($ context , self :: ENDPOINT_PATH . '/ ' . $ number , [], Licensee::class);
81+ return NetLicensingService::getInstance ()->get ($ context , Constants:: LICENSEE_ENDPOINT_PATH . '/ ' . $ number , [], Licensee::class);
6782 }
6883
6984 /**
@@ -83,7 +98,7 @@ public static function getList(Context $context, $filter = null)
8398 {
8499 $ queryParams = (!is_null ($ filter )) ? ['filter ' => $ filter ] : [];
85100
86- return NetLicensingService::getInstance ()->getList ($ context , self :: ENDPOINT_PATH , $ queryParams , Licensee::class);
101+ return NetLicensingService::getInstance ()->getList ($ context , Constants:: LICENSEE_ENDPOINT_PATH , $ queryParams , Licensee::class);
87102 }
88103
89104 /**
@@ -106,7 +121,7 @@ public static function update(Context $context, $number, Licensee $licensee)
106121 {
107122 CheckUtils::paramNotEmpty ($ number , 'number ' );
108123
109- return NetLicensingService::getInstance ()->post ($ context , self :: ENDPOINT_PATH . '/ ' . $ number , $ licensee ->asPropertiesMap (), $ licensee );
124+ return NetLicensingService::getInstance ()->post ($ context , Constants:: LICENSEE_ENDPOINT_PATH . '/ ' . $ number , $ licensee ->asPropertiesMap (), $ licensee );
110125 }
111126
112127 /**
@@ -130,7 +145,7 @@ public static function delete(Context $context, $number, $forceCascade = false)
130145
131146 $ queryParams ['forceCascade ' ] = ((bool )$ forceCascade ) ? 'true ' : 'false ' ;
132147
133- return NetLicensingService::getInstance ()->delete ($ context , self :: ENDPOINT_PATH . '/ ' . $ number , $ queryParams );
148+ return NetLicensingService::getInstance ()->delete ($ context , Constants:: LICENSEE_ENDPOINT_PATH . '/ ' . $ number , $ queryParams );
134149 }
135150
136151
@@ -177,7 +192,7 @@ public static function validate(Context $context, $number, ValidationParameters
177192 $ pmIndex ++;
178193 }
179194
180- $ data = NetLicensingService::getInstance ()->post ($ context , self :: ENDPOINT_PATH . '/ ' . $ number . '/ ' . self :: ENDPOINT_PATH_VALIDATE , $ queryParams );
195+ $ data = NetLicensingService::getInstance ()->post ($ context , Constants:: LICENSEE_ENDPOINT_PATH . '/ ' . $ number . '/ ' . Constants:: LICENSEE_ENDPOINT_PATH_VALIDATE , $ queryParams );
181196
182197 $ validationResults = new ValidationResults ();
183198 $ validationResults ->setProductModuleValidation ($ data ['productModuleNumber ' ], $ data );
@@ -208,6 +223,6 @@ public static function transfer(Context $context, $number, $sourceLicenseeNumber
208223
209224 $ queryParams ['sourceLicenseeNumber ' ] = $ sourceLicenseeNumber ;
210225
211- NetLicensingService::getInstance ()->post ($ context , self :: ENDPOINT_PATH . '/ ' . $ number . '/ ' . self :: ENDPOINT_PATH_TRANSFER , $ queryParams );
226+ NetLicensingService::getInstance ()->post ($ context , Constants:: LICENSEE_ENDPOINT_PATH . '/ ' . $ number . '/ ' . Constants:: LICENSEE_ENDPOINT_PATH_TRANSFER , $ queryParams );
212227 }
213228}
0 commit comments