@@ -250,4 +250,74 @@ public function get_relative_namespace() {
250250 public function get_rest_client () {
251251 return $ this ->client ;
252252 }
253+
254+ public function getImportTnOrders ($ filters = array ()) {
255+ $ url = sprintf ('%s/%s ' , $ this ->account_id , 'importTnOrders ' );
256+ $ response = parent ::_get ($ url , $ filters );
257+ return new ImportTnOrderResponse ($ response );
258+ }
259+
260+ public function createImportTnOrder (ImportTnOrder $ order ) {
261+ $ url = sprintf ('%s/%s ' , $ this ->account_id , 'importTnOrders ' );
262+ $ data = parent ::post ($ url , 'ImportTnOrder ' , $ order ->to_array ());
263+ return new ImportTnOrderResponse ($ data );
264+ }
265+
266+ public function getImportTnOrder ($ id ) {
267+ $ url = sprintf ('%s/%s/%s ' , $ this ->account_id , 'importTnOrders ' , $ id );
268+ $ response = parent ::_get ($ url );
269+ return new ImportTnOrder ($ response );
270+ }
271+
272+ public function getImportTnOrderHistory ($ id ) {
273+ $ url = sprintf ('%s/%s/%s/%s ' , $ this ->account_id , 'importTnOrders ' , $ id , 'history ' );
274+ $ response = parent ::_get ($ url );
275+ return new OrderHistoryResponse ($ response );
276+ }
277+
278+ public function checkTnsPortability ($ tns ) {
279+ $ url = sprintf ('%s/%s ' , $ this ->account_id , 'importTnChecker ' );
280+ $ payload = new ImportTnCheckerPayload (array (
281+ "TelephoneNumbers " => array (
282+ "TelephoneNumber " => $ tns
283+ )));
284+ $ data = parent ::post ($ url , 'ImportTnCheckerPayload ' , $ payload ->to_array ());
285+ return new ImportTnCheckerResponse ($ data );
286+ }
287+
288+ public function getInserviceNumbers ($ filters = array ()) {
289+ $ url = sprintf ('%s/%s ' , $ this ->account_id , 'inserviceNumbers ' );
290+ $ response = parent ::_get ($ url , $ filters );
291+ return new InserviceTns ($ response );
292+ }
293+
294+ public function checkInserviceNumber ($ tn ) {
295+ $ url = sprintf ('%s/%s/%s ' , $ this ->account_id , 'inserviceNumbers ' , $ tn );
296+ $ response = parent ::_get ($ url );
297+ return $ response ;
298+ }
299+
300+ public function getRemoveImportedTnOrders ($ filters = array ()) {
301+ $ url = sprintf ('%s/%s ' , $ this ->account_id , 'removeImportedTnOrders ' );
302+ $ response = parent ::_get ($ url , $ filters );
303+ return new RemoveImportedTnOrderSummaryResponse ($ response );
304+ }
305+
306+ public function createRemoveImportedTnOrder (RemoveImportedTnOrder $ order ) {
307+ $ url = sprintf ('%s/%s ' , $ this ->account_id , 'removeImportedTnOrders ' );
308+ $ data = parent ::post ($ url , 'RemoveImportedTnOrder ' , $ order ->to_array ());
309+ return new RemoveImportedTnOrderResponse ($ data );
310+ }
311+
312+ public function getRemoveImportedTnOrder ($ id ) {
313+ $ url = sprintf ('%s/%s/%s ' , $ this ->account_id , 'removeImportedTnOrders ' , $ id );
314+ $ response = parent ::_get ($ url );
315+ return new RemoveImportedTnOrder ($ response );
316+ }
317+
318+ public function getRemoveImportedTnOrderHistory ($ id ) {
319+ $ url = sprintf ('%s/%s/%s/%s ' , $ this ->account_id , 'removeImportedTnOrders ' , $ id , 'history ' );
320+ $ response = parent ::_get ($ url );
321+ return new OrderHistoryResponse ($ response );
322+ }
253323}
0 commit comments