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.
Files changed (231) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/lib/courier/client.rb +43 -0
  4. data/lib/courier/models/automations/invoke_invoke_ad_hoc_params.rb +13 -1
  5. data/lib/courier/models/automations/invoke_invoke_by_template_params.rb +13 -1
  6. data/lib/courier/models/brand_create_params.rb +13 -1
  7. data/lib/courier/models/broadcast.rb +132 -0
  8. data/lib/courier/models/broadcast_archive_params.rb +20 -0
  9. data/lib/courier/models/broadcast_cancel_params.rb +20 -0
  10. data/lib/courier/models/broadcast_create_params.rb +14 -0
  11. data/lib/courier/models/broadcast_duplicate_params.rb +20 -0
  12. data/lib/courier/models/broadcast_list_params.rb +30 -0
  13. data/lib/courier/models/broadcast_list_response.rb +24 -0
  14. data/lib/courier/models/broadcast_put_content_params.rb +20 -0
  15. data/lib/courier/models/broadcast_retrieve_content_params.rb +33 -0
  16. data/lib/courier/models/broadcast_retrieve_params.rb +20 -0
  17. data/lib/courier/models/broadcast_schedule.rb +59 -0
  18. data/lib/courier/models/broadcast_schedule_params.rb +20 -0
  19. data/lib/courier/models/broadcast_send_params.rb +20 -0
  20. data/lib/courier/models/broadcast_update_params.rb +20 -0
  21. data/lib/courier/models/create_broadcast_request.rb +43 -0
  22. data/lib/courier/models/inbox/message_delete_params.rb +22 -0
  23. data/lib/courier/models/inbox/message_restore_params.rb +22 -0
  24. data/lib/courier/models/journey_cancel_params.rb +13 -1
  25. data/lib/courier/models/journey_create_params.rb +13 -1
  26. data/lib/courier/models/journey_invoke_params.rb +13 -1
  27. data/lib/courier/models/journey_publish_params.rb +13 -1
  28. data/lib/courier/models/journeys/template_create_params.rb +13 -1
  29. data/lib/courier/models/journeys/template_publish_params.rb +13 -1
  30. data/lib/courier/models/lists/subscription_add_params.rb +13 -1
  31. data/lib/courier/models/notification_create_params.rb +13 -1
  32. data/lib/courier/models/notification_publish_params.rb +13 -1
  33. data/lib/courier/models/profile_create_params.rb +13 -1
  34. data/lib/courier/models/profiles/list_subscribe_params.rb +13 -1
  35. data/lib/courier/models/provider_create_params.rb +15 -1
  36. data/lib/courier/models/routing_strategy_create_params.rb +13 -1
  37. data/lib/courier/models/schedule_broadcast_request.rb +59 -0
  38. data/lib/courier/models/send_broadcast_request.rb +39 -0
  39. data/lib/courier/models/send_message_params.rb +15 -1
  40. data/lib/courier/models/update_broadcast_request.rb +18 -0
  41. data/lib/courier/models/users/preference_bulk_update_params.rb +15 -1
  42. data/lib/courier/models/users/preference_update_or_create_topic_params.rb +14 -4
  43. data/lib/courier/models/users/topic_preference.rb +21 -7
  44. data/lib/courier/models/workspace_preference_create_params.rb +13 -1
  45. data/lib/courier/models/workspace_preference_publish_params.rb +13 -1
  46. data/lib/courier/models/workspace_preferences/topic_create_params.rb +13 -1
  47. data/lib/courier/models.rb +38 -0
  48. data/lib/courier/resources/audiences.rb +12 -5
  49. data/lib/courier/resources/audit_events.rb +5 -2
  50. data/lib/courier/resources/auth.rb +5 -1
  51. data/lib/courier/resources/automations/invoke.rb +47 -23
  52. data/lib/courier/resources/automations.rb +6 -1
  53. data/lib/courier/resources/brands.rb +38 -12
  54. data/lib/courier/resources/broadcasts.rb +290 -0
  55. data/lib/courier/resources/digests/schedules.rb +4 -3
  56. data/lib/courier/resources/digests.rb +2 -0
  57. data/lib/courier/resources/inbound.rb +3 -1
  58. data/lib/courier/resources/inbox/messages.rb +58 -0
  59. data/lib/courier/resources/inbox.rb +19 -0
  60. data/lib/courier/resources/journeys/templates.rb +43 -25
  61. data/lib/courier/resources/journeys.rb +73 -44
  62. data/lib/courier/resources/lists/subscriptions.rb +22 -8
  63. data/lib/courier/resources/lists.rb +14 -5
  64. data/lib/courier/resources/messages.rb +14 -14
  65. data/lib/courier/resources/notifications/checks.rb +8 -3
  66. data/lib/courier/resources/notifications.rb +48 -30
  67. data/lib/courier/resources/profiles/lists.rb +19 -8
  68. data/lib/courier/resources/profiles.rb +25 -14
  69. data/lib/courier/resources/providers/catalog.rb +4 -4
  70. data/lib/courier/resources/providers.rb +27 -18
  71. data/lib/courier/resources/requests.rb +4 -1
  72. data/lib/courier/resources/routing_strategies.rb +24 -12
  73. data/lib/courier/resources/send.rb +14 -4
  74. data/lib/courier/resources/tenants/preferences/items.rb +6 -2
  75. data/lib/courier/resources/tenants/preferences.rb +2 -0
  76. data/lib/courier/resources/tenants/templates/versions.rb +4 -7
  77. data/lib/courier/resources/tenants/templates.rb +14 -19
  78. data/lib/courier/resources/tenants.rb +14 -5
  79. data/lib/courier/resources/translations.rb +6 -2
  80. data/lib/courier/resources/users/preferences.rb +23 -42
  81. data/lib/courier/resources/users/tenants.rb +12 -10
  82. data/lib/courier/resources/users/tokens.rb +14 -6
  83. data/lib/courier/resources/users.rb +6 -0
  84. data/lib/courier/resources/workspace_preferences/topics.rb +27 -19
  85. data/lib/courier/resources/workspace_preferences.rb +40 -20
  86. data/lib/courier/version.rb +1 -1
  87. data/lib/courier.rb +24 -1
  88. data/rbi/courier/client.rbi +41 -0
  89. data/rbi/courier/models/automations/invoke_invoke_ad_hoc_params.rbi +18 -0
  90. data/rbi/courier/models/automations/invoke_invoke_by_template_params.rbi +18 -0
  91. data/rbi/courier/models/brand_create_params.rbi +18 -0
  92. data/rbi/courier/models/broadcast.rbi +164 -0
  93. data/rbi/courier/models/broadcast_archive_params.rbi +35 -0
  94. data/rbi/courier/models/broadcast_cancel_params.rbi +35 -0
  95. data/rbi/courier/models/broadcast_create_params.rbi +27 -0
  96. data/rbi/courier/models/broadcast_duplicate_params.rbi +35 -0
  97. data/rbi/courier/models/broadcast_list_params.rbi +54 -0
  98. data/rbi/courier/models/broadcast_list_response.rbi +39 -0
  99. data/rbi/courier/models/broadcast_put_content_params.rbi +35 -0
  100. data/rbi/courier/models/broadcast_retrieve_content_params.rbi +57 -0
  101. data/rbi/courier/models/broadcast_retrieve_params.rbi +35 -0
  102. data/rbi/courier/models/broadcast_schedule.rbi +92 -0
  103. data/rbi/courier/models/broadcast_schedule_params.rbi +35 -0
  104. data/rbi/courier/models/broadcast_send_params.rbi +35 -0
  105. data/rbi/courier/models/broadcast_update_params.rbi +35 -0
  106. data/rbi/courier/models/create_broadcast_request.rbi +81 -0
  107. data/rbi/courier/models/inbox/message_delete_params.rbi +40 -0
  108. data/rbi/courier/models/inbox/message_restore_params.rbi +40 -0
  109. data/rbi/courier/models/journey_cancel_params.rbi +31 -5
  110. data/rbi/courier/models/journey_create_params.rbi +31 -5
  111. data/rbi/courier/models/journey_invoke_params.rbi +26 -2
  112. data/rbi/courier/models/journey_publish_params.rbi +26 -2
  113. data/rbi/courier/models/journeys/template_create_params.rbi +26 -2
  114. data/rbi/courier/models/journeys/template_publish_params.rbi +23 -1
  115. data/rbi/courier/models/lists/subscription_add_params.rbi +23 -1
  116. data/rbi/courier/models/notification_create_params.rbi +31 -5
  117. data/rbi/courier/models/notification_publish_params.rbi +26 -2
  118. data/rbi/courier/models/profile_create_params.rbi +23 -1
  119. data/rbi/courier/models/profiles/list_subscribe_params.rbi +23 -1
  120. data/rbi/courier/models/provider_create_params.rbi +18 -0
  121. data/rbi/courier/models/routing_strategy_create_params.rbi +31 -5
  122. data/rbi/courier/models/schedule_broadcast_request.rbi +103 -0
  123. data/rbi/courier/models/send_broadcast_request.rbi +77 -0
  124. data/rbi/courier/models/send_message_params.rbi +18 -0
  125. data/rbi/courier/models/update_broadcast_request.rbi +28 -0
  126. data/rbi/courier/models/users/preference_bulk_update_params.rbi +18 -0
  127. data/rbi/courier/models/users/preference_update_or_create_topic_params.rbi +14 -2
  128. data/rbi/courier/models/users/topic_preference.rbi +24 -2
  129. data/rbi/courier/models/workspace_preference_create_params.rbi +31 -5
  130. data/rbi/courier/models/workspace_preference_publish_params.rbi +31 -5
  131. data/rbi/courier/models/workspace_preferences/topic_create_params.rbi +26 -2
  132. data/rbi/courier/models.rbi +39 -0
  133. data/rbi/courier/resources/audiences.rbi +12 -5
  134. data/rbi/courier/resources/audit_events.rbi +5 -2
  135. data/rbi/courier/resources/auth.rbi +5 -1
  136. data/rbi/courier/resources/automations/invoke.rbi +48 -7
  137. data/rbi/courier/resources/automations.rbi +6 -1
  138. data/rbi/courier/resources/brands.rbi +37 -7
  139. data/rbi/courier/resources/broadcasts.rbi +199 -0
  140. data/rbi/courier/resources/digests/schedules.rbi +4 -3
  141. data/rbi/courier/resources/digests.rbi +2 -0
  142. data/rbi/courier/resources/inbound.rbi +3 -1
  143. data/rbi/courier/resources/inbox/messages.rbi +44 -0
  144. data/rbi/courier/resources/inbox.rbi +16 -0
  145. data/rbi/courier/resources/journeys/templates.rbi +47 -17
  146. data/rbi/courier/resources/journeys.rbi +93 -39
  147. data/rbi/courier/resources/lists/subscriptions.rbi +24 -5
  148. data/rbi/courier/resources/lists.rbi +14 -5
  149. data/rbi/courier/resources/messages.rbi +14 -14
  150. data/rbi/courier/resources/notifications/checks.rbi +8 -3
  151. data/rbi/courier/resources/notifications.rbi +58 -28
  152. data/rbi/courier/resources/profiles/lists.rbi +25 -6
  153. data/rbi/courier/resources/profiles.rbi +31 -11
  154. data/rbi/courier/resources/providers/catalog.rbi +4 -4
  155. data/rbi/courier/resources/providers.rbi +35 -19
  156. data/rbi/courier/resources/requests.rbi +4 -1
  157. data/rbi/courier/resources/routing_strategies.rbi +26 -10
  158. data/rbi/courier/resources/send.rbi +20 -3
  159. data/rbi/courier/resources/tenants/preferences/items.rbi +6 -2
  160. data/rbi/courier/resources/tenants/preferences.rbi +2 -0
  161. data/rbi/courier/resources/tenants/templates/versions.rbi +4 -7
  162. data/rbi/courier/resources/tenants/templates.rbi +14 -19
  163. data/rbi/courier/resources/tenants.rbi +14 -5
  164. data/rbi/courier/resources/translations.rbi +6 -2
  165. data/rbi/courier/resources/users/preferences.rbi +28 -40
  166. data/rbi/courier/resources/users/tenants.rbi +12 -10
  167. data/rbi/courier/resources/users/tokens.rbi +14 -6
  168. data/rbi/courier/resources/users.rbi +6 -0
  169. data/rbi/courier/resources/workspace_preferences/topics.rbi +37 -18
  170. data/rbi/courier/resources/workspace_preferences.rbi +51 -17
  171. data/sig/courier/client.rbs +4 -0
  172. data/sig/courier/models/automations/invoke_invoke_ad_hoc_params.rbs +15 -1
  173. data/sig/courier/models/automations/invoke_invoke_by_template_params.rbs +15 -1
  174. data/sig/courier/models/brand_create_params.rbs +15 -1
  175. data/sig/courier/models/broadcast.rbs +98 -0
  176. data/sig/courier/models/broadcast_archive_params.rbs +23 -0
  177. data/sig/courier/models/broadcast_cancel_params.rbs +23 -0
  178. data/sig/courier/models/broadcast_create_params.rbs +15 -0
  179. data/sig/courier/models/broadcast_duplicate_params.rbs +23 -0
  180. data/sig/courier/models/broadcast_list_params.rbs +30 -0
  181. data/sig/courier/models/broadcast_list_response.rbs +22 -0
  182. data/sig/courier/models/broadcast_put_content_params.rbs +25 -0
  183. data/sig/courier/models/broadcast_retrieve_content_params.rbs +30 -0
  184. data/sig/courier/models/broadcast_retrieve_params.rbs +23 -0
  185. data/sig/courier/models/broadcast_schedule.rbs +46 -0
  186. data/sig/courier/models/broadcast_schedule_params.rbs +25 -0
  187. data/sig/courier/models/broadcast_send_params.rbs +25 -0
  188. data/sig/courier/models/broadcast_update_params.rbs +25 -0
  189. data/sig/courier/models/create_broadcast_request.rbs +40 -0
  190. data/sig/courier/models/inbox/message_delete_params.rbs +25 -0
  191. data/sig/courier/models/inbox/message_restore_params.rbs +25 -0
  192. data/sig/courier/models/journey_cancel_params.rbs +20 -3
  193. data/sig/courier/models/journey_create_params.rbs +20 -3
  194. data/sig/courier/models/journey_invoke_params.rbs +18 -1
  195. data/sig/courier/models/journey_publish_params.rbs +18 -1
  196. data/sig/courier/models/journeys/template_create_params.rbs +18 -1
  197. data/sig/courier/models/journeys/template_publish_params.rbs +18 -1
  198. data/sig/courier/models/lists/subscription_add_params.rbs +15 -1
  199. data/sig/courier/models/notification_create_params.rbs +20 -3
  200. data/sig/courier/models/notification_publish_params.rbs +18 -2
  201. data/sig/courier/models/profile_create_params.rbs +18 -1
  202. data/sig/courier/models/profiles/list_subscribe_params.rbs +15 -1
  203. data/sig/courier/models/provider_create_params.rbs +15 -1
  204. data/sig/courier/models/routing_strategy_create_params.rbs +20 -3
  205. data/sig/courier/models/schedule_broadcast_request.rbs +48 -0
  206. data/sig/courier/models/send_broadcast_request.rbs +36 -0
  207. data/sig/courier/models/send_message_params.rbs +17 -1
  208. data/sig/courier/models/update_broadcast_request.rbs +13 -0
  209. data/sig/courier/models/users/preference_bulk_update_params.rbs +15 -1
  210. data/sig/courier/models/workspace_preference_create_params.rbs +20 -3
  211. data/sig/courier/models/workspace_preference_publish_params.rbs +20 -3
  212. data/sig/courier/models/workspace_preferences/topic_create_params.rbs +18 -1
  213. data/sig/courier/models.rbs +38 -0
  214. data/sig/courier/resources/automations/invoke.rbs +4 -0
  215. data/sig/courier/resources/brands.rbs +2 -0
  216. data/sig/courier/resources/broadcasts.rbs +74 -0
  217. data/sig/courier/resources/inbox/messages.rbs +19 -0
  218. data/sig/courier/resources/inbox.rbs +9 -0
  219. data/sig/courier/resources/journeys/templates.rbs +4 -0
  220. data/sig/courier/resources/journeys.rbs +8 -0
  221. data/sig/courier/resources/lists/subscriptions.rbs +2 -0
  222. data/sig/courier/resources/notifications.rbs +4 -0
  223. data/sig/courier/resources/profiles/lists.rbs +2 -0
  224. data/sig/courier/resources/profiles.rbs +2 -0
  225. data/sig/courier/resources/providers.rbs +2 -0
  226. data/sig/courier/resources/routing_strategies.rbs +2 -0
  227. data/sig/courier/resources/send.rbs +2 -0
  228. data/sig/courier/resources/users/preferences.rbs +2 -0
  229. data/sig/courier/resources/workspace_preferences/topics.rbs +2 -0
  230. data/sig/courier/resources/workspace_preferences.rbs +4 -0
  231. metadata +71 -2
