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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '00705085830c8f265f87386afef35cdaf81bd194'
4
- data.tar.gz: 918f33d66ba48c4af692fd80e3d428b7bdfaae49
3
+ metadata.gz: 0a1defabdef4a55f98769450ea8363083783d649
4
+ data.tar.gz: 140dfa0321bbabb1cf80cbdc132c8b3ceb30e6d4
5
5
  SHA512:
6
- metadata.gz: 38857bc2b76c472b997fe2e2b209c8c78cad6a168af28ba044af67635ae402c53a10b72b8b78515f353382578108ce94afad090d7f20bc3dd3f1804d2bb1fb7b
7
- data.tar.gz: 5d3387191e313a532a311cce57d3728ab59eb2b12e12eeedc82b7f0dd11c1c3d0eb003df1772e16e5481d54f67949478d61fb8f80bb8a6546a5288c586029b37
6
+ metadata.gz: 1799b76b57bac79de2bb3a1f8dda2aa0b28b4f9dd73fea1839169125d25ca228bdee677d1bd8b9d464baa51d54b8ffe6d8fa2e4f59399080c7df995a44dc7bc6
7
+ data.tar.gz: 8e37c3ed1b57d739b5b9922b890b0e35e32d30190154be0aebd0ee4e85d9b23594d9630c380ad626111d84e71a495309069932d43d36d7b705956d0e835fcff0
@@ -0,0 +1,5 @@
1
+ #### Why?
2
+ Why are you making this change?
3
+
4
+ #### How?
5
+ Technical details on your change
data/Gemfile CHANGED
@@ -5,7 +5,6 @@ gemspec
5
5
 
6
6
  group :development, :test do
7
7
  platforms :jruby do
8
- gem 'json-jruby'
9
8
  gem 'jruby-openssl'
10
9
  end
11
10
  end
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.convert(contact, user)
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)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Intercom #:nodoc:
2
- VERSION = "3.5.25"
2
+ VERSION = "3.5.26"
3
3
  end
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.25
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-05-11 00:00:00.000000000 Z
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.1
233
+ rubygems_version: 2.6.14
248
234
  signing_key:
249
235
  specification_version: 4
250
236
  summary: Ruby bindings for the Intercom API
@@ -1,10 +0,0 @@
1
- language: ruby
2
- sudo: false
3
- before_install:
4
- - gem install bundler
5
- - gem update --system
6
- - gem --version
7
- rvm:
8
- - 2.1.0
9
- - 2.2.0
10
- - 2.3.3