File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
src/Intercom/Service/config Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ Resources this API supports:
7979<?php
8080// Get a list of users
8181$intercom->getUsers();
82+ // Get a list of users created in the past 3 days
83+ $intercom->getUsers(array("created_since" => "3"));
8284// Find user by email
8385$intercom->getUser(array("email" => "
[email protected] "));
8486// Find user by user_id
Original file line number Diff line number Diff line change 4444 "location" : " query" ,
4545 "required" : false ,
4646 "type" : " string"
47+ },
48+ "created_since" : {
49+ "location" : " query" ,
50+ "required" : false ,
51+ "type" : " string"
4752 }
4853 },
4954 "responseClass" : " UserListModel" ,
Original file line number Diff line number Diff line change @@ -142,6 +142,14 @@ public function testGetUsersBySegmentID()
142142 $ this ->assertRequest ('GET ' , '/users?segment_id=20 ' );
143143 }
144144
145+ public function testGetUsersByCreatedSince ()
146+ {
147+ $ this ->setMockResponse ($ this ->client , 'User/UserList.txt ' );
148+ $ this ->client ->getUsers (['created_since ' => '1 ' , 'hello ' =>'hi ' ]);
149+
150+ $ this ->assertRequest ('GET ' , '/users?created_since=1 ' );
151+ }
152+
145153 public function testUpdateUserNoID ()
146154 {
147155 $ this ->setMockResponse ($ this ->client , 'User/User.txt ' );
You can’t perform that action at this time.
0 commit comments