@@ -2,26 +2,33 @@
2
2
 
3
3
  module Courier
4
4
  module Resources
5
+ # Build, version, publish, invoke, and cancel multi-step notification workflows,
6
+ # along with the templates scoped to them.
5
7
  class Journeys
8
+ # Build, version, publish, invoke, and cancel multi-step notification workflows,
9
+ # along with the templates scoped to them.
6
10
  # @return [Courier::Resources::Journeys::Templates]
7
11
  attr_reader :templates
8
12
 
9
- # Create a journey. Defaults to `DRAFT` state; pass `state: "PUBLISHED"` to
10
- # publish on create. Send nodes are not allowed on `POST`. The standard flow is:
11
- # create the journey shell here, add notification templates with
12
- # `POST /journeys/{templateId}/templates`, then wire them into the journey with
13
- # `PUT /journeys/{templateId}`. Call `POST /journeys/{templateId}/publish` to
14
- # publish a draft after the fact.
13
+ # Some parameter documentations has been truncated, see
14
+ # {Courier::Models::JourneyCreateParams} for more details.
15
15
  #
16
- # @overload create(name:, nodes:, enabled: nil, state: nil, request_options: {})
16
+ # Creates a journey from a set of nodes, in draft state unless you pass a
17
+ # published state. Send nodes cannot be included until their templates exist.
17
18
  #
