intercom 4.2.0 → 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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a680039a8ef799d52b227657866f60afa19bf4b292f9d70646c8f962eca11a0
|
4
|
+
data.tar.gz: 40317d4521715f294bec48805ed9edf6f83406260b5c74bde5e9cf96cdf9cb8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df28a00dc009f9e7bd94fa497021312d4cbe005905eea6095d1efe1172f567d8f806a47750843e129cfae5af80db038aea355ba2f1a2b5122142893574d9d977
|
7
|
+
data.tar.gz: d57709458d73737890f1933264f10b23c486a08840bd3a561c8971dbfef3d2ad88b4ddb2d393154b4127cd78196a39a56c93c0f08c747c74bd303c729d01fc5f
|
@@ -68,10 +68,7 @@ module Intercom
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def payload
|
71
|
-
|
72
|
-
payload[:per_page] = @params[:per_page] if @params[:per_page]
|
73
|
-
payload[:starting_after] = @params[:starting_after] if @params[:starting_after]
|
74
|
-
payload
|
71
|
+
@params.keep_if { |k, v| !v.nil? }.to_h
|
75
72
|
end
|
76
73
|
end
|
77
74
|
end
|
data/lib/intercom/version.rb
CHANGED
@@ -44,4 +44,9 @@ describe Intercom::BaseCollectionProxy do
|
|
44
44
|
contacts.each { |contact| emails_iter2 << contact.email }
|
45
45
|
_(emails_iter1).must_equal emails_iter2
|
46
46
|
end
|
47
|
+
|
48
|
+
it "supports query params" do
|
49
|
+
client.expects(:get).with("/conversations", {:intercom_user_id => 'abcdef0000'}).returns(test_conversation_list)
|
50
|
+
_(client.conversations.find_all(:intercom_user_id => 'abcdef0000').map(&:id)).must_equal %w[147]
|
51
|
+
end
|
47
52
|
end
|
@@ -9,7 +9,7 @@ describe Intercom::Company do
|
|
9
9
|
_(proc { client.companies.find(:company_id => "4")}).must_raise Intercom::HttpError
|
10
10
|
end
|
11
11
|
|
12
|
-
it "on
|
12
|
+
it "on all" do
|
13
13
|
client.expects(:get).with("/companies", {}).returns(nil)
|
14
14
|
_(proc { client.companies.all.each {|company| }}).must_raise Intercom::HttpError
|
15
15
|
end
|
@@ -13,6 +13,11 @@ describe "Intercom::Conversation" do
|
|
13
13
|
client.conversations.all.each { |c| }
|
14
14
|
end
|
15
15
|
|
16
|
+
it "can filter conversations based on params" do
|
17
|
+
client.expects(:get).with("/conversations", {type: 'user', intercom_user_id: '123456789'}).returns(test_conversation_list)
|
18
|
+
client.conversations.find_all(type: 'user', intercom_user_id: '123456789').each { |c| }
|
19
|
+
end
|
20
|
+
|
16
21
|
it 'marks a conversation as read' do
|
17
22
|
client.expects(:put).with('/conversations/147', { read: true })
|
18
23
|
client.conversations.mark_read('147')
|
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.2.
|
4
|
+
version: 4.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben McRedmond
|
@@ -12,10 +12,10 @@ authors:
|
|
12
12
|
- Declan McGrath
|
13
13
|
- Jamie Osler
|
14
14
|
- Bob Long
|
15
|
-
autorequire:
|
15
|
+
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2022-12-
|
18
|
+
date: 2022-12-16 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: minitest
|
@@ -264,7 +264,7 @@ homepage: https://www.intercom.io
|
|
264
264
|
licenses:
|
265
265
|
- MIT
|
266
266
|
metadata: {}
|
267
|
-
post_install_message:
|
267
|
+
post_install_message:
|
268
268
|
rdoc_options: []
|
269
269
|
require_paths:
|
270
270
|
- lib
|
@@ -279,8 +279,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
279
279
|
- !ruby/object:Gem::Version
|
280
280
|
version: '0'
|
281
281
|
requirements: []
|
282
|
-
rubygems_version: 3.
|
283
|
-
signing_key:
|
282
|
+
rubygems_version: 3.2.16
|
283
|
+
signing_key:
|
284
284
|
specification_version: 4
|
285
285
|
summary: Ruby bindings for the Intercom API
|
286
286
|
test_files:
|