sendgrid-ruby 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/USAGE.md +45 -0
- data/examples/accesssettings/accesssettings.rb +7 -0
- data/examples/contactdb/contactdb.rb +10 -0
- data/examples/suppression/suppression.rb +28 -0
- data/lib/sendgrid/version.rb +1 -1
- data/test/sendgrid/test_sendgrid-ruby.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc74d1d608d84fc1bc570507af58580bdac14221
|
4
|
+
data.tar.gz: 4d695ca96a2bd096afc92047fc2fa9bfd61a1784
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 315fffd295607dff2ea9021804348adaa3a15d7a12498c92029e6576b875c3c10799f9c7e2bf456e82bed952bf02475d9cb831541636ab02d7dcaf9a4bf788c1
|
7
|
+
data.tar.gz: f12c0c8c2ac0b02d1d1cc9539cbd33dc89c39c33d0e30c354c8ca54a67bfe0563380446b4d56cfba1f2fa6ccfa5e0bd17e44ce0a1fa9f59bb7b296df0be4337a
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## [4.0.2] - 2016-07-26 ##
|
5
|
+
### Fixed
|
6
|
+
- Example and USAGE DELETE calls were missing example payloads
|
7
|
+
|
8
|
+
## [4.0.1] - 2016-07-25 ##
|
9
|
+
### Added
|
10
|
+
- [Troubleshooting](https://github.com/sendgrid/sendgrid-ruby/blob/master/TROUBLESHOOTING.md) section
|
11
|
+
|
4
12
|
## [4.0.0] - 2016-07-23 ##
|
5
13
|
### BREAKING CHANGE
|
6
14
|
- Update dependency to [ruby-http-client](https://github.com/sendgrid/ruby-http-client/releases/tag/v3.0.0)
|
data/USAGE.md
CHANGED
@@ -122,6 +122,13 @@ For more information, please see our [User Guide](http://sendgrid.com/docs/User_
|
|
122
122
|
|
123
123
|
|
124
124
|
```ruby
|
125
|
+
data = JSON.parse('{
|
126
|
+
"ids": [
|
127
|
+
1,
|
128
|
+
2,
|
129
|
+
3
|
130
|
+
]
|
131
|
+
}')
|
125
132
|
response = sg.client.access_settings.whitelist.delete(request_body: data)
|
126
133
|
puts response.status_code
|
127
134
|
puts response.body
|
@@ -1192,6 +1199,12 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
|
|
1192
1199
|
|
1193
1200
|
|
1194
1201
|
```ruby
|
1202
|
+
data = JSON.parse('[
|
1203
|
+
1,
|
1204
|
+
2,
|
1205
|
+
3,
|
1206
|
+
4
|
1207
|
+
]')
|
1195
1208
|
response = sg.client.contactdb.lists.delete(request_body: data)
|
1196
1209
|
puts response.status_code
|
1197
1210
|
puts response.body
|
@@ -1414,6 +1427,10 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
|
|
1414
1427
|
|
1415
1428
|
|
1416
1429
|
```ruby
|
1430
|
+
data = JSON.parse('[
|
1431
|
+
"recipient_id1",
|
1432
|
+
"recipient_id2"
|
1433
|
+
]')
|
1417
1434
|
response = sg.client.contactdb.recipients.delete(request_body: data)
|
1418
1435
|
puts response.status_code
|
1419
1436
|
puts response.body
|
@@ -3165,6 +3182,13 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
|
|
3165
3182
|
|
3166
3183
|
|
3167
3184
|
```ruby
|
3185
|
+
data = JSON.parse('{
|
3186
|
+
"delete_all": false,
|
3187
|
+
"emails": [
|
3188
|
+
"example1@example.com",
|
3189
|
+
"example2@example.com"
|
3190
|
+
]
|
3191
|
+
}')
|
3168
3192
|
response = sg.client.suppression.blocks.delete(request_body: data)
|
3169
3193
|
puts response.status_code
|
3170
3194
|
puts response.body
|
@@ -3245,6 +3269,13 @@ Note: the `delete_all` and `emails` parameters should be used independently of e
|
|
3245
3269
|
|
3246
3270
|
|
3247
3271
|
```ruby
|
3272
|
+
data = JSON.parse('{
|
3273
|
+
"delete_all": true,
|
3274
|
+
"emails": [
|
3275
|
+
"example@example.com",
|
3276
|
+
"example2@example.com"
|
3277
|
+
]
|
3278
|
+
}')
|
3248
3279
|
response = sg.client.suppression.bounces.delete(request_body: data)
|
3249
3280
|
puts response.status_code
|
3250
3281
|
puts response.body
|
@@ -3334,6 +3365,13 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
|
|
3334
3365
|
|
3335
3366
|
|
3336
3367
|
```ruby
|
3368
|
+
data = JSON.parse('{
|
3369
|
+
"delete_all": false,
|
3370
|
+
"emails": [
|
3371
|
+
"example1@example.com",
|
3372
|
+
"example2@example.com"
|
3373
|
+
]
|
3374
|
+
}')
|
3337
3375
|
response = sg.client.suppression.invalid_emails.delete(request_body: data)
|
3338
3376
|
puts response.status_code
|
3339
3377
|
puts response.body
|
@@ -3450,6 +3488,13 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
|
|
3450
3488
|
|
3451
3489
|
|
3452
3490
|
```ruby
|
3491
|
+
data = JSON.parse('{
|
3492
|
+
"delete_all": false,
|
3493
|
+
"emails": [
|
3494
|
+
"example1@example.com",
|
3495
|
+
"example2@example.com"
|
3496
|
+
]
|
3497
|
+
}')
|
3453
3498
|
response = sg.client.suppression.spam_reports.delete(request_body: data)
|
3454
3499
|
puts response.status_code
|
3455
3500
|
puts response.body
|
@@ -49,6 +49,13 @@ puts response.headers
|
|
49
49
|
# Remove one or more IPs from the whitelist #
|
50
50
|
# DELETE /access_settings/whitelist #
|
51
51
|
|
52
|
+
data = JSON.parse('{
|
53
|
+
"ids": [
|
54
|
+
1,
|
55
|
+
2,
|
56
|
+
3
|
57
|
+
]
|
58
|
+
}')
|
52
59
|
response = sg.client.access_settings.whitelist.delete(request_body: data)
|
53
60
|
puts response.status_code
|
54
61
|
puts response.body
|
@@ -71,6 +71,12 @@ puts response.headers
|
|
71
71
|
# Delete Multiple lists #
|
72
72
|
# DELETE /contactdb/lists #
|
73
73
|
|
74
|
+
data = JSON.parse('[
|
75
|
+
1,
|
76
|
+
2,
|
77
|
+
3,
|
78
|
+
4
|
79
|
+
]')
|
74
80
|
response = sg.client.contactdb.lists.delete(request_body: data)
|
75
81
|
puts response.status_code
|
76
82
|
puts response.body
|
@@ -213,6 +219,10 @@ puts response.headers
|
|
213
219
|
# Delete Recipient #
|
214
220
|
# DELETE /contactdb/recipients #
|
215
221
|
|
222
|
+
data = JSON.parse('[
|
223
|
+
"recipient_id1",
|
224
|
+
"recipient_id2"
|
225
|
+
]')
|
216
226
|
response = sg.client.contactdb.recipients.delete(request_body: data)
|
217
227
|
puts response.status_code
|
218
228
|
puts response.body
|
@@ -18,6 +18,13 @@ puts response.headers
|
|
18
18
|
# Delete blocks #
|
19
19
|
# DELETE /suppression/blocks #
|
20
20
|
|
21
|
+
data = JSON.parse('{
|
22
|
+
"delete_all": false,
|
23
|
+
"emails": [
|
24
|
+
"example1@example.com",
|
25
|
+
"example2@example.com"
|
26
|
+
]
|
27
|
+
}')
|
21
28
|
response = sg.client.suppression.blocks.delete(request_body: data)
|
22
29
|
puts response.status_code
|
23
30
|
puts response.body
|
@@ -57,6 +64,13 @@ puts response.headers
|
|
57
64
|
# Delete bounces #
|
58
65
|
# DELETE /suppression/bounces #
|
59
66
|
|
67
|
+
data = JSON.parse('{
|
68
|
+
"delete_all": true,
|
69
|
+
"emails": [
|
70
|
+
"example@example.com",
|
71
|
+
"example2@example.com"
|
72
|
+
]
|
73
|
+
}')
|
60
74
|
response = sg.client.suppression.bounces.delete(request_body: data)
|
61
75
|
puts response.status_code
|
62
76
|
puts response.body
|
@@ -97,6 +111,13 @@ puts response.headers
|
|
97
111
|
# Delete invalid emails #
|
98
112
|
# DELETE /suppression/invalid_emails #
|
99
113
|
|
114
|
+
data = JSON.parse('{
|
115
|
+
"delete_all": false,
|
116
|
+
"emails": [
|
117
|
+
"example1@example.com",
|
118
|
+
"example2@example.com"
|
119
|
+
]
|
120
|
+
}')
|
100
121
|
response = sg.client.suppression.invalid_emails.delete(request_body: data)
|
101
122
|
puts response.status_code
|
102
123
|
puts response.body
|
@@ -156,6 +177,13 @@ puts response.headers
|
|
156
177
|
# Delete spam reports #
|
157
178
|
# DELETE /suppression/spam_reports #
|
158
179
|
|
180
|
+
data = JSON.parse('{
|
181
|
+
"delete_all": false,
|
182
|
+
"emails": [
|
183
|
+
"example1@example.com",
|
184
|
+
"example2@example.com"
|
185
|
+
]
|
186
|
+
}')
|
159
187
|
response = sg.client.suppression.spam_reports.delete(request_body: data)
|
160
188
|
puts response.status_code
|
161
189
|
puts response.body
|
data/lib/sendgrid/version.rb
CHANGED
@@ -30,7 +30,7 @@ class TestAPI < Minitest::Test
|
|
30
30
|
')
|
31
31
|
assert_equal(test_headers, sg.request_headers)
|
32
32
|
assert_equal("v3", sg.version)
|
33
|
-
assert_equal("4.0.
|
33
|
+
assert_equal("4.0.2", SendGrid::VERSION)
|
34
34
|
assert_instance_of(SendGrid::Client, sg.client)
|
35
35
|
end
|
36
36
|
|