18
- # @param name [String]
19
+ # @overload create(name:, nodes:, enabled: nil, state: nil, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
19
20
  #
20
- # @param nodes [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
21
+ # @param name [String] Body param
21
22
  #
22
- # @param enabled [Boolean]
23
+ # @param nodes [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>] Body param
23
24
  #
24
- # @param state [Symbol, Courier::Models::JourneyState] Lifecycle state of a journey.
25
+ # @param enabled [Boolean] Body param
26
+ #
27
+ # @param state [Symbol, Courier::Models::JourneyState] Body param: Lifecycle state of a journey.
28
+ #
29
+ # @param idempotency_key [String] Header param: A unique key that makes this request idempotent. If Courier receiv
30
+ #
31
+ # @param x_idempotency_expiration [String] Header param: How long the idempotency key remains valid, as a Unix epoch timest
25
32
  #
26
33
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
27
34
  #
@@ -30,10 +37,13 @@ module Courier
30
37
  # @see Courier::Models::JourneyCreateParams
31
38
  def create(params)
32
39
  parsed, options = Courier::JourneyCreateParams.dump_request(params)
40
+ header_params =
41
+ {idempotency_key: "idempotency-key", x_idempotency_expiration: "x-idempotency-expiration"}
33
42
  @client.request(
34
43
  method: :post,
35
44
  path: "journeys",
36
- body: parsed,
45
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
46
+ body: parsed.except(*header_params.keys),
37
47
  model: Courier::JourneyResponse,
38
48
  options: options
39
49
  )
