trycourier 4.22.0 → 4.24.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/lib/courier/client.rb +6 -4
- data/lib/courier/models/broadcast.rb +132 -0
- data/lib/courier/models/broadcast_archive_params.rb +20 -0
- data/lib/courier/models/broadcast_cancel_params.rb +20 -0
- data/lib/courier/models/broadcast_create_params.rb +14 -0
- data/lib/courier/models/broadcast_duplicate_params.rb +20 -0
- data/lib/courier/models/broadcast_list_params.rb +30 -0
- data/lib/courier/models/broadcast_list_response.rb +24 -0
- data/lib/courier/models/broadcast_put_content_params.rb +20 -0
- data/lib/courier/models/broadcast_retrieve_content_params.rb +33 -0
- data/lib/courier/models/broadcast_retrieve_params.rb +20 -0
- data/lib/courier/models/broadcast_schedule.rb +59 -0
- data/lib/courier/models/broadcast_schedule_params.rb +20 -0
- data/lib/courier/models/broadcast_send_params.rb +20 -0
- data/lib/courier/models/broadcast_update_params.rb +20 -0
- data/lib/courier/models/create_broadcast_request.rb +43 -0
- data/lib/courier/models/journey_node.rb +1 -1
- data/lib/courier/models/journey_send_node.rb +46 -3
- data/lib/courier/models/schedule_broadcast_request.rb +59 -0
- data/lib/courier/models/send_broadcast_request.rb +39 -0
- data/lib/courier/models/update_broadcast_request.rb +18 -0
- data/lib/courier/models.rb +36 -2
- data/lib/courier/resources/broadcasts.rb +292 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +20 -5
- data/rbi/courier/client.rbi +5 -3
- data/rbi/courier/models/broadcast.rbi +164 -0
- data/rbi/courier/models/broadcast_archive_params.rbi +35 -0
- data/rbi/courier/models/broadcast_cancel_params.rbi +35 -0
- data/rbi/courier/models/broadcast_create_params.rbi +27 -0
- data/rbi/courier/models/broadcast_duplicate_params.rbi +35 -0
- data/rbi/courier/models/broadcast_list_params.rbi +54 -0
- data/rbi/courier/models/broadcast_list_response.rbi +39 -0
- data/rbi/courier/models/broadcast_put_content_params.rbi +35 -0
- data/rbi/courier/models/broadcast_retrieve_content_params.rbi +57 -0
- data/rbi/courier/models/broadcast_retrieve_params.rbi +35 -0
- data/rbi/courier/models/broadcast_schedule.rbi +92 -0
- data/rbi/courier/models/broadcast_schedule_params.rbi +35 -0
- data/rbi/courier/models/broadcast_send_params.rbi +35 -0
- data/rbi/courier/models/broadcast_update_params.rbi +35 -0
- data/rbi/courier/models/create_broadcast_request.rbi +81 -0
- data/rbi/courier/models/journey_send_node.rbi +72 -3
- data/rbi/courier/models/schedule_broadcast_request.rbi +103 -0
- data/rbi/courier/models/send_broadcast_request.rbi +77 -0
- data/rbi/courier/models/update_broadcast_request.rbi +28 -0
- data/rbi/courier/models.rbi +37 -2
- data/rbi/courier/resources/broadcasts.rbi +201 -0
- data/sig/courier/client.rbs +2 -2
- data/sig/courier/models/broadcast.rbs +98 -0
- data/sig/courier/models/broadcast_archive_params.rbs +23 -0
- data/sig/courier/models/broadcast_cancel_params.rbs +23 -0
- data/sig/courier/models/broadcast_create_params.rbs +15 -0
- data/sig/courier/models/broadcast_duplicate_params.rbs +23 -0
- data/sig/courier/models/broadcast_list_params.rbs +30 -0
- data/sig/courier/models/broadcast_list_response.rbs +22 -0
- data/sig/courier/models/broadcast_put_content_params.rbs +25 -0
- data/sig/courier/models/broadcast_retrieve_content_params.rbs +30 -0
- data/sig/courier/models/broadcast_retrieve_params.rbs +23 -0
- data/sig/courier/models/broadcast_schedule.rbs +46 -0
- data/sig/courier/models/broadcast_schedule_params.rbs +25 -0
- data/sig/courier/models/broadcast_send_params.rbs +25 -0
- data/sig/courier/models/broadcast_update_params.rbs +25 -0
- data/sig/courier/models/create_broadcast_request.rbs +40 -0
- data/sig/courier/models/journey_send_node.rbs +19 -0
- data/sig/courier/models/schedule_broadcast_request.rbs +48 -0
- data/sig/courier/models/send_broadcast_request.rbs +36 -0
- data/sig/courier/models/update_broadcast_request.rbs +13 -0
- data/sig/courier/models.rbs +36 -2
- data/sig/courier/resources/broadcasts.rbs +74 -0
- metadata +59 -14
- data/lib/courier/models/inbox/message_delete_params.rb +0 -22
- data/lib/courier/models/inbox/message_restore_params.rb +0 -22
- data/lib/courier/resources/inbox/messages.rb +0 -58
- data/lib/courier/resources/inbox.rb +0 -19
- data/rbi/courier/models/inbox/message_delete_params.rbi +0 -40
- data/rbi/courier/models/inbox/message_restore_params.rbi +0 -40
- data/rbi/courier/resources/inbox/messages.rbi +0 -44
- data/rbi/courier/resources/inbox.rbi +0 -16
- data/sig/courier/models/inbox/message_delete_params.rbs +0 -25
- data/sig/courier/models/inbox/message_restore_params.rbs +0 -25
- data/sig/courier/resources/inbox/messages.rbs +0 -19
- data/sig/courier/resources/inbox.rbs +0 -9
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Resources
|
|
5
|
+
# Create a one-off send to a list or audience, author its content, then send it
|
|
6
|
+
# immediately or schedule it for later.
|
|
7
|
+
class Broadcasts
|
|
8
|
+
# Create a broadcast. Provisions a private notification template for the broadcast
|
|
9
|
+
# and returns the new broadcast in the draft state. Exactly one channel is
|
|
10
|
+
# required.
|
|
11
|
+
sig do
|
|
12
|
+
params(
|
|
13
|
+
channel: Courier::CreateBroadcastRequest::Channel::OrSymbol,
|
|
14
|
+
name: String,
|
|
15
|
+
request_options: Courier::RequestOptions::OrHash
|
|
16
|
+
).returns(Courier::Broadcast)
|
|
17
|
+
end
|
|
18
|
+
def create(
|
|
19
|
+
# The single delivery channel for this broadcast.
|
|
20
|
+
channel:,
|
|
21
|
+
# Human-readable name.
|
|
22
|
+
name:,
|
|
23
|
+
request_options: {}
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Retrieve a broadcast by ID. Archived broadcasts return 404.
|
|
28
|
+
sig do
|
|
29
|
+
params(
|
|
30
|
+
broadcast_id: String,
|
|
31
|
+
request_options: Courier::RequestOptions::OrHash
|
|
32
|
+
).returns(Courier::Broadcast)
|
|
33
|
+
end
|
|
34
|
+
def retrieve(broadcast_id, request_options: {})
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Update a broadcast's name. Content is edited via the broadcast's notification
|
|
38
|
+
# template, not this endpoint.
|
|
39
|
+
sig do
|
|
40
|
+
params(
|
|
41
|
+
broadcast_id: String,
|
|
42
|
+
name: String,
|
|
43
|
+
request_options: Courier::RequestOptions::OrHash
|
|
44
|
+
).returns(Courier::Broadcast)
|
|
45
|
+
end
|
|
46
|
+
def update(
|
|
47
|
+
broadcast_id,
|
|
48
|
+
# New human-readable name.
|
|
49
|
+
name:,
|
|
50
|
+
request_options: {}
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# List broadcasts in your workspace. Cursor-paginated; returns broadcasts
|
|
55
|
+
# newest-first.
|
|
56
|
+
sig do
|
|
57
|
+
params(
|
|
58
|
+
cursor: T.nilable(String),
|
|
59
|
+
limit: Integer,
|
|
60
|
+
request_options: Courier::RequestOptions::OrHash
|
|
61
|
+
).returns(Courier::BroadcastListResponse)
|
|
62
|
+
end
|
|
63
|
+
def list(
|
|
64
|
+
# Opaque pagination cursor from a previous response. Omit for the first page.
|
|
65
|
+
cursor: nil,
|
|
66
|
+
# Maximum number of results per page.
|
|
67
|
+
limit: nil,
|
|
68
|
+
request_options: {}
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Archive a broadcast. This is a soft delete — the archived broadcast is returned
|
|
73
|
+
# and no longer appears in list results.
|
|
74
|
+
sig do
|
|
75
|
+
params(
|
|
76
|
+
broadcast_id: String,
|
|
77
|
+
request_options: Courier::RequestOptions::OrHash
|
|
78
|
+
).returns(Courier::Broadcast)
|
|
79
|
+
end
|
|
80
|
+
def archive(broadcast_id, request_options: {})
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Cancel a broadcast's pending schedule, returning it to the draft state. Only
|
|
84
|
+
# valid for a scheduled broadcast.
|
|
85
|
+
sig do
|
|
86
|
+
params(
|
|
87
|
+
broadcast_id: String,
|
|
88
|
+
request_options: Courier::RequestOptions::OrHash
|
|
89
|
+
).returns(Courier::Broadcast)
|
|
90
|
+
end
|
|
91
|
+
def cancel(broadcast_id, request_options: {})
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Duplicate a broadcast (and its template) into a new draft named "{source name}
|
|
95
|
+
# (copy)".
|
|
96
|
+
sig do
|
|
97
|
+
params(
|
|
98
|
+
broadcast_id: String,
|
|
99
|
+
request_options: Courier::RequestOptions::OrHash
|
|
100
|
+
).returns(Courier::Broadcast)
|
|
101
|
+
end
|
|
102
|
+
def duplicate(broadcast_id, request_options: {})
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Author the broadcast's content by replacing the draft elemental content of its
|
|
106
|
+
# private notification template. The draft is published automatically when the
|
|
107
|
+
# broadcast is sent or scheduled.
|
|
108
|
+
sig do
|
|
109
|
+
params(
|
|
110
|
+
broadcast_id: String,
|
|
111
|
+
content: Courier::NotificationContentPutRequest::Content::OrHash,
|
|
112
|
+
state: Courier::NotificationTemplateState::OrSymbol,
|
|
113
|
+
request_options: Courier::RequestOptions::OrHash
|
|
114
|
+
).returns(Courier::NotificationContentMutationResponse)
|
|
115
|
+
end
|
|
116
|
+
def put_content(
|
|
117
|
+
broadcast_id,
|
|
118
|
+
# Elemental content payload. The server defaults `version` when omitted.
|
|
119
|
+
content:,
|
|
120
|
+
# Template state. Defaults to `DRAFT`.
|
|
121
|
+
state: nil,
|
|
122
|
+
request_options: {}
|
|
123
|
+
)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Retrieve the broadcast's content — the elemental content of its private
|
|
127
|
+
# notification template. Defaults to the working draft, since broadcast content is
|
|
128
|
+
# authored as a draft until the broadcast is sent.
|
|
129
|
+
sig do
|
|
130
|
+
params(
|
|
131
|
+
broadcast_id: String,
|
|
132
|
+
version: String,
|
|
133
|
+
request_options: Courier::RequestOptions::OrHash
|
|
134
|
+
).returns(Courier::NotificationContentGetResponse)
|
|
135
|
+
end
|
|
136
|
+
def retrieve_content(
|
|
137
|
+
broadcast_id,
|
|
138
|
+
# Accepts `draft`, `published`, or a version string (e.g. `v001`). Defaults to
|
|
139
|
+
# `draft`.
|
|
140
|
+
version: nil,
|
|
141
|
+
request_options: {}
|
|
142
|
+
)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Schedule a broadcast for a future send to a list or audience. Publishes the
|
|
146
|
+
# broadcast template first. Not allowed once the broadcast is sending or sent. For
|
|
147
|
+
# an immediate send use POST /broadcasts/{broadcastId}/send.
|
|
148
|
+
sig do
|
|
149
|
+
params(
|
|
150
|
+
broadcast_id: String,
|
|
151
|
+
recipient_id: String,
|
|
152
|
+
recipient_type:
|
|
153
|
+
Courier::ScheduleBroadcastRequest::RecipientType::OrSymbol,
|
|
154
|
+
scheduled_to: String,
|
|
155
|
+
timezone: String,
|
|
156
|
+
request_options: Courier::RequestOptions::OrHash
|
|
157
|
+
).returns(Courier::Broadcast)
|
|
158
|
+
end
|
|
159
|
+
def schedule(
|
|
160
|
+
broadcast_id,
|
|
161
|
+
# ID of the target list or audience.
|
|
162
|
+
recipient_id:,
|
|
163
|
+
# Whether the broadcast targets a list or an audience.
|
|
164
|
+
recipient_type:,
|
|
165
|
+
# Wall-clock timestamp of the future send, no timezone offset (e.g.
|
|
166
|
+
# "2026-07-21T20:00:00"). The zone is given by `timezone`.
|
|
167
|
+
scheduled_to:,
|
|
168
|
+
# IANA timezone for the scheduled send (e.g. America/New_York).
|
|
169
|
+
timezone: nil,
|
|
170
|
+
request_options: {}
|
|
171
|
+
)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Send a broadcast immediately to a list or audience. Publishes the broadcast
|
|
175
|
+
# template first. Not allowed once the broadcast is sending or sent.
|
|
176
|
+
sig do
|
|
177
|
+
params(
|
|
178
|
+
broadcast_id: String,
|
|
179
|
+
recipient_id: String,
|
|
180
|
+
recipient_type:
|
|
181
|
+
Courier::SendBroadcastRequest::RecipientType::OrSymbol,
|
|
182
|
+
request_options: Courier::RequestOptions::OrHash
|
|
183
|
+
).returns(Courier::Broadcast)
|
|
184
|
+
end
|
|
185
|
+
def send_(
|
|
186
|
+
broadcast_id,
|
|
187
|
+
# ID of the target list or audience.
|
|
188
|
+
recipient_id:,
|
|
189
|
+
# Whether the broadcast targets a list or an audience.
|
|
190
|
+
recipient_type:,
|
|
191
|
+
request_options: {}
|
|
192
|
+
)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# @api private
|
|
196
|
+
sig { params(client: Courier::Client).returns(T.attached_class) }
|
|
197
|
+
def self.new(client:)
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
end
|
data/sig/courier/client.rbs
CHANGED
|
@@ -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
|
|
@@ -32,8 +34,6 @@ module Courier
|
|
|
32
34
|
|
|
33
35
|
attr_reader lists: Courier::Resources::Lists
|
|
34
36
|
|
|
35
|
-
attr_reader inbox: Courier::Resources::Inbox
|
|
36
|
-
|
|
37
37
|
attr_reader messages: Courier::Resources::Messages
|
|
38
38
|
|
|
39
39
|
attr_reader requests: Courier::Resources::Requests
|
|
@@ -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
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type broadcast_schedule =
|
|
4
|
+
{
|
|
5
|
+
recipient_id: String,
|
|
6
|
+
recipient_type: Courier::Models::BroadcastSchedule::recipient_type,
|
|
7
|
+
scheduled_to: String?,
|
|
8
|
+
timezone: String?
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class BroadcastSchedule < Courier::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor recipient_id: String
|
|
13
|
+
|
|
14
|
+
attr_accessor recipient_type: Courier::Models::BroadcastSchedule::recipient_type
|
|
15
|
+
|
|
16
|
+
attr_accessor scheduled_to: String?
|
|
17
|
+
|
|
18
|
+
attr_accessor timezone: String?
|
|
19
|
+
|
|
20
|
+
def initialize: (
|
|
21
|
+
recipient_id: String,
|
|
22
|
+
recipient_type: Courier::Models::BroadcastSchedule::recipient_type,
|
|
23
|
+
?scheduled_to: String?,
|
|
24
|
+
?timezone: String?
|
|
25
|
+
) -> void
|
|
26
|
+
|
|
27
|
+
def to_hash: -> {
|
|
28
|
+
recipient_id: String,
|
|
29
|
+
recipient_type: Courier::Models::BroadcastSchedule::recipient_type,
|
|
30
|
+
scheduled_to: String?,
|
|
31
|
+
timezone: String?
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type recipient_type = :list | :audience
|
|
35
|
+
|
|
36
|
+
module RecipientType
|
|
37
|
+
extend Courier::Internal::Type::Enum
|
|
38
|
+
|
|
39
|
+
LIST: :list
|
|
40
|
+
AUDIENCE: :audience
|
|
41
|
+
|
|
42
|
+
def self?.values: -> ::Array[Courier::Models::BroadcastSchedule::recipient_type]
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type broadcast_schedule_params =
|
|
4
|
+
{ broadcast_id: String } & Courier::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class BroadcastScheduleParams < Courier::Models::ScheduleBroadcastRequest
|
|
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,25 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type broadcast_send_params =
|
|
4
|
+
{ broadcast_id: String } & Courier::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class BroadcastSendParams < Courier::Models::SendBroadcastRequest
|
|
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,25 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type broadcast_update_params =
|
|
4
|
+
{ broadcast_id: String } & Courier::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class BroadcastUpdateParams < Courier::Models::UpdateBroadcastRequest
|
|
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
|