trycourier 4.22.0 → 4.23.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 (68) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/lib/courier/client.rb +4 -0
  4. data/lib/courier/models/broadcast.rb +132 -0
  5. data/lib/courier/models/broadcast_archive_params.rb +20 -0
  6. data/lib/courier/models/broadcast_cancel_params.rb +20 -0
  7. data/lib/courier/models/broadcast_create_params.rb +14 -0
  8. data/lib/courier/models/broadcast_duplicate_params.rb +20 -0
  9. data/lib/courier/models/broadcast_list_params.rb +30 -0
  10. data/lib/courier/models/broadcast_list_response.rb +24 -0
  11. data/lib/courier/models/broadcast_put_content_params.rb +20 -0
  12. data/lib/courier/models/broadcast_retrieve_content_params.rb +33 -0
  13. data/lib/courier/models/broadcast_retrieve_params.rb +20 -0
  14. data/lib/courier/models/broadcast_schedule.rb +59 -0
  15. data/lib/courier/models/broadcast_schedule_params.rb +20 -0
  16. data/lib/courier/models/broadcast_send_params.rb +20 -0
  17. data/lib/courier/models/broadcast_update_params.rb +20 -0
  18. data/lib/courier/models/create_broadcast_request.rb +43 -0
  19. data/lib/courier/models/schedule_broadcast_request.rb +59 -0
  20. data/lib/courier/models/send_broadcast_request.rb +39 -0
  21. data/lib/courier/models/update_broadcast_request.rb +18 -0
  22. data/lib/courier/models.rb +36 -0
  23. data/lib/courier/resources/broadcasts.rb +290 -0
  24. data/lib/courier/version.rb +1 -1
  25. data/lib/courier.rb +20 -1
  26. data/rbi/courier/client.rbi +3 -0
  27. data/rbi/courier/models/broadcast.rbi +164 -0
  28. data/rbi/courier/models/broadcast_archive_params.rbi +35 -0
  29. data/rbi/courier/models/broadcast_cancel_params.rbi +35 -0
  30. data/rbi/courier/models/broadcast_create_params.rbi +27 -0
  31. data/rbi/courier/models/broadcast_duplicate_params.rbi +35 -0
  32. data/rbi/courier/models/broadcast_list_params.rbi +54 -0
  33. data/rbi/courier/models/broadcast_list_response.rbi +39 -0
  34. data/rbi/courier/models/broadcast_put_content_params.rbi +35 -0
  35. data/rbi/courier/models/broadcast_retrieve_content_params.rbi +57 -0
  36. data/rbi/courier/models/broadcast_retrieve_params.rbi +35 -0
  37. data/rbi/courier/models/broadcast_schedule.rbi +92 -0
  38. data/rbi/courier/models/broadcast_schedule_params.rbi +35 -0
  39. data/rbi/courier/models/broadcast_send_params.rbi +35 -0
  40. data/rbi/courier/models/broadcast_update_params.rbi +35 -0
  41. data/rbi/courier/models/create_broadcast_request.rbi +81 -0
  42. data/rbi/courier/models/schedule_broadcast_request.rbi +103 -0
  43. data/rbi/courier/models/send_broadcast_request.rbi +77 -0
  44. data/rbi/courier/models/update_broadcast_request.rbi +28 -0
  45. data/rbi/courier/models.rbi +37 -0
  46. data/rbi/courier/resources/broadcasts.rbi +199 -0
  47. data/sig/courier/client.rbs +2 -0
  48. data/sig/courier/models/broadcast.rbs +98 -0
  49. data/sig/courier/models/broadcast_archive_params.rbs +23 -0
  50. data/sig/courier/models/broadcast_cancel_params.rbs +23 -0
  51. data/sig/courier/models/broadcast_create_params.rbs +15 -0
  52. data/sig/courier/models/broadcast_duplicate_params.rbs +23 -0
  53. data/sig/courier/models/broadcast_list_params.rbs +30 -0
  54. data/sig/courier/models/broadcast_list_response.rbs +22 -0
  55. data/sig/courier/models/broadcast_put_content_params.rbs +25 -0
  56. data/sig/courier/models/broadcast_retrieve_content_params.rbs +30 -0
  57. data/sig/courier/models/broadcast_retrieve_params.rbs +23 -0
  58. data/sig/courier/models/broadcast_schedule.rbs +46 -0
  59. data/sig/courier/models/broadcast_schedule_params.rbs +25 -0
  60. data/sig/courier/models/broadcast_send_params.rbs +25 -0
  61. data/sig/courier/models/broadcast_update_params.rbs +25 -0
  62. data/sig/courier/models/create_broadcast_request.rbs +40 -0
  63. data/sig/courier/models/schedule_broadcast_request.rbs +48 -0
  64. data/sig/courier/models/send_broadcast_request.rbs +36 -0
  65. data/sig/courier/models/update_broadcast_request.rbs +13 -0
  66. data/sig/courier/models.rbs +36 -0
  67. data/sig/courier/resources/broadcasts.rbs +74 -0
  68. metadata +58 -1
