README.md in intercom-4.1.1 vs README.md in intercom-4.1.2
- old
+ new
@@ -84,10 +84,16 @@
# Update a contact's role from "lead" to "user"
contact.role = "user"
intercom.contacts.save(contact)
+# Archive a contact
+intercom.contacts.archive(contact)
+
+# Unarchive a contact
+intercom.contacts.unarchive(contact)
+
# Delete a contact permanently
intercom.contacts.delete(contact)
# List all contacts
contacts = intercom.contacts.all
@@ -123,10 +129,13 @@
contact.create_note(body: "<p>Text for the note</p>")
# List notes for a contact
contact.notes.each {|n| p n.body}
+# List segments for a contact
+contact.segments.each {|segment| p segment.name}
+
# Add a contact to a company
company = intercom.companies.find(id: "123")
contact.add_company(id: company.id)
# Remove a contact from a company
@@ -164,10 +173,13 @@
# Update a company
company.name = 'Updated company name'
intercom.companies.save(company)
+# Delete a company
+intercom.companies.delete(company)
+
# Iterate over all companies
intercom.companies.all.each {|company| puts %Q(#{company.name} - #{company.custom_attributes["referral_source"]}) }
intercom.companies.all.map {|company| company.name }
# Get a large list of companies using scroll
@@ -259,9 +271,12 @@
intercom.tags.all.each {|tag| "#{tag.id} - #{tag.name}" }
intercom.tags.all.map {|tag| tag.name }
# Tag companies
tag = intercom.tags.tag(name: 'blue', companies: [{company_id: "42ea2f1b93891f6a99000427"}])
+
+# Untag Companies
+tag = intercom.tags.untag(name: 'blue', companies: [{ company_id: "42ea2f1b93891f6a99000427" }])
```
#### Notes
```ruby
# Find a note by id