trycourier 4.10.0 → 4.10.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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/lib/courier/internal/util.rb +3 -1
  4. data/lib/courier/models/notification_list_response.rb +8 -8
  5. data/lib/courier/models/notification_template_create_request.rb +3 -3
  6. data/lib/courier/models/notification_template_payload.rb +2 -2
  7. data/lib/courier/models/notification_template_response.rb +71 -0
  8. data/lib/courier/models/notification_template_update_request.rb +3 -3
  9. data/lib/courier/models/provider_update_params.rb +3 -2
  10. data/lib/courier/models/routing_strategy_get_response.rb +1 -1
  11. data/lib/courier/models.rb +2 -6
  12. data/lib/courier/resources/notifications/checks.rb +16 -6
  13. data/lib/courier/resources/notifications.rb +8 -8
  14. data/lib/courier/resources/providers.rb +7 -5
  15. data/lib/courier/resources/routing_strategies.rb +4 -4
  16. data/lib/courier/version.rb +1 -1
  17. data/lib/courier.rb +1 -3
  18. data/rbi/courier/models/notification_list_response.rbi +9 -6
  19. data/rbi/courier/models/notification_template_create_request.rbi +4 -4
  20. data/rbi/courier/models/notification_template_payload.rbi +2 -2
  21. data/rbi/courier/models/notification_template_response.rbi +120 -0
  22. data/rbi/courier/models/notification_template_update_request.rbi +4 -4
  23. data/rbi/courier/models/provider_update_params.rbi +4 -2
  24. data/rbi/courier/models.rbi +2 -9
  25. data/rbi/courier/resources/notifications/checks.rbi +19 -4
  26. data/rbi/courier/resources/notifications.rbi +7 -7
  27. data/rbi/courier/resources/providers.rbi +7 -4
  28. data/rbi/courier/resources/routing_strategies.rbi +2 -2
  29. data/sig/courier/models/notification_list_response.rbs +7 -5
  30. data/sig/courier/models/notification_template_response.rbs +70 -0
  31. data/sig/courier/models.rbs +2 -6
  32. data/sig/courier/resources/notifications.rbs +3 -3
  33. data/sig/courier/resources/routing_strategies.rbs +2 -2
  34. metadata +5 -11
  35. data/lib/courier/models/notification_template_get_response.rb +0 -92
  36. data/lib/courier/models/notification_template_mutation_response.rb +0 -51
  37. data/lib/courier/models/routing_strategy_mutation_response.rb +0 -19
  38. data/rbi/courier/models/notification_template_get_response.rbi +0 -162
  39. data/rbi/courier/models/notification_template_mutation_response.rbi +0 -121
  40. data/rbi/courier/models/routing_strategy_mutation_response.rbi +0 -31
  41. data/sig/courier/models/notification_template_get_response.rbs +0 -72
  42. data/sig/courier/models/notification_template_mutation_response.rbs +0 -46
  43. data/sig/courier/models/routing_strategy_mutation_response.rbs +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d71ef55224ae3a498561c16171a3a2f4d7043cdd17d9c505ef34e70179a6c35b
4
- data.tar.gz: da26b63925075f65d3d953a4a810ea535431e65274528b902000121d928c7fcb
3
+ metadata.gz: 2c653d07cd54be88e8b8328788188c56e6d62e7308f6bccf582769bd38b5e413
4
+ data.tar.gz: 9a025d1497b0e9383686ba5c849d2784be1195c7c21a52ba24d2491f6e5ebe71
5
5
  SHA512:
6
- metadata.gz: 237604be72c50aa572c525addf58d4e3f723142ffbd5863c9dfb301882bf9efa4c77e4eae7a143cafc3ed1981fb0602be0bb7a1046d4be8e5587c2c15988fd52
7
- data.tar.gz: cfdb4b9bcf90da1d34e9aabbe994404f49e6df75d4d56368509034b60ceb55eb0461d492cbaf2d2cb7a4b92e17f54a6050f7b605a0f2c00a8b9788c6142255d1
6
+ metadata.gz: ee312a1f98ddfd71c03692e23047237cd1205465687890e3d0dea3bd675acb6ed1ba30b340e67a85e9cd3d73017c09c29e5ef0a3946c4b6e2ccb806e7af29392
7
+ data.tar.gz: ac1e5417c4e7400965fc5efc5074e40cff4e5e4b5a4427795884cdba02869dbc54185252d2653c9599fe745b8a78e2fd0793675bf9a08b6a9d5d3903ee0139c8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.10.2 (2026-04-14)
4
+
5
+ Full Changelog: [v4.10.1...v4.10.2](https://github.com/trycourier/courier-ruby/compare/v4.10.1...v4.10.2)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **types:** flatten NotificationTemplateResponse model structure ([4c019eb](https://github.com/trycourier/courier-ruby/commit/4c019ebb34aaf3b6c37e778da95c593aa5faa409))
10
+ * **types:** make note optional, flatten NotificationTemplateGetResponse ([05f8c8c](https://github.com/trycourier/courier-ruby/commit/05f8c8c41198a2f8156ac10ccf4a67fa84130350))
11
+
12
+ ## 4.10.1 (2026-04-13)
13
+
14
+ Full Changelog: [v4.10.0...v4.10.1](https://github.com/trycourier/courier-ruby/compare/v4.10.0...v4.10.1)
15
+
16
+ ### Bug Fixes
17
+
18
+ * multipart encoding for file arrays ([6f54534](https://github.com/trycourier/courier-ruby/commit/6f545347ec738929c45b89476d4fc02aa185760b))
19
+ * **types:** correct notifications/routing_strategies return types, remove mutation models ([8020a8f](https://github.com/trycourier/courier-ruby/commit/8020a8fa2015d5f5b4c4703a4354acd3283193bc))
20
+
3
21
  ## 4.10.0 (2026-04-08)
4
22
 
5
23
  Full Changelog: [v4.9.0...v4.10.0](https://github.com/trycourier/courier-ruby/compare/v4.9.0...v4.10.0)
@@ -610,6 +610,7 @@ module Courier
610
610
  #
611
611
  # @return [Array(String, Enumerable<String>)]
612
612
  private def encode_multipart_streaming(body)
613
+ # rubocop:disable Style/CaseEquality
613
614
  # RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
614
615
  boundary = SecureRandom.urlsafe_base64(46)
615
616
 
@@ -619,7 +620,7 @@ module Courier
619
620
  in Hash
620
621
  body.each do |key, val|
621
622
  case val
622
- in Array if val.all? { primitive?(_1) }
623
+ in Array if val.all? { primitive?(_1) || Courier::Internal::Type::FileInput === _1 }
623
624
  val.each do |v|
624
625
  write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing)
625
626
  end
@@ -635,6 +636,7 @@ module Courier
635
636
 
636
637
  fused_io = fused_enum(strio) { closing.each(&:call) }
637
638
  [boundary, fused_io]
639
+ # rubocop:enable Style/CaseEquality
638
640
  end
639
641
 
640
642
  # @api private
@@ -47,11 +47,6 @@ module Courier
47
47
  # @return [Array<String>]
48
48
  required :event_ids, Courier::Internal::Type::ArrayOf[String]
49
49
 
50
- # @!attribute note
51
- #
52
- # @return [String]
53
- required :note, String
54
-
55
50
  # @!attribute routing
56
51
  #
57
52
  # @return [Courier::Models::MessageRouting]
@@ -67,6 +62,11 @@ module Courier
67
62
  # @return [Integer]
68
63
  required :updated_at, Integer
69
64
 
65
+ # @!attribute note
66
+ #
67
+ # @return [String, nil]
68
+ optional :note, String
69
+
70
70
  # @!attribute tags
71
71
  #
72
72
  # @return [Courier::Models::NotificationListResponse::Result::Notification::Tags, nil]
@@ -77,21 +77,21 @@ module Courier
77
77
  # @return [String, nil]
78
78
  optional :title, String, nil?: true
79
79
 
80
- # @!method initialize(id:, created_at:, event_ids:, note:, routing:, topic_id:, updated_at:, tags: nil, title: nil)
80
+ # @!method initialize(id:, created_at:, event_ids:, routing:, topic_id:, updated_at:, note: nil, tags: nil, title: nil)
81
81
  # @param id [String]
82
82
  #
83
83
  # @param created_at [Integer]
84
84
  #
85
85
  # @param event_ids [Array<String>] Array of event IDs associated with this notification
86
86
  #
87
- # @param note [String]
88
- #
89
87
  # @param routing [Courier::Models::MessageRouting]
90
88
  #
91
89
  # @param topic_id [String]
92
90
  #
93
91
  # @param updated_at [Integer]
94
92
  #
93
+ # @param note [String]
94
+ #
95
95
  # @param tags [Courier::Models::NotificationListResponse::Result::Notification::Tags, nil]
96
96
  #
97
97
  # @param title [String, nil]
@@ -4,8 +4,8 @@ module Courier
4
4
  module Models
5
5
  class NotificationTemplateCreateRequest < Courier::Internal::Type::BaseModel
6
6
  # @!attribute notification
7
- # Full document shape used in POST and PUT request bodies, and returned inside the
8
- # GET response envelope.
7
+ # Core template fields used in POST and PUT request bodies (nested under a
8
+ # `notification` key) and returned at the top level in responses.
9
9
  #
10
10
  # @return [Courier::Models::NotificationTemplatePayload]
11
11
  required :notification, -> { Courier::NotificationTemplatePayload }
@@ -23,7 +23,7 @@ module Courier
23
23
  #
24
24
  # Request body for creating a notification template.
25
25
  #
26
- # @param notification [Courier::Models::NotificationTemplatePayload] Full document shape used in POST and PUT request bodies, and returned inside the
26
+ # @param notification [Courier::Models::NotificationTemplatePayload] Core template fields used in POST and PUT request bodies (nested under a `notifi
27
27
  #
28
28
  # @param state [Symbol, Courier::Models::NotificationTemplateCreateRequest::State] Template state after creation. Case-insensitive input, normalized to uppercase i
29
29
 
@@ -40,8 +40,8 @@ module Courier
40
40
  required :tags, Courier::Internal::Type::ArrayOf[String]
41
41
 
42
42
  # @!method initialize(brand:, content:, name:, routing:, subscription:, tags:)
43
- # Full document shape used in POST and PUT request bodies, and returned inside the
44
- # GET response envelope.
43
+ # Core template fields used in POST and PUT request bodies (nested under a
44
+ # `notification` key) and returned at the top level in responses.
45
45
  #
46
46
  # @param brand [Courier::Models::NotificationTemplatePayload::Brand, nil] Brand reference, or null for no brand.
47
47
  #
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ # @see Courier::Resources::Notifications#create
6
+ class NotificationTemplateResponse < Courier::Models::NotificationTemplatePayload
7
+ # @!attribute id
8
+ # The template ID.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute created
14
+ # Epoch milliseconds when the template was created.
15
+ #
16
+ # @return [Integer]
17
+ required :created, Integer
18
+
19
+ # @!attribute creator
20
+ # User ID of the creator.
21
+ #
22
+ # @return [String]
23
+ required :creator, String
24
+
25
+ # @!attribute state
26
+ # The template state. Always uppercase.
27
+ #
28
+ # @return [Symbol, Courier::Models::NotificationTemplateResponse::State]
29
+ required :state, enum: -> { Courier::NotificationTemplateResponse::State }
30
+
31
+ # @!attribute updated
32
+ # Epoch milliseconds of last update.
33
+ #
34
+ # @return [Integer, nil]
35
+ optional :updated, Integer
36
+
37
+ # @!attribute updater
38
+ # User ID of the last updater.
39
+ #
40
+ # @return [String, nil]
41
+ optional :updater, String
42
+
43
+ # @!method initialize(id:, created:, creator:, state:, updated: nil, updater: nil)
44
+ # Response for GET /notifications/{id}, POST /notifications, and PUT
45
+ # /notifications/{id}. Returns all template fields at the top level.
46
+ #
47
+ # @param id [String] The template ID.
48
+ #
49
+ # @param created [Integer] Epoch milliseconds when the template was created.
50
+ #
51
+ # @param creator [String] User ID of the creator.
52
+ #
53
+ # @param state [Symbol, Courier::Models::NotificationTemplateResponse::State] The template state. Always uppercase.
54
+ #
55
+ # @param updated [Integer] Epoch milliseconds of last update.
56
+ #
57
+ # @param updater [String] User ID of the last updater.
58
+
59
+ # The template state. Always uppercase.
60
+ module State
61
+ extend Courier::Internal::Type::Enum
62
+
63
+ DRAFT = :DRAFT
64
+ PUBLISHED = :PUBLISHED
65
+
66
+ # @!method self.values
67
+ # @return [Array<Symbol>]
68
+ end
69
+ end
70
+ end
71
+ end
@@ -4,8 +4,8 @@ module Courier
4
4
  module Models
5
5
  class NotificationTemplateUpdateRequest < Courier::Internal::Type::BaseModel
6
6
  # @!attribute notification
7
- # Full document shape used in POST and PUT request bodies, and returned inside the
8
- # GET response envelope.
7
+ # Core template fields used in POST and PUT request bodies (nested under a
8
+ # `notification` key) and returned at the top level in responses.
9
9
  #
10
10
  # @return [Courier::Models::NotificationTemplatePayload]
11
11
  required :notification, -> { Courier::NotificationTemplatePayload }
@@ -24,7 +24,7 @@ module Courier
24
24
  # Request body for replacing a notification template. Same shape as create. All
25
25
  # fields required (PUT = full replacement).
26
26
  #
27
- # @param notification [Courier::Models::NotificationTemplatePayload] Full document shape used in POST and PUT request bodies, and returned inside the
27
+ # @param notification [Courier::Models::NotificationTemplatePayload] Core template fields used in POST and PUT request bodies (nested under a `notifi
28
28
  #
29
29
  # @param state [Symbol, Courier::Models::NotificationTemplateUpdateRequest::State] Template state after update. Case-insensitive input, normalized to uppercase in
30
30
 
@@ -13,7 +13,8 @@ module Courier
13
13
  required :id, String
14
14
 
15
15
  # @!attribute provider
16
- # The provider key identifying the type.
16
+ # The provider key identifying the type. Required on every request because it
17
+ # selects the provider-specific settings schema for validation.
17
18
  #
18
19
  # @return [String]
19
20
  required :provider, String
@@ -44,7 +45,7 @@ module Courier
44
45
  #
45
46
  # @param id [String]
46
47
  #
47
- # @param provider [String] The provider key identifying the type.
48
+ # @param provider [String] The provider key identifying the type. Required on every request because it sele
48
49
  #
49
50
  # @param alias_ [String] Updated alias. Omit to clear.
50
51
  #
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Courier
4
4
  module Models
5
- # @see Courier::Resources::RoutingStrategies#retrieve
5
+ # @see Courier::Resources::RoutingStrategies#create
6
6
  class RoutingStrategyGetResponse < Courier::Internal::Type::BaseModel
7
7
  # @!attribute id
8
8
  # The routing strategy ID (rs\_ prefix).
@@ -297,14 +297,12 @@ module Courier
297
297
 
298
298
  NotificationTemplateCreateRequest = Courier::Models::NotificationTemplateCreateRequest
299
299
 
300
- NotificationTemplateGetResponse = Courier::Models::NotificationTemplateGetResponse
301
-
302
- NotificationTemplateMutationResponse = Courier::Models::NotificationTemplateMutationResponse
303
-
304
300
  NotificationTemplatePayload = Courier::Models::NotificationTemplatePayload
305
301
 
306
302
  NotificationTemplatePublishRequest = Courier::Models::NotificationTemplatePublishRequest
307
303
 
304
+ NotificationTemplateResponse = Courier::Models::NotificationTemplateResponse
305
+
308
306
  NotificationTemplateState = Courier::Models::NotificationTemplateState
309
307
 
310
308
  NotificationTemplateSummary = Courier::Models::NotificationTemplateSummary
@@ -379,8 +377,6 @@ module Courier
379
377
 
380
378
  RoutingStrategyListResponse = Courier::Models::RoutingStrategyListResponse
381
379
 
382
- RoutingStrategyMutationResponse = Courier::Models::RoutingStrategyMutationResponse
383
-
384
380
  RoutingStrategyReplaceParams = Courier::Models::RoutingStrategyReplaceParams
385
381
 
386
382
  RoutingStrategyReplaceRequest = Courier::Models::RoutingStrategyReplaceRequest
@@ -4,11 +4,13 @@ module Courier
4
4
  module Resources
5
5
  class Notifications
6
6
  class Checks
7
+ # Replace the checks for a notification template submission.
8
+ #
7
9
  # @overload update(submission_id, id:, checks:, request_options: {})
8
10
  #
9
- # @param submission_id [String] Path param
11
+ # @param submission_id [String] Path param: Submission ID.
10
12
  #
11
- # @param id [String] Path param
13
+ # @param id [String] Path param: Notification template ID.
12
14
  #
13
15
  # @param checks [Array<Courier::Models::BaseCheck>] Body param
14
16
  #
@@ -32,10 +34,14 @@ module Courier
32
34
  )
33
35
  end
34
36
 
37
+ # Retrieve the checks for a notification template submission.
38
+ #
35
39
  # @overload list(submission_id, id:, request_options: {})
36
40
  #
37
- # @param submission_id [String]
38
- # @param id [String]
41
+ # @param submission_id [String] Submission ID.
42
+ #
43
+ # @param id [String] Notification template ID.
44
+ #
39
45
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
40
46
  #
41
47
  # @return [Courier::Models::Notifications::CheckListResponse]
@@ -55,10 +61,14 @@ module Courier
55
61
  )
56
62
  end
57
63
 
64
+ # Cancel a notification template submission.
65
+ #
58
66
  # @overload delete(submission_id, id:, request_options: {})
59
67
  #
60
- # @param submission_id [String]
61
- # @param id [String]
68
+ # @param submission_id [String] Submission ID.
69
+ #
70
+ # @param id [String] Notification template ID.
71
+ #
62
72
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
63
73
  #
64
74
  # @return [nil]
@@ -14,13 +14,13 @@ module Courier
14
14
  #
15
15
  # @overload create(notification:, state: nil, request_options: {})
16
16
  #
17
- # @param notification [Courier::Models::NotificationTemplatePayload] Full document shape used in POST and PUT request bodies, and returned inside the
17
+ # @param notification [Courier::Models::NotificationTemplatePayload] Core template fields used in POST and PUT request bodies (nested under a `notifi
18
18
  #
19
19
  # @param state [Symbol, Courier::Models::NotificationTemplateCreateRequest::State] Template state after creation. Case-insensitive input, normalized to uppercase i
20
20
  #
21
21
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
22
22
  #
23
- # @return [Courier::Models::NotificationTemplateMutationResponse]
23
+ # @return [Courier::Models::NotificationTemplateResponse]
24
24
  #
25
25
  # @see Courier::Models::NotificationCreateParams
26
26
  def create(params)
@@ -29,7 +29,7 @@ module Courier
29
29
  method: :post,
30
30
  path: "notifications",
31
31
  body: parsed,
32
- model: Courier::NotificationTemplateMutationResponse,
32
+ model: Courier::NotificationTemplateResponse,
33
33
  options: options
34
34
  )
35
35
  end
@@ -48,7 +48,7 @@ module Courier
48
48
  #
49
49
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
50
50
  #
51
- # @return [Courier::Models::NotificationTemplateGetResponse]
51
+ # @return [Courier::Models::NotificationTemplateResponse]
52
52
  #
53
53
  # @see Courier::Models::NotificationRetrieveParams
54
54
  def retrieve(id, params = {})
@@ -58,7 +58,7 @@ module Courier
58
58
  method: :get,
59
59
  path: ["notifications/%1$s", id],
60
60
  query: query,
61
- model: Courier::NotificationTemplateGetResponse,
61
+ model: Courier::NotificationTemplateResponse,
62
62
  options: options
63
63
  )
64
64
  end
@@ -276,13 +276,13 @@ module Courier
276
276
  #
277
277
  # @param id [String] Template ID (nt\_ prefix).
278
278
  #
279
- # @param notification [Courier::Models::NotificationTemplatePayload] Full document shape used in POST and PUT request bodies, and returned inside the
279
+ # @param notification [Courier::Models::NotificationTemplatePayload] Core template fields used in POST and PUT request bodies (nested under a `notifi
280
280
  #
281
281
  # @param state [Symbol, Courier::Models::NotificationTemplateUpdateRequest::State] Template state after update. Case-insensitive input, normalized to uppercase in
282
282
  #
283
283
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
284
284
  #
285
- # @return [Courier::Models::NotificationTemplateMutationResponse]
285
+ # @return [Courier::Models::NotificationTemplateResponse]
286
286
  #
287
287
  # @see Courier::Models::NotificationReplaceParams
288
288
  def replace(id, params)
@@ -291,7 +291,7 @@ module Courier
291
291
  method: :put,
292
292
  path: ["notifications/%1$s", id],
293
293
  body: parsed,
294
- model: Courier::NotificationTemplateMutationResponse,
294
+ model: Courier::NotificationTemplateResponse,
295
295
  options: options
296
296
  )
297
297
  end
@@ -61,15 +61,17 @@ module Courier
61
61
  # Some parameter documentations has been truncated, see
62
62
  # {Courier::Models::ProviderUpdateParams} for more details.
63
63
  #
64
- # Update an existing provider configuration. The `provider` key is required. All
65
- # other fields are optional omitted fields are cleared from the stored
66
- # configuration (this is a full replacement, not a partial merge).
64
+ # Replace an existing provider configuration. The `provider` key is required and
65
+ # determines which provider-specific settings schema is applied. All other fields
66
+ # are optional omitted fields are cleared from the stored configuration (this is
67
+ # a full replacement, not a partial merge). Changing the provider type for an
68
+ # existing configuration is not supported.
67
69
  #
68
70
  # @overload update(id, provider:, alias_: nil, settings: nil, title: nil, request_options: {})
69
71
  #
70
72
  # @param id [String] A unique identifier of the provider configuration to update.
71
73
  #
72
- # @param provider [String] The provider key identifying the type.
74
+ # @param provider [String] The provider key identifying the type. Required on every request because it sele
73
75
  #
74
76
  # @param alias_ [String] Updated alias. Omit to clear.
75
77
  #
@@ -85,7 +87,7 @@ module Courier
85
87
  def update(id, params)
86
88
  parsed, options = Courier::ProviderUpdateParams.dump_request(params)
87
89
  @client.request(
88
- method: :post,
90
+ method: :put,
89
91
  path: ["providers/%1$s", id],
90
92
  body: parsed,
91
93
  model: Courier::Provider,
@@ -22,7 +22,7 @@ module Courier
22
22
  #
23
23
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
24
24
  #
25
- # @return [Courier::Models::RoutingStrategyMutationResponse]
25
+ # @return [Courier::Models::RoutingStrategyGetResponse]
26
26
  #
27
27
  # @see Courier::Models::RoutingStrategyCreateParams
28
28
  def create(params)
@@ -31,7 +31,7 @@ module Courier
31
31
  method: :post,
32
32
  path: "routing-strategies",
33
33
  body: parsed,
34
- model: Courier::RoutingStrategyMutationResponse,
34
+ model: Courier::RoutingStrategyGetResponse,
35
35
  options: options
36
36
  )
37
37
  end
@@ -154,7 +154,7 @@ module Courier
154
154
  #
155
155
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
156
156
  #
157
- # @return [Courier::Models::RoutingStrategyMutationResponse]
157
+ # @return [Courier::Models::RoutingStrategyGetResponse]
158
158
  #
159
159
  # @see Courier::Models::RoutingStrategyReplaceParams
160
160
  def replace(id, params)
@@ -163,7 +163,7 @@ module Courier
163
163
  method: :put,
164
164
  path: ["routing-strategies/%1$s", id],
165
165
  body: parsed,
166
- model: Courier::RoutingStrategyMutationResponse,
166
+ model: Courier::RoutingStrategyGetResponse,
167
167
  options: options
168
168
  )
169
169
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Courier
4
- VERSION = "4.10.0"
4
+ VERSION = "4.10.2"
5
5
  end
data/lib/courier.rb CHANGED
@@ -216,8 +216,7 @@ require_relative "courier/models/notifications/check_list_params"
216
216
  require_relative "courier/models/notifications/check_list_response"
217
217
  require_relative "courier/models/notifications/check_update_params"
218
218
  require_relative "courier/models/notifications/check_update_response"
219
- require_relative "courier/models/notification_template_get_response"
220
- require_relative "courier/models/notification_template_mutation_response"
219
+ require_relative "courier/models/notification_template_response"
221
220
  require_relative "courier/models/notification_template_state"
222
221
  require_relative "courier/models/notification_template_summary"
223
222
  require_relative "courier/models/notification_template_version_list_response"
@@ -261,7 +260,6 @@ require_relative "courier/models/routing_strategy_get_response"
261
260
  require_relative "courier/models/routing_strategy_list_notifications_params"
262
261
  require_relative "courier/models/routing_strategy_list_params"
263
262
  require_relative "courier/models/routing_strategy_list_response"
264
- require_relative "courier/models/routing_strategy_mutation_response"
265
263
  require_relative "courier/models/routing_strategy_replace_params"
266
264
  require_relative "courier/models/routing_strategy_retrieve_params"
267
265
  require_relative "courier/models/routing_strategy_summary"
@@ -89,9 +89,6 @@ module Courier
89
89
  sig { returns(T::Array[String]) }
90
90
  attr_accessor :event_ids
91
91
 
92
- sig { returns(String) }
93
- attr_accessor :note
94
-
95
92
  sig { returns(Courier::MessageRouting) }
96
93
  attr_reader :routing
97
94
 
@@ -104,6 +101,12 @@ module Courier
104
101
  sig { returns(Integer) }
105
102
  attr_accessor :updated_at
106
103
 
104
+ sig { returns(T.nilable(String)) }
105
+ attr_reader :note
106
+
107
+ sig { params(note: String).void }
108
+ attr_writer :note
109
+
107
110
  sig do
108
111
  returns(
109
112
  T.nilable(
@@ -131,10 +134,10 @@ module Courier
131
134
  id: String,
132
135
  created_at: Integer,
133
136
  event_ids: T::Array[String],
134
- note: String,
135
137
  routing: Courier::MessageRouting::OrHash,
136
138
  topic_id: String,
137
139
  updated_at: Integer,
140
+ note: String,
138
141
  tags:
139
142
  T.nilable(
140
143
  Courier::Models::NotificationListResponse::Result::Notification::Tags::OrHash
@@ -147,10 +150,10 @@ module Courier
147
150
  created_at:,
148
151
  # Array of event IDs associated with this notification
149
152
  event_ids:,
150
- note:,
151
153
  routing:,
152
154
  topic_id:,
153
155
  updated_at:,
156
+ note: nil,
154
157
  tags: nil,
155
158
  title: nil
156
159
  )
@@ -162,10 +165,10 @@ module Courier
162
165
  id: String,
163
166
  created_at: Integer,
164
167
  event_ids: T::Array[String],
165
- note: String,
166
168
  routing: Courier::MessageRouting,
167
169
  topic_id: String,
168
170
  updated_at: Integer,
171
+ note: String,
169
172
  tags:
170
173
  T.nilable(
171
174
  Courier::Models::NotificationListResponse::Result::Notification::Tags
@@ -11,8 +11,8 @@ module Courier
11
11
  )
12
12
  end
13
13
 
14
- # Full document shape used in POST and PUT request bodies, and returned inside the
15
- # GET response envelope.
14
+ # Core template fields used in POST and PUT request bodies (nested under a
15
+ # `notification` key) and returned at the top level in responses.
16
16
  sig { returns(Courier::NotificationTemplatePayload) }
17
17
  attr_reader :notification
18
18
 
@@ -45,8 +45,8 @@ module Courier
45
45
  ).returns(T.attached_class)
46
46
  end
47
47
  def self.new(
48
- # Full document shape used in POST and PUT request bodies, and returned inside the
49
- # GET response envelope.
48
+ # Core template fields used in POST and PUT request bodies (nested under a
49
+ # `notification` key) and returned at the top level in responses.
50
50
  notification:,
51
51
  # Template state after creation. Case-insensitive input, normalized to uppercase
52
52
  # in the response. Defaults to "DRAFT".
@@ -65,8 +65,8 @@ module Courier
65
65
  sig { returns(T::Array[String]) }
66
66
  attr_accessor :tags
67
67
 
68
- # Full document shape used in POST and PUT request bodies, and returned inside the
69
- # GET response envelope.
68
+ # Core template fields used in POST and PUT request bodies (nested under a
69
+ # `notification` key) and returned at the top level in responses.
70
70
  sig do
71
71
  params(
72
72
  brand: T.nilable(Courier::NotificationTemplatePayload::Brand::OrHash),