trycourier 4.21.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/lib/courier/client.rb +43 -0
- data/lib/courier/models/automations/invoke_invoke_ad_hoc_params.rb +13 -1
- data/lib/courier/models/automations/invoke_invoke_by_template_params.rb +13 -1
- data/lib/courier/models/brand_create_params.rb +13 -1
- 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/inbox/message_delete_params.rb +22 -0
- data/lib/courier/models/inbox/message_restore_params.rb +22 -0
- data/lib/courier/models/journey_cancel_params.rb +13 -1
- data/lib/courier/models/journey_create_params.rb +13 -1
- data/lib/courier/models/journey_invoke_params.rb +13 -1
- data/lib/courier/models/journey_publish_params.rb +13 -1
- data/lib/courier/models/journeys/template_create_params.rb +13 -1
- data/lib/courier/models/journeys/template_publish_params.rb +13 -1
- data/lib/courier/models/lists/subscription_add_params.rb +13 -1
- data/lib/courier/models/notification_create_params.rb +13 -1
- data/lib/courier/models/notification_publish_params.rb +13 -1
- data/lib/courier/models/profile_create_params.rb +13 -1
- data/lib/courier/models/profiles/list_subscribe_params.rb +13 -1
- data/lib/courier/models/provider_create_params.rb +15 -1
- data/lib/courier/models/routing_strategy_create_params.rb +13 -1
- data/lib/courier/models/schedule_broadcast_request.rb +59 -0
- data/lib/courier/models/send_broadcast_request.rb +39 -0
- data/lib/courier/models/send_message_params.rb +15 -1
- data/lib/courier/models/update_broadcast_request.rb +18 -0
- data/lib/courier/models/users/preference_bulk_update_params.rb +15 -1
- data/lib/courier/models/users/preference_update_or_create_topic_params.rb +14 -4
- data/lib/courier/models/users/topic_preference.rb +21 -7
- data/lib/courier/models/workspace_preference_create_params.rb +13 -1
- data/lib/courier/models/workspace_preference_publish_params.rb +13 -1
- data/lib/courier/models/workspace_preferences/topic_create_params.rb +13 -1
- data/lib/courier/models.rb +38 -0
- data/lib/courier/resources/audiences.rb +12 -5
- data/lib/courier/resources/audit_events.rb +5 -2
- data/lib/courier/resources/auth.rb +5 -1
- data/lib/courier/resources/automations/invoke.rb +47 -23
- data/lib/courier/resources/automations.rb +6 -1
- data/lib/courier/resources/brands.rb +38 -12
- data/lib/courier/resources/broadcasts.rb +290 -0
- data/lib/courier/resources/digests/schedules.rb +4 -3
- data/lib/courier/resources/digests.rb +2 -0
- data/lib/courier/resources/inbound.rb +3 -1
- data/lib/courier/resources/inbox/messages.rb +58 -0
- data/lib/courier/resources/inbox.rb +19 -0
- data/lib/courier/resources/journeys/templates.rb +43 -25
- data/lib/courier/resources/journeys.rb +73 -44
- data/lib/courier/resources/lists/subscriptions.rb +22 -8
- data/lib/courier/resources/lists.rb +14 -5
- data/lib/courier/resources/messages.rb +14 -14
- data/lib/courier/resources/notifications/checks.rb +8 -3
- data/lib/courier/resources/notifications.rb +48 -30
- data/lib/courier/resources/profiles/lists.rb +19 -8
- data/lib/courier/resources/profiles.rb +25 -14
- data/lib/courier/resources/providers/catalog.rb +4 -4
- data/lib/courier/resources/providers.rb +27 -18
- data/lib/courier/resources/requests.rb +4 -1
- data/lib/courier/resources/routing_strategies.rb +24 -12
- data/lib/courier/resources/send.rb +14 -4
- data/lib/courier/resources/tenants/preferences/items.rb +6 -2
- data/lib/courier/resources/tenants/preferences.rb +2 -0
- data/lib/courier/resources/tenants/templates/versions.rb +4 -7
- data/lib/courier/resources/tenants/templates.rb +14 -19
- data/lib/courier/resources/tenants.rb +14 -5
- data/lib/courier/resources/translations.rb +6 -2
- data/lib/courier/resources/users/preferences.rb +23 -42
- data/lib/courier/resources/users/tenants.rb +12 -10
- data/lib/courier/resources/users/tokens.rb +14 -6
- data/lib/courier/resources/users.rb +6 -0
- data/lib/courier/resources/workspace_preferences/topics.rb +27 -19
- data/lib/courier/resources/workspace_preferences.rb +40 -20
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +24 -1
- data/rbi/courier/client.rbi +41 -0
- data/rbi/courier/models/automations/invoke_invoke_ad_hoc_params.rbi +18 -0
- data/rbi/courier/models/automations/invoke_invoke_by_template_params.rbi +18 -0
- data/rbi/courier/models/brand_create_params.rbi +18 -0
- 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/inbox/message_delete_params.rbi +40 -0
- data/rbi/courier/models/inbox/message_restore_params.rbi +40 -0
- data/rbi/courier/models/journey_cancel_params.rbi +31 -5
- data/rbi/courier/models/journey_create_params.rbi +31 -5
- data/rbi/courier/models/journey_invoke_params.rbi +26 -2
- data/rbi/courier/models/journey_publish_params.rbi +26 -2
- data/rbi/courier/models/journeys/template_create_params.rbi +26 -2
- data/rbi/courier/models/journeys/template_publish_params.rbi +23 -1
- data/rbi/courier/models/lists/subscription_add_params.rbi +23 -1
- data/rbi/courier/models/notification_create_params.rbi +31 -5
- data/rbi/courier/models/notification_publish_params.rbi +26 -2
- data/rbi/courier/models/profile_create_params.rbi +23 -1
- data/rbi/courier/models/profiles/list_subscribe_params.rbi +23 -1
- data/rbi/courier/models/provider_create_params.rbi +18 -0
- data/rbi/courier/models/routing_strategy_create_params.rbi +31 -5
- data/rbi/courier/models/schedule_broadcast_request.rbi +103 -0
- data/rbi/courier/models/send_broadcast_request.rbi +77 -0
- data/rbi/courier/models/send_message_params.rbi +18 -0
- data/rbi/courier/models/update_broadcast_request.rbi +28 -0
- data/rbi/courier/models/users/preference_bulk_update_params.rbi +18 -0
- data/rbi/courier/models/users/preference_update_or_create_topic_params.rbi +14 -2
- data/rbi/courier/models/users/topic_preference.rbi +24 -2
- data/rbi/courier/models/workspace_preference_create_params.rbi +31 -5
- data/rbi/courier/models/workspace_preference_publish_params.rbi +31 -5
- data/rbi/courier/models/workspace_preferences/topic_create_params.rbi +26 -2
- data/rbi/courier/models.rbi +39 -0
- data/rbi/courier/resources/audiences.rbi +12 -5
- data/rbi/courier/resources/audit_events.rbi +5 -2
- data/rbi/courier/resources/auth.rbi +5 -1
- data/rbi/courier/resources/automations/invoke.rbi +48 -7
- data/rbi/courier/resources/automations.rbi +6 -1
- data/rbi/courier/resources/brands.rbi +37 -7
- data/rbi/courier/resources/broadcasts.rbi +199 -0
- data/rbi/courier/resources/digests/schedules.rbi +4 -3
- data/rbi/courier/resources/digests.rbi +2 -0
- data/rbi/courier/resources/inbound.rbi +3 -1
- data/rbi/courier/resources/inbox/messages.rbi +44 -0
- data/rbi/courier/resources/inbox.rbi +16 -0
- data/rbi/courier/resources/journeys/templates.rbi +47 -17
- data/rbi/courier/resources/journeys.rbi +93 -39
- data/rbi/courier/resources/lists/subscriptions.rbi +24 -5
- data/rbi/courier/resources/lists.rbi +14 -5
- data/rbi/courier/resources/messages.rbi +14 -14
- data/rbi/courier/resources/notifications/checks.rbi +8 -3
- data/rbi/courier/resources/notifications.rbi +58 -28
- data/rbi/courier/resources/profiles/lists.rbi +25 -6
- data/rbi/courier/resources/profiles.rbi +31 -11
- data/rbi/courier/resources/providers/catalog.rbi +4 -4
- data/rbi/courier/resources/providers.rbi +35 -19
- data/rbi/courier/resources/requests.rbi +4 -1
- data/rbi/courier/resources/routing_strategies.rbi +26 -10
- data/rbi/courier/resources/send.rbi +20 -3
- data/rbi/courier/resources/tenants/preferences/items.rbi +6 -2
- data/rbi/courier/resources/tenants/preferences.rbi +2 -0
- data/rbi/courier/resources/tenants/templates/versions.rbi +4 -7
- data/rbi/courier/resources/tenants/templates.rbi +14 -19
- data/rbi/courier/resources/tenants.rbi +14 -5
- data/rbi/courier/resources/translations.rbi +6 -2
- data/rbi/courier/resources/users/preferences.rbi +28 -40
- data/rbi/courier/resources/users/tenants.rbi +12 -10
- data/rbi/courier/resources/users/tokens.rbi +14 -6
- data/rbi/courier/resources/users.rbi +6 -0
- data/rbi/courier/resources/workspace_preferences/topics.rbi +37 -18
- data/rbi/courier/resources/workspace_preferences.rbi +51 -17
- data/sig/courier/client.rbs +4 -0
- data/sig/courier/models/automations/invoke_invoke_ad_hoc_params.rbs +15 -1
- data/sig/courier/models/automations/invoke_invoke_by_template_params.rbs +15 -1
- data/sig/courier/models/brand_create_params.rbs +15 -1
- 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/inbox/message_delete_params.rbs +25 -0
- data/sig/courier/models/inbox/message_restore_params.rbs +25 -0
- data/sig/courier/models/journey_cancel_params.rbs +20 -3
- data/sig/courier/models/journey_create_params.rbs +20 -3
- data/sig/courier/models/journey_invoke_params.rbs +18 -1
- data/sig/courier/models/journey_publish_params.rbs +18 -1
- data/sig/courier/models/journeys/template_create_params.rbs +18 -1
- data/sig/courier/models/journeys/template_publish_params.rbs +18 -1
- data/sig/courier/models/lists/subscription_add_params.rbs +15 -1
- data/sig/courier/models/notification_create_params.rbs +20 -3
- data/sig/courier/models/notification_publish_params.rbs +18 -2
- data/sig/courier/models/profile_create_params.rbs +18 -1
- data/sig/courier/models/profiles/list_subscribe_params.rbs +15 -1
- data/sig/courier/models/provider_create_params.rbs +15 -1
- data/sig/courier/models/routing_strategy_create_params.rbs +20 -3
- data/sig/courier/models/schedule_broadcast_request.rbs +48 -0
- data/sig/courier/models/send_broadcast_request.rbs +36 -0
- data/sig/courier/models/send_message_params.rbs +17 -1
- data/sig/courier/models/update_broadcast_request.rbs +13 -0
- data/sig/courier/models/users/preference_bulk_update_params.rbs +15 -1
- data/sig/courier/models/workspace_preference_create_params.rbs +20 -3
- data/sig/courier/models/workspace_preference_publish_params.rbs +20 -3
- data/sig/courier/models/workspace_preferences/topic_create_params.rbs +18 -1
- data/sig/courier/models.rbs +38 -0
- data/sig/courier/resources/automations/invoke.rbs +4 -0
- data/sig/courier/resources/brands.rbs +2 -0
- data/sig/courier/resources/broadcasts.rbs +74 -0
- data/sig/courier/resources/inbox/messages.rbs +19 -0
- data/sig/courier/resources/inbox.rbs +9 -0
- data/sig/courier/resources/journeys/templates.rbs +4 -0
- data/sig/courier/resources/journeys.rbs +8 -0
- data/sig/courier/resources/lists/subscriptions.rbs +2 -0
- data/sig/courier/resources/notifications.rbs +4 -0
- data/sig/courier/resources/profiles/lists.rbs +2 -0
- data/sig/courier/resources/profiles.rbs +2 -0
- data/sig/courier/resources/providers.rbs +2 -0
- data/sig/courier/resources/routing_strategies.rbs +2 -0
- data/sig/courier/resources/send.rbs +2 -0
- data/sig/courier/resources/users/preferences.rbs +2 -0
- data/sig/courier/resources/workspace_preferences/topics.rbs +2 -0
- data/sig/courier/resources/workspace_preferences.rbs +4 -0
- metadata +71 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 309ea61f0125b25e2bbafb9fc11e87220259bd66b2af26971ccb657a60f24b7c
|
|
4
|
+
data.tar.gz: 529a8bf37ffa589a91591aff67e192fe4429263ab008d0f156cdf8aca00e7933
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf7596a35ed847033067727fe8699e6a22fd57e927f560b8e81fb43618bc32ca5166d571782a478ba48d6b6bed7ef16878bcc842d78fb3804c81754f169d7e8e
|
|
7
|
+
data.tar.gz: f807364e550ef500ae2a837aa7fcd657d6163dd6b71b67cd303c15e09d6f308240c08470cf69b15fcdfa96e91e818d19f65a0f2ad5518881e21b33c6fe2d96d0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.23.0 (2026-07-29)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v4.22.0...v4.23.0](https://github.com/trycourier/courier-ruby/compare/v4.22.0...v4.23.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **broadcasts:** document Broadcasts CRUD REST API ([#170](https://github.com/trycourier/courier-ruby/issues/170)) ([122e598](https://github.com/trycourier/courier-ruby/commit/122e5984cc48c30473a81fd3003c4fd899fc1cc6))
|
|
10
|
+
|
|
11
|
+
## 4.22.0 (2026-07-29)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v4.21.0...v4.22.0](https://github.com/trycourier/courier-ruby/compare/v4.21.0...v4.22.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* Document DELETE/PUT restore for inbox messages (C-19268) ([#175](https://github.com/trycourier/courier-ruby/issues/175)) ([36c1d01](https://github.com/trycourier/courier-ruby/commit/36c1d0116770621edfefe94781e72a8061e43781))
|
|
18
|
+
* spec: rename and reorder the API reference sections ([#179](https://github.com/trycourier/courier-ruby/issues/179)) ([997010e](https://github.com/trycourier/courier-ruby/commit/997010e32d3e0aed0ac138c67a8383ba1f99d416))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Documentation
|
|
22
|
+
|
|
23
|
+
* **openapi:** describe user topic-preference fields explicitly ([#172](https://github.com/trycourier/courier-ruby/issues/172)) ([c540bdb](https://github.com/trycourier/courier-ruby/commit/c540bdb855f180d850feeabf1a30ed4394092b50))
|
|
24
|
+
* **openapi:** document Idempotency-Key header on idempotent POST endpoints ([#176](https://github.com/trycourier/courier-ruby/issues/176)) ([b76b6bb](https://github.com/trycourier/courier-ruby/commit/b76b6bbbd0e856d486037d7d140b2d934eb150ea))
|
|
25
|
+
* **openapi:** rewrite operation descriptions for agents and SEO ([#174](https://github.com/trycourier/courier-ruby/issues/174)) ([8a8c25b](https://github.com/trycourier/courier-ruby/commit/8a8c25b54b9a8db2cd906ab09ac8729423fa35b8))
|
|
26
|
+
|
|
3
27
|
## 4.21.0 (2026-07-23)
|
|
4
28
|
|
|
5
29
|
Full Changelog: [v4.20.0...v4.21.0](https://github.com/trycourier/courier-ruby/compare/v4.20.0...v4.21.0)
|
data/lib/courier/client.rb
CHANGED
|
@@ -18,60 +18,101 @@ module Courier
|
|
|
18
18
|
# @return [String]
|
|
19
19
|
attr_reader :api_key
|
|
20
20
|
|
|
21
|
+
# Send a message to one or more recipients — users, lists, audiences, or tenants —
|
|
22
|
+
# across every channel you have configured.
|
|
21
23
|
# @return [Courier::Resources::Send]
|
|
22
24
|
attr_reader :send_
|
|
23
25
|
|
|
26
|
+
# Define filter-based groups whose membership Courier recalculates as user
|
|
27
|
+
# profiles change.
|
|
24
28
|
# @return [Courier::Resources::Audiences]
|
|
25
29
|
attr_reader :audiences
|
|
26
30
|
|
|
31
|
+
# Configure the channel providers Courier delivers through, and browse the
|
|
32
|
+
# provider types it supports.
|
|
27
33
|
# @return [Courier::Resources::Providers]
|
|
28
34
|
attr_reader :providers
|
|
29
35
|
|
|
36
|
+
# Read the audit trail of configuration and access changes in your workspace.
|
|
30
37
|
# @return [Courier::Resources::AuditEvents]
|
|
31
38
|
attr_reader :audit_events
|
|
32
39
|
|
|
40
|
+
# Issue scoped, short-lived JWTs so client-side SDKs — Inbox, Preferences, and the
|
|
41
|
+
# embedded designer — can call Courier as a single user. Server-side requests
|
|
42
|
+
# authenticate with your workspace API key instead.
|
|
33
43
|
# @return [Courier::Resources::Auth]
|
|
34
44
|
attr_reader :auth
|
|
35
45
|
|
|
46
|
+
# Invoke a stored automation template or an ad hoc automation defined in the
|
|
47
|
+
# request.
|
|
36
48
|
# @return [Courier::Resources::Automations]
|
|
37
49
|
attr_reader :automations
|
|
38
50
|
|
|
51
|
+
# Build, version, publish, invoke, and cancel multi-step notification workflows,
|
|
52
|
+
# along with the templates scoped to them.
|
|
39
53
|
# @return [Courier::Resources::Journeys]
|
|
40
54
|
attr_reader :journeys
|
|
41
55
|
|
|
56
|
+
# @return [Courier::Resources::Broadcasts]
|
|
57
|
+
attr_reader :broadcasts
|
|
58
|
+
|
|
59
|
+
# Manage the logos, colors, and layout that give the templates you send a
|
|
60
|
+
# consistent look.
|
|
42
61
|
# @return [Courier::Resources::Brands]
|
|
43
62
|
attr_reader :brands
|
|
44
63
|
|
|
45
64
|
# @return [Courier::Resources::Digests]
|
|
46
65
|
attr_reader :digests
|
|
47
66
|
|
|
67
|
+
# Record an inbound event that triggers the journeys and automations mapped to it.
|
|
48
68
|
# @return [Courier::Resources::Inbound]
|
|
49
69
|
attr_reader :inbound
|
|
50
70
|
|
|
71
|
+
# Manage static groups of users that you subscribe explicitly, and send to them by
|
|
72
|
+
# list id or list pattern.
|
|
51
73
|
# @return [Courier::Resources::Lists]
|
|
52
74
|
attr_reader :lists
|
|
53
75
|
|
|
76
|
+
# @return [Courier::Resources::Inbox]
|
|
77
|
+
attr_reader :inbox
|
|
78
|
+
|
|
79
|
+
# Look up the messages Courier has accepted, inspect their delivery history and
|
|
80
|
+
# rendered output, and cancel, resend, or archive them.
|
|
54
81
|
# @return [Courier::Resources::Messages]
|
|
55
82
|
attr_reader :messages
|
|
56
83
|
|
|
84
|
+
# Look up the messages Courier has accepted, inspect their delivery history and
|
|
85
|
+
# rendered output, and cancel, resend, or archive them.
|
|
57
86
|
# @return [Courier::Resources::Requests]
|
|
58
87
|
attr_reader :requests
|
|
59
88
|
|
|
89
|
+
# Create, update, version, publish, and localize notification templates and their
|
|
90
|
+
# content.
|
|
60
91
|
# @return [Courier::Resources::Notifications]
|
|
61
92
|
attr_reader :notifications
|
|
62
93
|
|
|
94
|
+
# Define reusable channel routing and failover strategies, and see which templates
|
|
95
|
+
# use them.
|
|
63
96
|
# @return [Courier::Resources::RoutingStrategies]
|
|
64
97
|
attr_reader :routing_strategies
|
|
65
98
|
|
|
99
|
+
# Manage the workspace catalog of subscription topics, the sections that group
|
|
100
|
+
# them, and publishing the preference page.
|
|
66
101
|
# @return [Courier::Resources::WorkspacePreferences]
|
|
67
102
|
attr_reader :workspace_preferences
|
|
68
103
|
|
|
104
|
+
# Store the contact information Courier delivers to for each user — email, phone
|
|
105
|
+
# number, push tokens, and any custom data you send to.
|
|
69
106
|
# @return [Courier::Resources::Profiles]
|
|
70
107
|
attr_reader :profiles
|
|
71
108
|
|
|
109
|
+
# Manage tenants — the organizations, teams, or accounts your users belong to —
|
|
110
|
+
# along with their users and default preferences.
|
|
72
111
|
# @return [Courier::Resources::Tenants]
|
|
73
112
|
attr_reader :tenants
|
|
74
113
|
|
|
114
|
+
# Store and retrieve the translation strings Courier uses to render localized
|
|
115
|
+
# template content.
|
|
75
116
|
# @return [Courier::Resources::Translations]
|
|
76
117
|
attr_reader :translations
|
|
77
118
|
|
|
@@ -146,10 +187,12 @@ module Courier
|
|
|
146
187
|
@auth = Courier::Resources::Auth.new(client: self)
|
|
147
188
|
@automations = Courier::Resources::Automations.new(client: self)
|
|
148
189
|
@journeys = Courier::Resources::Journeys.new(client: self)
|
|
190
|
+
@broadcasts = Courier::Resources::Broadcasts.new(client: self)
|
|
149
191
|
@brands = Courier::Resources::Brands.new(client: self)
|
|
150
192
|
@digests = Courier::Resources::Digests.new(client: self)
|
|
151
193
|
@inbound = Courier::Resources::Inbound.new(client: self)
|
|
152
194
|
@lists = Courier::Resources::Lists.new(client: self)
|
|
195
|
+
@inbox = Courier::Resources::Inbox.new(client: self)
|
|
153
196
|
@messages = Courier::Resources::Messages.new(client: self)
|
|
154
197
|
@requests = Courier::Resources::Requests.new(client: self)
|
|
155
198
|
@notifications = Courier::Resources::Notifications.new(client: self)
|
|
@@ -38,13 +38,25 @@ module Courier
|
|
|
38
38
|
# @return [String, nil]
|
|
39
39
|
optional :template, String, nil?: true
|
|
40
40
|
|
|
41
|
-
# @!
|
|
41
|
+
# @!attribute idempotency_key
|
|
42
|
+
#
|
|
43
|
+
# @return [String, nil]
|
|
44
|
+
optional :idempotency_key, String
|
|
45
|
+
|
|
46
|
+
# @!attribute x_idempotency_expiration
|
|
47
|
+
#
|
|
48
|
+
# @return [String, nil]
|
|
49
|
+
optional :x_idempotency_expiration, String
|
|
50
|
+
|
|
51
|
+
# @!method initialize(automation:, brand: nil, data: nil, profile: nil, recipient: nil, template: nil, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
|
|
42
52
|
# @param automation [Courier::Models::Automations::InvokeInvokeAdHocParams::Automation]
|
|
43
53
|
# @param brand [String, nil]
|
|
44
54
|
# @param data [Hash{Symbol=>Object}, nil]
|
|
45
55
|
# @param profile [Hash{Symbol=>Object}, nil]
|
|
46
56
|
# @param recipient [String, nil]
|
|
47
57
|
# @param template [String, nil]
|
|
58
|
+
# @param idempotency_key [String]
|
|
59
|
+
# @param x_idempotency_expiration [String]
|
|
48
60
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
49
61
|
|
|
50
62
|
class Automation < Courier::Internal::Type::BaseModel
|
|
@@ -38,13 +38,25 @@ module Courier
|
|
|
38
38
|
# @return [String, nil]
|
|
39
39
|
optional :template, String, nil?: true
|
|
40
40
|
|
|
41
|
-
# @!
|
|
41
|
+
# @!attribute idempotency_key
|
|
42
|
+
#
|
|
43
|
+
# @return [String, nil]
|
|
44
|
+
optional :idempotency_key, String
|
|
45
|
+
|
|
46
|
+
# @!attribute x_idempotency_expiration
|
|
47
|
+
#
|
|
48
|
+
# @return [String, nil]
|
|
49
|
+
optional :x_idempotency_expiration, String
|
|
50
|
+
|
|
51
|
+
# @!method initialize(template_id:, recipient:, brand: nil, data: nil, profile: nil, template: nil, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
|
|
42
52
|
# @param template_id [String]
|
|
43
53
|
# @param recipient [String, nil]
|
|
44
54
|
# @param brand [String, nil]
|
|
45
55
|
# @param data [Hash{Symbol=>Object}, nil]
|
|
46
56
|
# @param profile [Hash{Symbol=>Object}, nil]
|
|
47
57
|
# @param template [String, nil]
|
|
58
|
+
# @param idempotency_key [String]
|
|
59
|
+
# @param x_idempotency_expiration [String]
|
|
48
60
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
49
61
|
end
|
|
50
62
|
end
|
|
@@ -27,11 +27,23 @@ module Courier
|
|
|
27
27
|
# @return [Courier::Models::BrandSnippets, nil]
|
|
28
28
|
optional :snippets, -> { Courier::BrandSnippets }, nil?: true
|
|
29
29
|
|
|
30
|
-
# @!
|
|
30
|
+
# @!attribute idempotency_key
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
optional :idempotency_key, String
|
|
34
|
+
|
|
35
|
+
# @!attribute x_idempotency_expiration
|
|
36
|
+
#
|
|
37
|
+
# @return [String, nil]
|
|
38
|
+
optional :x_idempotency_expiration, String
|
|
39
|
+
|
|
40
|
+
# @!method initialize(name:, settings:, id: nil, snippets: nil, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
|
|
31
41
|
# @param name [String]
|
|
32
42
|
# @param settings [Courier::Models::BrandSettings]
|
|
33
43
|
# @param id [String, nil]
|
|
34
44
|
# @param snippets [Courier::Models::BrandSnippets, nil]
|
|
45
|
+
# @param idempotency_key [String]
|
|
46
|
+
# @param x_idempotency_expiration [String]
|
|
35
47
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
36
48
|
end
|
|
37
49
|
end
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#create
|
|
6
|
+
class Broadcast < Courier::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The broadcast ID (bst\_ prefix).
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute channel
|
|
14
|
+
# The broadcast's delivery channel.
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, Courier::Models::Broadcast::Channel]
|
|
17
|
+
required :channel, enum: -> { Courier::Broadcast::Channel }
|
|
18
|
+
|
|
19
|
+
# @!attribute created_at
|
|
20
|
+
# ISO 8601 timestamp when the broadcast was created.
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
required :created_at, String
|
|
24
|
+
|
|
25
|
+
# @!attribute created_by
|
|
26
|
+
# Actor that created the broadcast.
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :created_by, String
|
|
30
|
+
|
|
31
|
+
# @!attribute name
|
|
32
|
+
# Human-readable name.
|
|
33
|
+
#
|
|
34
|
+
# @return [String]
|
|
35
|
+
required :name, String
|
|
36
|
+
|
|
37
|
+
# @!attribute status
|
|
38
|
+
# Lifecycle status of the broadcast.
|
|
39
|
+
#
|
|
40
|
+
# @return [Symbol, Courier::Models::Broadcast::Status]
|
|
41
|
+
required :status, enum: -> { Courier::Broadcast::Status }
|
|
42
|
+
|
|
43
|
+
# @!attribute updated_at
|
|
44
|
+
# ISO 8601 timestamp of the last update.
|
|
45
|
+
#
|
|
46
|
+
# @return [String]
|
|
47
|
+
required :updated_at, String
|
|
48
|
+
|
|
49
|
+
# @!attribute updated_by
|
|
50
|
+
# Actor that last updated the broadcast.
|
|
51
|
+
#
|
|
52
|
+
# @return [String]
|
|
53
|
+
required :updated_by, String
|
|
54
|
+
|
|
55
|
+
# @!attribute archived_at
|
|
56
|
+
# ISO 8601 timestamp when the broadcast was archived, if archived.
|
|
57
|
+
#
|
|
58
|
+
# @return [String, nil]
|
|
59
|
+
optional :archived_at, String, nil?: true
|
|
60
|
+
|
|
61
|
+
# @!attribute archived_by
|
|
62
|
+
# Actor that archived the broadcast, if archived.
|
|
63
|
+
#
|
|
64
|
+
# @return [String, nil]
|
|
65
|
+
optional :archived_by, String, nil?: true
|
|
66
|
+
|
|
67
|
+
# @!attribute schedule
|
|
68
|
+
# The delivery schedule and recipient targeting for a broadcast.
|
|
69
|
+
#
|
|
70
|
+
# @return [Courier::Models::BroadcastSchedule, nil]
|
|
71
|
+
optional :schedule, -> { Courier::BroadcastSchedule }, nil?: true
|
|
72
|
+
|
|
73
|
+
# @!method initialize(id:, channel:, created_at:, created_by:, name:, status:, updated_at:, updated_by:, archived_at: nil, archived_by: nil, schedule: nil)
|
|
74
|
+
# A broadcast — a single-channel message delivered to a known set of recipients (a
|
|
75
|
+
# list or audience).
|
|
76
|
+
#
|
|
77
|
+
# @param id [String] The broadcast ID (bst\_ prefix).
|
|
78
|
+
#
|
|
79
|
+
# @param channel [Symbol, Courier::Models::Broadcast::Channel] The broadcast's delivery channel.
|
|
80
|
+
#
|
|
81
|
+
# @param created_at [String] ISO 8601 timestamp when the broadcast was created.
|
|
82
|
+
#
|
|
83
|
+
# @param created_by [String] Actor that created the broadcast.
|
|
84
|
+
#
|
|
85
|
+
# @param name [String] Human-readable name.
|
|
86
|
+
#
|
|
87
|
+
# @param status [Symbol, Courier::Models::Broadcast::Status] Lifecycle status of the broadcast.
|
|
88
|
+
#
|
|
89
|
+
# @param updated_at [String] ISO 8601 timestamp of the last update.
|
|
90
|
+
#
|
|
91
|
+
# @param updated_by [String] Actor that last updated the broadcast.
|
|
92
|
+
#
|
|
93
|
+
# @param archived_at [String, nil] ISO 8601 timestamp when the broadcast was archived, if archived.
|
|
94
|
+
#
|
|
95
|
+
# @param archived_by [String, nil] Actor that archived the broadcast, if archived.
|
|
96
|
+
#
|
|
97
|
+
# @param schedule [Courier::Models::BroadcastSchedule, nil] The delivery schedule and recipient targeting for a broadcast.
|
|
98
|
+
|
|
99
|
+
# The broadcast's delivery channel.
|
|
100
|
+
#
|
|
101
|
+
# @see Courier::Models::Broadcast#channel
|
|
102
|
+
module Channel
|
|
103
|
+
extend Courier::Internal::Type::Enum
|
|
104
|
+
|
|
105
|
+
EMAIL = :email
|
|
106
|
+
SMS = :sms
|
|
107
|
+
PUSH = :push
|
|
108
|
+
INBOX = :inbox
|
|
109
|
+
SLACK = :slack
|
|
110
|
+
MSTEAMS = :msteams
|
|
111
|
+
|
|
112
|
+
# @!method self.values
|
|
113
|
+
# @return [Array<Symbol>]
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Lifecycle status of the broadcast.
|
|
117
|
+
#
|
|
118
|
+
# @see Courier::Models::Broadcast#status
|
|
119
|
+
module Status
|
|
120
|
+
extend Courier::Internal::Type::Enum
|
|
121
|
+
|
|
122
|
+
DRAFT = :draft
|
|
123
|
+
SCHEDULED = :scheduled
|
|
124
|
+
SENDING = :sending
|
|
125
|
+
SENT = :sent
|
|
126
|
+
|
|
127
|
+
# @!method self.values
|
|
128
|
+
# @return [Array<Symbol>]
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#archive
|
|
6
|
+
class BroadcastArchiveParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(broadcast_id:, request_options: {})
|
|
16
|
+
# @param broadcast_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#cancel
|
|
6
|
+
class BroadcastCancelParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(broadcast_id:, request_options: {})
|
|
16
|
+
# @param broadcast_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#create
|
|
6
|
+
class BroadcastCreateParams < Courier::Models::CreateBroadcastRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#duplicate
|
|
6
|
+
class BroadcastDuplicateParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(broadcast_id:, request_options: {})
|
|
16
|
+
# @param broadcast_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#list
|
|
6
|
+
class BroadcastListParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute cursor
|
|
11
|
+
# Opaque pagination cursor from a previous response. Omit for the first page.
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
optional :cursor, String, nil?: true
|
|
15
|
+
|
|
16
|
+
# @!attribute limit
|
|
17
|
+
# Maximum number of results per page.
|
|
18
|
+
#
|
|
19
|
+
# @return [Integer, nil]
|
|
20
|
+
optional :limit, Integer
|
|
21
|
+
|
|
22
|
+
# @!method initialize(cursor: nil, limit: nil, request_options: {})
|
|
23
|
+
# @param cursor [String, nil] Opaque pagination cursor from a previous response. Omit for the first page.
|
|
24
|
+
#
|
|
25
|
+
# @param limit [Integer] Maximum number of results per page.
|
|
26
|
+
#
|
|
27
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#list
|
|
6
|
+
class BroadcastListResponse < Courier::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute paging
|
|
8
|
+
#
|
|
9
|
+
# @return [Courier::Models::Paging]
|
|
10
|
+
required :paging, -> { Courier::Paging }
|
|
11
|
+
|
|
12
|
+
# @!attribute results
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<Courier::Models::Broadcast>]
|
|
15
|
+
required :results, -> { Courier::Internal::Type::ArrayOf[Courier::Broadcast] }
|
|
16
|
+
|
|
17
|
+
# @!method initialize(paging:, results:)
|
|
18
|
+
# Paginated list of broadcasts.
|
|
19
|
+
#
|
|
20
|
+
# @param paging [Courier::Models::Paging]
|
|
21
|
+
# @param results [Array<Courier::Models::Broadcast>]
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#put_content
|
|
6
|
+
class BroadcastPutContentParams < Courier::Models::NotificationContentPutRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(broadcast_id:, request_options: {})
|
|
16
|
+
# @param broadcast_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#retrieve_content
|
|
6
|
+
class BroadcastRetrieveContentParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute version
|
|
16
|
+
# Accepts `draft`, `published`, or a version string (e.g. `v001`). Defaults to
|
|
17
|
+
# `draft`.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :version, String
|
|
21
|
+
|
|
22
|
+
# @!method initialize(broadcast_id:, version: nil, request_options: {})
|
|
23
|
+
# Some parameter documentations has been truncated, see
|
|
24
|
+
# {Courier::Models::BroadcastRetrieveContentParams} for more details.
|
|
25
|
+
#
|
|
26
|
+
# @param broadcast_id [String]
|
|
27
|
+
#
|
|
28
|
+
# @param version [String] Accepts `draft`, `published`, or a version string (e.g. `v001`). Defaults to `dr
|
|
29
|
+
#
|
|
30
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#retrieve
|
|
6
|
+
class BroadcastRetrieveParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(broadcast_id:, request_options: {})
|
|
16
|
+
# @param broadcast_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class BroadcastSchedule < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute recipient_id
|
|
7
|
+
# ID of the target list or audience.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :recipient_id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute recipient_type
|
|
13
|
+
# Whether the broadcast targets a list or an audience.
|
|
14
|
+
#
|
|
15
|
+
# @return [Symbol, Courier::Models::BroadcastSchedule::RecipientType]
|
|
16
|
+
required :recipient_type, enum: -> { Courier::BroadcastSchedule::RecipientType }
|
|
17
|
+
|
|
18
|
+
# @!attribute scheduled_to
|
|
19
|
+
# Wall-clock timestamp of the scheduled send, no timezone offset (e.g.
|
|
20
|
+
# "2026-07-21T20:00:00").
|
|
21
|
+
#
|
|
22
|
+
# @return [String, nil]
|
|
23
|
+
optional :scheduled_to, String, nil?: true
|
|
24
|
+
|
|
25
|
+
# @!attribute timezone
|
|
26
|
+
# IANA timezone for the scheduled send (e.g. America/New_York).
|
|
27
|
+
#
|
|
28
|
+
# @return [String, nil]
|
|
29
|
+
optional :timezone, String, nil?: true
|
|
30
|
+
|
|
31
|
+
# @!method initialize(recipient_id:, recipient_type:, scheduled_to: nil, timezone: nil)
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Courier::Models::BroadcastSchedule} for more details.
|
|
34
|
+
#
|
|
35
|
+
# The delivery schedule and recipient targeting for a broadcast.
|
|
36
|
+
#
|
|
37
|
+
# @param recipient_id [String] ID of the target list or audience.
|
|
38
|
+
#
|
|
39
|
+
# @param recipient_type [Symbol, Courier::Models::BroadcastSchedule::RecipientType] Whether the broadcast targets a list or an audience.
|
|
40
|
+
#
|
|
41
|
+
# @param scheduled_to [String, nil] Wall-clock timestamp of the scheduled send, no timezone offset (e.g. "2026-07-21
|
|
42
|
+
#
|
|
43
|
+
# @param timezone [String, nil] IANA timezone for the scheduled send (e.g. America/New_York).
|
|
44
|
+
|
|
45
|
+
# Whether the broadcast targets a list or an audience.
|
|
46
|
+
#
|
|
47
|
+
# @see Courier::Models::BroadcastSchedule#recipient_type
|
|
48
|
+
module RecipientType
|
|
49
|
+
extend Courier::Internal::Type::Enum
|
|
50
|
+
|
|
51
|
+
LIST = :list
|
|
52
|
+
AUDIENCE = :audience
|
|
53
|
+
|
|
54
|
+
# @!method self.values
|
|
55
|
+
# @return [Array<Symbol>]
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#schedule
|
|
6
|
+
class BroadcastScheduleParams < Courier::Models::ScheduleBroadcastRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(broadcast_id:, request_options: {})
|
|
16
|
+
# @param broadcast_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|