chartmogul-ruby 4.11.0 → 4.12.0
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/changelog.md +3 -0
- data/lib/chartmogul/contact.rb +4 -1
- data/lib/chartmogul/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 60097ddd8ee68f3625128a8e6aa69f1192e9967bb50a62fbef007a99e1098f65
|
|
4
|
+
data.tar.gz: 80985ad1c0cfaa65d4849caa30830f1fe5ca343a5321ccf4d714ea1225230370
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9de9ae516248fab40be9a6e5c7c3c121047ddc86cb73dca4aea6918900d9c14ec6e50c045a2d31dc703e22a68e4adf2705a2287b3c1b1b8964682664947a0688
|
|
7
|
+
data.tar.gz: 6185d768c0966c6792c9462750ca9ba113d4bd494e4de36aa12e405d7662d1bb2dbf1422bffe1e19d0baed128ee507ea900259817a138840ddfe91bc0982834a
|
data/changelog.md
CHANGED
data/lib/chartmogul/contact.rb
CHANGED
|
@@ -20,6 +20,7 @@ module ChartMogul
|
|
|
20
20
|
writeable_attr :linked_in
|
|
21
21
|
writeable_attr :twitter
|
|
22
22
|
writeable_attr :notes
|
|
23
|
+
writeable_attr :external_id
|
|
23
24
|
writeable_attr :custom
|
|
24
25
|
|
|
25
26
|
include API::Actions::Create
|
|
@@ -43,13 +44,15 @@ module ChartMogul
|
|
|
43
44
|
if attribute_name == :custom && attribute_value.is_a?(Hash)
|
|
44
45
|
payload = attribute_value.each_with_object([]) do |custom_value, arr|
|
|
45
46
|
key, value = custom_value
|
|
46
|
-
arr << { key
|
|
47
|
+
arr << ({ key:, value: })
|
|
47
48
|
end
|
|
48
49
|
attributes[:custom] = payload
|
|
49
50
|
else
|
|
50
51
|
attributes[attribute_name] = attribute_value
|
|
51
52
|
end
|
|
52
53
|
end
|
|
54
|
+
# Include external_id attribute even when nil so callers can explicitly clear it
|
|
55
|
+
attributes[:external_id] = nil if instance_variable_defined?(:@external_id) && external_id.nil?
|
|
53
56
|
end
|
|
54
57
|
end
|
|
55
58
|
end
|
data/lib/chartmogul/version.rb
CHANGED