1 | <?php |
||
7 | class Message extends TeamworkObject |
||
8 | { |
||
9 | use RestfulTrait; |
||
10 | |||
11 | protected $wrapper = 'post'; |
||
12 | protected $endpoint = 'posts'; |
||
13 | |||
14 | /** |
||
15 | * Create Message |
||
16 | * POST /projects/{project_id}/posts.json |
||
17 | * |
||
18 | * The RestfulTrait must be overwritten because messages |
||
19 | * require a project to be associated with. |
||
20 | * |
||
21 | * $teamwork->message($projectID)->create([$data]); |
||
22 | * |
||
23 | * @retun mixed |
||
24 | */ |
||
25 | public function create($data) |
||
29 | |||
30 | /** |
||
31 | * Archive Message |
||
32 | * PUT /messages/{id}/archive.json |
||
33 | */ |
||
34 | public function archive() |
||
38 | |||
39 | /** |
||
40 | * Unarchive Message |
||
41 | * PUT /messages/{id}/unarchive.json |
||
42 | */ |
||
43 | public function unarchive() |
||
47 | } |