Skip to content

Commit

Permalink
rename variables to correspond to the documentation
Browse files Browse the repository at this point in the history
AUT-2851

Co-authored-by: Peter Kozma <peter.kozma@emarsys.com>
  • Loading branch information
fqqdk and kozma committed May 21, 2024
1 parent 80907a5 commit 14abc52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Suite/Api/ContactList.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ public function getContactsOfList(int $customerId, int $contactListId, int $limi
}
}

public function getContactIdsInList(int $customerId, int $contactListId, int $limit = null, int $offset = null)
public function getContactIdsInList(int $customerId, int $contactListId, int $limit = null, int $skipToken = null)
{
try {
$response = $this->apiClient->get($this->endPoints->contactIdsInList($customerId, $contactListId, $limit, $offset));
$response = $this->apiClient->get($this->endPoints->contactIdsInList($customerId, $contactListId, $limit, $skipToken));
return $response['data'] ?? [];
} catch (Error $error) {
throw new RequestFailed('Could not fetch contact ids: ' . $error->getMessage(), $error->getCode(), $error);
Expand Down
6 changes: 3 additions & 3 deletions src/Suite/Api/ContactListEndPoints.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ public function contactsOfList(int $customerId, int $contactListId, int $limit,
return $this->baseUrl($customerId) . "/{$contactListId}/contacts/?limit={$limit}&offset={$offset}";
}

public function contactIdsInList(int $customerId, int $contactListId, int $limit = null, int $offset = null)
public function contactIdsInList(int $customerId, int $contactListId, int $limit = null, int $skipToken = null)
{
$result = $this->baseUrl($customerId) . "/{$contactListId}/contactIds";
if (null !== $limit && null !== $offset) {
$result .= "?\$top={$limit}&\$skiptoken={$offset}";
if (null !== $limit && null !== $skipToken) {
$result .= "?\$top={$limit}&\$skiptoken={$skipToken}";
}
return $result;
}
Expand Down

0 comments on commit 14abc52

Please sign in to comment.