resend 1.14.0 → 1.15.0
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/lib/resend/version.rb +1 -1
- data/lib/resend/webhooks.rb +15 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3938cdaa35000f4892f2c976fac519d217a27ef09e659f43edc42743e05ce405
|
|
4
|
+
data.tar.gz: 57b247c84895ad999bb343ec38e7a830d10df733da1bd24b244601c27afdca50
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 310f162c8042191f415021519dffe7be44e67b3746a804fee0c2230c5632c34f2def7626f1927852370a96ddf2d36b04075fd2eca5072d8bfd3e695e768783f4
|
|
7
|
+
data.tar.gz: 9cc0f489144b5ba28b40f2402bb5e10e819dd64c984ab0b281ce342bc23c8810d4e0ad65eda0c2f8a89ee0aaacf23b0436eea81dbb4018cee18e5ece4bc246fb
|
data/lib/resend/version.rb
CHANGED
data/lib/resend/webhooks.rb
CHANGED
|
@@ -182,6 +182,21 @@ module Resend
|
|
|
182
182
|
Resend::Request.new(path, params, "patch").perform
|
|
183
183
|
end
|
|
184
184
|
|
|
185
|
+
# Rotate the signing secret of a webhook
|
|
186
|
+
#
|
|
187
|
+
# Generates a new signing secret for the webhook. The previous secret keeps working for 24 hours.
|
|
188
|
+
#
|
|
189
|
+
# @param webhook_id [String] The webhook ID
|
|
190
|
+
#
|
|
191
|
+
# @return [Hash] The webhook object containing id, object type, and the new signing_secret
|
|
192
|
+
#
|
|
193
|
+
# @example
|
|
194
|
+
# Resend::Webhooks.rotate_signing_secret("4dd369bc-aa82-4ff3-97de-514ae3000ee0")
|
|
195
|
+
def rotate_signing_secret(webhook_id)
|
|
196
|
+
path = "webhooks/#{webhook_id}/signing-secret/rotate"
|
|
197
|
+
Resend::Request.new(path, {}, "post").perform
|
|
198
|
+
end
|
|
199
|
+
|
|
185
200
|
# Remove an existing webhook
|
|
186
201
|
#
|
|
187
202
|
# @param webhook_id [String] The webhook ID
|