Skip to content

Instantly share code, notes, and snippets.

@andrewvc
Created July 16, 2010 04:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewvc/477944 to your computer and use it in GitHub Desktop.
Save andrewvc/477944 to your computer and use it in GitHub Desktop.
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