lib/createsend/client.rb in createsend-2.3.0 vs lib/createsend/client.rb in createsend-2.4.0
- old
+ new
@@ -91,9 +91,17 @@
:orderdirection => order_direction } }
response = get 'suppressionlist', options
Hashie::Mash.new(response)
end
+ # Adds email addresses to a client's suppression list
+ def suppress(emails)
+ options = { :body => {
+ :EmailAddresses => emails.kind_of?(String) ?
+ [ emails ] : emails }.to_json }
+ response = post "suppress", options
+ end
+
# Unsuppresses an email address by removing it from the the client's
# suppression list
def unsuppress(email)
options = { :query => { :email => email }, :body => '' }
response = put "unsuppress", options
\ No newline at end of file