trycourier 6.5.0 → 6.6.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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/courier/models/digest_day_of_week.rb +21 -0
  5. data/lib/courier/models/digest_frequency.rb +21 -0
  6. data/lib/courier/models/journey_conditions_field.rb +11 -1
  7. data/lib/courier/models/journey_node.rb +17 -2
  8. data/lib/courier/models/topic_digest_category.rb +71 -0
  9. data/lib/courier/models/topic_digest_release_request.rb +35 -0
  10. data/lib/courier/models/topic_digest_request.rb +63 -0
  11. data/lib/courier/models/topic_digest_response.rb +66 -0
  12. data/lib/courier/models/topic_digest_schedule_request.rb +93 -0
  13. data/lib/courier/models/topic_digest_schedule_response.rb +103 -0
  14. data/lib/courier/models/users/preference_update_or_create_topic_params.rb +13 -1
  15. data/lib/courier/models/users/topic_preference.rb +12 -1
  16. data/lib/courier/models/workspace_preference_topic_create_request.rb +15 -1
  17. data/lib/courier/models/workspace_preference_topic_get_response.rb +9 -1
  18. data/lib/courier/models/workspace_preference_topic_replace_request.rb +15 -1
  19. data/lib/courier/models/workspace_preferences/topic_delete_digest_params.rb +28 -0
  20. data/lib/courier/models/workspace_preferences/topic_release_digest_params.rb +28 -0
  21. data/lib/courier/models.rb +16 -0
  22. data/lib/courier/resources/digests/schedules.rb +1 -1
  23. data/lib/courier/resources/workspace_preferences/topics.rb +77 -4
  24. data/lib/courier/resources/workspace_preferences.rb +0 -2
  25. data/lib/courier/version.rb +1 -1
  26. data/lib/courier.rb +10 -0
  27. data/rbi/courier/models/digest_day_of_week.rbi +25 -0
  28. data/rbi/courier/models/digest_frequency.rbi +25 -0
  29. data/rbi/courier/models/journey_node.rbi +12 -1
  30. data/rbi/courier/models/topic_digest_category.rbi +116 -0
  31. data/rbi/courier/models/topic_digest_release_request.rbi +51 -0
  32. data/rbi/courier/models/topic_digest_request.rbi +95 -0
  33. data/rbi/courier/models/topic_digest_response.rbi +98 -0
  34. data/rbi/courier/models/topic_digest_schedule_request.rbi +141 -0
  35. data/rbi/courier/models/topic_digest_schedule_response.rbi +159 -0
  36. data/rbi/courier/models/users/preference_update_or_create_topic_params.rbi +16 -0
  37. data/rbi/courier/models/users/topic_preference.rbi +17 -0
  38. data/rbi/courier/models/workspace_preference_topic_create_request.rbi +25 -0
  39. data/rbi/courier/models/workspace_preference_topic_get_response.rbi +13 -0
  40. data/rbi/courier/models/workspace_preference_topic_replace_request.rbi +25 -0
  41. data/rbi/courier/models/workspace_preferences/topic_delete_digest_params.rbi +48 -0
  42. data/rbi/courier/models/workspace_preferences/topic_release_digest_params.rbi +48 -0
  43. data/rbi/courier/models.rbi +16 -0
  44. data/rbi/courier/resources/digests/schedules.rbi +5 -2
  45. data/rbi/courier/resources/workspace_preferences/topics.rbi +72 -2
  46. data/rbi/courier/resources/workspace_preferences.rbi +0 -2
  47. data/sig/courier/models/digest_day_of_week.rbs +26 -0
  48. data/sig/courier/models/digest_frequency.rbs +19 -0
  49. data/sig/courier/models/topic_digest_category.rbs +57 -0
  50. data/sig/courier/models/topic_digest_release_request.rbs +17 -0
  51. data/sig/courier/models/topic_digest_request.rbs +48 -0
  52. data/sig/courier/models/topic_digest_response.rbs +58 -0
  53. data/sig/courier/models/topic_digest_schedule_request.rbs +80 -0
  54. data/sig/courier/models/topic_digest_schedule_response.rbs +96 -0
  55. data/sig/courier/models/users/preference_update_or_create_topic_params.rbs +5 -0
  56. data/sig/courier/models/users/topic_preference.rbs +7 -0
  57. data/sig/courier/models/workspace_preference_topic_create_request.rbs +5 -0
  58. data/sig/courier/models/workspace_preference_topic_get_response.rbs +5 -0
  59. data/sig/courier/models/workspace_preference_topic_replace_request.rbs +5 -0
  60. data/sig/courier/models/workspace_preferences/topic_delete_digest_params.rbs +30 -0
  61. data/sig/courier/models/workspace_preferences/topic_release_digest_params.rbs +34 -0
  62. data/sig/courier/models.rbs +16 -0
  63. data/sig/courier/resources/workspace_preferences/topics.rbs +16 -0
  64. metadata +32 -2
