Skip to content

Commit c4b4cd4

Browse files
committed
Update next token to follow new standaerd
1 parent 10b026d commit c4b4cd4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Intercom/Model/Iterators/AbstractPageIterator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ protected function sendRequest()
2929
$result = $this->command->execute();
3030

3131
// Parse the next token
32-
$this->nextToken = (isset($result['next_page'])) ? $result['next_page'] : false;
32+
$this->nextToken = (isset($result['pages']['next'])) ? $result['pages']['page'] + 1 : false;
3333

3434
// Set the total results
3535
$this->totalResults = $result['total_count'];
@@ -101,4 +101,4 @@ protected function getObjectKeyFromListType($type)
101101
throw new IntercomException("Unknown list type returned ({$type}). Unable to use iterator to paginate");
102102
}
103103
}
104-
}
104+
}

0 commit comments

Comments
 (0)