@@ -79,6 +79,7 @@ libraryDependencies += "io.intercom" % "intercom-java" % "1.0.9"
7979Resources this API supports:
8080
8181- [ Users] ( #users )
82+ - [ Contacts] ( #contacts )
8283- [ Companies] ( #companies )
8384- [ Admins] ( #admins )
8485- [ Events] ( #events )
@@ -139,6 +140,41 @@ while(users.hasNext()) {
139140}
140141```
141142
143+ ### Contacts
144+
145+ _ Contacts were added in version 1.1 of the client._
146+
147+ ``` java
148+ // Create a Contact
149+ Contact contact = new Contact ()
150+ .setEmail(" fantastic@serenity.io" )
151+ .addCustomAttribute(newStringAttribute(" role" , " fence" ));
152+ Contact created = Contact . create(contact);
153+
154+ // Find a single contact by server supplied user id or id
155+ contact = Contact . findByID(" 541a144b201ebf2ec5000002" );
156+ contact = Contact . findByUserID(" e1a7d875-d83a-46f7-86f4-73be98a98584);
157+
158+ // Update a contact
159+ contact.setName(" Stitch Hessian " );
160+ Contact updated = Contact.update(contact);
161+
162+ // Read a contact list by email
163+ Contact contacts = Contact.listByEmail(" jubal@serenity . io" );
164+ while(contacts.hasNext()) {
165+ System.out.println(contacts.next());
166+ }
167+
168+ // Iterate over all contacts
169+ Contact allContacts = Contact.list();
170+ while(allContacts.hasNext()) {
171+ System.out.println(allContacts.next());
172+ }
173+
174+ // Remove a contact
175+ Contact.delete(contact);
176+ ```
177+
142178### Companies
143179
144180```java
0 commit comments