Skip to content

Commit 8d1a9da

Browse files
committed
Adding delete User example.
1 parent 6ee85e7 commit 8d1a9da

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ user = User.find(user_id="1")
6262
user = User.find(id="1")
6363
# Create a user
6464
user = User.create(email="bob@example.com", name="Bob Smith")
65+
# Delete a user
66+
deleted_user = User.find(id="1").delete()
6567
# Update custom_attributes for a user
6668
user.custom_attributes["average_monthly_spend"] = 1234.56
6769
user.save()
@@ -394,6 +396,7 @@ Note that models generated from webhook notifications might differ slightly from
394396

395397

396398
### Errors
399+
397400
You do not need to deal with the HTTP response from an API call directly. If there is an unsuccessful response then an error that is a subclass of `intercom.Error` will be raised. If desired, you can get at the http_code of an `Error` via it's `http_code` method.
398401

399402
The list of different error subclasses are listed below. As they all inherit off `IntercomError` you can choose to except `IntercomError` or the more specific error subclass:

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ Users
7575
user = User.find(id="1")
7676
# Create a user
7777
user = User.create(email="bob@example.com", name="Bob Smith")
78+
# Delete a user
79+
deleted_user = User.find(id="1").delete()
7880
# Update custom_attributes for a user
7981
user.custom_attributes["average_monthly_spend"] = 1234.56
8082
user.save()

0 commit comments

Comments
 (0)