trycourier 4.7.0 → 4.8.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 (260) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/README.md +25 -235
  4. data/lib/courier/client.rb +4 -0
  5. data/lib/courier/internal/util.rb +32 -1
  6. data/lib/courier/models/audience_delete_params.rb +7 -1
  7. data/lib/courier/models/audience_list_members_params.rb +8 -1
  8. data/lib/courier/models/audience_retrieve_params.rb +7 -1
  9. data/lib/courier/models/audience_update_params.rb +8 -1
  10. data/lib/courier/models/audit_event_retrieve_params.rb +7 -1
  11. data/lib/courier/models/automations/invoke_invoke_by_template_params.rb +7 -1
  12. data/lib/courier/models/brand_delete_params.rb +7 -1
  13. data/lib/courier/models/brand_retrieve_params.rb +7 -1
  14. data/lib/courier/models/brand_update_params.rb +8 -1
  15. data/lib/courier/models/bulk_add_users_params.rb +7 -1
  16. data/lib/courier/models/bulk_list_users_params.rb +8 -1
  17. data/lib/courier/models/bulk_retrieve_job_params.rb +7 -1
  18. data/lib/courier/models/bulk_run_job_params.rb +7 -1
  19. data/lib/courier/models/elemental_content.rb +1 -8
  20. data/lib/courier/models/journey.rb +63 -0
  21. data/lib/courier/models/journey_invoke_params.rb +20 -0
  22. data/lib/courier/models/journey_list_params.rb +47 -0
  23. data/lib/courier/models/journeys_invoke_request.rb +49 -0
  24. data/lib/courier/models/journeys_invoke_response.rb +17 -0
  25. data/lib/courier/models/journeys_list_response.rb +24 -0
  26. data/lib/courier/models/list_delete_params.rb +7 -1
  27. data/lib/courier/models/list_restore_params.rb +7 -1
  28. data/lib/courier/models/list_retrieve_params.rb +7 -1
  29. data/lib/courier/models/list_update_params.rb +7 -1
  30. data/lib/courier/models/lists/subscription_add_params.rb +7 -1
  31. data/lib/courier/models/lists/subscription_list_params.rb +8 -1
  32. data/lib/courier/models/lists/subscription_subscribe_params.rb +7 -1
  33. data/lib/courier/models/lists/subscription_subscribe_user_params.rb +7 -1
  34. data/lib/courier/models/lists/subscription_unsubscribe_user_params.rb +7 -1
  35. data/lib/courier/models/message_cancel_params.rb +7 -1
  36. data/lib/courier/models/message_content_params.rb +7 -1
  37. data/lib/courier/models/message_details.rb +37 -37
  38. data/lib/courier/models/message_history_params.rb +8 -1
  39. data/lib/courier/models/message_retrieve_params.rb +7 -1
  40. data/lib/courier/models/notification_retrieve_content_params.rb +7 -1
  41. data/lib/courier/models/notifications/check_delete_params.rb +7 -1
  42. data/lib/courier/models/notifications/check_list_params.rb +7 -1
  43. data/lib/courier/models/notifications/check_update_params.rb +7 -1
  44. data/lib/courier/models/notifications/draft_retrieve_content_params.rb +7 -1
  45. data/lib/courier/models/profile_create_params.rb +7 -1
  46. data/lib/courier/models/profile_delete_params.rb +7 -1
  47. data/lib/courier/models/profile_replace_params.rb +7 -1
  48. data/lib/courier/models/profile_retrieve_params.rb +7 -1
  49. data/lib/courier/models/profile_update_params.rb +8 -1
  50. data/lib/courier/models/profiles/list_delete_params.rb +7 -1
  51. data/lib/courier/models/profiles/list_retrieve_params.rb +8 -1
  52. data/lib/courier/models/profiles/list_subscribe_params.rb +7 -1
  53. data/lib/courier/models/request_archive_params.rb +7 -1
  54. data/lib/courier/models/tenant_delete_params.rb +7 -1
  55. data/lib/courier/models/tenant_list_users_params.rb +8 -1
  56. data/lib/courier/models/tenant_retrieve_params.rb +7 -1
  57. data/lib/courier/models/tenant_update_params.rb +8 -1
  58. data/lib/courier/models/tenants/preferences/item_delete_params.rb +7 -1
  59. data/lib/courier/models/tenants/preferences/item_update_params.rb +7 -1
  60. data/lib/courier/models/tenants/template_list_params.rb +8 -1
  61. data/lib/courier/models/tenants/template_publish_params.rb +7 -1
  62. data/lib/courier/models/tenants/template_replace_params.rb +7 -1
  63. data/lib/courier/models/tenants/template_retrieve_params.rb +7 -1
  64. data/lib/courier/models/tenants/templates/version_retrieve_params.rb +7 -1
  65. data/lib/courier/models/translation_retrieve_params.rb +7 -1
  66. data/lib/courier/models/translation_update_params.rb +7 -1
  67. data/lib/courier/models/users/preference_retrieve_params.rb +8 -1
  68. data/lib/courier/models/users/preference_retrieve_topic_params.rb +8 -1
  69. data/lib/courier/models/users/preference_update_or_create_topic_params.rb +8 -1
  70. data/lib/courier/models/users/tenant_add_multiple_params.rb +7 -1
  71. data/lib/courier/models/users/tenant_add_single_params.rb +7 -1
  72. data/lib/courier/models/users/tenant_list_params.rb +8 -1
  73. data/lib/courier/models/users/tenant_remove_all_params.rb +7 -1
  74. data/lib/courier/models/users/tenant_remove_single_params.rb +7 -1
  75. data/lib/courier/models/users/token_add_multiple_params.rb +7 -1
  76. data/lib/courier/models/users/token_add_single_params.rb +168 -2
  77. data/lib/courier/models/users/token_delete_params.rb +7 -1
  78. data/lib/courier/models/users/token_list_params.rb +7 -1
  79. data/lib/courier/models/users/token_retrieve_params.rb +7 -1
  80. data/lib/courier/models/users/token_update_params.rb +7 -1
  81. data/lib/courier/models.rb +12 -0
  82. data/lib/courier/resources/audiences.rb +4 -2
  83. data/lib/courier/resources/audit_events.rb +2 -1
  84. data/lib/courier/resources/automations.rb +2 -1
  85. data/lib/courier/resources/brands.rb +2 -1
  86. data/lib/courier/resources/bulk.rb +2 -1
  87. data/lib/courier/resources/journeys.rb +73 -0
  88. data/lib/courier/resources/lists/subscriptions.rb +2 -1
  89. data/lib/courier/resources/lists.rb +2 -1
  90. data/lib/courier/resources/messages.rb +4 -2
  91. data/lib/courier/resources/notifications.rb +2 -1
  92. data/lib/courier/resources/profiles/lists.rb +2 -1
  93. data/lib/courier/resources/tenants/templates.rb +2 -1
  94. data/lib/courier/resources/tenants.rb +4 -2
  95. data/lib/courier/resources/users/preferences.rb +7 -4
  96. data/lib/courier/resources/users/tenants.rb +2 -1
  97. data/lib/courier/resources/users/tokens.rb +7 -9
  98. data/lib/courier/version.rb +1 -1
  99. data/lib/courier.rb +7 -0
  100. data/rbi/courier/client.rbi +3 -0
  101. data/rbi/courier/internal/util.rbi +21 -1
  102. data/rbi/courier/models/audience_delete_params.rbi +13 -5
  103. data/rbi/courier/models/audience_list_members_params.rbi +6 -0
  104. data/rbi/courier/models/audience_retrieve_params.rbi +13 -5
  105. data/rbi/courier/models/audience_update_params.rbi +6 -0
  106. data/rbi/courier/models/audit_event_retrieve_params.rbi +13 -5
  107. data/rbi/courier/models/automations/invoke_invoke_by_template_params.rbi +6 -0
  108. data/rbi/courier/models/brand_delete_params.rbi +13 -5
  109. data/rbi/courier/models/brand_retrieve_params.rbi +13 -5
  110. data/rbi/courier/models/brand_update_params.rbi +6 -0
  111. data/rbi/courier/models/bulk_add_users_params.rbi +6 -1
  112. data/rbi/courier/models/bulk_list_users_params.rbi +6 -0
  113. data/rbi/courier/models/bulk_retrieve_job_params.rbi +13 -5
  114. data/rbi/courier/models/bulk_run_job_params.rbi +13 -5
  115. data/rbi/courier/models/elemental_content.rbi +3 -9
  116. data/rbi/courier/models/journey.rbi +91 -0
  117. data/rbi/courier/models/journey_invoke_params.rbi +35 -0
  118. data/rbi/courier/models/journey_list_params.rbi +85 -0
  119. data/rbi/courier/models/journeys_invoke_request.rbi +84 -0
  120. data/rbi/courier/models/journeys_invoke_response.rbi +27 -0
  121. data/rbi/courier/models/journeys_list_response.rbi +46 -0
  122. data/rbi/courier/models/list_delete_params.rbi +13 -5
  123. data/rbi/courier/models/list_restore_params.rbi +13 -5
  124. data/rbi/courier/models/list_retrieve_params.rbi +13 -5
  125. data/rbi/courier/models/list_update_params.rbi +6 -1
  126. data/rbi/courier/models/lists/subscription_add_params.rbi +6 -1
  127. data/rbi/courier/models/lists/subscription_list_params.rbi +6 -0
  128. data/rbi/courier/models/lists/subscription_subscribe_params.rbi +6 -1
  129. data/rbi/courier/models/lists/subscription_subscribe_user_params.rbi +6 -1
  130. data/rbi/courier/models/lists/subscription_unsubscribe_user_params.rbi +10 -2
  131. data/rbi/courier/models/message_cancel_params.rbi +13 -5
  132. data/rbi/courier/models/message_content_params.rbi +13 -5
  133. data/rbi/courier/models/message_details.rbi +55 -43
  134. data/rbi/courier/models/message_history_params.rbi +10 -1
  135. data/rbi/courier/models/message_retrieve_params.rbi +13 -5
  136. data/rbi/courier/models/notification_retrieve_content_params.rbi +13 -5
  137. data/rbi/courier/models/notifications/check_delete_params.rbi +10 -2
  138. data/rbi/courier/models/notifications/check_list_params.rbi +10 -2
  139. data/rbi/courier/models/notifications/check_update_params.rbi +6 -1
  140. data/rbi/courier/models/notifications/draft_retrieve_content_params.rbi +13 -5
  141. data/rbi/courier/models/profile_create_params.rbi +6 -1
  142. data/rbi/courier/models/profile_delete_params.rbi +13 -5
  143. data/rbi/courier/models/profile_replace_params.rbi +6 -1
  144. data/rbi/courier/models/profile_retrieve_params.rbi +13 -5
  145. data/rbi/courier/models/profile_update_params.rbi +6 -0
  146. data/rbi/courier/models/profiles/list_delete_params.rbi +13 -5
  147. data/rbi/courier/models/profiles/list_retrieve_params.rbi +6 -0
  148. data/rbi/courier/models/profiles/list_subscribe_params.rbi +6 -1
  149. data/rbi/courier/models/request_archive_params.rbi +13 -5
  150. data/rbi/courier/models/tenant_delete_params.rbi +13 -5
  151. data/rbi/courier/models/tenant_list_users_params.rbi +6 -0
  152. data/rbi/courier/models/tenant_retrieve_params.rbi +13 -5
  153. data/rbi/courier/models/tenant_update_params.rbi +6 -0
  154. data/rbi/courier/models/tenants/preferences/item_delete_params.rbi +10 -2
  155. data/rbi/courier/models/tenants/preferences/item_update_params.rbi +10 -2
  156. data/rbi/courier/models/tenants/template_list_params.rbi +6 -0
  157. data/rbi/courier/models/tenants/template_publish_params.rbi +10 -2
  158. data/rbi/courier/models/tenants/template_replace_params.rbi +10 -2
  159. data/rbi/courier/models/tenants/template_retrieve_params.rbi +10 -2
  160. data/rbi/courier/models/tenants/templates/version_retrieve_params.rbi +6 -1
  161. data/rbi/courier/models/translation_retrieve_params.rbi +10 -2
  162. data/rbi/courier/models/translation_update_params.rbi +6 -1
  163. data/rbi/courier/models/users/preference_retrieve_params.rbi +6 -0
  164. data/rbi/courier/models/users/preference_retrieve_topic_params.rbi +6 -0
  165. data/rbi/courier/models/users/preference_update_or_create_topic_params.rbi +6 -0
  166. data/rbi/courier/models/users/tenant_add_multiple_params.rbi +6 -1
  167. data/rbi/courier/models/users/tenant_add_single_params.rbi +6 -1
  168. data/rbi/courier/models/users/tenant_list_params.rbi +6 -0
  169. data/rbi/courier/models/users/tenant_remove_all_params.rbi +13 -5
  170. data/rbi/courier/models/users/tenant_remove_single_params.rbi +10 -2
  171. data/rbi/courier/models/users/token_add_multiple_params.rbi +13 -5
  172. data/rbi/courier/models/users/token_add_single_params.rbi +290 -3
  173. data/rbi/courier/models/users/token_delete_params.rbi +10 -2
  174. data/rbi/courier/models/users/token_list_params.rbi +13 -5
  175. data/rbi/courier/models/users/token_retrieve_params.rbi +10 -2
  176. data/rbi/courier/models/users/token_update_params.rbi +6 -1
  177. data/rbi/courier/models.rbi +12 -0
  178. data/rbi/courier/resources/journeys.rbi +64 -0
  179. data/rbi/courier/resources/users/tokens.rbi +11 -9
  180. data/sig/courier/client.rbs +2 -0
  181. data/sig/courier/internal/util.rbs +10 -0
  182. data/sig/courier/models/audience_delete_params.rbs +11 -3
  183. data/sig/courier/models/audience_list_members_params.rbs +6 -1
  184. data/sig/courier/models/audience_retrieve_params.rbs +11 -3
  185. data/sig/courier/models/audience_update_params.rbs +5 -0
  186. data/sig/courier/models/audit_event_retrieve_params.rbs +11 -3
  187. data/sig/courier/models/automations/invoke_invoke_by_template_params.rbs +5 -0
  188. data/sig/courier/models/brand_delete_params.rbs +11 -3
  189. data/sig/courier/models/brand_retrieve_params.rbs +11 -3
  190. data/sig/courier/models/brand_update_params.rbs +5 -0
  191. data/sig/courier/models/bulk_add_users_params.rbs +5 -1
  192. data/sig/courier/models/bulk_list_users_params.rbs +6 -1
  193. data/sig/courier/models/bulk_retrieve_job_params.rbs +11 -3
  194. data/sig/courier/models/bulk_run_job_params.rbs +11 -3
  195. data/sig/courier/models/elemental_content.rbs +3 -11
  196. data/sig/courier/models/journey.rbs +55 -0
  197. data/sig/courier/models/journey_invoke_params.rbs +25 -0
  198. data/sig/courier/models/journey_list_params.rbs +45 -0
  199. data/sig/courier/models/journeys_invoke_request.rbs +36 -0
  200. data/sig/courier/models/journeys_invoke_response.rbs +13 -0
  201. data/sig/courier/models/journeys_list_response.rbs +23 -0
  202. data/sig/courier/models/list_delete_params.rbs +12 -3
  203. data/sig/courier/models/list_restore_params.rbs +11 -3
  204. data/sig/courier/models/list_retrieve_params.rbs +11 -3
  205. data/sig/courier/models/list_update_params.rbs +9 -1
  206. data/sig/courier/models/lists/subscription_add_params.rbs +8 -1
  207. data/sig/courier/models/lists/subscription_list_params.rbs +6 -1
  208. data/sig/courier/models/lists/subscription_subscribe_params.rbs +8 -1
  209. data/sig/courier/models/lists/subscription_subscribe_user_params.rbs +9 -1
  210. data/sig/courier/models/lists/subscription_unsubscribe_user_params.rbs +6 -1
  211. data/sig/courier/models/message_cancel_params.rbs +11 -3
  212. data/sig/courier/models/message_content_params.rbs +11 -3
  213. data/sig/courier/models/message_details.rbs +31 -23
  214. data/sig/courier/models/message_history_params.rbs +6 -1
  215. data/sig/courier/models/message_retrieve_params.rbs +11 -3
  216. data/sig/courier/models/notification_retrieve_content_params.rbs +8 -3
  217. data/sig/courier/models/notifications/check_delete_params.rbs +10 -2
  218. data/sig/courier/models/notifications/check_list_params.rbs +10 -2
  219. data/sig/courier/models/notifications/check_update_params.rbs +9 -1
  220. data/sig/courier/models/notifications/draft_retrieve_content_params.rbs +8 -3
  221. data/sig/courier/models/profile_create_params.rbs +5 -1
  222. data/sig/courier/models/profile_delete_params.rbs +11 -3
  223. data/sig/courier/models/profile_replace_params.rbs +5 -1
  224. data/sig/courier/models/profile_retrieve_params.rbs +11 -3
  225. data/sig/courier/models/profile_update_params.rbs +5 -1
  226. data/sig/courier/models/profiles/list_delete_params.rbs +11 -3
  227. data/sig/courier/models/profiles/list_retrieve_params.rbs +6 -1
  228. data/sig/courier/models/profiles/list_subscribe_params.rbs +8 -1
  229. data/sig/courier/models/request_archive_params.rbs +11 -3
  230. data/sig/courier/models/tenant_delete_params.rbs +11 -3
  231. data/sig/courier/models/tenant_list_users_params.rbs +5 -1
  232. data/sig/courier/models/tenant_retrieve_params.rbs +11 -3
  233. data/sig/courier/models/tenant_update_params.rbs +5 -0
  234. data/sig/courier/models/tenants/preferences/item_delete_params.rbs +6 -1
  235. data/sig/courier/models/tenants/preferences/item_update_params.rbs +8 -1
  236. data/sig/courier/models/tenants/template_list_params.rbs +5 -1
  237. data/sig/courier/models/tenants/template_publish_params.rbs +8 -1
  238. data/sig/courier/models/tenants/template_replace_params.rbs +8 -1
  239. data/sig/courier/models/tenants/template_retrieve_params.rbs +6 -1
  240. data/sig/courier/models/tenants/templates/version_retrieve_params.rbs +5 -1
  241. data/sig/courier/models/translation_retrieve_params.rbs +6 -1
  242. data/sig/courier/models/translation_update_params.rbs +5 -1
  243. data/sig/courier/models/users/preference_retrieve_params.rbs +6 -1
  244. data/sig/courier/models/users/preference_retrieve_topic_params.rbs +5 -1
  245. data/sig/courier/models/users/preference_update_or_create_topic_params.rbs +5 -0
  246. data/sig/courier/models/users/tenant_add_multiple_params.rbs +5 -1
  247. data/sig/courier/models/users/tenant_add_single_params.rbs +5 -1
  248. data/sig/courier/models/users/tenant_list_params.rbs +5 -1
  249. data/sig/courier/models/users/tenant_remove_all_params.rbs +11 -3
  250. data/sig/courier/models/users/tenant_remove_single_params.rbs +6 -1
  251. data/sig/courier/models/users/token_add_multiple_params.rbs +11 -3
  252. data/sig/courier/models/users/token_add_single_params.rbs +127 -4
  253. data/sig/courier/models/users/token_delete_params.rbs +6 -1
  254. data/sig/courier/models/users/token_list_params.rbs +11 -3
  255. data/sig/courier/models/users/token_retrieve_params.rbs +6 -1
  256. data/sig/courier/models/users/token_update_params.rbs +5 -0
  257. data/sig/courier/models.rbs +12 -0
  258. data/sig/courier/resources/journeys.rbs +21 -0
  259. data/sig/courier/resources/users/tokens.rbs +5 -6
  260. metadata +23 -2