@@ -0,0 +1,77 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class SendBroadcastRequest < Courier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Courier::SendBroadcastRequest, Courier::Internal::AnyHash)
9
+ end
10
+
11
+ # ID of the target list or audience.
12
+ sig { returns(String) }
13
+ attr_accessor :recipient_id
14
+
15
+ # Whether the broadcast targets a list or an audience.
16
+ sig { returns(Courier::SendBroadcastRequest::RecipientType::OrSymbol) }
17
+ attr_accessor :recipient_type
18
+
19
+ # Request body for sending a broadcast immediately.
20
+ sig do
21
+ params(
22
+ recipient_id: String,
23
+ recipient_type: Courier::SendBroadcastRequest::RecipientType::OrSymbol
24
+ ).returns(T.attached_class)
25
+ end
26
+ def self.new(
27
+ # ID of the target list or audience.
28
+ recipient_id:,
29
+ # Whether the broadcast targets a list or an audience.
30
+ recipient_type:
31
+ )
32
+ end
33
+
34
+ sig do
35
+ override.returns(
36
+ {
37
+ recipient_id: String,
38
+ recipient_type:
39
+ Courier::SendBroadcastRequest::RecipientType::OrSymbol
40
+ }
41
+ )
42
+ end
43
+ def to_hash
44
+ end
45
+
46
+ # Whether the broadcast targets a list or an audience.
47
+ module RecipientType
48
+ extend Courier::Internal::Type::Enum
49
+
50
+ TaggedSymbol =
51
+ T.type_alias do
52
+ T.all(Symbol, Courier::SendBroadcastRequest::RecipientType)
53
+ end
54
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
55
+
56
+ LIST =
57
+ T.let(
58
+ :list,
59
+ Courier::SendBroadcastRequest::RecipientType::TaggedSymbol
60
+ )
61
+ AUDIENCE =
62
+ T.let(
63
+ :audience,
64
+ Courier::SendBroadcastRequest::RecipientType::TaggedSymbol
65
+ )
66
+
67
+ sig do
68
+ override.returns(
69
+ T::Array[Courier::SendBroadcastRequest::RecipientType::TaggedSymbol]
70
+ )
71
+ end
72
+ def self.values
73
+ end
74
+ end
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,28 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class UpdateBroadcastRequest < Courier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Courier::UpdateBroadcastRequest, Courier::Internal::AnyHash)
9
+ end
10
+
11
+ # New human-readable name.
12
+ sig { returns(String) }
13
+ attr_accessor :name
14
+
15
+ # Request body for updating a broadcast. Only the name is mutable.
16
+ sig { params(name: String).returns(T.attached_class) }
17
+ def self.new(
18
+ # New human-readable name.
19
+ name:
20
+ )
21
+ end
22
+
23
+ sig { override.returns({ name: String }) }
24
+ def to_hash
25
+ end
26
+ end
27
+ end
28
+ end
@@ -77,6 +77,35 @@ module Courier
77
77
 
78
78
  BrandUpdateParams = Courier::Models::BrandUpdateParams
79
79
 
