Skip to content

Commit 5183a2f

Browse files
author
austin-intercom
committed
Merge pull request #101 from intercom/ah/addContactsIterator
Add contacts iterator.
2 parents 5933556 + 0f2c3bf commit 5183a2f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
namespace Intercom\Model;
3+
4+
use Intercom\Model\Iterators\AbstractPageIterator;
5+
6+
class GetContactsIterator extends AbstractPageIterator
7+
{
8+
9+
}

src/Intercom/Model/Iterators/AbstractPageIterator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ protected function getObjectKeyFromListType($type)
9595
return 'tags';
9696
case 'user.list':
9797
return 'users';
98+
case 'contact.list':
99+
return 'contacts';
98100
default:
99101
throw new IntercomException("Unknown list type returned ({$type}). Unable to use iterator to paginate");
100102
}

0 commit comments

Comments
 (0)