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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85cb026177d3b62726be072e424335b587cfcf801bf86d025879b3f3684d429f
4
- data.tar.gz: 5b9f13e1c416694af0312e2a58dc6de78b7d3a5e492116d030edab54ce9349de
3
+ metadata.gz: 827c94bd5b4f6fda96ccff6e55ec3e9f0ab94b23e0d9434d2105d40488443125
4
+ data.tar.gz: a35ee1f67786eb4f0489839f38621d2905aa500ecc315ce96158d36a3b64b93d
5
5
  SHA512:
6
- metadata.gz: c1ad7d202d9d3ac9eee02dbe21b937463be7f526b7dacb977a20ee04756e1786527bdedbe80da981863eac4ea1b15c7549eaa30fce2726d199bd28fefdea82bf
7
- data.tar.gz: 2450271d15a82b337b383dd78cabe5f71ba0312be0073237d00f6c38ea57b7564db154e73153086c8f4cdb7e9287901daf0039282484de2aea16b916a2824b38
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
- # @param params [Hash] Optional parameters for pagination
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
- path = Resend::PaginationHelper.build_paginated_path("emails/receiving", params)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Resend
4
- VERSION = "1.21.0"
4
+ VERSION = "1.22.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.21.0
4
+ version: 1.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derich Pacheco