@@ -68,7 +78,8 @@ module Courier
68
78
  # Some parameter documentations has been truncated, see
69
79
  # {Courier::Models::JourneyListParams} for more details.
70
80
  #
71
- # Get the list of journeys.
81
+ # Lists the workspace's journeys, each carrying a name, state, and enabled flag.
82
+ # Paged by cursor.
72
83
  #
73
84
  # @overload list(cursor: nil, version: nil, request_options: {})
74
85
  #
@@ -93,8 +104,8 @@ module Courier
93
104
  )
94
105
  end
95
106
 
96
- # Archive a journey. Archived journeys cannot be invoked. Existing journey runs
97
- # continue to completion.
107
+ # Archives a journey so it can no longer be invoked. Runs already in flight
108
+ # continue to completion, so archiving never strands a user mid-sequence.
98
109
  #
99
110
  # @overload archive(template_id, request_options: {})
100
111
  #
@@ -117,16 +128,16 @@ module Courier
117
128
  # Some parameter documentations has been truncated, see
118
129
  # {Courier::Models::JourneyCancelParams} for more details.
119
130
  #
120
- # Cancel journey runs. The request body must include EXACTLY ONE of
121
- # `cancelation_token` (cancels every run associated with the token) or `run_id`
122
- # (cancels a single tenant-scoped run). Supplying both or neither returns a `400`.
123
- # A `run_id` that does not match a run for the tenant returns `404`. Cancelation
124
- # is idempotent: a run that has already finished (`PROCESSED`/`ERROR`) or was
125
- # already `CANCELED` is left unchanged and its current status is returned.
131
+ # Cancels in-flight journey runs, either every run sharing a cancelation token or
132
+ # one run by id. Use it to stop a sequence when the event resolves.
133
+ #
134
+ # @overload cancel(cancel_journey_request:, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
126
135
  #
127
- # @overload cancel(cancel_journey_request:, request_options: {})
136
+ # @param cancel_journey_request [Courier::Models::CancelJourneyRequest::ByCancelationToken, Courier::Models::CancelJourneyRequest::ByRunID] Body param: Request body for `POST /journeys/cancel`. Provide EXACTLY ONE of `ca
128
137
  #
129
- # @param cancel_journey_request [Courier::Models::CancelJourneyRequest::ByCancelationToken, Courier::Models::CancelJourneyRequest::ByRunID] Request body for `POST /journeys/cancel`. Provide EXACTLY ONE of `cancelation_to
138
+ # @param idempotency_key [String] Header param: A unique key that makes this request idempotent. If Courier receiv
139
+ #
140
+ # @param x_idempotency_expiration [String] Header param: How long the idempotency key remains valid, as a Unix epoch timest
130
141
  #
131
142
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
132
143
  #