80
+ Broadcast = Courier::Models::Broadcast
81
+
82
+ BroadcastArchiveParams = Courier::Models::BroadcastArchiveParams
83
+
84
+ BroadcastCancelParams = Courier::Models::BroadcastCancelParams
85
+
86
+ BroadcastCreateParams = Courier::Models::BroadcastCreateParams
87
+
88
+ BroadcastDuplicateParams = Courier::Models::BroadcastDuplicateParams
89
+
90
+ BroadcastListParams = Courier::Models::BroadcastListParams
91
+
92
+ BroadcastListResponse = Courier::Models::BroadcastListResponse
93
+
94
+ BroadcastPutContentParams = Courier::Models::BroadcastPutContentParams
95
+
96
+ BroadcastRetrieveContentParams =
97
+ Courier::Models::BroadcastRetrieveContentParams
98
+
99
+ BroadcastRetrieveParams = Courier::Models::BroadcastRetrieveParams
100
+
101
+ BroadcastSchedule = Courier::Models::BroadcastSchedule
102
+
103
+ BroadcastScheduleParams = Courier::Models::BroadcastScheduleParams
104
+
105
+ BroadcastSendParams = Courier::Models::BroadcastSendParams
106
+
107
+ BroadcastUpdateParams = Courier::Models::BroadcastUpdateParams
108
+
80
109
  CancelJourneyRequest = Courier::Models::CancelJourneyRequest
81
110
 
82
111
  CancelJourneyResponse = Courier::Models::CancelJourneyResponse
@@ -91,6 +120,8 @@ module Courier
91
120
 
92
121
  Check = Courier::Models::Check
93
122
 
123
+ CreateBroadcastRequest = Courier::Models::CreateBroadcastRequest
124
+
94
125
  CreateJourneyRequest = Courier::Models::CreateJourneyRequest
95
126
 
96
127
  DefaultPreferences = Courier::Models::DefaultPreferences
@@ -452,6 +483,10 @@ module Courier
452
483
 
453
484
  Rule = Courier::Models::Rule
454
485
 
486
+ ScheduleBroadcastRequest = Courier::Models::ScheduleBroadcastRequest
487
+
488
+ SendBroadcastRequest = Courier::Models::SendBroadcastRequest
489
+
455
490
  SendDirectMessage = Courier::Models::SendDirectMessage
456
491
 
457
492
  SendMessageParams = Courier::Models::SendMessageParams
@@ -514,6 +549,8 @@ module Courier
514
549
 
515
550
  TranslationUpdateParams = Courier::Models::TranslationUpdateParams
516
551
 
552
+ UpdateBroadcastRequest = Courier::Models::UpdateBroadcastRequest
553
+
517
554
  UserProfile = Courier::Models::UserProfile
518
555
 
519
556
  UserProfileFirebaseToken = Courier::Models::UserProfileFirebaseToken