@@ -40,6 +40,21 @@ module Courier
40
40
  sig { returns(T.nilable(String)) }
41
41
  attr_accessor :description
42
42
 
43
+ # A topic's digest configuration: the template that renders it, the cadences it
44
+ # delivers on, and how collected events are retained.
45
+ #
46
+ # Send `null` for the whole object to turn a digest off, which unlinks the
47
+ # template and removes its schedules. There is no `enabled` flag, and
48
+ # `schedules: []` is rejected, because both states are un-deliverable rather than
49
+ # merely off.
50
+ sig { returns(T.nilable(Courier::TopicDigestRequest)) }
51
+ attr_reader :digest
52
+
53
+ sig do
54
+ params(digest: T.nilable(Courier::TopicDigestRequest::OrHash)).void
55
+ end
56
+ attr_writer :digest
57
+
43
58
  # Whether to include a list-unsubscribe header on emails for this topic.
44
59
  sig { returns(T.nilable(T::Boolean)) }
45
60
  attr_accessor :include_unsubscribe_header
@@ -68,6 +83,7 @@ module Courier
68
83
  ]
69
84
  ),
70
85
  description: T.nilable(String),
86
+ digest: T.nilable(Courier::TopicDigestRequest::OrHash),
71
87
  include_unsubscribe_header: T.nilable(T::Boolean),
72
88
  routing_options:
73
89
  T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
@@ -84,6 +100,14 @@ module Courier
84
100
  # Optional description shown under the topic on the hosted preferences page. Omit
85
101
  # to clear.
86
102
  description: nil,
103
+ # A topic's digest configuration: the template that renders it, the cadences it
104
+ # delivers on, and how collected events are retained.
105
+ #
106
+ # Send `null` for the whole object to turn a digest off, which unlinks the
107
+ # template and removes its schedules. There is no `enabled` flag, and
108
+ # `schedules: []` is rejected, because both states are un-deliverable rather than
109
+ # merely off.
110
+ digest: nil,
87
111
  # Whether to include a list-unsubscribe header on emails for this topic.
88
112
  include_unsubscribe_header: nil,
89
113
  # Default channels delivered for this topic. Omit to clear.
@@ -106,6 +130,7 @@ module Courier
106
130
  ]
107
131
  ),
108
132
  description: T.nilable(String),
133
+ digest: T.nilable(Courier::TopicDigestRequest),
109
134
  include_unsubscribe_header: T.nilable(T::Boolean),
110
135
  routing_options:
111
136
  T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
