intercom 3.0.4 → 3.0.5
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 +1 -1
- data/changes.txt +3 -0
- data/lib/intercom/api_operations/save.rb +1 -1
- data/lib/intercom/version.rb +1 -1
- data/spec/unit/intercom/contact_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 515802ff1485e49789659e0f6e8ff7a97991efef
|
4
|
+
data.tar.gz: f9b1670d919cf0051ae235fc48da54cc06ed8bcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4358b8c0ca1294f01d5cf515bdd70ff14ffc3afb2a0d55d5d37f0eaa4d63a6ca116ff3b84b33b8bc738aa1fe4c0fbfa4cb2279748b363ded3e36f4ddd585dce
|
7
|
+
data.tar.gz: ea2adc6ea9b836d671a43e27b0e116c9a9ac6b8fcad56c7dcb6fcbcb45904ab64ce72733e1d9b629cd86a151c415a97f59906932ce3eb28888aa330026be54f2
|
data/README.md
CHANGED
data/changes.txt
CHANGED
@@ -21,7 +21,7 @@ module Intercom
|
|
21
21
|
def save(object)
|
22
22
|
collection_name = Utils.resource_class_to_collection_name(collection_class)
|
23
23
|
if id_present?(object) && !posted_updates?(object)
|
24
|
-
response = @client.put("/#{collection_name}/#{id}", object.to_submittable_hash)
|
24
|
+
response = @client.put("/#{collection_name}/#{object.id}", object.to_submittable_hash)
|
25
25
|
else
|
26
26
|
response = @client.post("/#{collection_name}", object.to_submittable_hash.merge(identity_hash(object)))
|
27
27
|
end
|
data/lib/intercom/version.rb
CHANGED
@@ -15,6 +15,12 @@ describe "Intercom::Contact" do
|
|
15
15
|
client.contacts.create
|
16
16
|
end
|
17
17
|
|
18
|
+
it 'can update a contact with an id' do
|
19
|
+
contact = Intercom::Contact.new(:id => "de45ae78gae1289cb")
|
20
|
+
client.expects(:put).with("/contacts/de45ae78gae1289cb", {'custom_attributes' => {}})
|
21
|
+
client.contacts.save(contact)
|
22
|
+
end
|
23
|
+
|
18
24
|
describe 'converting' do
|
19
25
|
let(:contact) { Intercom::Contact.from_api(user_id: 'contact_id') }
|
20
26
|
let(:user) { Intercom::User.from_api(id: 'user_id') }
|
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.0.
|
4
|
+
version: 3.0.5
|
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: 2015-07-
|
18
|
+
date: 2015-07-14 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: minitest
|