trycourier 4.9.0 → 4.10.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 +9 -0
- data/lib/courier/models/associated_notification_list_response.rb +24 -0
- data/lib/courier/models/element_with_checksums.rb +60 -0
- data/lib/courier/models/notification_content_get_response.rb +26 -0
- data/lib/courier/models/notification_content_mutation_response.rb +61 -0
- data/lib/courier/models/notification_content_put_request.rb +51 -0
- data/lib/courier/models/notification_element_put_request.rb +62 -0
- data/lib/courier/models/notification_get_content.rb +0 -1
- data/lib/courier/models/notification_locale_put_request.rb +39 -0
- data/lib/courier/models/notification_put_content_params.rb +20 -0
- data/lib/courier/models/notification_put_element_params.rb +26 -0
- data/lib/courier/models/notification_put_locale_params.rb +26 -0
- data/lib/courier/models/notification_retrieve_content_params.rb +14 -1
- data/lib/courier/models/notification_retrieve_content_response.rb +21 -0
- data/lib/courier/models/notification_template_state.rb +16 -0
- data/lib/courier/models/routing_strategy_list_notifications_params.rb +37 -0
- data/lib/courier/models.rb +24 -0
- data/lib/courier/resources/notifications.rb +124 -9
- data/lib/courier/resources/routing_strategies.rb +28 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +13 -2
- data/rbi/courier/models/associated_notification_list_response.rbi +45 -0
- data/rbi/courier/models/element_with_checksums.rbi +109 -0
- data/rbi/courier/models/notification_content_get_response.rbi +45 -0
- data/rbi/courier/models/notification_content_mutation_response.rbi +95 -0
- data/rbi/courier/models/notification_content_put_request.rbi +145 -0
- data/rbi/courier/models/notification_element_put_request.rbi +98 -0
- data/rbi/courier/models/notification_locale_put_request.rbi +79 -0
- data/rbi/courier/models/notification_put_content_params.rbi +38 -0
- data/rbi/courier/models/notification_put_element_params.rbi +46 -0
- data/rbi/courier/models/notification_put_locale_params.rbi +46 -0
- data/rbi/courier/models/notification_retrieve_content_params.rbi +21 -2
- data/rbi/courier/models/notification_retrieve_content_response.rbi +29 -0
- data/rbi/courier/models/notification_template_state.rbi +26 -0
- data/rbi/courier/models/routing_strategy_list_notifications_params.rbi +63 -0
- data/rbi/courier/models.rbi +28 -0
- data/rbi/courier/resources/notifications.rbi +103 -5
- data/rbi/courier/resources/routing_strategies.rbi +21 -0
- data/sig/courier/models/associated_notification_list_response.rbs +25 -0
- data/sig/courier/models/element_with_checksums.rbs +60 -0
- data/sig/courier/models/notification_content_get_response.rbs +22 -0
- data/sig/courier/models/notification_content_mutation_response.rbs +47 -0
- data/sig/courier/models/notification_content_put_request.rbs +50 -0
- data/sig/courier/models/notification_element_put_request.rbs +64 -0
- data/sig/courier/models/notification_locale_put_request.rbs +39 -0
- data/sig/courier/models/notification_put_content_params.rbs +22 -0
- data/sig/courier/models/notification_put_element_params.rbs +32 -0
- data/sig/courier/models/notification_put_locale_params.rbs +32 -0
- data/sig/courier/models/notification_retrieve_content_params.rbs +12 -2
- data/sig/courier/models/notification_retrieve_content_response.rbs +12 -0
- data/sig/courier/models/notification_template_state.rbs +14 -0
- data/sig/courier/models/routing_strategy_list_notifications_params.rbs +34 -0
- data/sig/courier/models.rbs +24 -0
- data/sig/courier/resources/notifications.rbs +30 -3
- data/sig/courier/resources/routing_strategies.rbs +7 -0
- metadata +41 -8
- data/lib/courier/models/notifications/draft_retrieve_content_params.rb +0 -22
- data/lib/courier/resources/notifications/draft.rb +0 -33
- data/rbi/courier/models/notifications/draft_retrieve_content_params.rbi +0 -40
- data/rbi/courier/resources/notifications/draft.rbi +0 -23
- data/sig/courier/models/notifications/draft_retrieve_content_params.rbs +0 -22
- data/sig/courier/resources/notifications/draft.rbs +0 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d71ef55224ae3a498561c16171a3a2f4d7043cdd17d9c505ef34e70179a6c35b
|
|
4
|
+
data.tar.gz: da26b63925075f65d3d953a4a810ea535431e65274528b902000121d928c7fcb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 237604be72c50aa572c525addf58d4e3f723142ffbd5863c9dfb301882bf9efa4c77e4eae7a143cafc3ed1981fb0602be0bb7a1046d4be8e5587c2c15988fd52
|
|
7
|
+
data.tar.gz: cfdb4b9bcf90da1d34e9aabbe994404f49e6df75d4d56368509034b60ceb55eb0461d492cbaf2d2cb7a4b92e17f54a6050f7b605a0f2c00a8b9788c6142255d1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.10.0 (2026-04-08)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v4.9.0...v4.10.0](https://github.com/trycourier/courier-ruby/compare/v4.9.0...v4.10.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add list_notifications method to routing_strategies ([ce8f121](https://github.com/trycourier/courier-ruby/commit/ce8f1217d52377144e053e51497310e71fef1dea))
|
|
10
|
+
* **api:** add put_content/put_element/put_locale, remove draft resource, update retrieve_content ([ecb21e4](https://github.com/trycourier/courier-ruby/commit/ecb21e4913ec80513471153abab2e75d80afffb5))
|
|
11
|
+
|
|
3
12
|
## 4.9.0 (2026-04-01)
|
|
4
13
|
|
|
5
14
|
Full Changelog: [v4.8.0...v4.9.0](https://github.com/trycourier/courier-ruby/compare/v4.8.0...v4.9.0)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::RoutingStrategies#list_notifications
|
|
6
|
+
class AssociatedNotificationListResponse < 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::NotificationTemplateSummary>]
|
|
15
|
+
required :results, -> { Courier::Internal::Type::ArrayOf[Courier::NotificationTemplateSummary] }
|
|
16
|
+
|
|
17
|
+
# @!method initialize(paging:, results:)
|
|
18
|
+
# Paginated list of notification templates associated with a routing strategy.
|
|
19
|
+
#
|
|
20
|
+
# @param paging [Courier::Models::Paging]
|
|
21
|
+
# @param results [Array<Courier::Models::NotificationTemplateSummary>]
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class ElementWithChecksums < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute checksum
|
|
7
|
+
# MD5 hash of translatable content.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :checksum, String
|
|
11
|
+
|
|
12
|
+
# @!attribute type
|
|
13
|
+
# Element type (text, meta, action, etc.).
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :type, String
|
|
17
|
+
|
|
18
|
+
# @!attribute id
|
|
19
|
+
#
|
|
20
|
+
# @return [String, nil]
|
|
21
|
+
optional :id, String
|
|
22
|
+
|
|
23
|
+
# @!attribute elements
|
|
24
|
+
# Nested child elements (for group-type elements).
|
|
25
|
+
#
|
|
26
|
+
# @return [Array<Courier::Models::ElementWithChecksums>, nil]
|
|
27
|
+
optional :elements, -> { Courier::Internal::Type::ArrayOf[Courier::ElementWithChecksums] }
|
|
28
|
+
|
|
29
|
+
# @!attribute locales
|
|
30
|
+
# Locale-specific content with checksums.
|
|
31
|
+
#
|
|
32
|
+
# @return [Hash{Symbol=>Courier::Models::ElementWithChecksums::Locale}, nil]
|
|
33
|
+
optional :locales, -> { Courier::Internal::Type::HashOf[Courier::ElementWithChecksums::Locale] }
|
|
34
|
+
|
|
35
|
+
# @!method initialize(checksum:, type:, id: nil, elements: nil, locales: nil)
|
|
36
|
+
# An element with its content checksum and optional nested elements and locale
|
|
37
|
+
# checksums.
|
|
38
|
+
#
|
|
39
|
+
# @param checksum [String] MD5 hash of translatable content.
|
|
40
|
+
#
|
|
41
|
+
# @param type [String] Element type (text, meta, action, etc.).
|
|
42
|
+
#
|
|
43
|
+
# @param id [String]
|
|
44
|
+
#
|
|
45
|
+
# @param elements [Array<Courier::Models::ElementWithChecksums>] Nested child elements (for group-type elements).
|
|
46
|
+
#
|
|
47
|
+
# @param locales [Hash{Symbol=>Courier::Models::ElementWithChecksums::Locale}] Locale-specific content with checksums.
|
|
48
|
+
|
|
49
|
+
class Locale < Courier::Internal::Type::BaseModel
|
|
50
|
+
# @!attribute checksum
|
|
51
|
+
#
|
|
52
|
+
# @return [String]
|
|
53
|
+
required :checksum, String
|
|
54
|
+
|
|
55
|
+
# @!method initialize(checksum:)
|
|
56
|
+
# @param checksum [String]
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationContentGetResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute elements
|
|
7
|
+
#
|
|
8
|
+
# @return [Array<Courier::Models::ElementWithChecksums>]
|
|
9
|
+
required :elements, -> { Courier::Internal::Type::ArrayOf[Courier::ElementWithChecksums] }
|
|
10
|
+
|
|
11
|
+
# @!attribute version
|
|
12
|
+
# Content version identifier.
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :version, String
|
|
16
|
+
|
|
17
|
+
# @!method initialize(elements:, version:)
|
|
18
|
+
# Elemental content response for V2 templates. Contains versioned elements with
|
|
19
|
+
# content checksums.
|
|
20
|
+
#
|
|
21
|
+
# @param elements [Array<Courier::Models::ElementWithChecksums>]
|
|
22
|
+
#
|
|
23
|
+
# @param version [String] Content version identifier.
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Notifications#put_content
|
|
6
|
+
class NotificationContentMutationResponse < Courier::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# Template ID.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute elements
|
|
14
|
+
#
|
|
15
|
+
# @return [Array<Courier::Models::NotificationContentMutationResponse::Element>]
|
|
16
|
+
required :elements,
|
|
17
|
+
-> { Courier::Internal::Type::ArrayOf[Courier::NotificationContentMutationResponse::Element] }
|
|
18
|
+
|
|
19
|
+
# @!attribute state
|
|
20
|
+
# Template state. Defaults to `DRAFT`.
|
|
21
|
+
#
|
|
22
|
+
# @return [Symbol, Courier::Models::NotificationTemplateState]
|
|
23
|
+
required :state, enum: -> { Courier::NotificationTemplateState }
|
|
24
|
+
|
|
25
|
+
# @!attribute version
|
|
26
|
+
# Content version identifier.
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :version, String
|
|
30
|
+
|
|
31
|
+
# @!method initialize(id:, elements:, state:, version:)
|
|
32
|
+
# Shared mutation response for `PUT` content, `PUT` element, and `PUT` locale
|
|
33
|
+
# operations. Contains the template ID, content version, per-element checksums,
|
|
34
|
+
# and resulting state.
|
|
35
|
+
#
|
|
36
|
+
# @param id [String] Template ID.
|
|
37
|
+
#
|
|
38
|
+
# @param elements [Array<Courier::Models::NotificationContentMutationResponse::Element>]
|
|
39
|
+
#
|
|
40
|
+
# @param state [Symbol, Courier::Models::NotificationTemplateState] Template state. Defaults to `DRAFT`.
|
|
41
|
+
#
|
|
42
|
+
# @param version [String] Content version identifier.
|
|
43
|
+
|
|
44
|
+
class Element < Courier::Internal::Type::BaseModel
|
|
45
|
+
# @!attribute id
|
|
46
|
+
#
|
|
47
|
+
# @return [String]
|
|
48
|
+
required :id, String
|
|
49
|
+
|
|
50
|
+
# @!attribute checksum
|
|
51
|
+
#
|
|
52
|
+
# @return [String]
|
|
53
|
+
required :checksum, String
|
|
54
|
+
|
|
55
|
+
# @!method initialize(id:, checksum:)
|
|
56
|
+
# @param id [String]
|
|
57
|
+
# @param checksum [String]
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationContentPutRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute content
|
|
7
|
+
# Elemental content payload. The server defaults `version` when omitted.
|
|
8
|
+
#
|
|
9
|
+
# @return [Courier::Models::NotificationContentPutRequest::Content]
|
|
10
|
+
required :content, -> { Courier::NotificationContentPutRequest::Content }
|
|
11
|
+
|
|
12
|
+
# @!attribute state
|
|
13
|
+
# Template state. Defaults to `DRAFT`.
|
|
14
|
+
#
|
|
15
|
+
# @return [Symbol, Courier::Models::NotificationTemplateState, nil]
|
|
16
|
+
optional :state, enum: -> { Courier::NotificationTemplateState }
|
|
17
|
+
|
|
18
|
+
# @!method initialize(content:, state: nil)
|
|
19
|
+
# Request body for replacing the elemental content of a notification template.
|
|
20
|
+
#
|
|
21
|
+
# @param content [Courier::Models::NotificationContentPutRequest::Content] Elemental content payload. The server defaults `version` when omitted.
|
|
22
|
+
#
|
|
23
|
+
# @param state [Symbol, Courier::Models::NotificationTemplateState] Template state. Defaults to `DRAFT`.
|
|
24
|
+
|
|
25
|
+
# @see Courier::Models::NotificationContentPutRequest#content
|
|
26
|
+
class Content < Courier::Internal::Type::BaseModel
|
|
27
|
+
# @!attribute elements
|
|
28
|
+
#
|
|
29
|
+
# @return [Array<Courier::Models::ElementalTextNodeWithType, Courier::Models::ElementalMetaNodeWithType, Courier::Models::ElementalChannelNodeWithType, Courier::Models::ElementalImageNodeWithType, Courier::Models::ElementalActionNodeWithType, Courier::Models::ElementalDividerNodeWithType, Courier::Models::ElementalQuoteNodeWithType, Courier::Models::ElementalHTMLNodeWithType>]
|
|
30
|
+
required :elements, -> { Courier::Internal::Type::ArrayOf[union: Courier::ElementalNode] }
|
|
31
|
+
|
|
32
|
+
# @!attribute version
|
|
33
|
+
# Content version identifier (e.g., `2022-01-01`). Optional; server defaults when
|
|
34
|
+
# omitted.
|
|
35
|
+
#
|
|
36
|
+
# @return [String, nil]
|
|
37
|
+
optional :version, String
|
|
38
|
+
|
|
39
|
+
# @!method initialize(elements:, version: nil)
|
|
40
|
+
# Some parameter documentations has been truncated, see
|
|
41
|
+
# {Courier::Models::NotificationContentPutRequest::Content} for more details.
|
|
42
|
+
#
|
|
43
|
+
# Elemental content payload. The server defaults `version` when omitted.
|
|
44
|
+
#
|
|
45
|
+
# @param elements [Array<Courier::Models::ElementalTextNodeWithType, Courier::Models::ElementalMetaNodeWithType, Courier::Models::ElementalChannelNodeWithType, Courier::Models::ElementalImageNodeWithType, Courier::Models::ElementalActionNodeWithType, Courier::Models::ElementalDividerNodeWithType, Courier::Models::ElementalQuoteNodeWithType, Courier::Models::ElementalHTMLNodeWithType>]
|
|
46
|
+
#
|
|
47
|
+
# @param version [String] Content version identifier (e.g., `2022-01-01`). Optional; server defaults when
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationElementPutRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute type
|
|
7
|
+
# Element type (text, meta, action, image, etc.).
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :type, String
|
|
11
|
+
|
|
12
|
+
# @!attribute channels
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<String>, nil]
|
|
15
|
+
optional :channels, Courier::Internal::Type::ArrayOf[String]
|
|
16
|
+
|
|
17
|
+
# @!attribute data
|
|
18
|
+
#
|
|
19
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
20
|
+
optional :data, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]
|
|
21
|
+
|
|
22
|
+
# @!attribute if_
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
optional :if_, String, api_name: :if
|
|
26
|
+
|
|
27
|
+
# @!attribute loop_
|
|
28
|
+
#
|
|
29
|
+
# @return [String, nil]
|
|
30
|
+
optional :loop_, String, api_name: :loop
|
|
31
|
+
|
|
32
|
+
# @!attribute ref
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
optional :ref, String
|
|
36
|
+
|
|
37
|
+
# @!attribute state
|
|
38
|
+
# Template state. Defaults to `DRAFT`.
|
|
39
|
+
#
|
|
40
|
+
# @return [Symbol, Courier::Models::NotificationTemplateState, nil]
|
|
41
|
+
optional :state, enum: -> { Courier::NotificationTemplateState }
|
|
42
|
+
|
|
43
|
+
# @!method initialize(type:, channels: nil, data: nil, if_: nil, loop_: nil, ref: nil, state: nil)
|
|
44
|
+
# Request body for updating a single element. Additional type-specific fields are
|
|
45
|
+
# allowed.
|
|
46
|
+
#
|
|
47
|
+
# @param type [String] Element type (text, meta, action, image, etc.).
|
|
48
|
+
#
|
|
49
|
+
# @param channels [Array<String>]
|
|
50
|
+
#
|
|
51
|
+
# @param data [Hash{Symbol=>Object}]
|
|
52
|
+
#
|
|
53
|
+
# @param if_ [String]
|
|
54
|
+
#
|
|
55
|
+
# @param loop_ [String]
|
|
56
|
+
#
|
|
57
|
+
# @param ref [String]
|
|
58
|
+
#
|
|
59
|
+
# @param state [Symbol, Courier::Models::NotificationTemplateState] Template state. Defaults to `DRAFT`.
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationLocalePutRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute elements
|
|
7
|
+
# Elements with locale-specific content overrides.
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<Courier::Models::NotificationLocalePutRequest::Element>]
|
|
10
|
+
required :elements,
|
|
11
|
+
-> { Courier::Internal::Type::ArrayOf[Courier::NotificationLocalePutRequest::Element] }
|
|
12
|
+
|
|
13
|
+
# @!attribute state
|
|
14
|
+
# Template state. Defaults to `DRAFT`.
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, Courier::Models::NotificationTemplateState, nil]
|
|
17
|
+
optional :state, enum: -> { Courier::NotificationTemplateState }
|
|
18
|
+
|
|
19
|
+
# @!method initialize(elements:, state: nil)
|
|
20
|
+
# Request body for setting locale-specific content overrides. Each element
|
|
21
|
+
# override must include the target element ID.
|
|
22
|
+
#
|
|
23
|
+
# @param elements [Array<Courier::Models::NotificationLocalePutRequest::Element>] Elements with locale-specific content overrides.
|
|
24
|
+
#
|
|
25
|
+
# @param state [Symbol, Courier::Models::NotificationTemplateState] Template state. Defaults to `DRAFT`.
|
|
26
|
+
|
|
27
|
+
class Element < Courier::Internal::Type::BaseModel
|
|
28
|
+
# @!attribute id
|
|
29
|
+
# Target element ID.
|
|
30
|
+
#
|
|
31
|
+
# @return [String]
|
|
32
|
+
required :id, String
|
|
33
|
+
|
|
34
|
+
# @!method initialize(id:)
|
|
35
|
+
# @param id [String] Target element ID.
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Notifications#put_content
|
|
6
|
+
class NotificationPutContentParams < Courier::Models::NotificationContentPutRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(id:, request_options: {})
|
|
16
|
+
# @param id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Notifications#put_element
|
|
6
|
+
class NotificationPutElementParams < Courier::Models::NotificationElementPutRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute element_id
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :element_id, String
|
|
19
|
+
|
|
20
|
+
# @!method initialize(id:, element_id:, request_options: {})
|
|
21
|
+
# @param id [String]
|
|
22
|
+
# @param element_id [String]
|
|
23
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Notifications#put_locale
|
|
6
|
+
class NotificationPutLocaleParams < Courier::Models::NotificationLocalePutRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute locale_id
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :locale_id, String
|
|
19
|
+
|
|
20
|
+
# @!method initialize(id:, locale_id:, request_options: {})
|
|
21
|
+
# @param id [String]
|
|
22
|
+
# @param locale_id [String]
|
|
23
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -12,8 +12,21 @@ module Courier
|
|
|
12
12
|
# @return [String]
|
|
13
13
|
required :id, String
|
|
14
14
|
|
|
15
|
-
# @!
|
|
15
|
+
# @!attribute version
|
|
16
|
+
# Accepts `draft`, `published`, or a version string (e.g., `v001`). Defaults to
|
|
17
|
+
# `published`.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :version, String
|
|
21
|
+
|
|
22
|
+
# @!method initialize(id:, version: nil, request_options: {})
|
|
23
|
+
# Some parameter documentations has been truncated, see
|
|
24
|
+
# {Courier::Models::NotificationRetrieveContentParams} for more details.
|
|
25
|
+
#
|
|
16
26
|
# @param id [String]
|
|
27
|
+
#
|
|
28
|
+
# @param version [String] Accepts `draft`, `published`, or a version string (e.g., `v001`). Defaults to `p
|
|
29
|
+
#
|
|
17
30
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
31
|
end
|
|
19
32
|
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# Elemental content response for V2 templates. Contains versioned elements with
|
|
6
|
+
# content checksums.
|
|
7
|
+
#
|
|
8
|
+
# @see Courier::Resources::Notifications#retrieve_content
|
|
9
|
+
module NotificationRetrieveContentResponse
|
|
10
|
+
extend Courier::Internal::Type::Union
|
|
11
|
+
|
|
12
|
+
# Elemental content response for V2 templates. Contains versioned elements with content checksums.
|
|
13
|
+
variant -> { Courier::NotificationContentGetResponse }
|
|
14
|
+
|
|
15
|
+
variant -> { Courier::NotificationGetContent }
|
|
16
|
+
|
|
17
|
+
# @!method self.variants
|
|
18
|
+
# @return [Array(Courier::Models::NotificationContentGetResponse, Courier::Models::NotificationGetContent)]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# Template state. Defaults to `DRAFT`.
|
|
6
|
+
module NotificationTemplateState
|
|
7
|
+
extend Courier::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
DRAFT = :DRAFT
|
|
10
|
+
PUBLISHED = :PUBLISHED
|
|
11
|
+
|
|
12
|
+
# @!method self.values
|
|
13
|
+
# @return [Array<Symbol>]
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::RoutingStrategies#list_notifications
|
|
6
|
+
class RoutingStrategyListNotificationsParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute cursor
|
|
16
|
+
# Opaque pagination cursor from a previous response. Omit for the first page.
|
|
17
|
+
#
|
|
18
|
+
# @return [String, nil]
|
|
19
|
+
optional :cursor, String, nil?: true
|
|
20
|
+
|
|
21
|
+
# @!attribute limit
|
|
22
|
+
# Maximum number of results per page. Default 20, max 100.
|
|
23
|
+
#
|
|
24
|
+
# @return [Integer, nil]
|
|
25
|
+
optional :limit, Integer
|
|
26
|
+
|
|
27
|
+
# @!method initialize(id:, cursor: nil, limit: nil, request_options: {})
|
|
28
|
+
# @param id [String]
|
|
29
|
+
#
|
|
30
|
+
# @param cursor [String, nil] Opaque pagination cursor from a previous response. Omit for the first page.
|
|
31
|
+
#
|
|
32
|
+
# @param limit [Integer] Maximum number of results per page. Default 20, max 100.
|
|
33
|
+
#
|
|
34
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
data/lib/courier/models.rb
CHANGED
|
@@ -45,6 +45,8 @@ module Courier
|
|
|
45
45
|
|
|
46
46
|
Alignment = Courier::Models::Alignment
|
|
47
47
|
|
|
48
|
+
AssociatedNotificationListResponse = Courier::Models::AssociatedNotificationListResponse
|
|
49
|
+
|
|
48
50
|
Audience = Courier::Models::Audience
|
|
49
51
|
|
|
50
52
|
AudienceDeleteParams = Courier::Models::AudienceDeleteParams
|
|
@@ -163,6 +165,8 @@ module Courier
|
|
|
163
165
|
|
|
164
166
|
ElementalTextNodeWithType = Courier::Models::ElementalTextNodeWithType
|
|
165
167
|
|
|
168
|
+
ElementWithChecksums = Courier::Models::ElementWithChecksums
|
|
169
|
+
|
|
166
170
|
EmailFooter = Courier::Models::EmailFooter
|
|
167
171
|
|
|
168
172
|
EmailHead = Courier::Models::EmailHead
|
|
@@ -255,18 +259,34 @@ module Courier
|
|
|
255
259
|
|
|
256
260
|
NotificationArchiveParams = Courier::Models::NotificationArchiveParams
|
|
257
261
|
|
|
262
|
+
NotificationContentGetResponse = Courier::Models::NotificationContentGetResponse
|
|
263
|
+
|
|
264
|
+
NotificationContentMutationResponse = Courier::Models::NotificationContentMutationResponse
|
|
265
|
+
|
|
266
|
+
NotificationContentPutRequest = Courier::Models::NotificationContentPutRequest
|
|
267
|
+
|
|
258
268
|
NotificationCreateParams = Courier::Models::NotificationCreateParams
|
|
259
269
|
|
|
270
|
+
NotificationElementPutRequest = Courier::Models::NotificationElementPutRequest
|
|
271
|
+
|
|
260
272
|
NotificationGetContent = Courier::Models::NotificationGetContent
|
|
261
273
|
|
|
262
274
|
NotificationListParams = Courier::Models::NotificationListParams
|
|
263
275
|
|
|
264
276
|
NotificationListVersionsParams = Courier::Models::NotificationListVersionsParams
|
|
265
277
|
|
|
278
|
+
NotificationLocalePutRequest = Courier::Models::NotificationLocalePutRequest
|
|
279
|
+
|
|
266
280
|
NotificationPreferenceDetails = Courier::Models::NotificationPreferenceDetails
|
|
267
281
|
|
|
268
282
|
NotificationPublishParams = Courier::Models::NotificationPublishParams
|
|
269
283
|
|
|
284
|
+
NotificationPutContentParams = Courier::Models::NotificationPutContentParams
|
|
285
|
+
|
|
286
|
+
NotificationPutElementParams = Courier::Models::NotificationPutElementParams
|
|
287
|
+
|
|
288
|
+
NotificationPutLocaleParams = Courier::Models::NotificationPutLocaleParams
|
|
289
|
+
|
|
270
290
|
NotificationReplaceParams = Courier::Models::NotificationReplaceParams
|
|
271
291
|
|
|
272
292
|
NotificationRetrieveContentParams = Courier::Models::NotificationRetrieveContentParams
|
|
@@ -285,6 +305,8 @@ module Courier
|
|
|
285
305
|
|
|
286
306
|
NotificationTemplatePublishRequest = Courier::Models::NotificationTemplatePublishRequest
|
|
287
307
|
|
|
308
|
+
NotificationTemplateState = Courier::Models::NotificationTemplateState
|
|
309
|
+
|
|
288
310
|
NotificationTemplateSummary = Courier::Models::NotificationTemplateSummary
|
|
289
311
|
|
|
290
312
|
NotificationTemplateUpdateRequest = Courier::Models::NotificationTemplateUpdateRequest
|
|
@@ -351,6 +373,8 @@ module Courier
|
|
|
351
373
|
|
|
352
374
|
RoutingStrategyGetResponse = Courier::Models::RoutingStrategyGetResponse
|
|
353
375
|
|
|
376
|
+
RoutingStrategyListNotificationsParams = Courier::Models::RoutingStrategyListNotificationsParams
|
|
377
|
+
|
|
354
378
|
RoutingStrategyListParams = Courier::Models::RoutingStrategyListParams
|
|
355
379
|
|
|
356
380
|
RoutingStrategyListResponse = Courier::Models::RoutingStrategyListResponse
|