@@ -0,0 +1,48 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ module WorkspacePreferences
6
+ class TopicDeleteDigestParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Courier::WorkspacePreferences::TopicDeleteDigestParams,
14
+ Courier::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :section_id
20
+
21
+ sig { returns(String) }
22
+ attr_accessor :topic_id
23
+
24
+ sig do
25
+ params(
26
+ section_id: String,
27
+ topic_id: String,
28
+ request_options: Courier::RequestOptions::OrHash
29
+ ).returns(T.attached_class)
30
+ end
31
+ def self.new(section_id:, topic_id:, request_options: {})
32
+ end
33
+
34
+ sig do
35
+ override.returns(
36
+ {
37
+ section_id: String,
38
+ topic_id: String,
39
+ request_options: Courier::RequestOptions
40
+ }
41
+ )
42
+ end
43
+ def to_hash
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,48 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ module WorkspacePreferences
6
+ class TopicReleaseDigestParams < Courier::Models::TopicDigestReleaseRequest
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Courier::WorkspacePreferences::TopicReleaseDigestParams,
14
+ Courier::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :section_id
20
+
21
+ sig { returns(String) }
22
+ attr_accessor :topic_id
23
+
24
+ sig do
25
+ params(
26
+ section_id: String,
27
+ topic_id: String,
28
+ request_options: Courier::RequestOptions::OrHash
29
+ ).returns(T.attached_class)
30
+ end
31
+ def self.new(section_id:, topic_id:, request_options: {})
32
+ end
33
+
34
+ sig do
35
+ override.returns(
36
+ {
37
+ section_id: String,
38
+ topic_id: String,
39
+ request_options: Courier::RequestOptions
40
+ }
41
+ )
42
+ end
43
+ def to_hash
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -152,6 +152,10 @@ module Courier
152
152
 
153
153
  DigestCategory = Courier::Models::DigestCategory
154
154
 
155
+ DigestDayOfWeek = Courier::Models::DigestDayOfWeek
156
+
157
+ DigestFrequency = Courier::Models::DigestFrequency
158
+
155
159
  DigestInstance = Courier::Models::DigestInstance
156
160
 
157
161
  DigestInstanceListResponse = Courier::Models::DigestInstanceListResponse
@@ -622,6 +626,18 @@ module Courier
622
626
 
623
627
  Token = Courier::Models::Token
624
628
 
629
+ TopicDigestCategory = Courier::Models::TopicDigestCategory
630
+
631
+ TopicDigestReleaseRequest = Courier::Models::TopicDigestReleaseRequest
632
+
633
+ TopicDigestRequest = Courier::Models::TopicDigestRequest
634
+
635
+ TopicDigestResponse = Courier::Models::TopicDigestResponse
636
+
637
+ TopicDigestScheduleRequest = Courier::Models::TopicDigestScheduleRequest
638
+
639
+ TopicDigestScheduleResponse = Courier::Models::TopicDigestScheduleResponse
640
+
625
641
  TranslationRetrieveParams = Courier::Models::TranslationRetrieveParams
626
642
 
627
643
  TranslationUpdateParams = Courier::Models::TranslationUpdateParams
@@ -38,8 +38,11 @@ module Courier
38
38
  ).void
39
39
  end
40
40
  def release(
41
- # The ID of the digest schedule to release, in the form `sch/{uuid}`. The value
42
- # must be URL-encoded (e.g. `sch%2F00000000-0000-0000-0000-000000000000`).
41
+ # The ID of the digest schedule to release. Newer schedules are
42
+ # `sch_01m26xfcn3endt3nxy4e2kx2rh` and need no encoding. Schedules created before
43
+ # that format are `sch/{uuid}` and contain a literal `/`, so those must be
44
+ # URL-encoded (e.g. `sch%2F00000000-0000-0000-0000-000000000000`). Both forms
45
+ # remain valid; existing ids are never migrated.
43
46
  schedule_id,
44
47
  request_options: {}
45
48
  )
@@ -3,8 +3,6 @@
3
3
  module Courier
4
4
  module Resources
5
5
  class WorkspacePreferences
6
- # Manage the workspace catalog of subscription topics, the sections that group
7
- # them, and publishing the preference page.
8
6
  class Topics
9
7
  # Creates a subscription topic inside a workspace preference. The default status
10
8
  # sets whether users start opted in, opted out, or required.
@@ -21,6 +19,7 @@ module Courier
21
19
  ]
22
20
  ),
23
21
  description: T.nilable(String),
22
+ digest: T.nilable(Courier::TopicDigestRequest::OrHash),
24
23
  include_unsubscribe_header: T.nilable(T::Boolean),
25
24
  routing_options:
26
25
  T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
@@ -44,6 +43,14 @@ module Courier
44
43
  # Body param: Optional description shown under the topic on the hosted preferences
45
44
  # page.
46
45
  description: nil,
46
+ # Body param: A topic's digest configuration: the template that renders it, the
47
+ # cadences it delivers on, and how collected events are retained.
48
+ #
49
+ # Send `null` for the whole object to turn a digest off, which unlinks the
50
+ # template and removes its schedules. There is no `enabled` flag, and
51
+ # `schedules: []` is rejected, because both states are un-deliverable rather than
52
+ # merely off.
53
+ digest: nil,
47
54
  # Body param: Whether to include a list-unsubscribe header on emails for this
48
55
  # topic.
49
56
  include_unsubscribe_header: nil,
@@ -119,6 +126,60 @@ module Courier
119
126
  )
120
127
  end
121
128
 
129
+ # Turn off a topic's digest, leaving the topic itself in place. The template is
130
+ # unlinked and the digest's schedules are removed along with their delivery rules.
131
+ # Equivalent to sending `digest: null` on a topic replace.
132
+ sig do
133
+ params(
134
+ topic_id: String,
135
+ section_id: String,
136
+ request_options: Courier::RequestOptions::OrHash
137
+ ).void
138
+ end
139
+ def delete_digest(
140
+ # The preference topic whose digest to turn off.
141
+ topic_id,
142
+ # The preference section containing the topic.
143
+ section_id:,
144
+ request_options: {}
145
+ )
146
+ end
147
+
148
+ # Send one recipient's held digest now, instead of waiting for its schedule. Use
149
+ # it to preview what a digest will look like, or to let someone flush their own.
150
+ #
151
+ # Keyed on the topic because that is how a held digest is stored: one per
152
+ # recipient per topic, with the schedule recorded on it rather than part of its
153
+ # identity. To flush every recipient on a schedule instead, use
154
+ # `POST /digests/schedules/{schedule_id}/trigger`.
155
+ sig do
156
+ params(
157
+ topic_id: String,
158
+ section_id: String,
159
+ user_id: String,
160
+ tenant_id: String,
161
+ request_options: Courier::RequestOptions::OrHash
162
+ ).void
163
+ end
164
+ def release_digest(
165
+ # Path param: The preference topic whose digest to release.
166
+ topic_id,
167
+ # Path param: The preference section containing the topic.
168
+ section_id:,
169
+ # Body param: The recipient whose digest to release. Required: there is no
170
+ # "release everyone on this topic" form, because a whole-schedule flush already
171
+ # has its own endpoint and a body-shaped difference between one recipient and all
172
+ # of them is too easy to get wrong.
173
+ user_id:,
174
+ # Body param: The recipient's tenant, when they were sent to as part of one -- the
175
+ # same value returned as `tenant_id` on a digest instance and sent as
176
+ # `message.context.tenant_id`. It is part of the held digest's key, so a tenanted
177
+ # recipient cannot be found without it. Omit for an ordinary recipient.
178
+ tenant_id: nil,
179
+ request_options: {}
180
+ )
181
+ end
182
+
122
183
  # Replace a topic within a workspace preference. Full document replacement;
123
184
  # missing optional fields are cleared. Same 404 rules as GET.
124
185
  sig do
@@ -135,6 +196,7 @@ module Courier
135
196
  ]
136
197
  ),
137
198
  description: T.nilable(String),
199
+ digest: T.nilable(Courier::TopicDigestRequest::OrHash),
138
200
  include_unsubscribe_header: T.nilable(T::Boolean),
139
201
  routing_options:
140
202
  T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
@@ -157,6 +219,14 @@ module Courier
157
219
  # Body param: Optional description shown under the topic on the hosted preferences
158
220
  # page. Omit to clear.
159
221
  description: nil,
222
+ # Body param: A topic's digest configuration: the template that renders it, the
223
+ # cadences it delivers on, and how collected events are retained.
224
+ #
225
+ # Send `null` for the whole object to turn a digest off, which unlinks the
226
+ # template and removes its schedules. There is no `enabled` flag, and
227
+ # `schedules: []` is rejected, because both states are un-deliverable rather than
228
+ # merely off.
229
+ digest: nil,
160
230
  # Body param: Whether to include a list-unsubscribe header on emails for this
161
231
  # topic.
162
232
  include_unsubscribe_header: nil,
@@ -5,8 +5,6 @@ module Courier
5
5
  # Manage the workspace catalog of subscription topics, the sections that group
6
6
  # them, and publishing the preference page.
7
7
  class WorkspacePreferences
8
- # Manage the workspace catalog of subscription topics, the sections that group
9
- # them, and publishing the preference page.
10
8
  sig { returns(Courier::Resources::WorkspacePreferences::Topics) }
11
9
  attr_reader :topics
12
10
 
