Class: Sendgrid::Web::SpamReports
- Defined in:
- lib/sendgrid/web/spam_reports.rb
Instance Method Summary collapse
-
#delete(email: nil) ⇒ Sendgrid::Web::Response
Deletes all spam reports associated with the provided email.
-
#get(date: nil, days: nil, start_date: nil, end_date: nil, limit: nil, offset: nil) ⇒ Sendgrid::Web::Response
Retrieve entries in the Spam Reports list.
Methods inherited from Client
base_uri, config, #config, configure
Instance Method Details
#delete(email: nil) ⇒ Sendgrid::Web::Response
Note:
email
parameter is required.
Deletes all spam reports associated with the provided email.
39 40 41 42 43 44 45 46 47 |
# File 'lib/sendgrid/web/spam_reports.rb', line 39 def delete(email: nil) if email.nil? raise ArgumentError.new('Missing required `email` option') end res = connection.post( '/api/spamreports.delete.json', default_params(email: email)) craft_response(res) end |
#get(date: nil, days: nil, start_date: nil, end_date: nil, limit: nil, offset: nil) ⇒ Sendgrid::Web::Response
Note:
All parameters are optional.
Retrieve entries in the Spam Reports list.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/sendgrid/web/spam_reports.rb', line 19 def get( date: nil, days: nil, start_date: nil, end_date: nil, limit: nil, offset: nil) res = connection.post( '/api/spamreports.get.json', default_params( date: date, days: days, start_date: start_date, end_date: end_date, limit: limit, offset: offset)) craft_response(res) end |