Class: Mandrill::Whitelists
- Inherits:
-
Object
- Object
- Mandrill::Whitelists
- Defined in:
- lib/mandrill/api.rb
Instance Attribute Summary collapse
-
#master ⇒ Object
Returns the value of attribute master.
Instance Method Summary collapse
-
#add(email, comment = nil) ⇒ Hash
Adds an email to your email rejection whitelist.
-
#delete(email) ⇒ Hash
Removes an email address from the whitelist.
-
#initialize(master) ⇒ Whitelists
constructor
A new instance of Whitelists.
-
#list(email = nil) ⇒ Array
Retrieves your email rejection whitelist.
Constructor Details
#initialize(master) ⇒ Whitelists
Returns a new instance of Whitelists.
1155 1156 1157 |
# File 'lib/mandrill/api.rb', line 1155 def initialize(master) @master = master end |
Instance Attribute Details
#master ⇒ Object
Returns the value of attribute master.
1153 1154 1155 |
# File 'lib/mandrill/api.rb', line 1153 def master @master end |
Instance Method Details
#add(email, comment = nil) ⇒ Hash
Adds an email to your email rejection whitelist. If the address is currently on your blacklist, that blacklist entry will be removed automatically.
1165 1166 1167 1168 |
# File 'lib/mandrill/api.rb', line 1165 def add(email, comment=nil) _params = {:email => email, :comment => comment} return @master.call 'whitelists/add', _params end |
#delete(email) ⇒ Hash
Removes an email address from the whitelist.
1187 1188 1189 1190 |
# File 'lib/mandrill/api.rb', line 1187 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.
1177 1178 1179 1180 |
# File 'lib/mandrill/api.rb', line 1177 def list(email=nil) _params = {:email => email} return @master.call 'whitelists/list', _params end |