intercom 3.9.5 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +483 -234
- data/Rakefile +1 -1
- data/changes.txt +37 -0
- data/lib/intercom/api_operations/archive.rb +2 -1
- data/lib/intercom/api_operations/delete.rb +16 -0
- data/lib/intercom/api_operations/find.rb +5 -2
- data/lib/intercom/api_operations/find_all.rb +4 -3
- data/lib/intercom/api_operations/list.rb +4 -1
- data/lib/intercom/api_operations/load.rb +4 -2
- data/lib/intercom/api_operations/nested_resource.rb +68 -0
- data/lib/intercom/api_operations/save.rb +6 -4
- data/lib/intercom/api_operations/scroll.rb +4 -5
- data/lib/intercom/api_operations/search.rb +3 -2
- data/lib/intercom/article.rb +7 -0
- data/lib/intercom/base_collection_proxy.rb +74 -0
- data/lib/intercom/client.rb +48 -25
- data/lib/intercom/client_collection_proxy.rb +17 -39
- data/lib/intercom/collection.rb +7 -0
- data/lib/intercom/company.rb +8 -0
- data/lib/intercom/contact.rb +23 -3
- data/lib/intercom/conversation.rb +5 -0
- data/lib/intercom/data_attribute.rb +7 -0
- data/lib/intercom/deprecated_leads_collection_proxy.rb +22 -0
- data/lib/intercom/deprecated_resources.rb +13 -0
- data/lib/intercom/errors.rb +6 -0
- data/lib/intercom/export_content.rb +7 -0
- data/lib/intercom/extended_api_operations/segments.rb +3 -1
- data/lib/intercom/extended_api_operations/tags.rb +3 -1
- data/lib/intercom/lead.rb +21 -0
- data/lib/intercom/lib/dynamic_accessors.rb +9 -10
- data/lib/intercom/lib/typed_json_deserializer.rb +45 -35
- data/lib/intercom/note.rb +4 -0
- data/lib/intercom/phone_call_redirect.rb +7 -0
- data/lib/intercom/request.rb +39 -33
- data/lib/intercom/scroll_collection_proxy.rb +38 -42
- data/lib/intercom/search_collection_proxy.rb +30 -65
- data/lib/intercom/section.rb +23 -0
- data/lib/intercom/segment.rb +4 -0
- data/lib/intercom/service/article.rb +20 -0
- data/lib/intercom/service/base_service.rb +7 -0
- data/lib/intercom/service/collection.rb +24 -0
- data/lib/intercom/service/company.rb +2 -12
- data/lib/intercom/service/contact.rb +35 -10
- data/lib/intercom/service/conversation.rb +16 -3
- data/lib/intercom/service/data_attribute.rb +20 -0
- data/lib/intercom/service/export_content.rb +30 -0
- data/lib/intercom/service/lead.rb +41 -0
- data/lib/intercom/service/note.rb +4 -8
- data/lib/intercom/service/phone_call_redirect.rb +15 -0
- data/lib/intercom/service/section.rb +7 -0
- data/lib/intercom/service/subscription.rb +2 -2
- data/lib/intercom/service/subscription_type.rb +18 -0
- data/lib/intercom/service/tag.rb +9 -9
- data/lib/intercom/service/visitor.rb +17 -8
- data/lib/intercom/subscription_type.rb +12 -0
- data/lib/intercom/tag.rb +4 -0
- data/lib/intercom/traits/api_resource.rb +44 -18
- data/lib/intercom/traits/dirty_tracking.rb +8 -1
- data/lib/intercom/user.rb +12 -3
- data/lib/intercom/utils.rb +19 -3
- data/lib/intercom/version.rb +1 -1
- data/lib/intercom/visitor.rb +0 -2
- data/lib/intercom.rb +39 -22
- data/spec/spec_helper.rb +843 -520
- data/spec/unit/intercom/admin_spec.rb +2 -2
- data/spec/unit/intercom/article_spec.rb +40 -0
- data/spec/unit/intercom/base_collection_proxy_spec.rb +52 -0
- data/spec/unit/intercom/client_collection_proxy_spec.rb +41 -41
- data/spec/unit/intercom/client_spec.rb +25 -26
- data/spec/unit/intercom/collection_spec.rb +32 -0
- data/spec/unit/intercom/company_spec.rb +19 -15
- data/spec/unit/intercom/contact_spec.rb +402 -33
- data/spec/unit/intercom/conversation_spec.rb +60 -7
- data/spec/unit/intercom/count_spec.rb +4 -4
- data/spec/unit/intercom/data_attribute_spec.rb +40 -0
- data/spec/unit/intercom/deprecated_leads_collection_proxy_spec.rb +17 -0
- data/spec/unit/intercom/event_spec.rb +16 -11
- data/spec/unit/intercom/export_content_spec.rb +28 -0
- data/spec/unit/intercom/job_spec.rb +24 -24
- data/spec/unit/intercom/lead_spec.rb +57 -0
- data/spec/unit/intercom/lib/flat_store_spec.rb +22 -20
- data/spec/unit/intercom/message_spec.rb +1 -1
- data/spec/unit/intercom/note_spec.rb +4 -10
- data/spec/unit/intercom/phone_call_redirect.rb +12 -0
- data/spec/unit/intercom/request_spec.rb +14 -1
- data/spec/unit/intercom/scroll_collection_proxy_spec.rb +40 -39
- data/spec/unit/intercom/search_collection_proxy_spec.rb +32 -28
- data/spec/unit/intercom/section_spec.rb +32 -0
- data/spec/unit/intercom/segment_spec.rb +2 -2
- data/spec/unit/intercom/subscription_spec.rb +5 -6
- data/spec/unit/intercom/tag_spec.rb +28 -14
- data/spec/unit/intercom/team_spec.rb +2 -2
- data/spec/unit/intercom/traits/api_resource_spec.rb +107 -52
- data/spec/unit/intercom/user_spec.rb +224 -226
- data/spec/unit/intercom/visitor_spec.rb +49 -0
- data/spec/unit/intercom_spec.rb +5 -3
- metadata +44 -8
- data/lib/intercom/customer.rb +0 -10
- data/lib/intercom/service/customer.rb +0 -14
- data/spec/unit/intercom/visitors_spec.rb +0 -61
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe 'Intercom::Visitor' do
|
|
4
|
+
let (:client) { Intercom::Client.new(token: 'token') }
|
|
5
|
+
|
|
6
|
+
it 'can update a visitor with an id' do
|
|
7
|
+
visitor = Intercom::Visitor.new(:id => 'de45ae78gae1289cb')
|
|
8
|
+
client.expects(:put).with('/visitors/de45ae78gae1289cb', 'custom_attributes' => {})
|
|
9
|
+
client.visitors.save(visitor)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
it 'can get a visitor' do
|
|
13
|
+
visitor = Intercom::Visitor.new(:id => 'de45ae78gae1289cb')
|
|
14
|
+
client.expects(:get).with('/visitors/de45ae78gae1289cb', {}).returns(test_visitor)
|
|
15
|
+
client.visitors.find(id: visitor.id)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
describe 'converting' do
|
|
19
|
+
let(:visitor) { Intercom::Visitor.from_api(user_id: 'visitor_id') }
|
|
20
|
+
let(:user) { Intercom::Contact.from_api(id: 'user_id', role: 'user') }
|
|
21
|
+
|
|
22
|
+
it 'visitor to user' do
|
|
23
|
+
client.expects(:post).with(
|
|
24
|
+
'/visitors/convert',
|
|
25
|
+
visitor: { user_id: visitor.user_id },
|
|
26
|
+
user: { 'id' => user.id },
|
|
27
|
+
type: 'user'
|
|
28
|
+
).returns(test_contact)
|
|
29
|
+
|
|
30
|
+
client.visitors.convert(visitor, user)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
it 'visitor to lead' do
|
|
34
|
+
client.expects(:post).with(
|
|
35
|
+
'/visitors/convert',
|
|
36
|
+
visitor: { user_id: visitor.user_id },
|
|
37
|
+
type: 'lead'
|
|
38
|
+
).returns(test_contact(role: 'lead'))
|
|
39
|
+
|
|
40
|
+
client.visitors.convert(visitor)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
it 'deletes a visitor' do
|
|
45
|
+
visitor = Intercom::Visitor.new('id' => '1')
|
|
46
|
+
client.expects(:delete).with('/visitors/1', {}).returns(visitor)
|
|
47
|
+
client.visitors.delete(visitor)
|
|
48
|
+
end
|
|
49
|
+
end
|
data/spec/unit/intercom_spec.rb
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
2
4
|
|
|
3
5
|
describe Intercom do
|
|
4
|
-
it
|
|
5
|
-
Intercom::VERSION.must_match(/\d+\.\d+\.\d+/)
|
|
6
|
+
it 'has a version number' do
|
|
7
|
+
_(Intercom::VERSION).must_match(/\d+\.\d+\.\d+/)
|
|
6
8
|
end
|
|
7
9
|
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:
|
|
4
|
+
version: 4.2.1
|
|
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:
|
|
18
|
+
date: 2022-12-16 00:00:00.000000000 Z
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
21
21
|
name: minitest
|
|
@@ -150,26 +150,35 @@ files:
|
|
|
150
150
|
- lib/intercom/api_operations/bulk/load_error_feed.rb
|
|
151
151
|
- lib/intercom/api_operations/bulk/submit.rb
|
|
152
152
|
- lib/intercom/api_operations/convert.rb
|
|
153
|
+
- lib/intercom/api_operations/delete.rb
|
|
153
154
|
- lib/intercom/api_operations/find.rb
|
|
154
155
|
- lib/intercom/api_operations/find_all.rb
|
|
155
156
|
- lib/intercom/api_operations/list.rb
|
|
156
157
|
- lib/intercom/api_operations/load.rb
|
|
158
|
+
- lib/intercom/api_operations/nested_resource.rb
|
|
157
159
|
- lib/intercom/api_operations/request_hard_delete.rb
|
|
158
160
|
- lib/intercom/api_operations/save.rb
|
|
159
161
|
- lib/intercom/api_operations/scroll.rb
|
|
160
162
|
- lib/intercom/api_operations/search.rb
|
|
163
|
+
- lib/intercom/article.rb
|
|
164
|
+
- lib/intercom/base_collection_proxy.rb
|
|
161
165
|
- lib/intercom/client.rb
|
|
162
166
|
- lib/intercom/client_collection_proxy.rb
|
|
167
|
+
- lib/intercom/collection.rb
|
|
163
168
|
- lib/intercom/company.rb
|
|
164
169
|
- lib/intercom/contact.rb
|
|
165
170
|
- lib/intercom/conversation.rb
|
|
166
171
|
- lib/intercom/count.rb
|
|
167
|
-
- lib/intercom/
|
|
172
|
+
- lib/intercom/data_attribute.rb
|
|
173
|
+
- lib/intercom/deprecated_leads_collection_proxy.rb
|
|
174
|
+
- lib/intercom/deprecated_resources.rb
|
|
168
175
|
- lib/intercom/errors.rb
|
|
169
176
|
- lib/intercom/event.rb
|
|
177
|
+
- lib/intercom/export_content.rb
|
|
170
178
|
- lib/intercom/extended_api_operations/segments.rb
|
|
171
179
|
- lib/intercom/extended_api_operations/tags.rb
|
|
172
180
|
- lib/intercom/job.rb
|
|
181
|
+
- lib/intercom/lead.rb
|
|
173
182
|
- lib/intercom/lib/dynamic_accessors.rb
|
|
174
183
|
- lib/intercom/lib/dynamic_accessors_on_method_missing.rb
|
|
175
184
|
- lib/intercom/lib/flat_store.rb
|
|
@@ -177,28 +186,38 @@ files:
|
|
|
177
186
|
- lib/intercom/message.rb
|
|
178
187
|
- lib/intercom/note.rb
|
|
179
188
|
- lib/intercom/options.rb
|
|
189
|
+
- lib/intercom/phone_call_redirect.rb
|
|
180
190
|
- lib/intercom/request.rb
|
|
181
191
|
- lib/intercom/scroll_collection_proxy.rb
|
|
182
192
|
- lib/intercom/search_collection_proxy.rb
|
|
193
|
+
- lib/intercom/section.rb
|
|
183
194
|
- lib/intercom/segment.rb
|
|
184
195
|
- lib/intercom/service/admin.rb
|
|
196
|
+
- lib/intercom/service/article.rb
|
|
185
197
|
- lib/intercom/service/base_service.rb
|
|
198
|
+
- lib/intercom/service/collection.rb
|
|
186
199
|
- lib/intercom/service/company.rb
|
|
187
200
|
- lib/intercom/service/contact.rb
|
|
188
201
|
- lib/intercom/service/conversation.rb
|
|
189
202
|
- lib/intercom/service/count.rb
|
|
190
|
-
- lib/intercom/service/
|
|
203
|
+
- lib/intercom/service/data_attribute.rb
|
|
191
204
|
- lib/intercom/service/event.rb
|
|
205
|
+
- lib/intercom/service/export_content.rb
|
|
192
206
|
- lib/intercom/service/job.rb
|
|
207
|
+
- lib/intercom/service/lead.rb
|
|
193
208
|
- lib/intercom/service/message.rb
|
|
194
209
|
- lib/intercom/service/note.rb
|
|
210
|
+
- lib/intercom/service/phone_call_redirect.rb
|
|
211
|
+
- lib/intercom/service/section.rb
|
|
195
212
|
- lib/intercom/service/segment.rb
|
|
196
213
|
- lib/intercom/service/subscription.rb
|
|
214
|
+
- lib/intercom/service/subscription_type.rb
|
|
197
215
|
- lib/intercom/service/tag.rb
|
|
198
216
|
- lib/intercom/service/team.rb
|
|
199
217
|
- lib/intercom/service/user.rb
|
|
200
218
|
- lib/intercom/service/visitor.rb
|
|
201
219
|
- lib/intercom/subscription.rb
|
|
220
|
+
- lib/intercom/subscription_type.rb
|
|
202
221
|
- lib/intercom/tag.rb
|
|
203
222
|
- lib/intercom/team.rb
|
|
204
223
|
- lib/intercom/traits/api_resource.rb
|
|
@@ -210,27 +229,36 @@ files:
|
|
|
210
229
|
- lib/intercom/visitor.rb
|
|
211
230
|
- spec/spec_helper.rb
|
|
212
231
|
- spec/unit/intercom/admin_spec.rb
|
|
232
|
+
- spec/unit/intercom/article_spec.rb
|
|
233
|
+
- spec/unit/intercom/base_collection_proxy_spec.rb
|
|
213
234
|
- spec/unit/intercom/client_collection_proxy_spec.rb
|
|
214
235
|
- spec/unit/intercom/client_spec.rb
|
|
236
|
+
- spec/unit/intercom/collection_spec.rb
|
|
215
237
|
- spec/unit/intercom/company_spec.rb
|
|
216
238
|
- spec/unit/intercom/contact_spec.rb
|
|
217
239
|
- spec/unit/intercom/conversation_spec.rb
|
|
218
240
|
- spec/unit/intercom/count_spec.rb
|
|
241
|
+
- spec/unit/intercom/data_attribute_spec.rb
|
|
242
|
+
- spec/unit/intercom/deprecated_leads_collection_proxy_spec.rb
|
|
219
243
|
- spec/unit/intercom/event_spec.rb
|
|
244
|
+
- spec/unit/intercom/export_content_spec.rb
|
|
220
245
|
- spec/unit/intercom/job_spec.rb
|
|
246
|
+
- spec/unit/intercom/lead_spec.rb
|
|
221
247
|
- spec/unit/intercom/lib/flat_store_spec.rb
|
|
222
248
|
- spec/unit/intercom/message_spec.rb
|
|
223
249
|
- spec/unit/intercom/note_spec.rb
|
|
250
|
+
- spec/unit/intercom/phone_call_redirect.rb
|
|
224
251
|
- spec/unit/intercom/request_spec.rb
|
|
225
252
|
- spec/unit/intercom/scroll_collection_proxy_spec.rb
|
|
226
253
|
- spec/unit/intercom/search_collection_proxy_spec.rb
|
|
254
|
+
- spec/unit/intercom/section_spec.rb
|
|
227
255
|
- spec/unit/intercom/segment_spec.rb
|
|
228
256
|
- spec/unit/intercom/subscription_spec.rb
|
|
229
257
|
- spec/unit/intercom/tag_spec.rb
|
|
230
258
|
- spec/unit/intercom/team_spec.rb
|
|
231
259
|
- spec/unit/intercom/traits/api_resource_spec.rb
|
|
232
260
|
- spec/unit/intercom/user_spec.rb
|
|
233
|
-
- spec/unit/intercom/
|
|
261
|
+
- spec/unit/intercom/visitor_spec.rb
|
|
234
262
|
- spec/unit/intercom_spec.rb
|
|
235
263
|
homepage: https://www.intercom.io
|
|
236
264
|
licenses:
|
|
@@ -251,33 +279,41 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
251
279
|
- !ruby/object:Gem::Version
|
|
252
280
|
version: '0'
|
|
253
281
|
requirements: []
|
|
254
|
-
|
|
255
|
-
rubygems_version: 2.7.6.2
|
|
282
|
+
rubygems_version: 3.2.16
|
|
256
283
|
signing_key:
|
|
257
284
|
specification_version: 4
|
|
258
285
|
summary: Ruby bindings for the Intercom API
|
|
259
286
|
test_files:
|
|
260
287
|
- spec/spec_helper.rb
|
|
261
288
|
- spec/unit/intercom/admin_spec.rb
|
|
289
|
+
- spec/unit/intercom/article_spec.rb
|
|
290
|
+
- spec/unit/intercom/base_collection_proxy_spec.rb
|
|
262
291
|
- spec/unit/intercom/client_collection_proxy_spec.rb
|
|
263
292
|
- spec/unit/intercom/client_spec.rb
|
|
293
|
+
- spec/unit/intercom/collection_spec.rb
|
|
264
294
|
- spec/unit/intercom/company_spec.rb
|
|
265
295
|
- spec/unit/intercom/contact_spec.rb
|
|
266
296
|
- spec/unit/intercom/conversation_spec.rb
|
|
267
297
|
- spec/unit/intercom/count_spec.rb
|
|
298
|
+
- spec/unit/intercom/data_attribute_spec.rb
|
|
299
|
+
- spec/unit/intercom/deprecated_leads_collection_proxy_spec.rb
|
|
268
300
|
- spec/unit/intercom/event_spec.rb
|
|
301
|
+
- spec/unit/intercom/export_content_spec.rb
|
|
269
302
|
- spec/unit/intercom/job_spec.rb
|
|
303
|
+
- spec/unit/intercom/lead_spec.rb
|
|
270
304
|
- spec/unit/intercom/lib/flat_store_spec.rb
|
|
271
305
|
- spec/unit/intercom/message_spec.rb
|
|
272
306
|
- spec/unit/intercom/note_spec.rb
|
|
307
|
+
- spec/unit/intercom/phone_call_redirect.rb
|
|
273
308
|
- spec/unit/intercom/request_spec.rb
|
|
274
309
|
- spec/unit/intercom/scroll_collection_proxy_spec.rb
|
|
275
310
|
- spec/unit/intercom/search_collection_proxy_spec.rb
|
|
311
|
+
- spec/unit/intercom/section_spec.rb
|
|
276
312
|
- spec/unit/intercom/segment_spec.rb
|
|
277
313
|
- spec/unit/intercom/subscription_spec.rb
|
|
278
314
|
- spec/unit/intercom/tag_spec.rb
|
|
279
315
|
- spec/unit/intercom/team_spec.rb
|
|
280
316
|
- spec/unit/intercom/traits/api_resource_spec.rb
|
|
281
317
|
- spec/unit/intercom/user_spec.rb
|
|
282
|
-
- spec/unit/intercom/
|
|
318
|
+
- spec/unit/intercom/visitor_spec.rb
|
|
283
319
|
- spec/unit/intercom_spec.rb
|
data/lib/intercom/customer.rb
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
require 'intercom/service/base_service'
|
|
2
|
-
require 'intercom/api_operations/search'
|
|
3
|
-
|
|
4
|
-
module Intercom
|
|
5
|
-
module Service
|
|
6
|
-
class Customer < BaseService
|
|
7
|
-
include ApiOperations::Search
|
|
8
|
-
|
|
9
|
-
def collection_class
|
|
10
|
-
Intercom::Customer
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
require "spec_helper"
|
|
2
|
-
|
|
3
|
-
describe "Intercom::Visitors" do
|
|
4
|
-
let (:client) { Intercom::Client.new(app_id: 'app_id', api_key: 'api_key') }
|
|
5
|
-
|
|
6
|
-
it 'should be listable' do
|
|
7
|
-
proxy = client.visitors.all
|
|
8
|
-
proxy.resource_name.must_equal 'visitors'
|
|
9
|
-
proxy.finder_url.must_equal '/visitors'
|
|
10
|
-
proxy.resource_class.must_equal Intercom::Visitor
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
it 'can update a visitor with an id' do
|
|
14
|
-
visitor = Intercom::Visitor.new(:id => "de45ae78gae1289cb")
|
|
15
|
-
client.expects(:put).with("/visitors/de45ae78gae1289cb", {'custom_attributes' => {}})
|
|
16
|
-
client.visitors.save(visitor)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
describe 'converting' do
|
|
20
|
-
let(:visitor) { Intercom::Visitor.from_api(user_id: 'visitor_id') }
|
|
21
|
-
let(:user) { Intercom::User.from_api(id: 'user_id') }
|
|
22
|
-
|
|
23
|
-
it 'visitor to user' do
|
|
24
|
-
client.expects(:post).with(
|
|
25
|
-
"/visitors/convert",
|
|
26
|
-
{
|
|
27
|
-
visitor: { user_id: visitor.user_id },
|
|
28
|
-
user: { 'id' => user.id },
|
|
29
|
-
type:'user'
|
|
30
|
-
}
|
|
31
|
-
).returns(test_user)
|
|
32
|
-
|
|
33
|
-
client.visitors.convert(visitor, user)
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
it 'visitor to lead' do
|
|
37
|
-
client.expects(:post).with(
|
|
38
|
-
"/visitors/convert",
|
|
39
|
-
{
|
|
40
|
-
visitor: { user_id: visitor.user_id },
|
|
41
|
-
type:'lead'
|
|
42
|
-
}
|
|
43
|
-
).returns(test_user)
|
|
44
|
-
|
|
45
|
-
client.visitors.convert(visitor)
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
it "returns a ClientCollectionProxy for all without making any requests" do
|
|
50
|
-
client.expects(:execute_request).never
|
|
51
|
-
all = client.visitors.all
|
|
52
|
-
all.must_be_instance_of(Intercom::ClientCollectionProxy)
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
it "deletes a visitor" do
|
|
56
|
-
visitor = Intercom::Visitor.new("id" => "1")
|
|
57
|
-
client.expects(:delete).with("/visitors/1", {}).returns(visitor)
|
|
58
|
-
client.visitors.delete(visitor)
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
end
|