| @@ 13-43 (lines=31) @@ | ||
| 10 | * |
|
| 11 | * @property-read array $projectsIds |
|
| 12 | */ |
|
| 13 | class BulkDeleteProjects extends Request |
|
| 14 | { |
|
| 15 | /** |
|
| 16 | * @var string |
|
| 17 | */ |
|
| 18 | protected $uri = 'projects/{project_ids}'; |
|
| 19 | ||
| 20 | /** |
|
| 21 | * @var string |
|
| 22 | */ |
|
| 23 | protected $method = Request::DELETE; |
|
| 24 | ||
| 25 | /** |
|
| 26 | * @var array |
|
| 27 | */ |
|
| 28 | protected $projectsIds; |
|
| 29 | ||
| 30 | /** |
|
| 31 | * BulkDeleteProjects constructor. |
|
| 32 | * |
|
| 33 | * @param array $properties |
|
| 34 | */ |
|
| 35 | public function __construct(array $properties) |
|
| 36 | { |
|
| 37 | parent::__construct($properties); |
|
| 38 | ||
| 39 | $projectIds = implode(',', $this->projectsIds); |
|
| 40 | ||
| 41 | $this->uri = str_replace('{project_ids}', $projectIds, $this->uri); |
|
| 42 | } |
|
| 43 | } |
|
| 44 | ||
| @@ 13-43 (lines=31) @@ | ||
| 10 | * |
|
| 11 | * @property-read array $projectUserIds |
|
| 12 | */ |
|
| 13 | class BulkDeleteProjectUsers extends Request |
|
| 14 | { |
|
| 15 | /** |
|
| 16 | * @var string |
|
| 17 | */ |
|
| 18 | protected $uri = 'project_users/{project_user_ids}'; |
|
| 19 | ||
| 20 | /** |
|
| 21 | * @var array |
|
| 22 | */ |
|
| 23 | protected $projectUserIds; |
|
| 24 | ||
| 25 | /** |
|
| 26 | * @var string |
|
| 27 | */ |
|
| 28 | protected $method = Request::DELETE; |
|
| 29 | ||
| 30 | /** |
|
| 31 | * BulkDeleteProjectUsers constructor. |
|
| 32 | * |
|
| 33 | * @param array $properties |
|
| 34 | */ |
|
| 35 | public function __construct(array $properties) |
|
| 36 | { |
|
| 37 | parent::__construct($properties); |
|
| 38 | ||
| 39 | $projectUserIds = implode(',', $this->projectUserIds); |
|
| 40 | ||
| 41 | $this->uri = str_replace('{project_user_ids}', $projectUserIds, $this->uri); |
|
| 42 | } |
|
| 43 | } |
|
| 44 | ||
| @@ 13-43 (lines=31) @@ | ||
| 10 | * |
|
| 11 | * @property-read array $taskIds |
|
| 12 | */ |
|
| 13 | class BulkDeleteTasks extends Request |
|
| 14 | { |
|
| 15 | /** |
|
| 16 | * @var string |
|
| 17 | */ |
|
| 18 | protected $uri = 'tasks/{task_ids}'; |
|
| 19 | ||
| 20 | /** |
|
| 21 | * @var array |
|
| 22 | */ |
|
| 23 | protected $taskIds; |
|
| 24 | ||
| 25 | /** |
|
| 26 | * @var string |
|
| 27 | */ |
|
| 28 | protected $method = Request::DELETE; |
|
| 29 | ||
| 30 | /** |
|
| 31 | * BulkDeleteTasks constructor. |
|
| 32 | * |
|
| 33 | * @param array $properties |
|
| 34 | */ |
|
| 35 | public function __construct(array $properties) |
|
| 36 | { |
|
| 37 | parent::__construct($properties); |
|
| 38 | ||
| 39 | $taskIds = implode(',', $this->taskIds); |
|
| 40 | ||
| 41 | $this->uri = str_replace('{task_ids}', $taskIds, $this->uri); |
|
| 42 | } |
|
| 43 | } |
|
| 44 | ||
| @@ 13-51 (lines=39) @@ | ||
| 10 | * |
|
| 11 | * @property-read array $timeEntryIds |
|
| 12 | */ |
|
| 13 | class BulkUpdateTimeEntriesTags extends Request |
|
| 14 | { |
|
| 15 | /** |
|
| 16 | * @var string |
|
| 17 | */ |
|
| 18 | protected $uri = 'time_entries/{time_entry_ids}'; |
|
| 19 | ||
| 20 | /** |
|
| 21 | * @var string |
|
| 22 | */ |
|
| 23 | protected $method = Request::PUT; |
|
| 24 | ||
| 25 | /** |
|
| 26 | * @var array |
|
| 27 | */ |
|
| 28 | protected $timeEntryIds; |
|
| 29 | ||
| 30 | /** |
|
| 31 | * BulkUpdateTimeEntriesTags constructor. |
|
| 32 | * |
|
| 33 | * @param array $properties |
|
| 34 | */ |
|
| 35 | public function __construct(array $properties) |
|
| 36 | { |
|
| 37 | parent::__construct($properties); |
|
| 38 | ||
| 39 | $entryIds = implode(',', $this->timeEntryIds); |
|
| 40 | ||
| 41 | $this->uri = str_replace('{time_entry_ids}', $entryIds, $this->uri); |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * {@inheritdoc} |
|
| 46 | */ |
|
| 47 | public function jsonSerialize() |
|
| 48 | { |
|
| 49 | return array('time_entry' => $this->data); |
|
| 50 | } |
|
| 51 | } |
|
| 52 | ||