bronto 0.0.4 → 0.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.
- data/lib/bronto/list.rb +4 -0
- data/lib/bronto/version.rb +1 -1
- metadata +1 -1
data/lib/bronto/list.rb
CHANGED
@@ -4,6 +4,8 @@ module Bronto
|
|
4
4
|
|
5
5
|
# Removes all contacts from the given lists.
|
6
6
|
def self.clear_lists(*lists)
|
7
|
+
lists = lists.flatten
|
8
|
+
|
7
9
|
resp = request(:clear) do
|
8
10
|
soap.body = {
|
9
11
|
list: lists.map { |l| { id: l.id } }
|
@@ -21,6 +23,7 @@ module Bronto
|
|
21
23
|
# Adds the given contacts to this list.
|
22
24
|
def add_to_list(*contacts)
|
23
25
|
return false if !self.id.present?
|
26
|
+
contacts = contacts.flatten
|
24
27
|
|
25
28
|
# The block below is evaluated in a weird scope so we need to capture self as _self for use inside the block.
|
26
29
|
_self = self
|
@@ -38,6 +41,7 @@ module Bronto
|
|
38
41
|
# Removes the given contacts from this list.
|
39
42
|
def remove_from_list(*contacts)
|
40
43
|
return false if !self.id.present?
|
44
|
+
contacts = contacts.flatten
|
41
45
|
|
42
46
|
resp = request("remove_from_list") do
|
43
47
|
soap.body = {
|
data/lib/bronto/version.rb
CHANGED