@@ -14,17 +14,10 @@ module Courier
14
14
  # @return [String]
15
15
  required :version, String
16
16
 
17
- # @!attribute brand
18
- #
19
- # @return [String, nil]
20
- optional :brand, String, nil?: true
21
-
22
- # @!method initialize(elements:, version:, brand: nil)
17
+ # @!method initialize(elements:, version:)
23
18
  # @param elements [Array<Courier::Models::ElementalTextNodeWithType, Courier::Models::ElementalMetaNodeWithType, Courier::Models::ElementalChannelNodeWithType, Courier::Models::ElementalImageNodeWithType, Courier::Models::ElementalActionNodeWithType, Courier::Models::ElementalDividerNodeWithType, Courier::Models::ElementalQuoteNodeWithType>]
24
19
  #
25
20
  # @param version [String] For example, "2022-01-01"
26
- #
27
- # @param brand [String, nil]
28
21
  end
29
22
  end
30
23
  end
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class Journey < Courier::Internal::Type::BaseModel
6
+ # @!attribute id
7
+ # The unique identifier of the journey.
8
+ #
9
+ # @return [String]
10
+ required :id, String
11
+
12
+ # @!attribute name
13
+ # The name of the journey.
14
+ #
15
+ # @return [String]
16
+ required :name, String
17
+
18
+ # @!attribute version
19
+ # The version of the journey (published or draft).
20
+ #
21
+ # @return [Symbol, Courier::Models::Journey::Version]
22
+ required :version, enum: -> { Courier::Journey::Version }
23
+
24
+ # @!attribute created_at
25
+ # ISO 8601 timestamp when the journey was created.
26
+ #
27
+ # @return [Time, nil]
28
+ optional :created_at, Time, api_name: :createdAt
29
+
30
+ # @!attribute updated_at
31
+ # ISO 8601 timestamp when the journey was last updated.
32
+ #
33
+ # @return [Time, nil]
34
+ optional :updated_at, Time, api_name: :updatedAt
35
+
36
+ # @!method initialize(id:, name:, version:, created_at: nil, updated_at: nil)
37
+ # A journey template representing an automation workflow.
38
+ #
39
+ # @param id [String] The unique identifier of the journey.
40
+ #
41
+ # @param name [String] The name of the journey.
42
+ #
43
+ # @param version [Symbol, Courier::Models::Journey::Version] The version of the journey (published or draft).
44
+ #
45
+ # @param created_at [Time] ISO 8601 timestamp when the journey was created.
46
+ #
47
+ # @param updated_at [Time] ISO 8601 timestamp when the journey was last updated.
48
+
49
+ # The version of the journey (published or draft).
50
+ #
51
+ # @see Courier::Models::Journey#version
52
+ module Version
53
+ extend Courier::Internal::Type::Enum
54
+
55
+ PUBLISHED = :published
56
+ DRAFT = :draft
57
+
58
+ # @!method self.values
59
+ # @return [Array<Symbol>]
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ # @see Courier::Resources::Journeys#invoke
6
+ class JourneyInvokeParams < Courier::Models::JourneysInvokeRequest
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ # @!attribute template_id
11
+ #
12
+ # @return [String]
13
+ required :template_id, String
14
+
15
+ # @!method initialize(template_id:, request_options: {})
16
+ # @param template_id [String]
17
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ # @see Courier::Resources::Journeys#list
6
+ class JourneyListParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ # @!attribute cursor
11
+ # A cursor token for pagination. Use the cursor from the previous response to
12
+ # fetch the next page of results.
13
+ #
14
+ # @return [String, nil]
15
+ optional :cursor, String
16
+
17
+ # @!attribute version
18
+ # The version of journeys to retrieve. Accepted values are published (for
19
+ # published journeys) or draft (for draft journeys). Defaults to published.
20
+ #
21
+ # @return [Symbol, Courier::Models::JourneyListParams::Version, nil]
22
+ optional :version, enum: -> { Courier::JourneyListParams::Version }
23
+
24
+ # @!method initialize(cursor: nil, version: nil, request_options: {})
25
+ # Some parameter documentations has been truncated, see
26
+ # {Courier::Models::JourneyListParams} for more details.
27
+ #
28
+ # @param cursor [String] A cursor token for pagination. Use the cursor from the previous response to fetc
29
+ #
30
+ # @param version [Symbol, Courier::Models::JourneyListParams::Version] The version of journeys to retrieve. Accepted values are published (for publishe
31
+ #
32
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
33
+
34
+ # The version of journeys to retrieve. Accepted values are published (for
35
+ # published journeys) or draft (for draft journeys). Defaults to published.
36
+ module Version
37
+ extend Courier::Internal::Type::Enum
38
+
39
+ PUBLISHED = :published
40
+ DRAFT = :draft
41
+
42
+ # @!method self.values
43
+ # @return [Array<Symbol>]
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneysInvokeRequest < Courier::Internal::Type::BaseModel
6
+ # @!attribute data
7
+ # Data payload passed to the journey. The expected shape can be predefined using
8
+ # the schema builder in the journey editor. This data is available in journey
9
+ # steps for condition evaluation and template variable interpolation. Can also
10
+ # contain user identifiers (user_id, userId, anonymousId) if not provided
11
+ # elsewhere.
12
+ #
13
+ # @return [Hash{Symbol=>Object}, nil]
14
+ optional :data, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]
15
+
16
+ # @!attribute profile
17
+ # Profile data for the user. Can contain contact information (email,
18
+ # phone_number), user identifiers (user_id, userId, anonymousId), or any custom
19
+ # profile fields. Profile fields are merged with any existing stored profile for
20
+ # the user. Include context.tenant_id to load a tenant-scoped profile for
21
+ # multi-tenant scenarios.
22
+ #
23
+ # @return [Hash{Symbol=>Object}, nil]
24
+ optional :profile, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]
25
+
26
+ # @!attribute user_id
27
+ # A unique identifier for the user. If not provided, the system will attempt to
28
+ # resolve the user identifier from profile or data objects.
29
+ #
30
+ # @return [String, nil]
31
+ optional :user_id, String
32
+
33
+ # @!method initialize(data: nil, profile: nil, user_id: nil)
34
+ # Some parameter documentations has been truncated, see
35
+ # {Courier::Models::JourneysInvokeRequest} for more details.
36
+ #
37
+ # Request body for invoking a journey. Requires either a user identifier or a
38
+ # profile with contact information. User identifiers can be provided via user_id
39
+ # field, or resolved from profile/data objects (user_id, userId, or anonymousId
40
+ # fields).
41
+ #
42
+ # @param data [Hash{Symbol=>Object}] Data payload passed to the journey. The expected shape can be predefined using t
43
+ #
44
+ # @param profile [Hash{Symbol=>Object}] Profile data for the user. Can contain contact information (email, phone_number)
45
+ #
46
+ # @param user_id [String] A unique identifier for the user. If not provided, the system will attempt to re
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ # @see Courier::Resources::Journeys#invoke
6
+ class JourneysInvokeResponse < Courier::Internal::Type::BaseModel
7
+ # @!attribute run_id
8
+ # A unique identifier for the journey run that was created.
9
+ #
10
+ # @return [String]
11
+ required :run_id, String, api_name: :runId
12
+
13
+ # @!method initialize(run_id:)
14
+ # @param run_id [String] A unique identifier for the journey run that was created.
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ # @see Courier::Resources::Journeys#list
6
+ class JourneysListResponse < Courier::Internal::Type::BaseModel
7
+ # @!attribute cursor
8
+ # A cursor token for pagination. Present when there are more results available.
9
+ #
10
+ # @return [String, nil]
11
+ optional :cursor, String
12
+
13
+ # @!attribute templates
14
+ #
15
+ # @return [Array<Courier::Models::Journey>, nil]
16
+ optional :templates, -> { Courier::Internal::Type::ArrayOf[Courier::Journey] }
17
+
18
+ # @!method initialize(cursor: nil, templates: nil)
19
+ # @param cursor [String] A cursor token for pagination. Present when there are more results available.
20
+ #
21
+ # @param templates [Array<Courier::Models::Journey>]
22
+ end
23
+ end
24
+ end
@@ -7,7 +7,13 @@ module Courier
7
7
  extend Courier::Internal::Type::RequestParameters::Converter
