mailtrap 2.12.0 → 2.13.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: 40fcde70d63616c345252736a68e3de8b1f0cfa7c1cf615cb0cace7e2158c752
4
- data.tar.gz: 5e3ab5dd73034c6fc752f0d13b683e767d6f29f170c1f2aeed5fbffedc9bef1c
3
+ metadata.gz: 4e1407023f85d4f46bb34447e8ed5a9cfe5343461ed38008690d9d92006929d1
4
+ data.tar.gz: 3efa540454828966a9e6ff4439410d73e69c0c41d8e1e227943ebf1a7cc122dc
5
5
  SHA512:
6
- metadata.gz: b971a8cc52133ce0aed38ed202742fdb45e4be73256abe284e40a1d4ac94b729674cd4faea526397685f26d80fcd307669777941b29b1a28fcbd821adbf6beba
7
- data.tar.gz: 00bc7f6c7db02b4d70f45070e250ad726b72150eb976dcf4476f72b58a44ad99d1f59a6ac89033cc5269d2a5f13987a10a8d1cd4d8d6dc0ed4d894e1134baade
6
+ metadata.gz: 22ae6dbfc35ff8228eb16d4c3444b9e93eb680f6c59bd4b7b0f2d37629b8c471943ea807c583cc50f50c64267920c67eb80c52a2d8e3dcc7b57379e58c7e7b80
7
+ data.tar.gz: e7eb3ff7a9592ffc0918a63c9b75dbe7c81342642c624ded9e2d359136e620f0fc32a6889cee0fef5bf58cd66037ed1370c1b7512d99c623f1f9e033dd7971f4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [2.13.0] - 2026-08-04
2
+
3
+ ## What's Changed
4
+ * Add inbound_receiving webhook support by @mklocek in https://github.com/mailtrap/mailtrap-ruby/pull/120
5
+
6
+
7
+ **Full Changelog**: https://github.com/mailtrap/mailtrap-ruby/compare/v2.12.0...v2.13.0
8
+
1
9
  ## [2.12.0] - 2026-07-24
2
10
 
3
11
  ## What's Changed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mailtrap (2.12.0)
4
+ mailtrap (2.13.0)
5
5
  base64
6
6
 
7
7
  GEM
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mailtrap
4
- VERSION = '2.12.0'
4
+ VERSION = '2.13.0'
5
5
  end
@@ -6,12 +6,15 @@ module Mailtrap
6
6
  # @attr_reader id [Integer] The webhook ID
7
7
  # @attr_reader url [String] The URL that will receive webhook payloads
8
8
  # @attr_reader active [Boolean] Whether the webhook is active
9
- # @attr_reader webhook_type [String] The type of webhook (`email_sending` or `audit_log`)
9
+ # @attr_reader webhook_type [String] The type of webhook
10
+ # (`email_sending`, `campaigns`, `audit_log` or `inbound_receiving`)
10
11
  # @attr_reader payload_format [String] The webhook payload format (`json` or `jsonlines`)
11
12
  # @attr_reader sending_stream [String, nil] The sending stream (`transactional` or `bulk`).
12
13
  # Applicable only for `email_sending` webhooks.
13
14
  # @attr_reader domain_id [Integer, nil] The sending domain ID the webhook is scoped to,
14
15
  # or nil for all domains. Applicable only for `email_sending` webhooks.
16
+ # @attr_reader inbound_inbox_id [Integer, nil] The inbound inbox ID the webhook is linked to.
17
+ # Applicable only for `inbound_receiving` webhooks.
15
18
  # @attr_reader event_types [Array<String>] The event types the webhook is subscribed to.
16
19
  # Applicable only for `email_sending` webhooks.
17
20
  # @attr_reader signing_secret [String, nil] HMAC SHA-256 signing secret. Returned only on creation.
@@ -23,6 +26,7 @@ module Mailtrap
23
26
  :payload_format,
24
27
  :sending_stream,
25
28
  :domain_id,
29
+ :inbound_inbox_id,
26
30
  :event_types,
27
31
  :signing_secret,
28
32
  keyword_init: true
@@ -7,7 +7,8 @@ module Mailtrap
7
7
  class WebhooksAPI
8
8
  include BaseAPI
9
9
 
10
- self.supported_options = %i[url webhook_type active payload_format sending_stream event_types domain_id]
10
+ self.supported_options = %i[url webhook_type active payload_format sending_stream event_types domain_id
11
+ inbound_inbox_id]
11
12
 
12
13
  self.response_class = Webhook
13
14
 
@@ -30,7 +31,8 @@ module Mailtrap
30
31
  # Creates a new webhook
31
32
  # @param [Hash] options The parameters to create
32
33
  # @option options [String] :url The URL that will receive webhook payloads
33
- # @option options [String] :webhook_type The type of webhook (`email_sending` or `audit_log`)
34
+ # @option options [String] :webhook_type The type of webhook
35
+ # (`email_sending`, `campaigns`, `audit_log` or `inbound_receiving`)
34
36
  # @option options [Boolean] :active Whether the webhook is active. Defaults to true.
35
37
  # @option options [String] :payload_format Payload format (`json` or `jsonlines`). Defaults to `json`.
36
38
  # @option options [String] :sending_stream Sending stream (`transactional` or `bulk`).
@@ -39,6 +41,9 @@ module Mailtrap
39
41
  # Required for `email_sending` webhook type.
40
42
  # @option options [Integer] :domain_id Sending domain ID to scope the webhook to.
41
43
  # Applicable only for `email_sending` webhooks.
44
+ # @option options [Integer] :inbound_inbox_id Inbound inbox ID to link the webhook to.
45
+ # Applicable only for `inbound_receiving` webhooks; omit to apply to all inboxes
46
+ # in the account.
42
47
  # @return [Webhook] Created webhook (includes `signing_secret`)
43
48
  # @!macro api_errors
44
49
  # @raise [ArgumentError] If invalid options are provided
@@ -54,11 +59,13 @@ module Mailtrap
54
59
  # @option options [String] :payload_format Payload format (`json` or `jsonlines`)
55
60
  # @option options [Array<String>] :event_types Event types to subscribe to.
56
61
  # Applicable only for `email_sending` webhooks.
62
+ # @option options [Integer] :inbound_inbox_id Inbound inbox ID to link the webhook to.
63
+ # Applicable only for `inbound_receiving` webhooks.
57
64
  # @return [Webhook] Updated webhook
58
65
  # @!macro api_errors
59
66
  # @raise [ArgumentError] If invalid options are provided
60
67
  def update(webhook_id, options)
61
- base_update(webhook_id, options, %i[url active payload_format event_types])
68
+ base_update(webhook_id, options, %i[url active payload_format event_types inbound_inbox_id])
62
69
  end
63
70
 
64
71
  # Deletes a webhook
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailtrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.0
4
+ version: 2.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Railsware Products Studio LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-27 00:00:00.000000000 Z
11
+ date: 2026-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64