intercom 3.5.25 → 3.5.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/PULL_REQUEST_TEMPLATE.md +5 -0
- data/Gemfile +0 -1
- data/README.md +29 -1
- data/intercom.gemspec +0 -1
- data/lib/intercom/version.rb +1 -1
- metadata +4 -18
- data/.travis.yml +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a1defabdef4a55f98769450ea8363083783d649
|
4
|
+
data.tar.gz: 140dfa0321bbabb1cf80cbdc132c8b3ceb30e6d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1799b76b57bac79de2bb3a1f8dda2aa0b28b4f9dd73fea1839169125d25ca228bdee677d1bd8b9d464baa51d54b8ffe6d8fa2e4f59399080c7df995a44dc7bc6
|
7
|
+
data.tar.gz: 8e37c3ed1b57d739b5b9922b890b0e35e32d30190154be0aebd0ee4e85d9b23594d9630c380ad626111d84e71a495309069932d43d36d7b705956d0e835fcff0
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -191,6 +191,11 @@ intercom.conversations.find_all(email: 'joe@example.com', type: 'user').each {|c
|
|
191
191
|
intercom.conversations.find_all(email: 'joe@example.com', type: 'user', unread: false).each {|convo| ... }
|
192
192
|
# Iterate over all unread conversations with a user based on the users email
|
193
193
|
intercom.conversations.find_all(email: 'joe@example.com', type: 'user', unread: true).each {|convo| ... }
|
194
|
+
# Iterate over all conversations for a user with their Intercom user ID
|
195
|
+
intercom.conversations.find_all(intercom_user_id: '536e564f316c83104c000020', type: 'user').each {|convo| ... }
|
196
|
+
# Iterate over all conversations for a lead
|
197
|
+
# NOTE: to iterate over a lead's conversations you MUST use their Intercom User ID and type User
|
198
|
+
intercom.conversations.find_all(intercom_user_id: lead.id, type: 'user').each {|convo| ... }
|
194
199
|
|
195
200
|
# FINDING A SINGLE CONVERSATION
|
196
201
|
conversation = intercom.conversations.find(id: '1')
|
@@ -369,8 +374,31 @@ intercom.contacts.save(contact)
|
|
369
374
|
# Find contacts by email
|
370
375
|
contacts = intercom.contacts.find_all(email: "some_contact@example.com")
|
371
376
|
|
377
|
+
# Using find to search for contacts by email
|
378
|
+
contact_list = intercom.contacts.find(email: "some_contact@example.com")
|
379
|
+
# This returns a Contact object with type contact.list
|
380
|
+
# Note: Multiple contacts can be returned in this list if there are multiple matching contacts found
|
381
|
+
# #<Intercom::Contact:0x00007ff3a80789f8
|
382
|
+
# @changed_fields=#<Set: {}>,
|
383
|
+
# @contacts=
|
384
|
+
# [{"type"=>"contact",
|
385
|
+
# "id"=>"5b7fd9b683681ac52274b9c7",
|
386
|
+
# "user_id"=>"05bc4d17-72cc-433e-88ae-0bf88db5d0e6",
|
387
|
+
# "anonymous"=>true,
|
388
|
+
# "email"=>"some_contact@example.com",
|
389
|
+
# ...}],
|
390
|
+
# @custom_attributes={},
|
391
|
+
# @limited=false,
|
392
|
+
# @pages=#<Intercom::Pages:0x00007ff3a7413c58 @changed_fields=#<Set: {}>, @next=nil, @page=1, @per_page=50, @total_pages=1, @type="pages">,
|
393
|
+
# @total_count=1,
|
394
|
+
# @type="contact.list">
|
395
|
+
# Access the contact's data
|
396
|
+
contact_list.contacts.first
|
397
|
+
|
372
398
|
# Convert a contact into a user
|
373
|
-
intercom.contacts.
|
399
|
+
contact = intercom.contacts.find(id: "536e564f316c83104c000020")
|
400
|
+
intercom.contacts.convert(contact, Intercom::User.new(email: email))
|
401
|
+
# Using find with email will not work here. See https://github.com/intercom/intercom-ruby/issues/419 for more information
|
374
402
|
|
375
403
|
# Delete a contact
|
376
404
|
intercom.contacts.delete(contact)
|
data/intercom.gemspec
CHANGED
@@ -25,7 +25,6 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_development_dependency "fakeweb", ["~> 1.3"]
|
26
26
|
spec.add_development_dependency "pry"
|
27
27
|
|
28
|
-
spec.add_dependency 'json', '>= 1.8'
|
29
28
|
spec.required_ruby_version = '>= 2.1.0'
|
30
29
|
spec.add_development_dependency 'gem-release'
|
31
30
|
end
|
data/lib/intercom/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: intercom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben McRedmond
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2018-
|
18
|
+
date: 2018-09-10 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: minitest
|
@@ -87,20 +87,6 @@ dependencies:
|
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
|
-
- !ruby/object:Gem::Dependency
|
91
|
-
name: json
|
92
|
-
requirement: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '1.8'
|
97
|
-
type: :runtime
|
98
|
-
prerelease: false
|
99
|
-
version_requirements: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '1.8'
|
104
90
|
- !ruby/object:Gem::Dependency
|
105
91
|
name: gem-release
|
106
92
|
requirement: !ruby/object:Gem::Requirement
|
@@ -133,8 +119,8 @@ extra_rdoc_files: []
|
|
133
119
|
files:
|
134
120
|
- ".circleci/config.yml"
|
135
121
|
- ".github/ISSUE_TEMPLATE.md"
|
122
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
136
123
|
- ".gitignore"
|
137
|
-
- ".travis.yml"
|
138
124
|
- Gemfile
|
139
125
|
- MIT-LICENSE
|
140
126
|
- README.md
|
@@ -244,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
244
230
|
version: '0'
|
245
231
|
requirements: []
|
246
232
|
rubyforge_project: intercom
|
247
|
-
rubygems_version: 2.6.14
|
233
|
+
rubygems_version: 2.6.14
|
248
234
|
signing_key:
|
249
235
|
specification_version: 4
|
250
236
|
summary: Ruby bindings for the Intercom API
|