Skip to content

Commit

Permalink
Merge branch 'master' into user-tagging-refactored
Browse files Browse the repository at this point in the history
Conflicts:
	changes.txt
  • Loading branch information
erskingardner committed Apr 2, 2013
2 parents 0977ab1 + c9177ef commit 1a2fcb5
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -74,4 +74,5 @@ You can also pass custom data within a company:

Intercom::AuthenticationError
Intercom::ServerError
Intercom::ServiceUnavailableError
Intercom::ResourceNotFound
7 changes: 5 additions & 2 deletions changes.txt
@@ -1,6 +1,9 @@
0.1.6
0.1.7
- add support for creating, updating, and fetching tags

0.1.6
- add unsubscribed_from_emails and unsubscribed_from_emails= to user

0.1.5
- always convert times to unix timestamps for the wire (thanks @jgwhite)

Expand Down Expand Up @@ -42,4 +45,4 @@
- updates to reflect changes to resources served by the api

0.0.1
- experimental version
- experimental version
14 changes: 14 additions & 0 deletions lib/intercom/user.rb
Expand Up @@ -194,6 +194,20 @@ def created_at=(time)
set_time_at("created_at", time)
end

##
# Get whether user has unsubscribed from email
# @return [Boolean]
def unsubscribed_from_emails
@attributes['unsubscribed_from_emails']
end

##
# Set whether user has unsubscribed from email
# @return [void]
def unsubscribed_from_emails=(unsubscribed_from_emails)
@attributes['unsubscribed_from_emails'] = unsubscribed_from_emails
end

##
# Get array of Intercom::SocialProfile objects attached to this Intercom::User
#
Expand Down
2 changes: 1 addition & 1 deletion lib/intercom/version.rb
@@ -1,3 +1,3 @@
module Intercom #:nodoc:
VERSION = "0.1.6"
VERSION = "0.1.7"
end
3 changes: 2 additions & 1 deletion spec/spec_helper.rb
Expand Up @@ -14,6 +14,7 @@ def test_user(email="bob@example.com")
:relationship_score => 90,
:session_count => 123,
:last_impression_at => 1323422442,
:unsubscribed_from_emails => true,
:social_profiles => [
{"type" => "twitter", "url" => "http://twitter.com/abc", "username" => "abc"},
{"type" => "twitter", "username" => "abc2", "url" => "http://twitter.com/abc2"},
Expand Down Expand Up @@ -115,4 +116,4 @@ def array.shuffle
self
end
array
end
end
1 change: 1 addition & 0 deletions spec/unit/intercom/user_spec.rb
Expand Up @@ -42,6 +42,7 @@
user.relationship_score.must_equal 90
user.last_seen_ip.must_equal "1.2.3.4"
user.last_seen_user_agent.must_equal "Mozilla blah blah ie6"
user.unsubscribed_from_emails.must_equal true
end

it "has read-only social accounts" do
Expand Down

0 comments on commit 1a2fcb5

Please sign in to comment.