@@ -10,108 +10,123 @@ class NotificationListResponse < Courier::Internal::Type::BaseModel
1010 required :paging , -> { Courier ::Paging }
1111
1212 # @!attribute results
13+ # Notification templates in this workspace.
1314 #
14- # @return [Array<Courier::Models::NotificationListResponse::Result>]
15+ # @return [Array<Courier::Models::NotificationListResponse::Result::Notification, Courier::Models::NotificationTemplateSummary >]
1516 required :results ,
16- -> { Courier ::Internal ::Type ::ArrayOf [ Courier ::Models ::NotificationListResponse ::Result ] }
17+ -> { Courier ::Internal ::Type ::ArrayOf [ union : Courier ::Models ::NotificationListResponse ::Result ] }
1718
1819 # @!method initialize(paging:, results:)
1920 # @param paging [Courier::Models::Paging]
20- # @param results [Array<Courier::Models::NotificationListResponse::Result>]
21-
22- class Result < Courier ::Internal ::Type ::BaseModel
23- # @!attribute id
24- #
25- # @return [String]
26- required :id , String
27-
28- # @!attribute created_at
29- #
30- # @return [Integer]
31- required :created_at , Integer
32-
33- # @!attribute event_ids
34- # Array of event IDs associated with this notification
35- #
36- # @return [Array<String>]
37- required :event_ids , Courier ::Internal ::Type ::ArrayOf [ String ]
38-
39- # @!attribute note
40- #
41- # @return [String]
42- required :note , String
43-
44- # @!attribute routing
45- #
46- # @return [Courier::Models::MessageRouting]
47- required :routing , -> { Courier ::MessageRouting }
48-
49- # @!attribute topic_id
50- #
51- # @return [String]
52- required :topic_id , String
53-
54- # @!attribute updated_at
55- #
56- # @return [Integer]
57- required :updated_at , Integer
58-
59- # @!attribute tags
60- #
61- # @return [Courier::Models::NotificationListResponse::Result::Tags, nil]
62- optional :tags , -> { Courier ::Models ::NotificationListResponse ::Result ::Tags } , nil? : true
63-
64- # @!attribute title
65- #
66- # @return [String, nil]
67- optional :title , String , nil? : true
68-
69- # @!method initialize(id:, created_at:, event_ids:, note:, routing:, topic_id:, updated_at:, tags: nil, title: nil)
70- # @param id [String]
71- #
72- # @param created_at [Integer]
73- #
74- # @param event_ids [Array<String>] Array of event IDs associated with this notification
75- #
76- # @param note [String]
77- #
78- # @param routing [Courier::Models::MessageRouting]
79- #
80- # @param topic_id [String]
81- #
82- # @param updated_at [Integer]
83- #
84- # @param tags [Courier::Models::NotificationListResponse::Result::Tags, nil]
85- #
86- # @param title [String, nil]
87-
88- # @see Courier::Models::NotificationListResponse::Result#tags
89- class Tags < Courier ::Internal ::Type ::BaseModel
90- # @!attribute data
91- #
92- # @return [Array<Courier::Models::NotificationListResponse::Result::Tags::Data>]
93- required :data ,
94- -> { Courier ::Internal ::Type ::ArrayOf [ Courier ::Models ::NotificationListResponse ::Result ::Tags ::Data ] }
95-
96- # @!method initialize(data:)
97- # @param data [Array<Courier::Models::NotificationListResponse::Result::Tags::Data>]
98-
99- class Data < Courier ::Internal ::Type ::BaseModel
100- # @!attribute id
101- #
102- # @return [String]
103- required :id , String
21+ #
22+ # @param results [Array<Courier::Models::NotificationListResponse::Result::Notification, Courier::Models::NotificationTemplateSummary>] Notification templates in this workspace.
10423
105- # @!attribute name
106- #
107- # @return [String]
108- required :name , String
24+ # V2 (CDS) template summary returned in list responses.
25+ module Result
26+ extend Courier ::Internal ::Type ::Union
27+
28+ variant -> { Courier ::Models ::NotificationListResponse ::Result ::Notification }
29+
30+ # V2 (CDS) template summary returned in list responses.
31+ variant -> { Courier ::NotificationTemplateSummary }
32+
33+ class Notification < Courier ::Internal ::Type ::BaseModel
34+ # @!attribute id
35+ #
36+ # @return [String]
37+ required :id , String
38+
39+ # @!attribute created_at
40+ #
41+ # @return [Integer]
42+ required :created_at , Integer
43+
44+ # @!attribute event_ids
45+ # Array of event IDs associated with this notification
46+ #
47+ # @return [Array<String>]
48+ required :event_ids , Courier ::Internal ::Type ::ArrayOf [ String ]
49+
50+ # @!attribute note
51+ #
52+ # @return [String]
53+ required :note , String
54+
55+ # @!attribute routing
56+ #
57+ # @return [Courier::Models::MessageRouting]
58+ required :routing , -> { Courier ::MessageRouting }
59+
60+ # @!attribute topic_id
61+ #
62+ # @return [String]
63+ required :topic_id , String
10964
110- # @!method initialize(id:, name:)
111- # @param id [String]
112- # @param name [String]
65+ # @!attribute updated_at
66+ #
67+ # @return [Integer]
68+ required :updated_at , Integer
69+
70+ # @!attribute tags
71+ #
72+ # @return [Courier::Models::NotificationListResponse::Result::Notification::Tags, nil]
73+ optional :tags , -> { Courier ::Models ::NotificationListResponse ::Result ::Notification ::Tags } , nil? : true
74+
75+ # @!attribute title
76+ #
77+ # @return [String, nil]
78+ optional :title , String , nil? : true
79+
80+ # @!method initialize(id:, created_at:, event_ids:, note:, routing:, topic_id:, updated_at:, tags: nil, title: nil)
81+ # @param id [String]
82+ #
83+ # @param created_at [Integer]
84+ #
85+ # @param event_ids [Array<String>] Array of event IDs associated with this notification
86+ #
87+ # @param note [String]
88+ #
89+ # @param routing [Courier::Models::MessageRouting]
90+ #
91+ # @param topic_id [String]
92+ #
93+ # @param updated_at [Integer]
94+ #
95+ # @param tags [Courier::Models::NotificationListResponse::Result::Notification::Tags, nil]
96+ #
97+ # @param title [String, nil]
98+
99+ # @see Courier::Models::NotificationListResponse::Result::Notification#tags
100+ class Tags < Courier ::Internal ::Type ::BaseModel
101+ # @!attribute data
102+ #
103+ # @return [Array<Courier::Models::NotificationListResponse::Result::Notification::Tags::Data>]
104+ required :data ,
105+ -> { Courier ::Internal ::Type ::ArrayOf [ Courier ::Models ::NotificationListResponse ::Result ::Notification ::Tags ::Data ] }
106+
107+ # @!method initialize(data:)
108+ # @param data [Array<Courier::Models::NotificationListResponse::Result::Notification::Tags::Data>]
109+
110+ class Data < Courier ::Internal ::Type ::BaseModel
111+ # @!attribute id
112+ #
113+ # @return [String]
114+ required :id , String
115+
116+ # @!attribute name
117+ #
118+ # @return [String]
119+ required :name , String
120+
121+ # @!method initialize(id:, name:)
122+ # @param id [String]
123+ # @param name [String]
124+ end
113125 end
114126 end
127+
128+ # @!method self.variants
129+ # @return [Array(Courier::Models::NotificationListResponse::Result::Notification, Courier::Models::NotificationTemplateSummary)]
115130 end
116131 end
117132 end
0 commit comments