@@ -138,6 +149,10 @@ module Courier
138
149
  @client.request(
139
150
  method: :post,
140
151
  path: "journeys/cancel",
152
+ headers: parsed.except(:cancel_journey_request).transform_keys(
153
+ idempotency_key: "idempotency-key",
154
+ x_idempotency_expiration: "x-idempotency-expiration"
155
+ ),
141
156
  body: parsed[:cancel_journey_request],
142
157
  model: Courier::CancelJourneyResponse,
143
158
  options: options
@@ -147,18 +162,22 @@ module Courier
147
162
  # Some parameter documentations has been truncated, see
148
163
  # {Courier::Models::JourneyInvokeParams} for more details.
149
164
  #
150
- # Invoke a journey by id or alias to start a new run. The response includes a
151
- # `runId` identifying the run.
165
+ # Starts a journey run for one user and returns a runId. Runs execute
166
+ # asynchronously, so the response arrives before any message is sent.
167
+ #
168
+ # @overload invoke(template_id, data: nil, profile: nil, user_id: nil, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
169
+ #
170
+ # @param template_id [String] Path param: A unique identifier representing the journey to be invoked. Accepts
152
171
  #
153
- # @overload invoke(template_id, data: nil, profile: nil, user_id: nil, request_options: {})
172
+ # @param data [Hash{Symbol=>Object}] Body param: Data payload passed to the journey. The expected shape can be predef
154
173
  #
155
- # @param template_id [String] A unique identifier representing the journey to be invoked. Accepts a Journey ID
174
+ # @param profile [Hash{Symbol=>Object}] Body param: Profile data for the user. Can contain contact information (email, p
156
175
  #
157
- # @param data [Hash{Symbol=>Object}] Data payload passed to the journey. The expected shape can be predefined using t
176
+ # @param user_id [String] Body param: A unique identifier for the user. If not provided, the system will a
158
177
  #
159
- # @param profile [Hash{Symbol=>Object}] Profile data for the user. Can contain contact information (email, phone_number)
178
+ # @param idempotency_key [String] Header param: A unique key that makes this request idempotent. If Courier receiv
160
179
  #
161
- # @param user_id [String] A unique identifier for the user. If not provided, the system will attempt to re
180
+ # @param x_idempotency_expiration [String] Header param: How long the idempotency key remains valid, as a Unix epoch timest
162
181
  #
163
182
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
164
183
  #
@@ -167,16 +186,20 @@ module Courier
167
186
  # @see Courier::Models::JourneyInvokeParams
168
187
  def invoke(template_id, params = {})
169
188
  parsed, options = Courier::JourneyInvokeParams.dump_request(params)
189
+ header_params =
190
+ {idempotency_key: "idempotency-key", x_idempotency_expiration: "x-idempotency-expiration"}
170
191
  @client.request(
171
192
  method: :post,
172
193
  path: ["journeys/%1$s/invoke", template_id],
173
- body: parsed,
194
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
195
+ body: parsed.except(*header_params.keys),
174
196
  model: Courier::JourneysInvokeResponse,
175
197
  options: options
176
198
  )
177
199
  end
178
200
 
179
- # List published versions of a journey, ordered most recent first.
201
+ # Lists a journey's published versions, most recent first, so you have a version
202
+ # id to roll back to. Paged by cursor.
180
203
  #
181
204
  # @overload list_versions(template_id, request_options: {})
182
205
  #
@@ -196,15 +219,21 @@ module Courier
196
219
  )
197
220
  end
198
221
 
199
- # Publish the current draft as a new version. Body is optional; pass
200
- # `{ "version": "vN" }` to roll back to a prior version instead. Returns 404 if
201
- # the journey has no draft to publish.
222
+ # Some parameter documentations has been truncated, see
223
+ # {Courier::Models::JourneyPublishParams} for more details.
202
224
  #
203
- # @overload publish(template_id, version: nil, request_options: {})
225
+ # Publishes a journey's current draft as a new version, making it live for new
226
+ # runs. Pass a version instead to roll back to an earlier one.
204
227
  #
205
- # @param template_id [String] Journey id
228
+ # @overload publish(template_id, version: nil, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
229
+ #
230
+ # @param template_id [String] Path param: Journey id
231
+ #
232
+ # @param version [String] Body param
206
233
  #
207
- # @param version [String]
234
+ # @param idempotency_key [String] Header param: A unique key that makes this request idempotent. If Courier receiv
235
+ #
236
+ # @param x_idempotency_expiration [String] Header param: How long the idempotency key remains valid, as a Unix epoch timest
208
237
  #
209
238
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
210
239
  #
@@ -213,20 +242,20 @@ module Courier
213
242
  # @see Courier::Models::JourneyPublishParams
214
243
  def publish(template_id, params = {})
215
244
  parsed, options = Courier::JourneyPublishParams.dump_request(params)
245
+ header_params =
246
+ {idempotency_key: "idempotency-key", x_idempotency_expiration: "x-idempotency-expiration"}
216
247
  @client.request(
217
248
  method: :post,
218
249
  path: ["journeys/%1$s/publish", template_id],
219
- body: parsed,
250
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
251
+ body: parsed.except(*header_params.keys),
220
252
  model: Courier::JourneyResponse,
221
253
  options: options
222
254
  )
223
255
  end
224
256
 
225
- # Replace the journey draft. Updates the working draft only; call
226
- # `POST /journeys/{templateId}/publish` to make it live, or pass
227
- # `state: "PUBLISHED"` in this request to publish immediately. Send-node
228
- # `template` ids must already exist and be scoped to this journey, and node ids
229
- # must not be claimed by another journey.
257
+ # Replaces a journey's working draft, leaving the published version live until you
258
+ # publish. Reach for this when editing a journey already running.
230
259
  #
231
260
  # @overload replace(template_id, name:, nodes:, enabled: nil, state: nil, request_options: {})
232
261
  #
@@ -3,8 +3,11 @@
3
3
  module Courier
4
4
  module Resources
5
5
  class Lists
6
+ # Manage static groups of users that you subscribe explicitly, and send to them by
7
+ # list id or list pattern.
6
8
  class Subscriptions
7
- # Get the list's subscriptions.
9
+ # Returns the users subscribed to a list with paging, each with the preferences
10
+ # recorded for that subscription.
8
11
  #
9
12
  # @overload list(list_id, cursor: nil, request_options: {})
10
13
  #
@@ -29,14 +32,21 @@ module Courier
29
32
  )
30
33
  end
31
34
 
35
+ # Some parameter documentations has been truncated, see
36
+ # {Courier::Models::Lists::SubscriptionAddParams} for more details.
37
+ #
32
38
  # Subscribes additional users to the list, without modifying existing
33
39
  # subscriptions. If the list does not exist, it will be automatically created.
34
40
  #
35
- # @overload add(list_id, recipients:, request_options: {})
41
+ # @overload add(list_id, recipients:, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
36
42
  #
37
- # @param list_id [String] A unique identifier representing the list you wish to retrieve.
43
+ # @param list_id [String] Path param: A unique identifier representing the list you wish to retrieve.
38
44
  #
