Created
July 16, 2010 04:58
-
-
Save andrewvc/477944 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SendgridToolkit | |
class Bounces < AbstractSendgridClient | |
def retrieve(options = {}) | |
options.each {|k,v| options[k] = 1 if k.to_s == 'date' && v == true} | |
api_post('bounces','get',options) | |
end | |
def delete(options = {}) | |
response = api_post('bounces','delete',options) | |
raise BounceEmailDoesNotExist if response['message'].include?('does not exist') | |
response | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment