trycourier 4.15.0 → 4.17.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 (89) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/lib/courier/client.rb +4 -0
  4. data/lib/courier/models/journeys/template_put_content_params.rb +28 -0
  5. data/lib/courier/models/journeys/template_put_locale_params.rb +34 -0
  6. data/lib/courier/models/journeys/template_retrieve_content_params.rb +42 -0
  7. data/lib/courier/models/preference_section_archive_params.rb +20 -0
  8. data/lib/courier/models/preference_section_create_params.rb +14 -0
  9. data/lib/courier/models/preference_section_create_request.rb +36 -0
  10. data/lib/courier/models/preference_section_get_response.rb +83 -0
  11. data/lib/courier/models/preference_section_list_params.rb +14 -0
  12. data/lib/courier/models/preference_section_list_response.rb +18 -0
  13. data/lib/courier/models/preference_section_publish_params.rb +14 -0
  14. data/lib/courier/models/preference_section_replace_params.rb +20 -0
  15. data/lib/courier/models/preference_section_replace_request.rb +37 -0
  16. data/lib/courier/models/preference_section_retrieve_params.rb +20 -0
  17. data/lib/courier/models/preference_sections/topic_archive_params.rb +28 -0
  18. data/lib/courier/models/preference_sections/topic_create_params.rb +22 -0
  19. data/lib/courier/models/preference_sections/topic_list_params.rb +22 -0
  20. data/lib/courier/models/preference_sections/topic_replace_params.rb +28 -0
  21. data/lib/courier/models/preference_sections/topic_retrieve_params.rb +28 -0
  22. data/lib/courier/models/preference_topic_create_request.rb +93 -0
  23. data/lib/courier/models/preference_topic_get_response.rb +124 -0
  24. data/lib/courier/models/preference_topic_list_response.rb +17 -0
  25. data/lib/courier/models/preference_topic_replace_request.rb +90 -0
  26. data/lib/courier/models/publish_preferences_response.rb +51 -0
  27. data/lib/courier/models.rb +32 -0
  28. data/lib/courier/resources/journeys/templates.rb +113 -0
  29. data/lib/courier/resources/preference_sections/topics.rb +173 -0
  30. data/lib/courier/resources/preference_sections.rb +155 -0
  31. data/lib/courier/version.rb +1 -1
  32. data/lib/courier.rb +27 -2
  33. data/rbi/courier/client.rbi +3 -0
  34. data/rbi/courier/models/journeys/template_put_content_params.rbi +48 -0
  35. data/rbi/courier/models/journeys/template_put_locale_params.rbi +58 -0
  36. data/rbi/courier/models/journeys/template_retrieve_content_params.rbi +65 -0
  37. data/rbi/courier/models/preference_section_archive_params.rbi +38 -0
  38. data/rbi/courier/models/preference_section_create_params.rbi +30 -0
  39. data/rbi/courier/models/preference_section_create_request.rbi +61 -0
  40. data/rbi/courier/models/preference_section_get_response.rbi +106 -0
  41. data/rbi/courier/models/preference_section_list_params.rbi +30 -0
  42. data/rbi/courier/models/preference_section_list_response.rbi +35 -0
  43. data/rbi/courier/models/preference_section_publish_params.rbi +30 -0
  44. data/rbi/courier/models/preference_section_replace_params.rbi +38 -0
  45. data/rbi/courier/models/preference_section_replace_request.rbi +62 -0
  46. data/rbi/courier/models/preference_section_retrieve_params.rbi +38 -0
  47. data/rbi/courier/models/preference_sections/topic_archive_params.rbi +48 -0
  48. data/rbi/courier/models/preference_sections/topic_create_params.rbi +40 -0
  49. data/rbi/courier/models/preference_sections/topic_list_params.rbi +40 -0
  50. data/rbi/courier/models/preference_sections/topic_replace_params.rbi +48 -0
  51. data/rbi/courier/models/preference_sections/topic_retrieve_params.rbi +48 -0
  52. data/rbi/courier/models/preference_topic_create_request.rbi +181 -0
  53. data/rbi/courier/models/preference_topic_get_response.rbi +209 -0
  54. data/rbi/courier/models/preference_topic_list_response.rbi +35 -0
  55. data/rbi/courier/models/preference_topic_replace_request.rbi +180 -0
  56. data/rbi/courier/models/publish_preferences_response.rbi +70 -0
  57. data/rbi/courier/models.rbi +38 -0
  58. data/rbi/courier/resources/journeys/templates.rbi +78 -0
  59. data/rbi/courier/resources/preference_sections/topics.rbi +149 -0
  60. data/rbi/courier/resources/preference_sections.rbi +113 -0
  61. data/sig/courier/client.rbs +2 -0
  62. data/sig/courier/models/journeys/template_put_content_params.rbs +34 -0
  63. data/sig/courier/models/journeys/template_put_locale_params.rbs +40 -0
  64. data/sig/courier/models/journeys/template_retrieve_content_params.rbs +36 -0
  65. data/sig/courier/models/preference_section_archive_params.rbs +23 -0
  66. data/sig/courier/models/preference_section_create_params.rbs +15 -0
  67. data/sig/courier/models/preference_section_create_request.rbs +30 -0
  68. data/sig/courier/models/preference_section_get_response.rbs +60 -0
  69. data/sig/courier/models/preference_section_list_params.rbs +15 -0
  70. data/sig/courier/models/preference_section_list_response.rbs +18 -0
  71. data/sig/courier/models/preference_section_publish_params.rbs +15 -0
  72. data/sig/courier/models/preference_section_replace_params.rbs +25 -0
  73. data/sig/courier/models/preference_section_replace_request.rbs +30 -0
  74. data/sig/courier/models/preference_section_retrieve_params.rbs +23 -0
  75. data/sig/courier/models/preference_sections/topic_archive_params.rbs +30 -0
  76. data/sig/courier/models/preference_sections/topic_create_params.rbs +27 -0
  77. data/sig/courier/models/preference_sections/topic_list_params.rbs +25 -0
  78. data/sig/courier/models/preference_sections/topic_replace_params.rbs +34 -0
  79. data/sig/courier/models/preference_sections/topic_retrieve_params.rbs +30 -0
  80. data/sig/courier/models/preference_topic_create_request.rbs +68 -0
  81. data/sig/courier/models/preference_topic_get_response.rbs +93 -0
  82. data/sig/courier/models/preference_topic_list_response.rbs +16 -0
  83. data/sig/courier/models/preference_topic_replace_request.rbs +68 -0
  84. data/sig/courier/models/publish_preferences_response.rbs +40 -0
  85. data/sig/courier/models.rbs +32 -0
  86. data/sig/courier/resources/journeys/templates.rbs +24 -0
  87. data/sig/courier/resources/preference_sections/topics.rbs +49 -0
  88. data/sig/courier/resources/preference_sections.rbs +42 -0
  89. metadata +77 -2
@@ -381,8 +381,44 @@ module Courier
381
381
 
382
382
  Preference = Courier::Models::Preference
383
383
 
384
+ PreferenceSectionArchiveParams =
385
+ Courier::Models::PreferenceSectionArchiveParams
386
+
387
+ PreferenceSectionCreateParams = Courier::Models::PreferenceSectionCreateParams
388
+
389
+ PreferenceSectionCreateRequest =
390
+ Courier::Models::PreferenceSectionCreateRequest
391
+
392
+ PreferenceSectionGetResponse = Courier::Models::PreferenceSectionGetResponse
393
+
394
+ PreferenceSectionListParams = Courier::Models::PreferenceSectionListParams
395
+
396
+ PreferenceSectionListResponse = Courier::Models::PreferenceSectionListResponse
397
+
398
+ PreferenceSectionPublishParams =
399
+ Courier::Models::PreferenceSectionPublishParams
400
+
401
+ PreferenceSectionReplaceParams =
402
+ Courier::Models::PreferenceSectionReplaceParams
403
+
404
+ PreferenceSectionReplaceRequest =
405
+ Courier::Models::PreferenceSectionReplaceRequest
406
+
407
+ PreferenceSectionRetrieveParams =
408
+ Courier::Models::PreferenceSectionRetrieveParams
409
+
410
+ PreferenceSections = Courier::Models::PreferenceSections
411
+
384
412
  PreferenceStatus = Courier::Models::PreferenceStatus
385
413
 
414
+ PreferenceTopicCreateRequest = Courier::Models::PreferenceTopicCreateRequest
415
+
416
+ PreferenceTopicGetResponse = Courier::Models::PreferenceTopicGetResponse
417
+
418
+ PreferenceTopicListResponse = Courier::Models::PreferenceTopicListResponse
419
+
420
+ PreferenceTopicReplaceRequest = Courier::Models::PreferenceTopicReplaceRequest
421
+
386
422
  ProfileCreateParams = Courier::Models::ProfileCreateParams
387
423
 
388
424
  ProfileDeleteParams = Courier::Models::ProfileDeleteParams
@@ -411,6 +447,8 @@ module Courier
411
447
 
412
448
  ProviderUpdateParams = Courier::Models::ProviderUpdateParams
413
449
 
450
+ PublishPreferencesResponse = Courier::Models::PublishPreferencesResponse
451
+
414
452
  PutSubscriptionsRecipient = Courier::Models::PutSubscriptionsRecipient
415
453
 
416
454
  PutTenantTemplateRequest = Courier::Models::PutTenantTemplateRequest
@@ -126,6 +126,59 @@ module Courier
126
126
  )
127
127
  end
128
128
 
129
+ # Replace the elemental content of a journey-scoped notification template.
130
+ # Overwrites all elements in the template draft with the provided content.
131
+ sig do
132
+ params(
133
+ notification_id: String,
134
+ template_id: String,
135
+ content: Courier::NotificationContentPutRequest::Content::OrHash,
136
+ state: Courier::NotificationTemplateState::OrSymbol,
137
+ request_options: Courier::RequestOptions::OrHash
138
+ ).returns(Courier::NotificationContentMutationResponse)
139
+ end
140
+ def put_content(
141
+ # Path param: Notification template id
142
+ notification_id,
143
+ # Path param: Journey id
144
+ template_id:,
145
+ # Body param: Elemental content payload. The server defaults `version` when
146
+ # omitted.
147
+ content:,
148
+ # Body param: Template state. Defaults to `DRAFT`.
149
+ state: nil,
150
+ request_options: {}
151
+ )
152
+ end
153
+
154
+ # Set locale-specific content overrides for a journey-scoped notification
155
+ # template. Each element override must reference an existing element by ID.
156
+ sig do
157
+ params(
158
+ locale_id: String,
159
+ template_id: String,
160
+ notification_id: String,
161
+ elements:
162
+ T::Array[Courier::NotificationLocalePutRequest::Element::OrHash],
163
+ state: Courier::NotificationTemplateState::OrSymbol,
164
+ request_options: Courier::RequestOptions::OrHash
165
+ ).returns(Courier::NotificationContentMutationResponse)
166
+ end
167
+ def put_locale(
168
+ # Path param: Locale code (e.g., `es`, `fr`, `pt-BR`).
169
+ locale_id,
170
+ # Path param: Journey id
171
+ template_id:,
172
+ # Path param: Notification template id
173
+ notification_id:,
174
+ # Body param: Elements with locale-specific content overrides.
175
+ elements:,
176
+ # Body param: Template state. Defaults to `DRAFT`.
177
+ state: nil,
178
+ request_options: {}
179
+ )
180
+ end
181
+
129
182
  # Replace the journey-scoped notification template draft.
130
183
  sig do
131
184
  params(
@@ -150,6 +203,31 @@ module Courier
150
203
  )
151
204
  end
152
205
 
206
+ # Retrieve the elemental content of a journey-scoped notification template. The
207
+ # response contains the versioned elements along with their content checksums,
208
+ # which can be used to detect changes between versions. Pass `?version=draft`
209
+ # (default `published`) to retrieve the working draft, or `?version=vN` for a
210
+ # historical version.
211
+ sig do
212
+ params(
213
+ notification_id: String,
214
+ template_id: String,
215
+ version: String,
216
+ request_options: Courier::RequestOptions::OrHash
217
+ ).returns(Courier::NotificationContentGetResponse)
218
+ end
219
+ def retrieve_content(
220
+ # Path param: Notification template id
221
+ notification_id,
222
+ # Path param: Journey id
223
+ template_id:,
224
+ # Query param: Accepts `draft`, `published`, or a version string (e.g., `v001`).
225
+ # Defaults to `published`.
226
+ version: nil,
227
+ request_options: {}
228
+ )
229
+ end
230
+
153
231
  # @api private
154
232
  sig { params(client: Courier::Client).returns(T.attached_class) }
155
233
  def self.new(client:)
@@ -0,0 +1,149 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Resources
5
+ class PreferenceSections
6
+ class Topics
7
+ # Create a subscription preference topic inside a section. Fails with 404 if the
8
+ # section does not exist. The topic id is generated and returned.
9
+ sig do
10
+ params(
11
+ section_id: String,
12
+ default_status:
13
+ Courier::PreferenceTopicCreateRequest::DefaultStatus::OrSymbol,
14
+ name: String,
15
+ allowed_preferences:
16
+ T.nilable(
17
+ T::Array[
18
+ Courier::PreferenceTopicCreateRequest::AllowedPreference::OrSymbol
19
+ ]
20
+ ),
21
+ include_unsubscribe_header: T.nilable(T::Boolean),
22
+ routing_options:
23
+ T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
24
+ topic_data: T.nilable(T::Hash[Symbol, T.anything]),
25
+ request_options: Courier::RequestOptions::OrHash
26
+ ).returns(Courier::PreferenceTopicGetResponse)
27
+ end
28
+ def create(
29
+ # Id of the preference section to create the topic in.
30
+ section_id,
31
+ # The default subscription status applied when a recipient has not set their own.
32
+ default_status:,
33
+ # Human-readable name for the preference topic.
34
+ name:,
35
+ # Preference controls a recipient may customize for this topic. Defaults to empty
36
+ # if omitted.
37
+ allowed_preferences: nil,
38
+ # Whether to include a list-unsubscribe header on emails for this topic.
39
+ include_unsubscribe_header: nil,
40
+ # Default channels delivered for this topic. Defaults to empty if omitted.
41
+ routing_options: nil,
42
+ # Arbitrary metadata associated with the topic.
43
+ topic_data: nil,
44
+ request_options: {}
45
+ )
46
+ end
47
+
48
+ # Retrieve a topic within a section. Returns 404 if the section does not exist,
49
+ # the topic does not exist, or the topic belongs to a different section.
50
+ sig do
51
+ params(
52
+ topic_id: String,
53
+ section_id: String,
54
+ request_options: Courier::RequestOptions::OrHash
55
+ ).returns(Courier::PreferenceTopicGetResponse)
56
+ end
57
+ def retrieve(
58
+ # Id of the subscription preference topic.
59
+ topic_id,
60
+ # Id of the preference section.
61
+ section_id:,
62
+ request_options: {}
63
+ )
64
+ end
65
+
66
+ # List the topics in a preference section.
67
+ sig do
68
+ params(
69
+ section_id: String,
70
+ request_options: Courier::RequestOptions::OrHash
71
+ ).returns(Courier::PreferenceTopicListResponse)
72
+ end
73
+ def list(
74
+ # Id of the preference section.
75
+ section_id,
76
+ request_options: {}
77
+ )
78
+ end
79
+
80
+ # Archive a topic and remove it from its section. Same 404 rules as GET.
81
+ sig do
82
+ params(
83
+ topic_id: String,
84
+ section_id: String,
85
+ request_options: Courier::RequestOptions::OrHash
86
+ ).void
87
+ end
88
+ def archive(
89
+ # Id of the subscription preference topic.
90
+ topic_id,
91
+ # Id of the preference section.
92
+ section_id:,
93
+ request_options: {}
94
+ )
95
+ end
96
+
97
+ # Replace a topic within a section. Full document replacement; missing optional
98
+ # fields are cleared. Same 404 rules as GET.
99
+ sig do
100
+ params(
101
+ topic_id: String,
102
+ section_id: String,
103
+ default_status:
104
+ Courier::PreferenceTopicReplaceRequest::DefaultStatus::OrSymbol,
105
+ name: String,
106
+ allowed_preferences:
107
+ T.nilable(
108
+ T::Array[
109
+ Courier::PreferenceTopicReplaceRequest::AllowedPreference::OrSymbol
110
+ ]
111
+ ),
112
+ include_unsubscribe_header: T.nilable(T::Boolean),
113
+ routing_options:
114
+ T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
115
+ topic_data: T.nilable(T::Hash[Symbol, T.anything]),
116
+ request_options: Courier::RequestOptions::OrHash
117
+ ).returns(Courier::PreferenceTopicGetResponse)
118
+ end
119
+ def replace(
120
+ # Path param: Id of the subscription preference topic.
121
+ topic_id,
122
+ # Path param: Id of the preference section.
123
+ section_id:,
124
+ # Body param: The default subscription status applied when a recipient has not set
125
+ # their own.
126
+ default_status:,
127
+ # Body param: Human-readable name for the preference topic.
128
+ name:,
129
+ # Body param: Preference controls a recipient may customize. Omit to clear.
130
+ allowed_preferences: nil,
131
+ # Body param: Whether to include a list-unsubscribe header on emails for this
132
+ # topic.
133
+ include_unsubscribe_header: nil,
134
+ # Body param: Default channels delivered for this topic. Omit to clear.
135
+ routing_options: nil,
136
+ # Body param: Arbitrary metadata associated with the topic. Omit to clear.
137
+ topic_data: nil,
138
+ request_options: {}
139
+ )
140
+ end
141
+
142
+ # @api private
143
+ sig { params(client: Courier::Client).returns(T.attached_class) }
144
+ def self.new(client:)
145
+ end
146
+ end
147
+ end
148
+ end
149
+ end
@@ -0,0 +1,113 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Resources
5
+ class PreferenceSections
6
+ sig { returns(Courier::Resources::PreferenceSections::Topics) }
7
+ attr_reader :topics
8
+
9
+ # Create a preference section in your workspace. The section id is generated and
10
+ # returned. Topics are created inside a section via POST
11
+ # /preferences/sections/{section_id}/topics.
12
+ sig do
13
+ params(
14
+ name: String,
15
+ has_custom_routing: T.nilable(T::Boolean),
16
+ routing_options:
17
+ T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
18
+ request_options: Courier::RequestOptions::OrHash
19
+ ).returns(Courier::PreferenceSectionGetResponse)
20
+ end
21
+ def create(
22
+ # Human-readable name for the section.
23
+ name:,
24
+ # Whether the section defines custom routing for its topics.
25
+ has_custom_routing: nil,
26
+ # Default channels for the section. Defaults to empty if omitted.
27
+ routing_options: nil,
28
+ request_options: {}
29
+ )
30
+ end
31
+
32
+ # Retrieve a preference section by id, including its topics.
33
+ sig do
34
+ params(
35
+ section_id: String,
36
+ request_options: Courier::RequestOptions::OrHash
37
+ ).returns(Courier::PreferenceSectionGetResponse)
38
+ end
39
+ def retrieve(
40
+ # Id of the preference section.
41
+ section_id,
42
+ request_options: {}
43
+ )
44
+ end
45
+
46
+ # List the workspace's preference sections. Each section embeds its topics. Scoped
47
+ # to the workspace of the API key.
48
+ sig do
49
+ params(request_options: Courier::RequestOptions::OrHash).returns(
50
+ Courier::PreferenceSectionListResponse
51
+ )
52
+ end
53
+ def list(request_options: {})
54
+ end
55
+
56
+ # Archive a preference section. The section must be empty: delete its topics
57
+ # first, otherwise the request fails with 409.
58
+ sig do
59
+ params(
60
+ section_id: String,
61
+ request_options: Courier::RequestOptions::OrHash
62
+ ).void
63
+ end
64
+ def archive(
65
+ # Id of the preference section.
66
+ section_id,
67
+ request_options: {}
68
+ )
69
+ end
70
+
71
+ # Publish the workspace's preferences page. Takes a snapshot of every section with
72
+ # its topics under a new published version, making the current state visible on
73
+ # the hosted preferences page (non-draft).
74
+ sig do
75
+ params(request_options: Courier::RequestOptions::OrHash).returns(
76
+ Courier::PublishPreferencesResponse
77
+ )
78
+ end
79
+ def publish(request_options: {})
80
+ end
81
+
82
+ # Replace a preference section. Full document replacement; missing optional fields
83
+ # are cleared. Topics attached to the section are unaffected.
84
+ sig do
85
+ params(
86
+ section_id: String,
87
+ name: String,
88
+ has_custom_routing: T.nilable(T::Boolean),
89
+ routing_options:
90
+ T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
91
+ request_options: Courier::RequestOptions::OrHash
92
+ ).returns(Courier::PreferenceSectionGetResponse)
93
+ end
94
+ def replace(
95
+ # Id of the preference section.
96
+ section_id,
97
+ # Human-readable name for the section.
98
+ name:,
99
+ # Whether the section defines custom routing for its topics.
100
+ has_custom_routing: nil,
101
+ # Default channels for the section. Omit to clear.
102
+ routing_options: nil,
103
+ request_options: {}
104
+ )
105
+ end
106
+
107
+ # @api private
108
+ sig { params(client: Courier::Client).returns(T.attached_class) }
109
+ def self.new(client:)
110
+ end
111
+ end
112
+ end
113
+ end
@@ -42,6 +42,8 @@ module Courier
42
42
 
43
43
  attr_reader routing_strategies: Courier::Resources::RoutingStrategies
44
44
 
45
+ attr_reader preference_sections: Courier::Resources::PreferenceSections
46
+
45
47
  attr_reader profiles: Courier::Resources::Profiles
46
48
 
47
49
  attr_reader tenants: Courier::Resources::Tenants
@@ -0,0 +1,34 @@
1
+ module Courier
2
+ module Models
3
+ module Journeys
4
+ type template_put_content_params =
5
+ { template_id: String, notification_id: String }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TemplatePutContentParams < Courier::Models::NotificationContentPutRequest
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ def template_id: -> String
13
+
14
+ def template_id=: (String _) -> String
15
+
16
+ def notification_id: -> String
17
+
18
+ def notification_id=: (String _) -> String
19
+
20
+ def initialize: (
21
+ template_id: String,
22
+ notification_id: String,
23
+ ?request_options: Courier::request_opts
24
+ ) -> void
25
+
26
+ def to_hash: -> {
27
+ template_id: String,
28
+ notification_id: String,
29
+ request_options: Courier::RequestOptions
30
+ }
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,40 @@
1
+ module Courier
2
+ module Models
3
+ module Journeys
4
+ type template_put_locale_params =
5
+ { template_id: String, notification_id: String, locale_id: String }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TemplatePutLocaleParams < Courier::Models::NotificationLocalePutRequest
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ def template_id: -> String
13
+
14
+ def template_id=: (String _) -> String
15
+
16
+ def notification_id: -> String
17
+
18
+ def notification_id=: (String _) -> String
19
+
20
+ def locale_id: -> String
21
+
22
+ def locale_id=: (String _) -> String
23
+
24
+ def initialize: (
25
+ template_id: String,
26
+ notification_id: String,
27
+ locale_id: String,
28
+ ?request_options: Courier::request_opts
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ template_id: String,
33
+ notification_id: String,
34
+ locale_id: String,
35
+ request_options: Courier::RequestOptions
36
+ }
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,36 @@
1
+ module Courier
2
+ module Models
3
+ module Journeys
4
+ type template_retrieve_content_params =
5
+ { template_id: String, notification_id: String, version: String }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TemplateRetrieveContentParams < Courier::Internal::Type::BaseModel
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ attr_accessor template_id: String
13
+
14
+ attr_accessor notification_id: String
15
+
16
+ attr_reader version: String?
17
+
18
+ def version=: (String) -> String
19
+
20
+ def initialize: (
21
+ template_id: String,
22
+ notification_id: String,
23
+ ?version: String,
24
+ ?request_options: Courier::request_opts
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ template_id: String,
29
+ notification_id: String,
30
+ version: String,
31
+ request_options: Courier::RequestOptions
32
+ }
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,23 @@
1
+ module Courier
2
+ module Models
3
+ type preference_section_archive_params =
4
+ { section_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class PreferenceSectionArchiveParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ attr_accessor section_id: String
11
+
12
+ def initialize: (
13
+ section_id: String,
14
+ ?request_options: Courier::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ section_id: String,
19
+ request_options: Courier::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,15 @@
1
+ module Courier
2
+ module Models
3
+ type preference_section_create_params =
4
+ { } & Courier::Internal::Type::request_parameters
5
+
6
+ class PreferenceSectionCreateParams < Courier::Models::PreferenceSectionCreateRequest
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ def initialize: (?request_options: Courier::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: Courier::RequestOptions }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,30 @@
1
+ module Courier
2
+ module Models
3
+ type preference_section_create_request =
4
+ {
5
+ name: String,
6
+ has_custom_routing: bool?,
7
+ routing_options: ::Array[Courier::Models::channel_classification]?
8
+ }
9
+
10
+ class PreferenceSectionCreateRequest < Courier::Internal::Type::BaseModel
11
+ attr_accessor name: String
12
+
13
+ attr_accessor has_custom_routing: bool?
14
+
15
+ attr_accessor routing_options: ::Array[Courier::Models::channel_classification]?
16
+
17
+ def initialize: (
18
+ name: String,
19
+ ?has_custom_routing: bool?,
20
+ ?routing_options: ::Array[Courier::Models::channel_classification]?
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ name: String,
25
+ has_custom_routing: bool?,
26
+ routing_options: ::Array[Courier::Models::channel_classification]?
27
+ }
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,60 @@
1
+ module Courier
2
+ module Models
3
+ type preference_section_get_response =
4
+ {
5
+ id: String,
6
+ created: String,
7
+ has_custom_routing: bool,
8
+ name: String,
9
+ routing_options: ::Array[Courier::Models::channel_classification],
10
+ topics: ::Array[Courier::PreferenceTopicGetResponse],
11
+ creator: String?,
12
+ updated: String?,
13
+ updater: String?
14
+ }
15
+
16
+ class PreferenceSectionGetResponse < Courier::Internal::Type::BaseModel
17
+ attr_accessor id: String
18
+
19
+ attr_accessor created: String
20
+
21
+ attr_accessor has_custom_routing: bool
22
+
23
+ attr_accessor name: String
24
+
25
+ attr_accessor routing_options: ::Array[Courier::Models::channel_classification]
26
+
27
+ attr_accessor topics: ::Array[Courier::PreferenceTopicGetResponse]
28
+
29
+ attr_accessor creator: String?
30
+
31
+ attr_accessor updated: String?
32
+
33
+ attr_accessor updater: String?
34
+
35
+ def initialize: (
36
+ id: String,
37
+ created: String,
38
+ has_custom_routing: bool,
39
+ name: String,
40
+ routing_options: ::Array[Courier::Models::channel_classification],
41
+ topics: ::Array[Courier::PreferenceTopicGetResponse],
42
+ ?creator: String?,
43
+ ?updated: String?,
44
+ ?updater: String?
45
+ ) -> void
46
+
47
+ def to_hash: -> {
48
+ id: String,
49
+ created: String,
50
+ has_custom_routing: bool,
51
+ name: String,
52
+ routing_options: ::Array[Courier::Models::channel_classification],
53
+ topics: ::Array[Courier::PreferenceTopicGetResponse],
54
+ creator: String?,
55
+ updated: String?,
56
+ updater: String?
57
+ }
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,15 @@
1
+ module Courier
2
+ module Models
3
+ type preference_section_list_params =
4
+ { } & Courier::Internal::Type::request_parameters
5
+
6
+ class PreferenceSectionListParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ def initialize: (?request_options: Courier::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: Courier::RequestOptions }
13
+ end
14
+ end
15
+ end