8
8
  include Courier::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute list_id
11
+ #
12
+ # @return [String]
13
+ required :list_id, String
14
+
15
+ # @!method initialize(list_id:, request_options: {})
16
+ # @param list_id [String]
11
17
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
12
18
  end
13
19
  end
@@ -7,7 +7,13 @@ module Courier
7
7
  extend Courier::Internal::Type::RequestParameters::Converter
8
8
  include Courier::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute list_id
11
+ #
12
+ # @return [String]
13
+ required :list_id, String
14
+
15
+ # @!method initialize(list_id:, request_options: {})
16
+ # @param list_id [String]
11
17
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
12
18
  end
13
19
  end
@@ -7,7 +7,13 @@ module Courier
7
7
  extend Courier::Internal::Type::RequestParameters::Converter
8
8
  include Courier::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute list_id
11
+ #
12
+ # @return [String]
13
+ required :list_id, String
14
+
15
+ # @!method initialize(list_id:, request_options: {})
16
+ # @param list_id [String]
11
17
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
12
18
  end
13
19
  end
@@ -7,6 +7,11 @@ module Courier
7
7
  extend Courier::Internal::Type::RequestParameters::Converter
8
8
  include Courier::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute list_id
11
+ #
12
+ # @return [String]
13
+ required :list_id, String
14
+
10
15
  # @!attribute name
