4
4
5
5
class Webhook extends Instance
6
6
{
7
- /**
8
- * Get the webhook name.
9
- *
10
- * @return string
11
- */
12
- public function getName (): string
13
- {
14
- return $ this ->getAttribute ('name ' );
15
- }
16
-
17
- /**
18
- * Set the webhook name.
19
- *
20
- * @param string $name
21
- * @return $this
22
- */
23
- public function setName (string $ name ): self
24
- {
25
- return $ this ->setAttribute ('name ' , $ name );
26
- }
27
-
28
- /**
29
- * Set the webhook rules.
30
- *
31
- * @param array $rules
32
- * @return $this
33
- */
34
- public function setRules (array $ rules = [])
35
- {
36
- return $ this ->setAttribute ('rules ' , $ rules );
37
- }
38
-
39
7
/**
40
8
* Add a new rule to the webook.
41
9
*
@@ -61,98 +29,4 @@ public function addRules(array $rules)
61
29
62
30
return $ this ;
63
31
}
64
-
65
- /**
66
- * Get the webhook rules.
67
- *
68
- * @return array
69
- */
70
- public function getRules (): array
71
- {
72
- return $ this ->getAttribute ('rules ' , []);
73
- }
74
-
75
- /**
76
- * Get the webhook client config rules.
77
- *
78
- * @return array
79
- */
80
- public function getClientConfig (): array
81
- {
82
- return $ this ->getAttribute ('clientConfig ' );
83
- }
84
-
85
- /**
86
- * Set the webhook client config rules.
87
- *
88
- * @param array $clientConfig
89
- * @return $this
90
- */
91
- public function setClientConfig (array $ clientConfig ): self
92
- {
93
- return $ this ->setAttribute ('clientConfig ' , $ clientConfig );
94
- }
95
-
96
- /**
97
- * Get the webhook admission review versions.
98
- *
99
- * @return array
100
- */
101
- public function getAdmissionReviewVersions (): array
102
- {
103
- return $ this ->getAttribute ('admissionReviewVersions ' );
104
- }
105
-
106
- /**
107
- * Set the webhook admission review versions.
108
- *
109
- * @param array $admissionReviewVersions
110
- * @return $this
111
- */
112
- public function setAdmissionReviewVersions (array $ admissionReviewVersions ): self
113
- {
114
- return $ this ->setAttribute ('admissionReviewVersions ' , $ admissionReviewVersions );
115
- }
116
-
117
- /**
118
- * Get the webhook side effects.
119
- *
120
- * @return string
121
- */
122
- public function getSideEffects (): string
123
- {
124
- return $ this ->getAttribute ('sideEffects ' );
125
- }
126
-
127
- /**
128
- * Set the webhook side effects.
129
- *
130
- * @param string $sideEffects
131
- * @return $this
132
- */
133
- public function setSideEffects (string $ sideEffects ): self
134
- {
135
- return $ this ->setAttribute ('sideEffects ' , $ sideEffects );
136
- }
137
-
138
- /**
139
- * Set the webhook timeout seconds.
140
- *
141
- * @return int
142
- */
143
- public function getTimeoutSeconds (): int
144
- {
145
- return $ this ->getAttribute ('timeoutSeconds ' );
146
- }
147
-
148
- /**
149
- * Set the webhook timeout seconds.
150
- *
151
- * @param int $timeoutSeconds
152
- * @return $this
153
- */
154
- public function setTimeoutSeconds (int $ timeoutSeconds ): self
155
- {
156
- return $ this ->setAttribute ('timeoutSeconds ' , $ timeoutSeconds );
157
- }
158
32
}
0 commit comments