From 14abc523cf5f4499643bf6d75b27a26dbd1bb77c Mon Sep 17 00:00:00 2001 From: fqqdk Date: Tue, 21 May 2024 15:54:53 +0200 Subject: [PATCH] rename variables to correspond to the documentation AUT-2851 Co-authored-by: Peter Kozma --- src/Suite/Api/ContactList.php | 4 ++-- src/Suite/Api/ContactListEndPoints.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Suite/Api/ContactList.php b/src/Suite/Api/ContactList.php index 75103ce..64e3b42 100644 --- a/src/Suite/Api/ContactList.php +++ b/src/Suite/Api/ContactList.php @@ -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); diff --git a/src/Suite/Api/ContactListEndPoints.php b/src/Suite/Api/ContactListEndPoints.php index 316bded..ec63c6b 100644 --- a/src/Suite/Api/ContactListEndPoints.php +++ b/src/Suite/Api/ContactListEndPoints.php @@ -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; }