11
16
  #
12
17
  # @return [String]
@@ -17,7 +22,8 @@ module Courier
17
22
  # @return [Courier::Models::RecipientPreferences, nil]
18
23
  optional :preferences, -> { Courier::RecipientPreferences }, nil?: true
19
24
 
20
- # @!method initialize(name:, preferences: nil, request_options: {})
25
+ # @!method initialize(list_id:, name:, preferences: nil, request_options: {})
26
+ # @param list_id [String]
21
27
  # @param name [String]
22
28
  # @param preferences [Courier::Models::RecipientPreferences, nil]
23
29
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
@@ -8,12 +8,18 @@ module Courier
8
8
  extend Courier::Internal::Type::RequestParameters::Converter
9
9
  include Courier::Internal::Type::RequestParameters
10
10
 
11
+ # @!attribute list_id
12
+ #
13
+ # @return [String]
14
+ required :list_id, String
15
+
11
16
  # @!attribute recipients
12
17
  #
13
18
  # @return [Array<Courier::Models::PutSubscriptionsRecipient>]
14
19
  required :recipients, -> { Courier::Internal::Type::ArrayOf[Courier::PutSubscriptionsRecipient] }
15
20
 
16
- # @!method initialize(recipients:, request_options: {})
21
+ # @!method initialize(list_id:, recipients:, request_options: {})
22
+ # @param list_id [String]
17
23
  # @param recipients [Array<Courier::Models::PutSubscriptionsRecipient>]
