NAME

WebService::Intercom::User - represent a user.

SYNOPSIS

 my $user = $intercom->user_create_or_update(
    email => 'test@example.com', 
    name => 'test user');
 
 # Retrieve an existing user.
 my $existing_user = $intercom->user_get(email => 'test2@example.com');

 # Add a tag to a user
 $user->tag('test tag');
 $user->untag('test tag');

 # Change the user's name or any other value
 $user->name = 'new name';
 $user->email = 'new-email@example.com';
 $user->save();

 # Delete the user
 $user->delete();

 # Add a note
 $user->add_note(body => "This is a test note");

 # Add an event
 $user->add_event(event_name => 'test event');

DESCRIPTION

Provides an object that represents a user at Intercom.

ATTRIBUTES

Attributes are defined at http://doc.intercom.io/api/#users

type
id
created_at
signed_up_at
updated_at
user_id
email
name
custom_attributes
last_request_at
session_count
avatar
unsubscribed_from_emails
location_data
user_agent_data
last_seen_ip
companies
social_profiles
segments
tags
intercom - the WebService::Intercom object that created this user object

METHODS

save() - save any changes made to this object back to Intercom.io, returns a new WebService::Intercom::User object with the updated user.
delete() - delete this user at Intercom.io
tag(name => $tag_name) - Add a tag to this user
tag(WebService::Intercom::Tag) - Add a tag to this user
untag(name => $tag_name) - Remove a tag from this user
add_note(admin_id => $admin_id, body => $message) - Add a note to this user
add_event(event_name => $event_name, created_at => time, metadata => {}) - Add an event to this user.