39
- # @param recipients [Array<Courier::Models::PutSubscriptionsRecipient>]
45
+ # @param recipients [Array<Courier::Models::PutSubscriptionsRecipient>] Body param
46
+ #
47
+ # @param idempotency_key [String] Header param: A unique key that makes this request idempotent. If Courier receiv
48
+ #
49
+ # @param x_idempotency_expiration [String] Header param: How long the idempotency key remains valid, as a Unix epoch timest
40
50
  #
41
51
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
42
52
  #
@@ -45,10 +55,13 @@ module Courier
45
55
  # @see Courier::Models::Lists::SubscriptionAddParams
46
56
  def add(list_id, params)
47
57
  parsed, options = Courier::Lists::SubscriptionAddParams.dump_request(params)
58
+ header_params =
59
+ {idempotency_key: "idempotency-key", x_idempotency_expiration: "x-idempotency-expiration"}
48
60
  @client.request(
49
61
  method: :post,
50
62
  path: ["lists/%1$s/subscriptions", list_id],
51
- body: parsed,
63
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
64
+ body: parsed.except(*header_params.keys),
52
65
  model: NilClass,
53
66
  options: options
54
67
  )
@@ -82,8 +95,8 @@ module Courier
82
95
  # Some parameter documentations has been truncated, see
83
96
  # {Courier::Models::Lists::SubscriptionSubscribeUserParams} for more details.
84
97
  #
85
- # Subscribe a user to an existing list (note: if the List does not exist, it will
86
- # be automatically created).
98
+ # Subscribes one user to a list, creating the list if it does not yet exist.
99
+ # Optional preferences apply to this subscription only.
87
100
  #
88
101
  # @overload subscribe_user(user_id, list_id:, preferences: nil, request_options: {})
89
102
  #
@@ -113,7 +126,8 @@ module Courier
113
126
  )
114
127
  end
115
128
 
116
- # Delete a subscription to a list by list ID and user ID.
129
+ # Removes one user's subscription to a list, addressed by list id and user id. The
130
+ # user's profile and other subscriptions are separate resources.
117
131
  #
118
132
  # @overload unsubscribe_user(user_id, list_id:, request_options: {})
119
133
  #
@@ -2,11 +2,16 @@
2
2
 
3
3
  module Courier
4
4
  module Resources
5
+ # Manage static groups of users that you subscribe explicitly, and send to them by
6
+ # list id or list pattern.
5
7
  class Lists
8
+ # Manage static groups of users that you subscribe explicitly, and send to them by
9
+ # list id or list pattern.
6
10
  # @return [Courier::Resources::Lists::Subscriptions]
7
11
  attr_reader :subscriptions
8
12
 
9
- # Returns a list based on the list ID provided.
13
+ # Returns one list by id with its name and created and updated timestamps. Fetch
14
+ # its subscribers separately with the subscriptions endpoint.
10
15
  #
11
16
  # @overload retrieve(list_id, request_options: {})
12
17
  #
@@ -26,7 +31,8 @@ module Courier
26
31
  )
27
32
  end
28
33
 
29
- # Create or replace an existing list with the supplied values.
34
+ # Creates or replaces a list from a name and preferences. Subscribers are managed
35
+ # through the separate subscriptions endpoints.
30
36
  #
31
37
  # @overload update(list_id, name:, preferences: nil, request_options: {})
32
38
  #
@@ -55,7 +61,8 @@ module Courier
55
61
  # Some parameter documentations has been truncated, see
56
62
  # {Courier::Models::ListListParams} for more details.
57
63
  #
58
- # Returns all of the lists, with the ability to filter based on a pattern.
64
+ # Returns the workspace's lists, filterable by a pattern to fetch a subset such as
65
+ # every regional list. Paged by cursor.
59
66
  #
60
67
  # @overload list(cursor: nil, pattern: nil, request_options: {})
61
68
  #
@@ -80,7 +87,8 @@ module Courier
80
87
  )
81
88
  end
82
89
 
83
- # Delete a list by list ID.
90
+ # Deletes a list, halting sends that target it. A previously deleted list can be
91
+ # brought back with the companion restore endpoint.
84
92
  #
85
93
  # @overload delete(list_id, request_options: {})
86
94
  #
@@ -100,7 +108,8 @@ module Courier
100
108
  )
101
109
  end
102
110
 
103
- # Restore a previously deleted list.
111
+ # Restores a previously deleted list along with its subscribers, so a list removed
112
+ # by mistake can be brought back rather than rebuilt.
104
113
  #
105
114
  # @overload restore(list_id, request_options: {})
106
115
  #
@@ -2,11 +2,14 @@
2
2
 
3
3
  module Courier
4
4
  module Resources
5
+ # Look up the messages Courier has accepted, inspect their delivery history and
6
+ # rendered output, and cancel, resend, or archive them.
5
7
  class Messages
6
8
  # Some parameter documentations has been truncated, see
7
9
  # {Courier::Models::MessageRetrieveParams} for more details.
8
10
  #
9
- # Fetch the status of a message you've previously sent.
11
+ # Returns a sent message's status, recipient, event, and per-provider delivery
12
+ # detail, with timestamps for enqueued, sent, delivered, opened, and clicked.
10
13
  #
11
14
  # @overload retrieve(message_id, request_options: {})
12
15
  #
@@ -29,7 +32,8 @@ module Courier
29
32
  # Some parameter documentations has been truncated, see
30
33
  # {Courier::Models::MessageListParams} for more details.
31
34
  #
32
- # Fetch the statuses of messages you've previously sent.
35
+ # Returns previously sent messages, most recent first, each carrying its status,
36
+ # recipient, channel, and provider. Paged by cursor.
33
37
  #
34
38
  # @overload list(archived: nil, cursor: nil, enqueued_after: nil, event: nil, list: nil, message_id: nil, notification: nil, provider: nil, recipient: nil, status: nil, tag: nil, tags: nil, tenant_id: nil, trace_id: nil, request_options: {})