@@ -0,0 +1,199 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Resources
5
+ class Broadcasts
6
+ # Create a broadcast. Provisions a private notification template for the broadcast
7
+ # and returns the new broadcast in the draft state. Exactly one channel is
8
+ # required.
9
+ sig do
10
+ params(
11
+ channel: Courier::CreateBroadcastRequest::Channel::OrSymbol,
12
+ name: String,
13
+ request_options: Courier::RequestOptions::OrHash
14
+ ).returns(Courier::Broadcast)
15
+ end
16
+ def create(
17
+ # The single delivery channel for this broadcast.
18
+ channel:,
19
+ # Human-readable name.
20
+ name:,
21
+ request_options: {}
22
+ )
23
+ end
24
+
25
+ # Retrieve a broadcast by ID. Archived broadcasts return 404.
26
+ sig do
27
+ params(
28
+ broadcast_id: String,
29
+ request_options: Courier::RequestOptions::OrHash
30
+ ).returns(Courier::Broadcast)
31
+ end
32
+ def retrieve(broadcast_id, request_options: {})
33
+ end
34
+
35
+ # Update a broadcast's name. Content is edited via the broadcast's notification
36
+ # template, not this endpoint.
37
+ sig do
38
+ params(
39
+ broadcast_id: String,
40
+ name: String,
41
+ request_options: Courier::RequestOptions::OrHash
42
+ ).returns(Courier::Broadcast)
43
+ end
44
+ def update(
45
+ broadcast_id,
46
+ # New human-readable name.
47
+ name:,
48
+ request_options: {}
49
+ )
50
+ end
51
+
52
+ # List broadcasts in your workspace. Cursor-paginated; returns broadcasts
53
+ # newest-first.
54
+ sig do
55
+ params(
56
+ cursor: T.nilable(String),
57
+ limit: Integer,
58
+ request_options: Courier::RequestOptions::OrHash
59
+ ).returns(Courier::BroadcastListResponse)
60
+ end
61
+ def list(
62
+ # Opaque pagination cursor from a previous response. Omit for the first page.
63
+ cursor: nil,
64
+ # Maximum number of results per page.
65
+ limit: nil,
66
+ request_options: {}
67
+ )
68
+ end
69
+
70
+ # Archive a broadcast. This is a soft delete — the archived broadcast is returned
71
+ # and no longer appears in list results.
72
+ sig do
73
+ params(
74
+ broadcast_id: String,
75
+ request_options: Courier::RequestOptions::OrHash
76
+ ).returns(Courier::Broadcast)
77
+ end
78
+ def archive(broadcast_id, request_options: {})
79
+ end
80
+
81
+ # Cancel a broadcast's pending schedule, returning it to the draft state. Only
82
+ # valid for a scheduled broadcast.
83
+ sig do
84
+ params(
85
+ broadcast_id: String,
86
+ request_options: Courier::RequestOptions::OrHash
87
+ ).returns(Courier::Broadcast)
88
+ end
89
+ def cancel(broadcast_id, request_options: {})
90
+ end
91
+
92
+ # Duplicate a broadcast (and its template) into a new draft named "{source name}
93
+ # (copy)".
94
+ sig do
95
+ params(
96
+ broadcast_id: String,
97
+ request_options: Courier::RequestOptions::OrHash
98
+ ).returns(Courier::Broadcast)
99
+ end
100
+ def duplicate(broadcast_id, request_options: {})
101
+ end
102
+
103
+ # Author the broadcast's content by replacing the draft elemental content of its
104
+ # private notification template. The draft is published automatically when the
105
+ # broadcast is sent or scheduled.
106
+ sig do
107
+ params(
108
+ broadcast_id: String,
109
+ content: Courier::NotificationContentPutRequest::Content::OrHash,
110
+ state: Courier::NotificationTemplateState::OrSymbol,
111
+ request_options: Courier::RequestOptions::OrHash
112
+ ).returns(Courier::NotificationContentMutationResponse)
113
+ end
114
+ def put_content(
115
+ broadcast_id,
116
+ # Elemental content payload. The server defaults `version` when omitted.
117
+ content:,
118
+ # Template state. Defaults to `DRAFT`.
119
+ state: nil,
120
+ request_options: {}
121
+ )
122
+ end
123
+
124
+ # Retrieve the broadcast's content — the elemental content of its private
125
+ # notification template. Defaults to the working draft, since broadcast content is
126
+ # authored as a draft until the broadcast is sent.
127
+ sig do
128
+ params(
129
+ broadcast_id: String,
130
+ version: String,
131
+ request_options: Courier::RequestOptions::OrHash
132
+ ).returns(Courier::NotificationContentGetResponse)
133
+ end
134
+ def retrieve_content(
135
+ broadcast_id,
136
+ # Accepts `draft`, `published`, or a version string (e.g. `v001`). Defaults to
137
+ # `draft`.
138
+ version: nil,
139
+ request_options: {}
140
+ )
141
+ end
142
+
143
+ # Schedule a broadcast for a future send to a list or audience. Publishes the
144
+ # broadcast template first. Not allowed once the broadcast is sending or sent. For
145
+ # an immediate send use POST /broadcasts/{broadcastId}/send.
146
+ sig do
147
+ params(
148
+ broadcast_id: String,
149
+ recipient_id: String,
150
+ recipient_type:
151
+ Courier::ScheduleBroadcastRequest::RecipientType::OrSymbol,
152
+ scheduled_to: String,
153
+ timezone: String,
154
+ request_options: Courier::RequestOptions::OrHash
155
+ ).returns(Courier::Broadcast)
156
+ end
157
+ def schedule(
158
+ broadcast_id,
159
+ # ID of the target list or audience.
160
+ recipient_id:,
161
+ # Whether the broadcast targets a list or an audience.
162
+ recipient_type:,
163
+ # Wall-clock timestamp of the future send, no timezone offset (e.g.
164
+ # "2026-07-21T20:00:00"). The zone is given by `timezone`.
165
+ scheduled_to:,
166
+ # IANA timezone for the scheduled send (e.g. America/New_York).
167
+ timezone: nil,
168
+ request_options: {}
169
+ )
170
+ end
171
+
172
+ # Send a broadcast immediately to a list or audience. Publishes the broadcast
173
+ # template first. Not allowed once the broadcast is sending or sent.
174
+ sig do
175
+ params(
176
+ broadcast_id: String,
177
+ recipient_id: String,
178
+ recipient_type:
179
+ Courier::SendBroadcastRequest::RecipientType::OrSymbol,
180
+ request_options: Courier::RequestOptions::OrHash
181
+ ).returns(Courier::Broadcast)
182
+ end
183
+ def send_(
184
+ broadcast_id,
185
+ # ID of the target list or audience.
186
+ recipient_id:,
187
+ # Whether the broadcast targets a list or an audience.
188
+ recipient_type:,
189
+ request_options: {}
190
+ )
191
+ end
192
+
193
+ # @api private
194
+ sig { params(client: Courier::Client).returns(T.attached_class) }
195
+ def self.new(client:)
196
+ end
197
+ end
198
+ end
199
+ end
@@ -24,6 +24,8 @@ module Courier
24
24
 