18
24
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
19
25
  end
@@ -8,13 +8,20 @@ module Courier
8
8
  extend Courier::Internal::Type::RequestParameters::Converter
9
9
  include Courier::Internal::Type::RequestParameters
10
10
 
11
+ # @!attribute list_id
12
+ #
13
+ # @return [String]
14
+ required :list_id, String
15
+
11
16
  # @!attribute cursor
12
17
  # A unique identifier that allows for fetching the next set of list subscriptions
13
18
  #
14
19
  # @return [String, nil]
15
20
  optional :cursor, String, nil?: true
16
21
 
17
- # @!method initialize(cursor: nil, request_options: {})
22
+ # @!method initialize(list_id:, cursor: nil, request_options: {})
23
+ # @param list_id [String]
24
+ #
18
25
  # @param cursor [String, nil] A unique identifier that allows for fetching the next set of list subscriptions
19
26
  #
20
27
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
@@ -8,12 +8,18 @@ module Courier
8
8
  extend Courier::Internal::Type::RequestParameters::Converter
9
9
  include Courier::Internal::Type::RequestParameters
10
10
 
11
+ # @!attribute list_id
12
+ #
13
+ # @return [String]
14
+ required :list_id, String
15
+
11
16
  # @!attribute recipients
12
17
  #
