Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fixes #382] Correct endpoint for single spam report requests #383

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014-2018 SendGrid, Inc.
Copyright (c) 2014-2019 SendGrid, Inc.

MIT License

Expand Down
4 changes: 2 additions & 2 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4026,7 +4026,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User

```ruby
email = "test_url_param"
response = sg.client.suppression.spam_report._(email).get()
response = sg.client.suppression.spam_reports._(email).get()
puts response.status_code
puts response.body
puts response.headers
Expand All @@ -4044,7 +4044,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User

```ruby
email = "test_url_param"
response = sg.client.suppression.spam_report._(email).delete()
response = sg.client.suppression.spam_reports._(email).delete()
puts response.status_code
puts response.body
puts response.headers
Expand Down
20 changes: 10 additions & 10 deletions examples/suppression/suppression.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
# DELETE /suppression/blocks #

data = JSON.parse('{
"delete_all": false,
"delete_all": false,
"emails": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}')
Expand Down Expand Up @@ -65,9 +65,9 @@
# DELETE /suppression/bounces #

data = JSON.parse('{
"delete_all": true,
"delete_all": true,
"emails": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}')
Expand Down Expand Up @@ -112,9 +112,9 @@
# DELETE /suppression/invalid_emails #

data = JSON.parse('{
"delete_all": false,
"delete_all": false,
"emails": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}')
Expand Down Expand Up @@ -148,7 +148,7 @@
# GET /suppression/spam_report/{email} #

email = "test_url_param"
response = sg.client.suppression.spam_report._(email).get()
response = sg.client.suppression.spam_reports._(email).get()
puts response.status_code
puts response.body
puts response.headers
Expand All @@ -158,7 +158,7 @@
# DELETE /suppression/spam_report/{email} #

email = "test_url_param"
response = sg.client.suppression.spam_report._(email).delete()
response = sg.client.suppression.spam_reports._(email).delete()
puts response.status_code
puts response.body
puts response.headers
Expand All @@ -178,9 +178,9 @@
# DELETE /suppression/spam_reports #

data = JSON.parse('{
"delete_all": false,
"delete_all": false,
"emails": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}')
Expand Down
2 changes: 1 addition & 1 deletion test/sendgrid/test_sendgrid-ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1891,7 +1891,7 @@ def test_suppression_spam_report__email__delete
email = "test_url_param"
headers = JSON.parse('{"X-Mock": 204}')

response = @sg.client.suppression.spam_report._(email).delete(request_headers: headers)
response = @sg.client.suppression.spam_reports._(email).delete(request_headers: headers)

self.assert_equal('204', response.status_code)
end
Expand Down