trycourier 4.18.2 → 4.19.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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/lib/courier/models/publish_preferences_request.rb +40 -0
  4. data/lib/courier/models/users/bulk_preference_topic.rb +59 -0
  5. data/lib/courier/models/users/preference_bulk_replace_params.rb +93 -0
  6. data/lib/courier/models/users/preference_bulk_replace_response.rb +27 -0
  7. data/lib/courier/models/users/preference_bulk_update_params.rb +92 -0
  8. data/lib/courier/models/users/preference_bulk_update_response.rb +48 -0
  9. data/lib/courier/models/workspace_preference_create_request.rb +9 -1
  10. data/lib/courier/models/workspace_preference_get_response.rb +9 -1
  11. data/lib/courier/models/workspace_preference_publish_params.rb +1 -1
  12. data/lib/courier/models/workspace_preference_replace_request.rb +13 -1
  13. data/lib/courier/models/workspace_preference_topic_create_request.rb +9 -1
  14. data/lib/courier/models/workspace_preference_topic_get_response.rb +9 -1
  15. data/lib/courier/models/workspace_preference_topic_replace_request.rb +13 -1
  16. data/lib/courier/models.rb +2 -0
  17. data/lib/courier/resources/users/preferences.rb +96 -0
  18. data/lib/courier/resources/workspace_preferences/topics.rb +6 -2
  19. data/lib/courier/resources/workspace_preferences.rb +22 -4
  20. data/lib/courier/version.rb +1 -1
  21. data/lib/courier.rb +6 -0
  22. data/rbi/courier/models/publish_preferences_request.rbi +58 -0
  23. data/rbi/courier/models/users/bulk_preference_topic.rbi +99 -0
  24. data/rbi/courier/models/users/preference_bulk_replace_params.rbi +188 -0
  25. data/rbi/courier/models/users/preference_bulk_replace_response.rbi +50 -0
  26. data/rbi/courier/models/users/preference_bulk_update_params.rbi +186 -0
  27. data/rbi/courier/models/users/preference_bulk_update_response.rbi +94 -0
  28. data/rbi/courier/models/workspace_preference_create_request.rbi +8 -0
  29. data/rbi/courier/models/workspace_preference_get_response.rbi +8 -0
  30. data/rbi/courier/models/workspace_preference_publish_params.rbi +1 -1
  31. data/rbi/courier/models/workspace_preference_replace_request.rbi +10 -0
  32. data/rbi/courier/models/workspace_preference_topic_create_request.rbi +8 -0
  33. data/rbi/courier/models/workspace_preference_topic_get_response.rbi +8 -0
  34. data/rbi/courier/models/workspace_preference_topic_replace_request.rbi +10 -0
  35. data/rbi/courier/models.rbi +2 -0
  36. data/rbi/courier/resources/users/preferences.rbi +83 -0
  37. data/rbi/courier/resources/workspace_preferences/topics.rbi +7 -0
  38. data/rbi/courier/resources/workspace_preferences.rbi +23 -4
  39. data/sig/courier/models/publish_preferences_request.rbs +26 -0
  40. data/sig/courier/models/users/bulk_preference_topic.rbs +48 -0
  41. data/sig/courier/models/users/preference_bulk_replace_params.rbs +87 -0
  42. data/sig/courier/models/users/preference_bulk_replace_response.rbs +27 -0
  43. data/sig/courier/models/users/preference_bulk_update_params.rbs +87 -0
  44. data/sig/courier/models/users/preference_bulk_update_response.rbs +39 -0
  45. data/sig/courier/models/workspace_preference_create_request.rbs +5 -0
  46. data/sig/courier/models/workspace_preference_get_response.rbs +5 -0
  47. data/sig/courier/models/workspace_preference_publish_params.rbs +1 -1
  48. data/sig/courier/models/workspace_preference_replace_request.rbs +5 -0
  49. data/sig/courier/models/workspace_preference_topic_create_request.rbs +5 -0
  50. data/sig/courier/models/workspace_preference_topic_get_response.rbs +5 -0
  51. data/sig/courier/models/workspace_preference_topic_replace_request.rbs +5 -0
  52. data/sig/courier/models.rbs +2 -0
  53. data/sig/courier/resources/users/preferences.rbs +14 -0
  54. data/sig/courier/resources/workspace_preferences/topics.rbs +2 -0
  55. data/sig/courier/resources/workspace_preferences.rbs +5 -0
  56. metadata +19 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5dfe27ef204a57575754464258c3bfc13c6f51426e0566a008322a0d64a0c648
4
- data.tar.gz: 69833499b114555c923d2818a4544d2bcc6129f9f5b3773455fb65c85588bb77
3
+ metadata.gz: 36258d274b2bc67f4059fd4f61a451511a44af84ea33b39a4f35f67e59e5caac
4
+ data.tar.gz: b94c56826d10822db771e94955e185faaf42d04d4d3d945d86d453323213b89e
5
5
  SHA512:
6
- metadata.gz: 05d2da79243cb23bef226df3f2c33bbecd6a840bbae09d48d10f2124edd27402aed45d44b0a072c8ad727917ee454745f30a9b743d9e0904ed196d6bdece1ed3
7
- data.tar.gz: f7b8d7c2b6e49f099db098bfafcb16b17850880ea050f529e1859f6a014f58612146621603faa107f0395d810c4145958b73b268dad2f38be671cd8f7f1a0b55
6
+ metadata.gz: 30b1984a1767a07ac87979e4089dcde0c4298c9a5aa974e136fd1bbdc3b88c4a1df4fcf26f53357203e45dcb772915dfcda27e9a74d4ba4282c3c6aadba3b974
7
+ data.tar.gz: 3e55533431b261294c723be05ad6e0d76a81acb933b98a3e393f855d255e93090d9495adb22d90f6cee9028b41b9d5f08f9b948e91880bdb1a130464c9594163
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.19.0 (2026-07-09)
4
+
5
+ Full Changelog: [v4.18.2...v4.19.0](https://github.com/trycourier/courier-ruby/compare/v4.18.2...v4.19.0)
6
+
7
+ ### Features
8
+
9
+ * Add bulk user preference upsert and replace endpoints ([695929f](https://github.com/trycourier/courier-ruby/commit/695929f41a7c07c28ef9c3cb6913890b30759404))
10
+ * Preferences v3 REST fields: section/topic description + publish body ([df7c59d](https://github.com/trycourier/courier-ruby/commit/df7c59d084f401ea9523db27b35bdccfc0696f2f))
11
+
3
12
  ## 4.18.2 (2026-07-09)
4
13
 
5
14
  Full Changelog: [v4.18.1...v4.18.2](https://github.com/trycourier/courier-ruby/compare/v4.18.1...v4.18.2)
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class PublishPreferencesRequest < Courier::Internal::Type::BaseModel
6
+ # @!attribute brand_id
7
+ # Brand for the hosted page - "default" (workspace default brand), "none" (no
8
+ # brand), or a specific brand id. Defaults to "default".
9
+ #
10
+ # @return [String, nil]
11
+ optional :brand_id, String, nil?: true
12
+
13
+ # @!attribute description
14
+ # Description shown under the heading on the hosted preferences page.
15
+ #
16
+ # @return [String, nil]
17
+ optional :description, String, nil?: true
18
+
19
+ # @!attribute heading
20
+ # Heading shown at the top of the hosted preferences page.
21
+ #
22
+ # @return [String, nil]
23
+ optional :heading, String, nil?: true
24
+
25
+ # @!method initialize(brand_id: nil, description: nil, heading: nil)
26
+ # Some parameter documentations has been truncated, see
27
+ # {Courier::Models::PublishPreferencesRequest} for more details.
28
+ #
29
+ # Optional page metadata to apply when publishing the workspace's preferences
30
+ # page. All fields are optional; omitted fields fall back to the page defaults
31
+ # (and the workspace default brand).
32
+ #
33
+ # @param brand_id [String, nil] Brand for the hosted page - "default" (workspace default brand), "none" (no bran
34
+ #
35
+ # @param description [String, nil] Description shown under the heading on the hosted preferences page.
36
+ #
37
+ # @param heading [String, nil] Heading shown at the top of the hosted preferences page.
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ module Users
6
+ class BulkPreferenceTopic < Courier::Internal::Type::BaseModel
7
+ # @!attribute custom_routing
8
+ #
9
+ # @return [Array<Symbol, Courier::Models::ChannelClassification>]
10
+ required :custom_routing, -> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] }
11
+
12
+ # @!attribute has_custom_routing
13
+ #
14
+ # @return [Boolean]
15
+ required :has_custom_routing, Courier::Internal::Type::Boolean
16
+
17
+ # @!attribute status
18
+ # The applied subscription status. Echoes the requested value, so it is always
19
+ # OPTED_IN or OPTED_OUT.
20
+ #
21
+ # @return [Symbol, Courier::Models::Users::BulkPreferenceTopic::Status]
22
+ required :status, enum: -> { Courier::Users::BulkPreferenceTopic::Status }
23
+
24
+ # @!attribute topic_id
25
+ #
26
+ # @return [String]
27
+ required :topic_id, String
28
+
29
+ # @!method initialize(custom_routing:, has_custom_routing:, status:, topic_id:)
30
+ # Some parameter documentations has been truncated, see
31
+ # {Courier::Models::Users::BulkPreferenceTopic} for more details.
32
+ #
33
+ # A single topic override echoed in a bulk preference response.
34
+ #
35
+ # @param custom_routing [Array<Symbol, Courier::Models::ChannelClassification>]
36
+ #
37
+ # @param has_custom_routing [Boolean]
38
+ #
39
+ # @param status [Symbol, Courier::Models::Users::BulkPreferenceTopic::Status] The applied subscription status. Echoes the requested value, so it is always OPT
40
+ #
41
+ # @param topic_id [String]
42
+
43
+ # The applied subscription status. Echoes the requested value, so it is always
44
+ # OPTED_IN or OPTED_OUT.
45
+ #
46
+ # @see Courier::Models::Users::BulkPreferenceTopic#status
47
+ module Status
48
+ extend Courier::Internal::Type::Enum
49
+
50
+ OPTED_IN = :OPTED_IN
51
+ OPTED_OUT = :OPTED_OUT
52
+
53
+ # @!method self.values
54
+ # @return [Array<Symbol>]
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,93 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ module Users
6
+ # @see Courier::Resources::Users::Preferences#bulk_replace
7
+ class PreferenceBulkReplaceParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ # @!attribute user_id
12
+ #
13
+ # @return [String]
14
+ required :user_id, String
15
+
16
+ # @!attribute topics
17
+ # The complete set of topic overrides for the user. Up to 50 topics may be
18
+ # provided. Any existing override not listed here is reset to its topic default;
19
+ # an empty array resets every existing override.
20
+ #
21
+ # @return [Array<Courier::Models::Users::PreferenceBulkReplaceParams::Topic>]
22
+ required :topics,
23
+ -> { Courier::Internal::Type::ArrayOf[Courier::Users::PreferenceBulkReplaceParams::Topic] }
24
+
25
+ # @!attribute tenant_id
26
+ # Update the preferences of a user for this specific tenant context.
27
+ #
28
+ # @return [String, nil]
29
+ optional :tenant_id, String, nil?: true
30
+
31
+ # @!method initialize(user_id:, topics:, tenant_id: nil, request_options: {})
32
+ # Some parameter documentations has been truncated, see
33
+ # {Courier::Models::Users::PreferenceBulkReplaceParams} for more details.
34
+ #
35
+ # @param user_id [String]
36
+ #
37
+ # @param topics [Array<Courier::Models::Users::PreferenceBulkReplaceParams::Topic>] The complete set of topic overrides for the user. Up to 50 topics may be provide
38
+ #
39
+ # @param tenant_id [String, nil] Update the preferences of a user for this specific tenant context.
40
+ #
41
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
42
+
43
+ class Topic < Courier::Internal::Type::BaseModel
44
+ # @!attribute status
45
+ # The subscription status to apply for this topic.
46
+ #
47
+ # @return [Symbol, Courier::Models::Users::PreferenceBulkReplaceParams::Topic::Status]
48
+ required :status, enum: -> { Courier::Users::PreferenceBulkReplaceParams::Topic::Status }
49
+
50
+ # @!attribute topic_id
51
+ # A unique identifier associated with a subscription topic.
52
+ #
53
+ # @return [String]
54
+ required :topic_id, String
55
+
56
+ # @!attribute custom_routing
57
+ # The channels a user has chosen to receive notifications through for this topic.
58
+ #
59
+ # @return [Array<Symbol, Courier::Models::ChannelClassification>, nil]
60
+ optional :custom_routing, -> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] }
61
+
62
+ # @!attribute has_custom_routing
63
+ # Whether the recipient has chosen specific delivery channels for this topic.
64
+ #
65
+ # @return [Boolean, nil]
66
+ optional :has_custom_routing, Courier::Internal::Type::Boolean
67
+
68
+ # @!method initialize(status:, topic_id:, custom_routing: nil, has_custom_routing: nil)
69
+ # @param status [Symbol, Courier::Models::Users::PreferenceBulkReplaceParams::Topic::Status] The subscription status to apply for this topic.
70
+ #
71
+ # @param topic_id [String] A unique identifier associated with a subscription topic.
72
+ #
73
+ # @param custom_routing [Array<Symbol, Courier::Models::ChannelClassification>] The channels a user has chosen to receive notifications through for this topic.
74
+ #
75
+ # @param has_custom_routing [Boolean] Whether the recipient has chosen specific delivery channels for this topic.
76
+
77
+ # The subscription status to apply for this topic.
78
+ #
79
+ # @see Courier::Models::Users::PreferenceBulkReplaceParams::Topic#status
80
+ module Status
81
+ extend Courier::Internal::Type::Enum
82
+
83
+ OPTED_IN = :OPTED_IN
84
+ OPTED_OUT = :OPTED_OUT
85
+
86
+ # @!method self.values
87
+ # @return [Array<Symbol>]
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ module Users
6
+ # @see Courier::Resources::Users::Preferences#bulk_replace
7
+ class PreferenceBulkReplaceResponse < Courier::Internal::Type::BaseModel
8
+ # @!attribute deleted
9
+ # The ids of the overrides that were reset to their topic default.
10
+ #
11
+ # @return [Array<String>]
12
+ required :deleted, Courier::Internal::Type::ArrayOf[String]
13
+
14
+ # @!attribute items
15
+ # The complete resulting set of topic overrides for the user.
16
+ #
17
+ # @return [Array<Courier::Models::Users::BulkPreferenceTopic>]
18
+ required :items, -> { Courier::Internal::Type::ArrayOf[Courier::Users::BulkPreferenceTopic] }
19
+
20
+ # @!method initialize(deleted:, items:)
21
+ # @param deleted [Array<String>] The ids of the overrides that were reset to their topic default.
22
+ #
23
+ # @param items [Array<Courier::Models::Users::BulkPreferenceTopic>] The complete resulting set of topic overrides for the user.
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,92 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ module Users
6
+ # @see Courier::Resources::Users::Preferences#bulk_update
7
+ class PreferenceBulkUpdateParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ # @!attribute user_id
12
+ #
13
+ # @return [String]
14
+ required :user_id, String
15
+
16
+ # @!attribute topics
17
+ # The topics to create or update. Between 1 and 50 topics may be provided in a
18
+ # single request.
19
+ #
20
+ # @return [Array<Courier::Models::Users::PreferenceBulkUpdateParams::Topic>]
21
+ required :topics,
22
+ -> { Courier::Internal::Type::ArrayOf[Courier::Users::PreferenceBulkUpdateParams::Topic] }
23
+
24
+ # @!attribute tenant_id
25
+ # Update the preferences of a user for this specific tenant context.
26
+ #
27
+ # @return [String, nil]
28
+ optional :tenant_id, String, nil?: true
29
+
30
+ # @!method initialize(user_id:, topics:, tenant_id: nil, request_options: {})
31
+ # Some parameter documentations has been truncated, see
32
+ # {Courier::Models::Users::PreferenceBulkUpdateParams} for more details.
33
+ #
34
+ # @param user_id [String]
35
+ #
36
+ # @param topics [Array<Courier::Models::Users::PreferenceBulkUpdateParams::Topic>] The topics to create or update. Between 1 and 50 topics may be provided in a sin
37
+ #
38
+ # @param tenant_id [String, nil] Update the preferences of a user for this specific tenant context.
39
+ #
40
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
41
+
42
+ class Topic < Courier::Internal::Type::BaseModel
43
+ # @!attribute status
44
+ # The subscription status to apply for this topic.
45
+ #
46
+ # @return [Symbol, Courier::Models::Users::PreferenceBulkUpdateParams::Topic::Status]
47
+ required :status, enum: -> { Courier::Users::PreferenceBulkUpdateParams::Topic::Status }
48
+
49
+ # @!attribute topic_id
50
+ # A unique identifier associated with a subscription topic.
51
+ #
52
+ # @return [String]
53
+ required :topic_id, String
54
+
55
+ # @!attribute custom_routing
56
+ # The channels a user has chosen to receive notifications through for this topic.
57
+ #
58
+ # @return [Array<Symbol, Courier::Models::ChannelClassification>, nil]
59
+ optional :custom_routing, -> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] }
60
+
61
+ # @!attribute has_custom_routing
62
+ # Whether the recipient has chosen specific delivery channels for this topic.
63
+ #
64
+ # @return [Boolean, nil]
65
+ optional :has_custom_routing, Courier::Internal::Type::Boolean
66
+
67
+ # @!method initialize(status:, topic_id:, custom_routing: nil, has_custom_routing: nil)
68
+ # @param status [Symbol, Courier::Models::Users::PreferenceBulkUpdateParams::Topic::Status] The subscription status to apply for this topic.
69
+ #
70
+ # @param topic_id [String] A unique identifier associated with a subscription topic.
71
+ #
72
+ # @param custom_routing [Array<Symbol, Courier::Models::ChannelClassification>] The channels a user has chosen to receive notifications through for this topic.
73
+ #
74
+ # @param has_custom_routing [Boolean] Whether the recipient has chosen specific delivery channels for this topic.
75
+
76
+ # The subscription status to apply for this topic.
77
+ #
78
+ # @see Courier::Models::Users::PreferenceBulkUpdateParams::Topic#status
79
+ module Status
80
+ extend Courier::Internal::Type::Enum
81
+
82
+ OPTED_IN = :OPTED_IN
83
+ OPTED_OUT = :OPTED_OUT
84
+
85
+ # @!method self.values
86
+ # @return [Array<Symbol>]
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ module Users
6
+ # @see Courier::Resources::Users::Preferences#bulk_update
7
+ class PreferenceBulkUpdateResponse < Courier::Internal::Type::BaseModel
8
+ # @!attribute errors
9
+ # The topics that could not be applied, each with a reason.
10
+ #
11
+ # @return [Array<Courier::Models::Users::PreferenceBulkUpdateResponse::Error>]
12
+ required :errors,
13
+ -> { Courier::Internal::Type::ArrayOf[Courier::Models::Users::PreferenceBulkUpdateResponse::Error] }
14
+
15
+ # @!attribute items
16
+ # The topics that were successfully created or updated.
17
+ #
18
+ # @return [Array<Courier::Models::Users::BulkPreferenceTopic>]
19
+ required :items, -> { Courier::Internal::Type::ArrayOf[Courier::Users::BulkPreferenceTopic] }
20
+
21
+ # @!method initialize(errors:, items:)
22
+ # @param errors [Array<Courier::Models::Users::PreferenceBulkUpdateResponse::Error>] The topics that could not be applied, each with a reason.
23
+ #
24
+ # @param items [Array<Courier::Models::Users::BulkPreferenceTopic>] The topics that were successfully created or updated.
25
+
26
+ class Error < Courier::Internal::Type::BaseModel
27
+ # @!attribute reason
28
+ # A human-readable explanation of why the topic could not be applied.
29
+ #
30
+ # @return [String]
31
+ required :reason, String
32
+
33
+ # @!attribute topic_id
34
+ #
35
+ # @return [String]
36
+ required :topic_id, String
37
+
38
+ # @!method initialize(reason:, topic_id:)
39
+ # A single topic that could not be applied in a bulk preference request.
40
+ #
41
+ # @param reason [String] A human-readable explanation of why the topic could not be applied.
42
+ #
43
+ # @param topic_id [String]
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -9,6 +9,12 @@ module Courier
9
9
  # @return [String]
10
10
  required :name, String
11
11
 
12
+ # @!attribute description
13
+ # Optional description shown under the section on the hosted preferences page.
14
+ #
15
+ # @return [String, nil]
16
+ optional :description, String, nil?: true
17
+
12
18
  # @!attribute has_custom_routing
13
19
  # Whether the workspace preference defines custom routing for its topics.
14
20
  #
@@ -23,11 +29,13 @@ module Courier
23
29
  -> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] },
24
30
  nil?: true
25
31
 
26
- # @!method initialize(name:, has_custom_routing: nil, routing_options: nil)
32
+ # @!method initialize(name:, description: nil, has_custom_routing: nil, routing_options: nil)
27
33
  # Request body for creating a workspace preference.
28
34
  #
29
35
  # @param name [String] Human-readable name for the workspace preference.
30
36
  #
37
+ # @param description [String, nil] Optional description shown under the section on the hosted preferences page.
38
+ #
31
39
  # @param has_custom_routing [Boolean, nil] Whether the workspace preference defines custom routing for its topics.
32
40
  #
33
41
  # @param routing_options [Array<Symbol, Courier::Models::ChannelClassification>, nil] Default channels for the workspace preference. Defaults to empty if omitted.
@@ -46,6 +46,12 @@ module Courier
46
46
  # @return [String, nil]
47
47
  optional :creator, String, nil?: true
48
48
 
49
+ # @!attribute description
50
+ # Optional description shown under the section on the hosted preferences page.
51
+ #
52
+ # @return [String, nil]
53
+ optional :description, String, nil?: true
54
+
49
55
  # @!attribute updated
50
56
  # ISO-8601 timestamp of the last update.
51
57
  #
@@ -58,7 +64,7 @@ module Courier
58
64
  # @return [String, nil]
59
65
  optional :updater, String, nil?: true
60
66
 
61
- # @!method initialize(id:, created:, has_custom_routing:, name:, routing_options:, topics:, creator: nil, updated: nil, updater: nil)
67
+ # @!method initialize(id:, created:, has_custom_routing:, name:, routing_options:, topics:, creator: nil, description: nil, updated: nil, updater: nil)
62
68
  # A workspace preference in your workspace, including its topics.
63
69
  #
64
70
  # @param id [String] The workspace preference id.
@@ -75,6 +81,8 @@ module Courier
75
81
  #
76
82
  # @param creator [String, nil] Id of the creator.
77
83
  #
84
+ # @param description [String, nil] Optional description shown under the section on the hosted preferences page.
85
+ #
78
86
  # @param updated [String, nil] ISO-8601 timestamp of the last update.
79
87
  #
80
88
  # @param updater [String, nil] Id of the last updater.
@@ -3,7 +3,7 @@
3
3
  module Courier
4
4
  module Models
5
5
  # @see Courier::Resources::WorkspacePreferences#publish
6
- class WorkspacePreferencePublishParams < Courier::Internal::Type::BaseModel
6
+ class WorkspacePreferencePublishParams < Courier::Models::PublishPreferencesRequest
7
7
  extend Courier::Internal::Type::RequestParameters::Converter
8
8
  include Courier::Internal::Type::RequestParameters
9
9
 
@@ -9,6 +9,13 @@ module Courier
9
9
  # @return [String]
10
10
  required :name, String
11
11
 
12
+ # @!attribute description
13
+ # Optional description shown under the section on the hosted preferences page.
14
+ # Omit to clear.
15
+ #
16
+ # @return [String, nil]
17
+ optional :description, String, nil?: true
18
+
12
19
  # @!attribute has_custom_routing
13
20
  # Whether the workspace preference defines custom routing for its topics.
14
21
  #
@@ -23,12 +30,17 @@ module Courier
23
30
  -> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] },
24
31
  nil?: true
25
32
 
26
- # @!method initialize(name:, has_custom_routing: nil, routing_options: nil)
33
+ # @!method initialize(name:, description: nil, has_custom_routing: nil, routing_options: nil)
34
+ # Some parameter documentations has been truncated, see
35
+ # {Courier::Models::WorkspacePreferenceReplaceRequest} for more details.
36
+ #
27
37
  # Request body for replacing a workspace preference. Full document replacement;
28
38
  # missing optional fields are cleared.
29
39
  #
30
40
  # @param name [String] Human-readable name for the workspace preference.
31
41
  #
42
+ # @param description [String, nil] Optional description shown under the section on the hosted preferences page. Omi
43
+ #
32
44
  # @param has_custom_routing [Boolean, nil] Whether the workspace preference defines custom routing for its topics.
33
45
  #
34
46
  # @param routing_options [Array<Symbol, Courier::Models::ChannelClassification>, nil] Default channels for the workspace preference. Omit to clear.
@@ -26,6 +26,12 @@ module Courier
26
26
  },
27
27
  nil?: true
28
28
 
29
+ # @!attribute description
30
+ # Optional description shown under the topic on the hosted preferences page.
31
+ #
32
+ # @return [String, nil]
33
+ optional :description, String, nil?: true
34
+
29
35
  # @!attribute include_unsubscribe_header
30
36
  # Whether to include a list-unsubscribe header on emails for this topic.
31
37
  #
@@ -46,7 +52,7 @@ module Courier
46
52
  # @return [Hash{Symbol=>Object}, nil]
47
53
  optional :topic_data, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown], nil?: true
48
54
 
49
- # @!method initialize(default_status:, name:, allowed_preferences: nil, include_unsubscribe_header: nil, routing_options: nil, topic_data: nil)
55
+ # @!method initialize(default_status:, name:, allowed_preferences: nil, description: nil, include_unsubscribe_header: nil, routing_options: nil, topic_data: nil)
50
56
  # Some parameter documentations has been truncated, see
51
57
  # {Courier::Models::WorkspacePreferenceTopicCreateRequest} for more details.
52
58
  #
@@ -58,6 +64,8 @@ module Courier
58
64
  #
59
65
  # @param allowed_preferences [Array<Symbol, Courier::Models::WorkspacePreferenceTopicCreateRequest::AllowedPreference>, nil] Preference controls a recipient may customize for this topic. Defaults to empty
60
66
  #
67
+ # @param description [String, nil] Optional description shown under the topic on the hosted preferences page.
68
+ #
61
69
  # @param include_unsubscribe_header [Boolean, nil] Whether to include a list-unsubscribe header on emails for this topic.
62
70
  #
63
71
  # @param routing_options [Array<Symbol, Courier::Models::ChannelClassification>, nil] Default channels delivered for this topic. Defaults to empty if omitted.
@@ -64,13 +64,19 @@ module Courier
64
64
  # @return [String, nil]
65
65
  optional :creator, String, nil?: true
66
66
 
67
+ # @!attribute description
68
+ # Optional description shown under the topic on the hosted preferences page.
69
+ #
70
+ # @return [String, nil]
71
+ optional :description, String, nil?: true
72
+
67
73
  # @!attribute updater
68
74
  # Id of the last updater.
69
75
  #
70
76
  # @return [String, nil]
71
77
  optional :updater, String, nil?: true
72
78
 
73
- # @!method initialize(id:, allowed_preferences:, created:, default_status:, include_unsubscribe_header:, name:, routing_options:, topic_data:, updated:, creator: nil, updater: nil)
79
+ # @!method initialize(id:, allowed_preferences:, created:, default_status:, include_unsubscribe_header:, name:, routing_options:, topic_data:, updated:, creator: nil, description: nil, updater: nil)
74
80
  # A subscription preference topic in your workspace.
75
81
  #
76
82
  # @param id [String] The preference topic id.
@@ -93,6 +99,8 @@ module Courier
93
99
  #
94
100
  # @param creator [String, nil] Id of the creator.
95
101
  #
102
+ # @param description [String, nil] Optional description shown under the topic on the hosted preferences page.
103
+ #
96
104
  # @param updater [String, nil] Id of the last updater.
97
105
 
98
106
  # A preference control a recipient may customize for a topic.
@@ -25,6 +25,13 @@ module Courier
25
25
  },
26
26
  nil?: true
27
27
 
28
+ # @!attribute description
29
+ # Optional description shown under the topic on the hosted preferences page. Omit
30
+ # to clear.
31
+ #
32
+ # @return [String, nil]
33
+ optional :description, String, nil?: true
34
+
28
35
  # @!attribute include_unsubscribe_header
29
36
  # Whether to include a list-unsubscribe header on emails for this topic.
30
37
  #
@@ -45,7 +52,10 @@ module Courier
45
52
  # @return [Hash{Symbol=>Object}, nil]
46
53
  optional :topic_data, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown], nil?: true
47
54
 
48
- # @!method initialize(default_status:, name:, allowed_preferences: nil, include_unsubscribe_header: nil, routing_options: nil, topic_data: nil)
55
+ # @!method initialize(default_status:, name:, allowed_preferences: nil, description: nil, include_unsubscribe_header: nil, routing_options: nil, topic_data: nil)
56
+ # Some parameter documentations has been truncated, see
57
+ # {Courier::Models::WorkspacePreferenceTopicReplaceRequest} for more details.
58
+ #
49
59
  # Request body for replacing a preference topic. Full document replacement;
50
60
  # missing optional fields are cleared.
51
61
  #
@@ -55,6 +65,8 @@ module Courier
55
65
  #
56
66
  # @param allowed_preferences [Array<Symbol, Courier::Models::WorkspacePreferenceTopicReplaceRequest::AllowedPreference>, nil] Preference controls a recipient may customize. Omit to clear.
57
67
  #
68
+ # @param description [String, nil] Optional description shown under the topic on the hosted preferences page. Omit
69
+ #
58
70
  # @param include_unsubscribe_header [Boolean, nil] Whether to include a list-unsubscribe header on emails for this topic.
59
71
  #
60
72
  # @param routing_options [Array<Symbol, Courier::Models::ChannelClassification>, nil] Default channels delivered for this topic. Omit to clear.
@@ -446,6 +446,8 @@ module Courier
446
446
 
447
447
  ProviderUpdateParams = Courier::Models::ProviderUpdateParams
448
448
 
449
+ PublishPreferencesRequest = Courier::Models::PublishPreferencesRequest
450
+
449
451
  PublishPreferencesResponse = Courier::Models::PublishPreferencesResponse
450
452
 
451
453
  PutSubscriptionsRecipient = Courier::Models::PutSubscriptionsRecipient