35
39
  #
@@ -78,11 +82,8 @@ module Courier
78
82
  )
79
83
  end
80
84
 
81
- # Cancel a message that is currently in the process of being delivered. A
82
- # well-formatted API call to the cancel message API will return either `200`
83
- # status code for a successful cancellation or `409` status code for an
84
- # unsuccessful cancellation. Both cases will include the actual message record in
85
- # the response body (see details below).
85
+ # Cancels a message that is still in the delivery pipeline and returns the message
86
+ # record with its resulting canceled or failed status.
86
87
  #
87
88
  # @overload cancel(message_id, request_options: {})
88
89
  #
@@ -105,7 +106,8 @@ module Courier
105
106
  # Some parameter documentations has been truncated, see
106
107
  # {Courier::Models::MessageContentParams} for more details.
107
108
  #
108
- # Get message content
109
+ # Returns the rendered content Courier delivered for a message, broken out per
110
+ # channel, to confirm what the recipient received.
109
111
  #
110
112
  # @overload content(message_id, request_options: {})
111
113
  #
@@ -125,7 +127,8 @@ module Courier
125
127
  )
126
128
  end
127
129
 
128
- # Fetch the array of events of a message you've previously sent.
130
+ # Returns the ordered event history for a sent message, one entry per status
131
+ # transition with its timestamp.
129
132
  #
130
133
  # @overload history(message_id, type: nil, request_options: {})
131
134
  #
@@ -153,11 +156,8 @@ module Courier
153
156
  # Some parameter documentations has been truncated, see
154
157
  # {Courier::Models::MessageResendParams} for more details.
155
158
  #
156
- # Resend a previously sent message. The original send request is loaded from
157
- # storage and a brand-new send is enqueued for the same recipient and content,
158
- # producing a **new** `messageId` — the original message is not modified.
159
- # Throttled by a per-message rate limit; a repeat inside the limit window returns
160
- # `429 Too Many Requests`.
159
+ # Resends a previously sent message to the same recipient and content, returning a
160
+ # new messageId. The original send request is not modified.
161
161
  #
162
162
  # @overload resend(message_id, request_options: {})
163
163
  #
@@ -3,8 +3,11 @@
3
3
  module Courier
4
4
  module Resources
5
5
  class Notifications
6
+ # Create, update, version, publish, and localize notification templates and their
7
+ # content.
6
8
  class Checks
7
- # Replace the submission checks for a notification template.
9
+ # Replaces the approval checks on a template submission with the complete set
10
+ # supplied in the request body.
8
11
  #
9
12
  # @overload update(submission_id, id:, checks:, request_options: {})
10
13
  #
@@ -34,7 +37,8 @@ module Courier
34
37
  )
35
38
  end
36
39
 
37
- # Retrieve the submission checks for a notification template.
40
+ # Returns the approval checks recorded for a template submission, each with its
41
+ # pass or fail result.
38
42
  #
39
43
  # @overload list(submission_id, id:, request_options: {})
40
44
  #
@@ -61,7 +65,8 @@ module Courier
61
65
  )
62
66
  end
63
67
 
64
- # Cancel a submission for a notification template.
68
+ # Cancels a pending template submission, withdrawing it from the approval
69
+ # workflow. The template stays in draft and can be resubmitted later.
65
70
  #
66
71
  # @overload delete(submission_id, id:, request_options: {})
67
72
  #
@@ -2,7 +2,11 @@
2
2
 
3
3
  module Courier
4
4
  module Resources
5
+ # Create, update, version, publish, and localize notification templates and their
6
+ # content.
5
7
  class Notifications
8
+ # Create, update, version, publish, and localize notification templates and their
9
+ # content.
6
10
  # @return [Courier::Resources::Notifications::Checks]
7
11
  attr_reader :checks
8
12
 
@@ -12,11 +16,15 @@ module Courier
12
16
  # Create a notification template. Requires all fields in the notification object.
13
17
  # Templates are created in draft state by default.
14
18
  #
15
- # @overload create(notification:, state: nil, request_options: {})
19
+ # @overload create(notification:, state: nil, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
16
20
  #
17
- # @param notification [Courier::Models::NotificationTemplatePayload] Core template fields used in POST and PUT request bodies (nested under a `notifi
21
+ # @param notification [Courier::Models::NotificationTemplatePayload] Body param: Core template fields used in POST and PUT request bodies (nested und
22
+ #
23
+ # @param state [Symbol, Courier::Models::NotificationTemplateCreateRequest::State] Body param: Template state after creation. Case-insensitive input, normalized to
24
+ #
25
+ # @param idempotency_key [String] Header param: A unique key that makes this request idempotent. If Courier receiv
18
26
  #
19
- # @param state [Symbol, Courier::Models::NotificationTemplateCreateRequest::State] Template state after creation. Case-insensitive input, normalized to uppercase i
27
+ # @param x_idempotency_expiration [String] Header param: How long the idempotency key remains valid, as a Unix epoch timest
20
28
  #
21
29
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
22
30
  #
@@ -25,10 +33,13 @@ module Courier
25
33
  # @see Courier::Models::NotificationCreateParams
26
34
  def create(params)
27
35
  parsed, options = Courier::NotificationCreateParams.dump_request(params)
36
+ header_params =
37
+ {idempotency_key: "idempotency-key", x_idempotency_expiration: "x-idempotency-expiration"}
28
38
  @client.request(
29
39
  method: :post,
30
40
  path: "notifications",
31
- body: parsed,
41
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
42
+ body: parsed.except(*header_params.keys),
32
43
  model: Courier::NotificationTemplateResponse,
33
44
  options: options
34
45
  )
@@ -63,7 +74,8 @@ module Courier
63
74
  )
64
75
  end
65
76
 
66
- # List notification templates in your workspace.
77
+ # Lists the workspace's notification templates. Each carries a name, tags, brand,
78
+ # routing, and its draft or published state.
67
79
  #