13
18
  # @return [Array<Courier::Models::PutSubscriptionsRecipient>]
14
19
  required :recipients, -> { Courier::Internal::Type::ArrayOf[Courier::PutSubscriptionsRecipient] }
15
20
 
16
- # @!method initialize(recipients:, request_options: {})
21
+ # @!method initialize(list_id:, recipients:, request_options: {})
22
+ # @param list_id [String]
17
23
  # @param recipients [Array<Courier::Models::PutSubscriptionsRecipient>]
18
24
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
19
25
  end
@@ -13,13 +13,19 @@ module Courier
13
13
  # @return [String]
14
14
  required :list_id, String
15
15
 
16
+ # @!attribute user_id
17
+ #
18
+ # @return [String]
19
+ required :user_id, String
20
+
16
21
  # @!attribute preferences
17
22
  #
18
23
  # @return [Courier::Models::RecipientPreferences, nil]
19
24
  optional :preferences, -> { Courier::RecipientPreferences }, nil?: true
20
25
 
21
- # @!method initialize(list_id:, preferences: nil, request_options: {})
26
+ # @!method initialize(list_id:, user_id:, preferences: nil, request_options: {})
22
27
  # @param list_id [String]
28
+ # @param user_id [String]
23
29
  # @param preferences [Courier::Models::RecipientPreferences, nil]
