1515
1616use Upwork \API \Debug as ApiDebug ;
1717use Upwork \API \Client as ApiClient ;
18+ use Upwork \API \ApiException as ApiException ;
1819
1920/**
2021 * Contracts API
@@ -52,11 +53,7 @@ public function __construct(ApiClient $client)
5253 public function suspendContract ($ reference , $ params )
5354 {
5455 ApiDebug::p (__FUNCTION__ );
55-
56- $ response = $ this ->_client ->put ('/hr/v2/contracts/ ' . $ reference . '/suspend ' , $ params );
57- ApiDebug::p ('found response info ' , $ response );
58-
59- return $ response ;
56+ throw new ApiException ('The legacy API was deprecated. Please, use GraphQL call - see example in this library. ' );
6057 }
6158
6259 /**
@@ -69,11 +66,7 @@ public function suspendContract($reference, $params)
6966 public function restartContract ($ reference , $ params )
7067 {
7168 ApiDebug::p (__FUNCTION__ );
72-
73- $ response = $ this ->_client ->put ('/hr/v2/contracts/ ' . $ reference . '/restart ' , $ params );
74- ApiDebug::p ('found response info ' , $ response );
75-
76- return $ response ;
69+ throw new ApiException ('The legacy API was deprecated. Please, use GraphQL call - see example in this library. ' );
7770 }
7871
7972 /**
@@ -86,10 +79,6 @@ public function restartContract($reference, $params)
8679 public function endContract ($ reference , $ params )
8780 {
8881 ApiDebug::p (__FUNCTION__ );
89-
90- $ response = $ this ->_client ->delete ('/hr/v2/contracts/ ' . $ reference , $ params );
91- ApiDebug::p ('found response info ' , $ response );
92-
93- return $ response ;
82+ throw new ApiException ('The legacy API was deprecated. Please, use GraphQL call - see example in this library. ' );
9483 }
9584}
0 commit comments