Skip to content

Commit daaed3c

Browse files
akapaGergely Illyes
andcommitted
return responses because without them we are sad
- AUT-3515 Co-authored-by: Gergely Illyes <illyes.gergely@gmail.com>
1 parent 532e99b commit daaed3c

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/Suite/Api/ContactList.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)