File tree Expand file tree Collapse file tree 3 files changed +77
-0
lines changed Expand file tree Collapse file tree 3 files changed +77
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace NotificationChannels \Notion \Properties ;
4
+
5
+ class RichText extends AbstractProperty
6
+ {
7
+ public function __construct (protected array $ value )
8
+ {
9
+ }
10
+
11
+ public function toArray (): array
12
+ {
13
+ return ['rich_text ' => $ this ->value ];
14
+ }
15
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace NotificationChannels \Notion \Properties ;
4
+
5
+ class Status extends AbstractProperty
6
+ {
7
+ public function __construct (
8
+ protected string $ value ,
9
+ protected string $ type = 'name ' ,
10
+ protected string $ color = 'default ' ,
11
+ ) {
12
+ }
13
+
14
+ public function name (string $ name ): self
15
+ {
16
+ $ this ->type = 'name ' ;
17
+ $ this ->value = $ name ;
18
+
19
+ return $ this ;
20
+ }
21
+
22
+ public function id (string $ id ): self
23
+ {
24
+ $ this ->type = 'id ' ;
25
+ $ this ->value = $ id ;
26
+
27
+ return $ this ;
28
+ }
29
+
30
+ public function color (string $ color ): self
31
+ {
32
+ $ this ->color = $ color ;
33
+
34
+ return $ this ;
35
+ }
36
+
37
+ public function toArray (): array
38
+ {
39
+ return [
40
+ 'status ' => [
41
+ 'type ' => $ this ->type ,
42
+ 'value ' => $ this ->value ,
43
+ 'color ' => $ this ->color ,
44
+ ],
45
+ ];
46
+ }
47
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace NotificationChannels \Notion \Properties ;
4
+
5
+ class URL extends AbstractProperty
6
+ {
7
+ public function __construct (protected string $ value )
8
+ {
9
+ }
10
+
11
+ public function toArray (): array
12
+ {
13
+ return ['url ' => $ this ->value ];
14
+ }
15
+ }
You can’t perform that action at this time.
0 commit comments