Skip to content

Update user.py #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions intercom/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,16 @@ def last_seen_ip(self, last_seen_ip):
""" Sets the last seen IP address. """
self['last_seen_ip'] = last_seen_ip

@property
def user_agent_data(self):
""" Returns the last seen User Agent. """
return dict.get(self, 'user_agent_data', None)

@user_agent_data.setter
def user_agent_data(self, user_agent_data):
""" Sets the last seen User Agent. """
self['user_agent_data'] = user_agent_data

@property
def last_seen_user_agent(self):
""" Returns the last seen User Agent. """
Expand Down Expand Up @@ -253,6 +263,19 @@ def created_at(self, value):
""" Sets the timestamp when this User started using your
application. """
self['created_at'] = value

@property
@from_timestamp_property
def signed_up_at(self):
""" Returns the datetime this User started using your application. """
return dict.get(self, 'signed_up_at', None)

@signed_up_at.setter
@to_timestamp_property
def signed_up_at(self, value):
""" Sets the timestamp when this User started using your
application. """
self['signed_up_at'] = value

@property
def social_profiles(self):
Expand Down