24
30
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
25
31
  end
@@ -13,8 +13,14 @@ module Courier
13
13
  # @return [String]
14
14
  required :list_id, String
15
15
 
16
- # @!method initialize(list_id:, request_options: {})
16
+ # @!attribute user_id
17
+ #
18
+ # @return [String]
19
+ required :user_id, String
20
+
21
+ # @!method initialize(list_id:, user_id:, request_options: {})
17
22
  # @param list_id [String]
23
+ # @param user_id [String]
18
24
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
19
25
  end
20
26
  end
@@ -7,7 +7,13 @@ module Courier
7
7
  extend Courier::Internal::Type::RequestParameters::Converter
8
8
  include Courier::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute message_id
11
+ #
12
+ # @return [String]
13
+ required :message_id, String
14
+
15
+ # @!method initialize(message_id:, request_options: {})
16
+ # @param message_id [String]
11
17
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
12
18
  end
13
19
  end
@@ -7,7 +7,13 @@ module Courier
7
7
  extend Courier::Internal::Type::RequestParameters::Converter
8
8
  include Courier::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute message_id
11
+ #
12
+ # @return [String]
13
+ required :message_id, String
14
+
15
+ # @!method initialize(message_id:, request_options: {})
16
+ # @param message_id [String]
11
17
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
12
18
  end
13
19
  end
@@ -11,20 +11,6 @@ module Courier
11
11
  # @return [String]
12
12
  required :id, String
13
13
 
14
- # @!attribute clicked
15
- # A UTC timestamp at which the recipient clicked on a tracked link for the first
16
- # time. Stored as a millisecond representation of the Unix epoch.
17
- #
18
- # @return [Integer]
19
- required :clicked, Integer
20
-
21
- # @!attribute delivered
22
- # A UTC timestamp at which the Integration provider delivered the message. Stored
23
- # as a millisecond representation of the Unix epoch.
24
- #
25
- # @return [Integer]
26
- required :delivered, Integer
27
-
28
14
  # @!attribute enqueued
29
15
  # A UTC timestamp at which Courier received the message request. Stored as a
30
16
  # millisecond representation of the Unix epoch.
@@ -44,71 +30,85 @@ module Courier
44
30
  # @return [String]
45
31
  required :notification, String
46
32
 
47
- # @!attribute opened
48
- # A UTC timestamp at which the recipient opened a message for the first time.
49
- # Stored as a millisecond representation of the Unix epoch.
50
- #
51
- # @return [Integer]
52
- required :opened, Integer
53
-
54
33
  # @!attribute recipient
55
34
  # A unique identifier associated with the recipient of the delivered message.
56
35
  #
57
36
  # @return [String]
58
37
  required :recipient, String
59
38
 
60
- # @!attribute sent
61
- # A UTC timestamp at which Courier passed the message to the Integration provider.
62
- # Stored as a millisecond representation of the Unix epoch.
63
- #
64
- # @return [Integer]
65
- required :sent, Integer
66
-
67
39
  # @!attribute status
68
40
  # The current status of the message.
69
41
  #
70
42
  # @return [Symbol, Courier::Models::MessageDetails::Status]
71
43
  required :status, enum: -> { Courier::MessageDetails::Status }
72
44
 
45
+ # @!attribute clicked
46
+ # A UTC timestamp at which the recipient clicked on a tracked link for the first
47
+ # time. Stored as a millisecond representation of the Unix epoch.
48
+ #
49
+ # @return [Integer, nil]
50
+ optional :clicked, Integer
51
+
52
+ # @!attribute delivered
53
+ # A UTC timestamp at which the Integration provider delivered the message. Stored
54
+ # as a millisecond representation of the Unix epoch.
55
+ #
56
+ # @return [Integer, nil]
57
+ optional :delivered, Integer
58
+
73
59
  # @!attribute error
74
60
  # A message describing the error that occurred.
75
61
  #
76
62
  # @return [String, nil]
77
63
  optional :error, String, nil?: true
78
64
 
65
+ # @!attribute opened
66
+ # A UTC timestamp at which the recipient opened a message for the first time.
67
+ # Stored as a millisecond representation of the Unix epoch.
68
+ #
69
+ # @return [Integer, nil]
70
+ optional :opened, Integer
71
+
79
72
  # @!attribute reason