@@ -0,0 +1,26 @@
1
+ module Courier
2
+ module Models
3
+ type digest_day_of_week =
4
+ :sunday
5
+ | :monday
6
+ | :tuesday
7
+ | :wednesday
8
+ | :thursday
9
+ | :friday
10
+ | :saturday
11
+
12
+ module DigestDayOfWeek
13
+ extend Courier::Internal::Type::Enum
14
+
15
+ SUNDAY: :sunday
16
+ MONDAY: :monday
17
+ TUESDAY: :tuesday
18
+ WEDNESDAY: :wednesday
19
+ THURSDAY: :thursday
20
+ FRIDAY: :friday
21
+ SATURDAY: :saturday
22
+
23
+ def self?.values: -> ::Array[Courier::Models::digest_day_of_week]
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,19 @@
1
+ module Courier
2
+ module Models
3
+ type digest_frequency =
4
+ :instant | :daily | :weekdays | :weekly | :custom_days | :monthly
5
+
6
+ module DigestFrequency
7
+ extend Courier::Internal::Type::Enum
8
+
9
+ INSTANT: :instant
10
+ DAILY: :daily
11
+ WEEKDAYS: :weekdays
12
+ WEEKLY: :weekly
13
+ CUSTOM_DAYS: :custom_days
14
+ MONTHLY: :monthly
15
+
16
+ def self?.values: -> ::Array[Courier::Models::digest_frequency]
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,57 @@
1
+ module Courier
2
+ module Models
3
+ type topic_digest_category =
4
+ {
5
+ category_key: String,
6
+ limit: Integer,
7
+ retain: Courier::Models::TopicDigestCategory::retain,
8
+ sort_key: String
9
+ }
10
+
11
+ class TopicDigestCategory < Courier::Internal::Type::BaseModel
12
+ attr_accessor category_key: String
13
+
14
+ attr_reader limit: Integer?
15
+
16
+ def limit=: (Integer) -> Integer
17
+
18
+ attr_reader retain: Courier::Models::TopicDigestCategory::retain?
19
+
20
+ def retain=: (
21
+ Courier::Models::TopicDigestCategory::retain
22
+ ) -> Courier::Models::TopicDigestCategory::retain
23
+
24
+ attr_reader sort_key: String?
25
+
26
+ def sort_key=: (String) -> String
27
+
28
+ def initialize: (
29
+ category_key: String,
30
+ ?limit: Integer,
31
+ ?retain: Courier::Models::TopicDigestCategory::retain,
32
+ ?sort_key: String
33
+ ) -> void
34
+
35
+ def to_hash: -> {
36
+ category_key: String,
37
+ limit: Integer,
38
+ retain: Courier::Models::TopicDigestCategory::retain,
39
+ sort_key: String
40
+ }
41
+
42
+ type retain = :FIRST | :LAST | :HIGHEST | :LOWEST | :NONE
43
+
44
+ module Retain
45
+ extend Courier::Internal::Type::Enum
46
+
47
+ FIRST: :FIRST
48
+ LAST: :LAST
49
+ HIGHEST: :HIGHEST
50
+ LOWEST: :LOWEST
51
+ NONE: :NONE
52
+
53
+ def self?.values: -> ::Array[Courier::Models::TopicDigestCategory::retain]
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,17 @@
1
+ module Courier
2
+ module Models
3
+ type topic_digest_release_request = { user_id: String, tenant_id: String }
4
+
5
+ class TopicDigestReleaseRequest < Courier::Internal::Type::BaseModel
6
+ attr_accessor user_id: String
7
+
8
+ attr_reader tenant_id: String?
9
+
10
+ def tenant_id=: (String) -> String
11
+
12
+ def initialize: (user_id: String, ?tenant_id: String) -> void
13
+
14
+ def to_hash: -> { user_id: String, tenant_id: String }
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,48 @@
1
+ module Courier
2
+ module Models
3
+ type topic_digest_request =
4
+ {
5
+ schedules: ::Array[Courier::TopicDigestScheduleRequest],
6
+ template_id: String,
7
+ audience_id: String,
8
+ categories: ::Array[Courier::TopicDigestCategory],
9
+ trigger_empty: bool
10
+ }
11
+
12
+ class TopicDigestRequest < Courier::Internal::Type::BaseModel
13
+ attr_accessor schedules: ::Array[Courier::TopicDigestScheduleRequest]
14
+
15
+ attr_accessor template_id: String
16
+
17
+ attr_reader audience_id: String?
18
+
19
+ def audience_id=: (String) -> String
20
+
21
+ attr_reader categories: ::Array[Courier::TopicDigestCategory]?
22
+
23
+ def categories=: (
24
+ ::Array[Courier::TopicDigestCategory]
25
+ ) -> ::Array[Courier::TopicDigestCategory]
26
+
27
+ attr_reader trigger_empty: bool?
28
+
29
+ def trigger_empty=: (bool) -> bool
30
+
31
+ def initialize: (
32
+ schedules: ::Array[Courier::TopicDigestScheduleRequest],
33
+ template_id: String,
34
+ ?audience_id: String,
35
+ ?categories: ::Array[Courier::TopicDigestCategory],
36
+ ?trigger_empty: bool
37
+ ) -> void
38
+
39
+ def to_hash: -> {
40
+ schedules: ::Array[Courier::TopicDigestScheduleRequest],
41
+ template_id: String,
42
+ audience_id: String,
43
+ categories: ::Array[Courier::TopicDigestCategory],
44
+ trigger_empty: bool
45
+ }
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,58 @@
1
+ module Courier
2
+ module Models
3
+ type topic_digest_response =
4
+ {
5
+ categories: ::Array[Courier::TopicDigestCategory],
6
+ schedules: ::Array[Courier::TopicDigestScheduleResponse],
7
+ template_id: String,
8
+ audience_id: String,
9
+ created: String,
10
+ trigger_empty: bool,
11
+ updated: String
12
+ }
13
+
14
+ class TopicDigestResponse < Courier::Internal::Type::BaseModel
15
+ attr_accessor categories: ::Array[Courier::TopicDigestCategory]
16
+
17
+ attr_accessor schedules: ::Array[Courier::TopicDigestScheduleResponse]
18
+
19
+ attr_accessor template_id: String
20
+
21
+ attr_reader audience_id: String?
22
+
23
+ def audience_id=: (String) -> String
24
+
25
+ attr_reader created: String?
26
+
27
+ def created=: (String) -> String
28
+
29
+ attr_reader trigger_empty: bool?
30
+
31
+ def trigger_empty=: (bool) -> bool
32
+
33
+ attr_reader updated: String?
34
+
35
+ def updated=: (String) -> String
36
+
37
+ def initialize: (
38
+ categories: ::Array[Courier::TopicDigestCategory],
39
+ schedules: ::Array[Courier::TopicDigestScheduleResponse],
40
+ template_id: String,
41
+ ?audience_id: String,
42
+ ?created: String,
43
+ ?trigger_empty: bool,
44
+ ?updated: String
45
+ ) -> void
46
+
47
+ def to_hash: -> {
48
+ categories: ::Array[Courier::TopicDigestCategory],
49
+ schedules: ::Array[Courier::TopicDigestScheduleResponse],
50
+ template_id: String,
51
+ audience_id: String,
52
+ created: String,
53
+ trigger_empty: bool,
54
+ updated: String
55
+ }
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,80 @@
1
+ module Courier
2
+ module Models
3
+ type topic_digest_schedule_request =
4
+ {
5
+ frequency: Courier::Models::digest_frequency,
6
+ day_of_month: Integer,
7
+ day_of_week: Courier::Models::digest_day_of_week,
8
+ days_of_week: ::Array[Courier::Models::digest_day_of_week],
9
+ disabled: bool,
10
+ is_default: bool,
11
+ schedule_id: String,
12
+ time: String,
13
+ timezone: String
14
+ }
15
+
16
+ class TopicDigestScheduleRequest < Courier::Internal::Type::BaseModel
17
+ attr_accessor frequency: Courier::Models::digest_frequency
18
+
19
+ attr_reader day_of_month: Integer?
20
+
21
+ def day_of_month=: (Integer) -> Integer
22
+
23
+ attr_reader day_of_week: Courier::Models::digest_day_of_week?
24
+
25
+ def day_of_week=: (
26
+ Courier::Models::digest_day_of_week
27
+ ) -> Courier::Models::digest_day_of_week
28
+
29
+ attr_reader days_of_week: ::Array[Courier::Models::digest_day_of_week]?
30
+
31
+ def days_of_week=: (
32
+ ::Array[Courier::Models::digest_day_of_week]
33
+ ) -> ::Array[Courier::Models::digest_day_of_week]
34
+
35
+ attr_reader disabled: bool?
36
+
37
+ def disabled=: (bool) -> bool
38
+
39
+ attr_reader is_default: bool?
40
+
41
+ def is_default=: (bool) -> bool
42
+
43
+ attr_reader schedule_id: String?
44
+
45
+ def schedule_id=: (String) -> String
46
+
47
+ attr_reader time: String?
48
+
49
+ def time=: (String) -> String
50
+
51
+ attr_reader timezone: String?
52
+
53
+ def timezone=: (String) -> String
54
+
55
+ def initialize: (
56
+ frequency: Courier::Models::digest_frequency,
57
+ ?day_of_month: Integer,
58
+ ?day_of_week: Courier::Models::digest_day_of_week,
59
+ ?days_of_week: ::Array[Courier::Models::digest_day_of_week],
60
+ ?disabled: bool,
61
+ ?is_default: bool,
62
+ ?schedule_id: String,
63
+ ?time: String,
64
+ ?timezone: String
65
+ ) -> void
66
+
67
+ def to_hash: -> {
68
+ frequency: Courier::Models::digest_frequency,
69
+ day_of_month: Integer,
70
+ day_of_week: Courier::Models::digest_day_of_week,
71
+ days_of_week: ::Array[Courier::Models::digest_day_of_week],
72
+ disabled: bool,
73
+ is_default: bool,
74
+ schedule_id: String,
75
+ time: String,
76
+ timezone: String
77
+ }
78
+ end
79
+ end
80
+ end