File tree 2 files changed +31
-2
lines changed
Src/Notion.Client/Models/PropertyItems
2 files changed +31
-2
lines changed Original file line number Diff line number Diff line change
1
+ using System . Collections . Generic ;
2
+ using Newtonsoft . Json ;
3
+
4
+ namespace Notion . Client
5
+ {
6
+ public class RollupPropertyItem : SimplePropertyItem
7
+ {
8
+ public override string Type => "rollup" ;
9
+
10
+ [ JsonProperty ( "rollup" ) ] public Data Rollup { get ; set ; }
11
+
12
+ public class Data
13
+ {
14
+ [ JsonProperty ( "type" ) ] public string Type { get ; set ; }
15
+
16
+ [ JsonProperty ( "function" ) ] public string Function { get ; set ; }
17
+
18
+ [ JsonProperty ( "number" ) ] public double ? Number { get ; set ; }
19
+
20
+ [ JsonProperty ( "date" ) ] public Date Date { get ; set ; }
21
+
22
+ [ JsonProperty ( "array" ) ] public IEnumerable < Dictionary < string , object > > Array { get ; set ; }
23
+
24
+ [ JsonProperty ( "unsupported" ) ] public Dictionary < string , object > Unsupported { get ; set ; }
25
+
26
+ [ JsonProperty ( "incomplete" ) ] public Dictionary < string , object > Incomplete { get ; set ; }
27
+ }
28
+ }
29
+ }
Original file line number Diff line number Diff line change 1
- using System . Collections ;
2
- using JsonSubTypes ;
1
+ using JsonSubTypes ;
3
2
using Newtonsoft . Json ;
4
3
5
4
namespace Notion . Client
@@ -24,6 +23,7 @@ namespace Notion.Client
24
23
[ JsonSubtypes . KnownSubType ( typeof ( RichTextPropertyItem ) , "rich_text" ) ]
25
24
[ JsonSubtypes . KnownSubType ( typeof ( PeoplePropertyItem ) , "people" ) ]
26
25
[ JsonSubtypes . KnownSubType ( typeof ( RelationPropertyItem ) , "relation" ) ]
26
+ [ JsonSubtypes . KnownSubType ( typeof ( RollupPropertyItem ) , "rollup" ) ]
27
27
public abstract class SimplePropertyItem : IPropertyItemObject
28
28
{
29
29
public string Object => "property_item" ;
You can’t perform that action at this time.
0 commit comments