effective_mailchimp 0.3.0 → 0.3.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6828c1db2915c26b5aa9d2401496925b0898ff71edb6436d9283c895942967f7
|
4
|
+
data.tar.gz: 33db597cfe2e2ae408fc05b106ef4354b63bdfee2fa286bc10e8ccf5ed8e68df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e2eceb6d94dd48f78b43090bd51742f092b22b10c028636f2ab522562aa295bd361d6629d238c5ef99b5fe2ef0a7abb5dca9f72b2cfabd89c5c1bf4878cf072
|
7
|
+
data.tar.gz: 2b13409e3e4ef8b84f8541fda2d386649d149e6e52de6c41d8888894be2ad25f375dc5100443e224a9f596b12bbeafad4df883f8f96fd7eada54030a3faf3a16
|
@@ -183,13 +183,13 @@ module EffectiveMailchimpUser
|
|
183
183
|
|
184
184
|
assign_attributes(mailchimp_user_form_action: nil)
|
185
185
|
|
186
|
-
mailchimp_list_members.
|
186
|
+
mailchimp_list_members.each do |member|
|
187
187
|
if member.mailchimp_id.blank? && member.subscribed?
|
188
188
|
list_member = api.list_member_add(member)
|
189
|
-
member.assign_mailchimp_attributes(list_member)
|
189
|
+
member.assign_mailchimp_attributes(list_member) if list_member.present?
|
190
190
|
elsif member.mailchimp_id.present?
|
191
191
|
list_member = api.list_member_update(member)
|
192
|
-
member.assign_mailchimp_attributes(list_member)
|
192
|
+
member.assign_mailchimp_attributes(list_member) if list_member.present?
|
193
193
|
end
|
194
194
|
end
|
195
195
|
|
@@ -94,7 +94,13 @@ module Effective
|
|
94
94
|
merge_fields: merge_fields.delete_if { |k, v| v.blank? }
|
95
95
|
}
|
96
96
|
|
97
|
-
|
97
|
+
begin
|
98
|
+
client.lists.add_list_member(member.mailchimp_list.mailchimp_id, payload)
|
99
|
+
rescue MailchimpMarketing::ApiError => e
|
100
|
+
return false if e.status == 400 && e.to_s.downcase.include?("member in compliance state")
|
101
|
+
raise(e)
|
102
|
+
end
|
103
|
+
|
98
104
|
end
|
99
105
|
|
100
106
|
def list_member_update(member)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_mailchimp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|