80
73
  # The reason for the current status of the message.
81
74
  #
82
75
  # @return [Symbol, Courier::Models::MessageDetails::Reason, nil]
83
76
  optional :reason, enum: -> { Courier::MessageDetails::Reason }, nil?: true
84
77
 
85
- # @!method initialize(id:, clicked:, delivered:, enqueued:, event:, notification:, opened:, recipient:, sent:, status:, error: nil, reason: nil)
78
+ # @!attribute sent
79
+ # A UTC timestamp at which Courier passed the message to the Integration provider.
80
+ # Stored as a millisecond representation of the Unix epoch.
81
+ #
82
+ # @return [Integer, nil]
83
+ optional :sent, Integer
84
+
85
+ # @!method initialize(id:, enqueued:, event:, notification:, recipient:, status:, clicked: nil, delivered: nil, error: nil, opened: nil, reason: nil, sent: nil)
86
86
  # Some parameter documentations has been truncated, see
87
87
  # {Courier::Models::MessageDetails} for more details.
88
88
  #
89
89
  # @param id [String] A unique identifier associated with the message you wish to retrieve (results fr
90
90
  #
91
- # @param clicked [Integer] A UTC timestamp at which the recipient clicked on a tracked link for the first t
92
- #
93
- # @param delivered [Integer] A UTC timestamp at which the Integration provider delivered the message. Stored
94
- #
95
91
  # @param enqueued [Integer] A UTC timestamp at which Courier received the message request. Stored as a milli
96
92
  #
97
93
  # @param event [String] A unique identifier associated with the event of the delivered message.
98
94
  #
99
95
  # @param notification [String] A unique identifier associated with the notification of the delivered message.
100
96
  #
101
- # @param opened [Integer] A UTC timestamp at which the recipient opened a message for the first time. Stor
102
- #
103
97
  # @param recipient [String] A unique identifier associated with the recipient of the delivered message.
104
98
  #
105
- # @param sent [Integer] A UTC timestamp at which Courier passed the message to the Integration provider.
106
- #
107
99
  # @param status [Symbol, Courier::Models::MessageDetails::Status] The current status of the message.
108
100
  #
101
+ # @param clicked [Integer] A UTC timestamp at which the recipient clicked on a tracked link for the first t
102
+ #
103
+ # @param delivered [Integer] A UTC timestamp at which the Integration provider delivered the message. Stored
104
+ #
109
105
  # @param error [String, nil] A message describing the error that occurred.
110
106
  #
107
+ # @param opened [Integer] A UTC timestamp at which the recipient opened a message for the first time. Stor
108
+ #
111
109
  # @param reason [Symbol, Courier::Models::MessageDetails::Reason, nil] The reason for the current status of the message.
110
+ #
111
+ # @param sent [Integer] A UTC timestamp at which Courier passed the message to the Integration provider.
112
112
 
113
113
  # The current status of the message.
114
114
  #
@@ -7,13 +7,20 @@ module Courier
7
7
  extend Courier::Internal::Type::RequestParameters::Converter
8
8
  include Courier::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute message_id
11
+ #
12
+ # @return [String]
13
+ required :message_id, String
14
+
10
15
  # @!attribute type
11
16
  # A supported Message History type that will filter the events returned.
12
17
  #
13
18
  # @return [String, nil]
14
19
  optional :type, String, nil?: true
15
20
 
16
- # @!method initialize(type: nil, request_options: {})
21
+ # @!method initialize(message_id:, type: nil, request_options: {})
22
+ # @param message_id [String]
23
+ #
17
24
  # @param type [String, nil] A supported Message History type that will filter the events returned.
18
25
  #
19
26
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
@@ -7,7 +7,13 @@ module Courier
7
7
  extend Courier::Internal::Type::RequestParameters::Converter
8
8
  include Courier::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute message_id
11
+ #
12
+ # @return [String]
13
+ required :message_id, String
14
+
15
+ # @!method initialize(message_id:, request_options: {})
16
+ # @param message_id [String]
11
17
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
12
18
  end
13
19
  end
@@ -7,7 +7,13 @@ module Courier
7
7
  extend Courier::Internal::Type::RequestParameters::Converter
8
8
  include Courier::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute id
11
+ #
12
+ # @return [String]
13
+ required :id, String
14
+
15
+ # @!method initialize(id:, request_options: {})
16
+ # @param id [String]
11
17
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
12
18
  end
13
19
  end
@@ -13,8 +13,14 @@ module Courier
13
13
  # @return [String]
14
14
  required :id, String
15
15
 
16
- # @!method initialize(id:, request_options: {})
16
+ # @!attribute submission_id
17
+ #
18
+ # @return [String]
19
+ required :submission_id, String
20
+
21
+ # @!method initialize(id:, submission_id:, request_options: {})
17
22
  # @param id [String]
23
+ # @param submission_id [String]
18
24
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
19
25
  end
20
26
  end
@@ -13,8 +13,14 @@ module Courier
13
13
  # @return [String]
14
14
  required :id, String
15
15
 
16
- # @!method initialize(id:, request_options: {})
16
+ # @!attribute submission_id
17
+ #
18
+ # @return [String]
19
+ required :submission_id, String
20
+
21
+ # @!method initialize(id:, submission_id:, request_options: {})
17
22
  # @param id [String]
23
+ # @param submission_id [String]
18
24
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
19
25
  end
20
26
  end