resend 1.21.0 → 1.22.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/emails/receiving.rb +16 -3
- data/lib/resend/version.rb +1 -1
- 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: 827c94bd5b4f6fda96ccff6e55ec3e9f0ab94b23e0d9434d2105d40488443125
|
|
4
|
+
data.tar.gz: a35ee1f67786eb4f0489839f38621d2905aa500ecc315ce96158d36a3b64b93d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c80690b54b0d6607a9bdf0b215c000e4f918b9808488115bbd1c4c09462888b07479f83a45648069c41174c32f8544eb1a0ae7e6e99d3e385e32753cd2080551
|
|
7
|
+
data.tar.gz: 65794839a7da6ba84cf1431439a0ff382aa0702b7ce06df29639469bb38819537113d6e669234d3371c14e735ef419e365776da12374d699c612ba768e527291
|
|
@@ -25,9 +25,17 @@ module Resend
|
|
|
25
25
|
Resend::Request.new(path, {}, "get").perform
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
# List received emails with optional pagination
|
|
28
|
+
# List received emails with optional filters and pagination
|
|
29
29
|
#
|
|
30
|
-
#
|
|
30
|
+
# Filters combine, so an email must match all of them.
|
|
31
|
+
#
|
|
32
|
+
# @param params [Hash] Optional filters and pagination parameters
|
|
33
|
+
# @option params [Array<String>] :to recipients. Returns emails received by any of these addresses.
|
|
34
|
+
# Each value is an exact, case-sensitive match on the envelope recipient. Up to 20 values
|
|
35
|
+
# @option params [String] :start_date matches emails received on or after this date. Accepts a date
|
|
36
|
+
# like `2026-09-01` or an ISO 8601 timestamp, in UTC unless the timestamp has an offset
|
|
37
|
+
# @option params [String] :end_date matches emails received on or before this date. Same formats as
|
|
38
|
+
# `start_date`. A date covers that whole day. Must not be before `start_date`
|
|
31
39
|
# @option params [Integer] :limit Maximum number of emails to return (1-100)
|
|
32
40
|
# @option params [String] :after Cursor for pagination (newer emails)
|
|
33
41
|
# @option params [String] :before Cursor for pagination (older emails)
|
|
@@ -41,8 +49,13 @@ module Resend
|
|
|
41
49
|
#
|
|
42
50
|
# @example List with pagination
|
|
43
51
|
# Resend::Emails::Receiving.list(limit: 20, after: "email_id_123")
|
|
52
|
+
#
|
|
53
|
+
# @example List emails received by an address in a date range
|
|
54
|
+
# Resend::Emails::Receiving.list(to: ["support@acme.com"], start_date: "2026-11-01", end_date: "2026-11-15")
|
|
44
55
|
def list(params = {})
|
|
45
|
-
|
|
56
|
+
# The API reads `to` as one comma-separated value and rejects a repeated parameter.
|
|
57
|
+
query = (params || {}).transform_values { |value| value.is_a?(Array) ? value.join(",") : value }
|
|
58
|
+
path = Resend::PaginationHelper.build_paginated_path("emails/receiving", query)
|
|
46
59
|
Resend::Request.new(path, {}, "get").perform
|
|
47
60
|
end
|
|
48
61
|
end
|
data/lib/resend/version.rb
CHANGED