Class: Mailgun::Bounce
Overview
Interface to manage bounce lists Refer - documentation.mailgun.net/api-bounces.html for optional params to pass
Instance Method Summary collapse
-
#add(email, options = {}) ⇒ Object
Creates a bounce for an email address.
-
#destroy(email) ⇒ Object
Cleans the bounces for an email address.
-
#find(email) ⇒ Object
Find bounce events for an email address.
-
#initialize(mailgun, domain) ⇒ Bounce
constructor
Used internally, called from Mailgun::Base.
-
#list(options = {}) ⇒ Object
List all bounces for a given domain.
Constructor Details
#initialize(mailgun, domain) ⇒ Bounce
Used internally, called from Mailgun::Base
7 8 9 10 |
# File 'lib/mailgun/bounce.rb', line 7 def initialize(mailgun, domain) @mailgun = mailgun @domain = domain end |
Instance Method Details
#add(email, options = {}) ⇒ Object
Creates a bounce for an email address
38 39 40 |
# File 'lib/mailgun/bounce.rb', line 38 def add(email, ={}) Mailgun.submit :post, bounce_url, {:address => email}.merge() end |
#destroy(email) ⇒ Object
Cleans the bounces for an email address
43 44 45 |
# File 'lib/mailgun/bounce.rb', line 43 def destroy(email) Mailgun.submit :delete, bounce_url(email) end |