Class: Mandrill::Whitelists

Inherits:
Object
  • Object
show all
Defined in:
lib/mandrill/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(master) ⇒ Whitelists



1153
1154
1155
# File 'lib/mandrill/api.rb', line 1153

def initialize(master)
    @master = master
end

Instance Attribute Details

#masterObject

Returns the value of attribute master.



1151
1152
1153
# File 'lib/mandrill/api.rb', line 1151

def master
  @master
end

Instance Method Details

#add(email) ⇒ Hash

Adds an email to your email rejection whitelist. If the address is currently on your blacklist, that blacklist entry will be removed automatically.



1162
1163
1164
1165
# File 'lib/mandrill/api.rb', line 1162

def add(email)
    _params = {:email => email}
    return @master.call 'whitelists/add', _params
end

#delete(email) ⇒ Hash

Removes an email address from the whitelist.



1184
1185
1186
1187
# File 'lib/mandrill/api.rb', line 1184

def delete(email)
    _params = {:email => email}
    return @master.call 'whitelists/delete', _params
end

#list(email = nil) ⇒ Array

Retrieves your email rejection whitelist. You can provide an email address or search prefix to limit the results. Returns up to 1000 results.



1174
1175
1176
1177
# File 'lib/mandrill/api.rb', line 1174

def list(email=nil)
    _params = {:email => email}
    return @master.call 'whitelists/list', _params
end