Class: Sendgrid::Web::Bounces
- Defined in:
- lib/sendgrid/web/bounces.rb
Instance Method Summary collapse
-
#delete(start_date: nil, end_date: nil, type: nil, email: nil) ⇒ Sendgrid::Web::Response
Delete an address from the Bounce list.
-
#get(date: nil, days: nil, start_date: nil, end_date: nil, limit: nil, offset: nil, type: nil, email: nil) ⇒ Sendgrid::Web::Response
Retrieve a list of bounces with addresses and response codes, optionally with dates.
Methods inherited from Client
base_uri, config, #config, configure
Instance Method Details
#delete(start_date: nil, end_date: nil, type: nil, email: nil) ⇒ Sendgrid::Web::Response
Note:
All parameters are optional
Note:
If no parameters are specified the ENTIRE list will be deleted.
Delete an address from the Bounce list.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/sendgrid/web/bounces.rb', line 52 def delete( start_date: nil, end_date: nil, type: nil, email: nil) res = connection.post('/api/bounces.delete.json', default_params( start_date: start_date, end_date: end_date, type: type, email: email)) craft_response(res) end |
#get(date: nil, days: nil, start_date: nil, end_date: nil, limit: nil, offset: nil, type: nil, email: nil) ⇒ Sendgrid::Web::Response
Note:
All parameters are optional
Retrieve a list of bounces with addresses and response codes, optionally with dates.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/sendgrid/web/bounces.rb', line 23 def get( date: nil, days: nil, start_date: nil, end_date: nil, limit: nil, offset: nil, type: nil, email: nil) res = connection.post( '/api/bounces.get.json', default_params( date: date, days: days, start_date: start_date, end_date: end_date, limit: limit, offset: offset, type: type, email: email)) craft_response(res) end |