68
80
  # @overload list(cursor: nil, event_id: nil, notes: nil, request_options: {})
69
81
  #
@@ -90,7 +102,8 @@ module Courier
90
102
  )
91
103
  end
92
104
 
93
- # Archive a notification template.
105
+ # Archives a notification template, preventing new sends from referencing it. The
106
+ # template stays retrievable for its version history.
94
107
  #
95
108
  # @overload archive(id, request_options: {})
96
109
  #
@@ -110,12 +123,9 @@ module Courier
110
123
  )
111
124
  end
112
125
 
113
- # Duplicate a notification template. Creates a standalone copy within the same
114
- # workspace and environment, with " COPY" appended to the title. The copy clones
115
- # the source draft's tags, brand, subscription topic, routing strategy, channels,
116
- # and content, and is always created as a standalone template (it is not linked to
117
- # any journey or broadcast, even if the source was). Templates that are scoped to
118
- # a journey or a broadcast cannot be duplicated through this endpoint.
126
+ # Copies a notification template within the same workspace and environment,
127
+ # appending " COPY" to the title. The copy is standalone and independently
128
+ # editable.
119
129
  #
120
130
  # @overload duplicate(id, request_options: {})
121
131
  #
@@ -135,7 +145,8 @@ module Courier
135
145
  )
136
146
  end
137
147
 
138
- # List versions of a notification template.
148
+ # Returns a notification template's published versions, most recent first, for
149
+ # comparison or rollback. Paged.
139
150
  #
140
151
  # @overload list_versions(id, cursor: nil, limit: nil, request_options: {})
141
152
  #
@@ -162,14 +173,21 @@ module Courier
162
173
  )
163
174
  end
164
175
 
176
+ # Some parameter documentations has been truncated, see
177
+ # {Courier::Models::NotificationPublishParams} for more details.
178
+ #
165
179
  # Publish a notification template. Publishes the current draft by default. Pass a
166
180
  # version in the request body to publish a specific historical version.
167
181
  #
168
- # @overload publish(id, version: nil, request_options: {})
182
+ # @overload publish(id, version: nil, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
169
183
  #
170
- # @param id [String] Template ID (nt\_ prefix).
184
+ # @param id [String] Path param: Template ID (nt\_ prefix).
185
+ #
186
+ # @param version [String] Body param: Historical version to publish (e.g. "v001"). Omit to publish the cur
171
187
  #
172
- # @param version [String] Historical version to publish (e.g. "v001"). Omit to publish the current draft.
188
+ # @param idempotency_key [String] Header param: A unique key that makes this request idempotent. If Courier receiv
189
+ #
190
+ # @param x_idempotency_expiration [String] Header param: How long the idempotency key remains valid, as a Unix epoch timest
173
191
  #
174
192
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
175
193
  #
@@ -178,18 +196,20 @@ module Courier
178
196
  # @see Courier::Models::NotificationPublishParams
179
197
  def publish(id, params = {})
180
198
  parsed, options = Courier::NotificationPublishParams.dump_request(params)
199
+ header_params =
200
+ {idempotency_key: "idempotency-key", x_idempotency_expiration: "x-idempotency-expiration"}
181
201
  @client.request(
182
202
  method: :post,
183
203
  path: ["notifications/%1$s/publish", id],
184
- body: parsed,
204
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
205
+ body: parsed.except(*header_params.keys),
185
206
  model: NilClass,
186
207
  options: options
187
208
  )
188
209
  end
189
210
 
190
- # Replace the elemental content of a notification template. Overwrites all
191
- # elements in the template with the provided content. Only supported for V2
192
- # (elemental) templates.
211
+ # Replaces all Elemental content in a template, overwriting every existing
212
+ # element. Supported for V2 templates only, not V1 blocks and channels.
193
213
  #
194
214
  # @overload put_content(id, content:, state: nil, request_options: {})
195
215
  #
@@ -215,8 +235,8 @@ module Courier
215
235
  )
216
236
  end
217
237
 
218
- # Update a single element within a notification template. Only supported for V2
219
- # (elemental) templates.
238
+ # Replaces one Elemental element in a template, addressed by its element id.
239
+ # Supported for V2 templates only, not V1 blocks and channels.
220
240
  #
221
241
  # @overload put_element(element_id, id:, type:, channels: nil, data: nil, if_: nil, loop_: nil, ref: nil, state: nil, request_options: {})
222
242
  #
@@ -258,9 +278,8 @@ module Courier
258
278
  )
259
279
  end
260
280
 
261
- # Set locale-specific content overrides for a notification template. Each element
262
- # override must reference an existing element by ID. Only supported for V2
263
- # (elemental) templates.
281
+ # Sets locale-specific content overrides for a template. Each override must
282
+ # reference an element that already exists in the default content.
264
283
  #
265
284
  # @overload put_locale(locale_id, id:, elements:, state: nil, request_options: {})
266
285
  #
@@ -295,7 +314,8 @@ module Courier
295
314
  # Some parameter documentations has been truncated, see
296
315
  # {Courier::Models::NotificationReplaceParams} for more details.
297
316
  #
298
- # Replace a notification template. All fields are required.
317
+ # Replaces a notification template in full, so send every field rather than only
318
+ # the ones you want changed. Publish separately to make it live.
299
319
  #
300
320
  # @overload replace(id, notification:, state: nil, request_options: {})
301
321
  #
@@ -324,10 +344,8 @@ module Courier
324
344
  # Some parameter documentations has been truncated, see
325
345
  # {Courier::Models::NotificationRetrieveContentParams} for more details.
326
346
  #
327
- # Retrieve the content of a notification template. The response shape depends on
328
- # whether the template uses V1 (blocks/channels) or V2 (elemental) content. Use
329
- # the `version` query parameter to select draft, published, or a specific
330
- # historical version.
347
+ # Returns a template's content and checksum. V2 templates return Elemental
348
+ # elements, while V1 templates return blocks and channels instead.
331
349
  #
332
350
  # @overload retrieve_content(id, version: nil, request_options: {})
333
351
  #