25
25
  attr_reader journeys: Courier::Resources::Journeys
26
26
 
27
+ attr_reader broadcasts: Courier::Resources::Broadcasts
28
+
27
29
  attr_reader brands: Courier::Resources::Brands
28
30
 
29
31
  attr_reader digests: Courier::Resources::Digests
@@ -0,0 +1,98 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast =
4
+ {
5
+ id: String,
6
+ channel: Courier::Models::Broadcast::channel,
7
+ created_at: String,
8
+ created_by: String,
9
+ name: String,
10
+ status: Courier::Models::Broadcast::status,
11
+ updated_at: String,
12
+ updated_by: String,
13
+ archived_at: String?,
14
+ archived_by: String?,
15
+ schedule: Courier::BroadcastSchedule?
16
+ }
17
+
18
+ class Broadcast < Courier::Internal::Type::BaseModel
19
+ attr_accessor id: String
20
+
21
+ attr_accessor channel: Courier::Models::Broadcast::channel
22
+
23
+ attr_accessor created_at: String
24
+
25
+ attr_accessor created_by: String
26
+
27
+ attr_accessor name: String
28
+
29
+ attr_accessor status: Courier::Models::Broadcast::status
30
+
31
+ attr_accessor updated_at: String
32
+
33
+ attr_accessor updated_by: String
34
+
35
+ attr_accessor archived_at: String?
36
+
37
+ attr_accessor archived_by: String?
38
+
39
+ attr_accessor schedule: Courier::BroadcastSchedule?
40
+
41
+ def initialize: (
42
+ id: String,
43
+ channel: Courier::Models::Broadcast::channel,
44
+ created_at: String,
45
+ created_by: String,
46
+ name: String,
47
+ status: Courier::Models::Broadcast::status,
48
+ updated_at: String,
49
+ updated_by: String,
50
+ ?archived_at: String?,
51
+ ?archived_by: String?,
52
+ ?schedule: Courier::BroadcastSchedule?
53
+ ) -> void
54
+
55
+ def to_hash: -> {
56
+ id: String,
57
+ channel: Courier::Models::Broadcast::channel,
58
+ created_at: String,
59
+ created_by: String,
60
+ name: String,
61
+ status: Courier::Models::Broadcast::status,
62
+ updated_at: String,
63
+ updated_by: String,
64
+ archived_at: String?,
65
+ archived_by: String?,
66
+ schedule: Courier::BroadcastSchedule?
67
+ }
68
+
69
+ type channel = :email | :sms | :push | :inbox | :slack | :msteams
70
+
71
+ module Channel
72
+ extend Courier::Internal::Type::Enum
73
+
74
+ EMAIL: :email
75
+ SMS: :sms
76
+ PUSH: :push
77
+ INBOX: :inbox
78
+ SLACK: :slack
79
+ MSTEAMS: :msteams
80
+
81
+ def self?.values: -> ::Array[Courier::Models::Broadcast::channel]
82
+ end
83
+
84
+ type status = :draft | :scheduled | :sending | :sent
85
+
86
+ module Status
87
+ extend Courier::Internal::Type::Enum
88
+
89
+ DRAFT: :draft
90
+ SCHEDULED: :scheduled
91
+ SENDING: :sending
92
+ SENT: :sent
93
+
94
+ def self?.values: -> ::Array[Courier::Models::Broadcast::status]
95
+ end
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,23 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_archive_params =
4
+ { broadcast_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class BroadcastArchiveParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ attr_accessor broadcast_id: String
11
+
12
+ def initialize: (
13
+ broadcast_id: String,
14
+ ?request_options: Courier::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ broadcast_id: String,
19
+ request_options: Courier::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_cancel_params =
4
+ { broadcast_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class BroadcastCancelParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ attr_accessor broadcast_id: String
11
+
12
+ def initialize: (
13
+ broadcast_id: String,
14
+ ?request_options: Courier::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ broadcast_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 broadcast_create_params =
4
+ { } & Courier::Internal::Type::request_parameters
5
+
6
+ class BroadcastCreateParams < Courier::Models::CreateBroadcastRequest
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,23 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_duplicate_params =
4
+ { broadcast_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class BroadcastDuplicateParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ attr_accessor broadcast_id: String
11
+
12
+ def initialize: (
13
+ broadcast_id: String,
14
+ ?request_options: Courier::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ broadcast_id: String,
19
+ request_options: Courier::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,30 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_list_params =
4
+ { cursor: String?, limit: Integer }
5
+ & Courier::Internal::Type::request_parameters
6
+
7
+ class BroadcastListParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ attr_accessor cursor: String?
12
+
13
+ attr_reader limit: Integer?
14
+
15
+ def limit=: (Integer) -> Integer
16
+
17
+ def initialize: (
18
+ ?cursor: String?,
19
+ ?limit: Integer,
20
+ ?request_options: Courier::request_opts
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ cursor: String?,
25
+ limit: Integer,
26
+ request_options: Courier::RequestOptions
27
+ }
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,22 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_list_response =
4
+ { paging: Courier::Paging, results: ::Array[Courier::Broadcast] }
5
+
6
+ class BroadcastListResponse < Courier::Internal::Type::BaseModel
7
+ attr_accessor paging: Courier::Paging
8
+
9
+ attr_accessor results: ::Array[Courier::Broadcast]
10
+
11
+ def initialize: (
12
+ paging: Courier::Paging,
13
+ results: ::Array[Courier::Broadcast]
14
+ ) -> void
15
+
16
+ def to_hash: -> {
17
+ paging: Courier::Paging,
18
+ results: ::Array[Courier::Broadcast]
19
+ }
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,25 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_put_content_params =
4
+ { broadcast_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class BroadcastPutContentParams < Courier::Models::NotificationContentPutRequest
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ def broadcast_id: -> String
11
+
12
+ def broadcast_id=: (String _) -> String
13
+
14
+ def initialize: (
15
+ broadcast_id: String,
16
+ ?request_options: Courier::request_opts
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ broadcast_id: String,
21
+ request_options: Courier::RequestOptions
22
+ }
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,30 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_retrieve_content_params =
4
+ { broadcast_id: String, version: String }
5
+ & Courier::Internal::Type::request_parameters
6
+
7
+ class BroadcastRetrieveContentParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ attr_accessor broadcast_id: String
12
+
13
+ attr_reader version: String?
14
+
15
+ def version=: (String) -> String
16
+
17
+ def initialize: (
18
+ broadcast_id: String,
19
+ ?version: String,
20
+ ?request_options: Courier::request_opts
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ broadcast_id: String,
25
+ version: String,
26
+ request_options: Courier::RequestOptions
27
+ }
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,23 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_retrieve_params =
4
+ { broadcast_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class BroadcastRetrieveParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ attr_accessor broadcast_id: String
11
+
12
+ def initialize: (
13
+ broadcast_id: String,
14
+ ?request_options: Courier::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ broadcast_id: String,
19
+ request_options: Courier::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end