1 | <?php |
||
24 | class Route extends HttpApi |
||
25 | { |
||
26 | /** |
||
27 | * Fetches the list of Routes. |
||
28 | * |
||
29 | * @param int $limit Maximum number of records to return. (100 by default) |
||
30 | * @param int $skip Number of records to skip. (0 by default) |
||
31 | * |
||
32 | * @return IndexResponse |
||
33 | */ |
||
34 | public function index(int $limit = 100, int $skip = 0) |
||
48 | |||
49 | /** |
||
50 | * Returns a single Route object based on its ID. |
||
51 | * |
||
52 | * @param string $routeId Route ID returned by the Routes::index() method |
||
53 | * |
||
54 | * @return ShowResponse |
||
55 | */ |
||
56 | public function show(string $routeId) |
||
64 | |||
65 | /** |
||
66 | * Creates a new Route. |
||
67 | * |
||
68 | * @param string $expression A filter expression like "match_recipient('.*@gmail.com')" |
||
69 | * @param array $actions Route action. This action is executed when the expression evaluates to True. Example: "forward('[email protected]')" |
||
70 | * @param string $description An arbitrary string |
||
71 | * @param int $priority Integer: smaller number indicates higher priority. Higher priority routes are handled first. Defaults to 0. |
||
72 | * |
||
73 | * @return CreateResponse |
||
74 | */ |
||
75 | 1 | public function create(string $expression, array $actions, string $description, int $priority = 0) |
|
90 | |||
91 | /** |
||
92 | * Updates a given Route by ID. All parameters are optional. |
||
93 | * This API call only updates the specified fields leaving others unchanged. |
||
94 | * |
||
95 | * @param string $routeId Route ID returned by the Routes::index() method |
||
96 | * @param string|null $expression A filter expression like "match_recipient('.*@gmail.com')" |
||
97 | * @param array|null $actions Route action. This action is executed when the expression evaluates to True. Example: "forward('[email protected]')" |
||
98 | * @param string|null $description An arbitrary string |
||
99 | * @param int|null $priority Integer: smaller number indicates higher priority. Higher priority routes are handled first. Defaults to 0. |
||
100 | * |
||
101 | * @return UpdateResponse |
||
102 | */ |
||
103 | public function update( |
||
136 | |||
137 | /** |
||
138 | * Deletes a Route based on the ID. |
||
139 | * |
||
140 | * @param string $routeId Route ID returned by the Routes::index() method |
||
141 | * |
||
142 | * @return DeleteResponse |
||
143 | */ |
||
144 | public function delete(string $routeId) |
||
152 | } |
||
153 |