@@ -69,7 +69,7 @@ public function findContactListByName(int $customerId, string $listName)
6969 public function addToContactList (int $ customerId , int $ contactListId , array $ contactIds )
7070 {
7171 try {
72- $ this ->apiClient ->post ($ this ->endPoints ->addToContactList ($ customerId , $ contactListId ), [
72+ return $ this ->apiClient ->post ($ this ->endPoints ->addToContactList ($ customerId , $ contactListId ), [
7373 'key_id ' => 'id ' ,
7474 'external_ids ' => $ contactIds
7575 ]);
@@ -81,11 +81,10 @@ public function addToContactList(int $customerId, int $contactListId, array $con
8181 public function replaceContactList (int $ customerId , int $ contactListId , array $ contactIds )
8282 {
8383 try {
84- $ this ->apiClient ->post ($ this ->endPoints ->replaceContactList ($ customerId , $ contactListId ), [
84+ return $ this ->apiClient ->post ($ this ->endPoints ->replaceContactList ($ customerId , $ contactListId ), [
8585 'key_id ' => 'id ' ,
8686 'external_ids ' => $ contactIds
8787 ]);
88- return $ contactListId ;
8988 } catch (Error $ error ) {
9089 throw new RequestFailed ('Could not add contacts to list: ' . $ error ->getMessage (), $ error ->getCode (), $ error );
9190 }
@@ -95,11 +94,10 @@ public function replaceContactList(int $customerId, int $contactListId, array $c
9594 public function deleteContactsFromList (int $ customerId , int $ contactListId , array $ contactIds )
9695 {
9796 try {
98- $ this ->apiClient ->post ($ this ->endPoints ->deleteContactsFromList ($ customerId , $ contactListId ), [
97+ return $ this ->apiClient ->post ($ this ->endPoints ->deleteContactsFromList ($ customerId , $ contactListId ), [
9998 'key_id ' => 'id ' ,
10099 'external_ids ' => $ contactIds
101100 ]);
102- return $ contactListId ;
103101 } catch (Error $ error ) {
104102 throw new RequestFailed ('Could not delete contacts from list: ' . $ error ->getMessage (), $ error ->getCode (), $ error );
105103 }
0 commit comments