TasksRequest::unsetNote()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * This class is generated using the package carono/codegen
5
 */
6
7
namespace carono\etxtru\request;
8
9
class TasksRequest extends \carono\etxtru\RequestAbstract
10
{
11
	/**
12
	 * Возвращает список заказов текущего пользователя, только для заказчика.
13
	 *
14
	 * @param \carono\etxtru\config\TasksListTasksConfig|array $config
15
	 * @return \carono\etxtru\response\ListTasksResponse|\stdClass
16
	 */
17
	public function listTasks($config)
18
	{
19
		$params = [];
20
		foreach ($config instanceof \carono\etxtru\ConfigAbstract ? $config->toArray() : $config as $key => $value) {
21
		    $params[$key] = $value;
22
		}
23
		return $this->getClient()->getContent('tasks.listTasks', $params, 'carono\etxtru\response\ListTasksResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...nse\ListTasksResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\ListTasksResponse|stdClass.
Loading history...
24
	}
25
26
27
	/**
28
	 * Функция возвращает список заявок и комментариев на указанный заказ (или список заказов) текущего
29
	 * пользователя, только для заказчика.
30
	 *
31
	 * @param int (array) $id Идентификатор заказа (-ов, но не более 100), обязательный параметр
32
	 * @return \carono\etxtru\response\ViewNotesResponse|\stdClass
33
	 */
34
	public function viewNotes($id)
35
	{
36
		$params = [
37
			'id' => $id
38
		];
39
		return $this->getClient()->getContent('tasks.viewNotes', $params, 'carono\etxtru\response\ViewNotesResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...nse\ViewNotesResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\ViewNotesResponse|stdClass.
Loading history...
40
	}
41
42
43
	/**
44
	 * Функция возвращает список всех поданных заявок на все заказы текущего заказчика.
45
	 *
46
	 * @return \carono\etxtru\response\ViewNotesAllResponse|\stdClass
47
	 */
48
	public function viewNotesAll()
49
	{
50
		$params = [];
51
		return $this->getClient()->getContent('tasks.viewNotesAll', $params, 'carono\etxtru\response\ViewNotesAllResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...\ViewNotesAllResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\V...tesAllResponse|stdClass.
Loading history...
52
	}
53
54
55
	/**
56
	 * Функция принятия указанной заявки на заказ, только для заказчика.
57
	 *
58
	 * @param int $id Идентификатор заявки (не комментария!), обязательный параметр
59
	 * @param string $comment Комментарий при принятии заявки, добавляется в конец описания заказа, не более 500 символов
60
	 * @return \carono\etxtru\response\SetNoteResponse|\stdClass
61
	 */
62
	public function setNote($id, $comment)
63
	{
64
		$params = [
65
			'id' => $id,
66
			'comment' => $comment
67
		];
68
		return $this->getClient()->getContent('tasks.setNote', $params, 'carono\etxtru\response\SetNoteResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...ponse\SetNoteResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\SetNoteResponse|stdClass.
Loading history...
69
	}
70
71
72
	/**
73
	 * Функция отклонения указанной заявки на заказ, только для заказчика.
74
	 *
75
	 * @param int $id Идентификатор заявки (не комментария!), обязательный параметр
76
	 * @return \carono\etxtru\response\UnsetNoteResponse|\stdClass
77
	 */
78
	public function unsetNote($id)
79
	{
80
		$params = [
81
			'id' => $id
82
		];
83
		return $this->getClient()->getContent('tasks.unsetNote', $params, 'carono\etxtru\response\UnsetNoteResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...nse\UnsetNoteResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\UnsetNoteResponse|stdClass.
Loading history...
84
	}
85
86
87
	/**
88
	 * Функция принятия заказа на проверке, только для заказчика.
89
	 *
90
	 * @param array (int var1, int var2, ... ) $id Массив идентификаторов принимаемых заказов вида id[]=1&id[]=2, обязательный параметр
0 ignored issues
show
Documentation Bug introduced by
The doc comment (int at position 1 could not be parsed: Expected ')' at position 1, but found 'int'.
Loading history...
91
	 * @return \carono\etxtru\response\PaidTaskResponse|\stdClass
92
	 */
93
	public function paidTask($id)
94
	{
95
		$params = [
96
			'id' => $id
97
		];
98
		return $this->getClient()->getContent('tasks.paidTask', $params, 'carono\etxtru\response\PaidTaskResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...onse\PaidTaskResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\PaidTaskResponse|stdClass.
Loading history...
99
	}
100
101
102
	/**
103
	 * Функция отправки заказа на проверке на доработку, только для заказчика.
104
	 *
105
	 * @param array (int var1, int var2, ... ) $id Массив идентификаторов отклоняемых заказов вида id[]=1&id[]=2, обязательный параметр
0 ignored issues
show
Documentation Bug introduced by
The doc comment (int at position 1 could not be parsed: Expected ')' at position 1, but found 'int'.
Loading history...
106
	 * @param string $text Комментарий к отклонению, обязателен, если отклоняется 1 заказ, а не пакет заказов, иначе
107
	 * обнуляется
108
	 * @return \carono\etxtru\response\CancelTaskResponse|\stdClass
109
	 */
110
	public function cancelTask($id, $text)
111
	{
112
		$params = [
113
			'id' => $id,
114
			'text' => $text
115
		];
116
		return $this->getClient()->getContent('tasks.cancelTask', $params, 'carono\etxtru\response\CancelTaskResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...se\CancelTaskResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\CancelTaskResponse|stdClass.
Loading history...
117
	}
118
119
120
	/**
121
	 * Функция получения результатов по заказам, только для заказчика.
122
	 *
123
	 * @param array (int var1, int var2, ...) $id Массив идентификаторов заказов, обязательный параметр
0 ignored issues
show
Documentation Bug introduced by
The doc comment (int at position 1 could not be parsed: Expected ')' at position 1, but found 'int'.
Loading history...
124
	 * @return \carono\etxtru\response\GetResultsResponse|\stdClass
125
	 */
126
	public function getResults($id)
127
	{
128
		$params = [
129
			'id' => $id
130
		];
131
		return $this->getClient()->getContent('tasks.getResults', $params, 'carono\etxtru\response\GetResultsResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...se\GetResultsResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\GetResultsResponse|stdClass.
Loading history...
132
	}
133
134
135
	/**
136
	 * Функция удаления заказов в статусе ожидания исполнителя или из черновика, только для заказчика.
137
	 * Запрещено удалять заказы в течение недели после снятия исполнителя с заказа.
138
	 *
139
	 * @param array (int var1, int var2, ...) $id Массив идентификаторов заказов, обязательный параметр
0 ignored issues
show
Documentation Bug introduced by
The doc comment (int at position 1 could not be parsed: Expected ')' at position 1, but found 'int'.
Loading history...
140
	 * @return \carono\etxtru\response\DeleteTaskResponse|\stdClass
141
	 */
142
	public function deleteTask($id)
143
	{
144
		$params = [
145
			'id' => $id
146
		];
147
		return $this->getClient()->getContent('tasks.deleteTask', $params, 'carono\etxtru\response\DeleteTaskResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...se\DeleteTaskResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\DeleteTaskResponse|stdClass.
Loading history...
148
	}
149
150
151
	/**
152
	 * Функция начисления доплаты по заданию.
153
	 *
154
	 * @param int $id Идентификатор задания
155
	 * @param int $count Сумма доплаты, не более стоимости заказа * 3
156
	 * @param int $note Посылать уведомление исполнителю, по умолчанию 1 (1 - да, 0 - нет)
157
	 * @param string $autopay Расчет доплаты автоматически, по числу превышения знаков у последнего результата (get - получить
158
	 * расчет доплаты, pay - произвести доплату), по умолчанию размер доплаты берется из параметра count
159
	 * @return \carono\etxtru\response\ExtraPaidResponse|\stdClass
160
	 */
161
	public function extraPaid($id, $count, $note, $autopay)
162
	{
163
		$params = [
164
			'id' => $id,
165
			'count' => $count,
166
			'note' => $note,
167
			'autopay' => $autopay
168
		];
169
		return $this->getClient()->getContent('tasks.extraPaid', $params, 'carono\etxtru\response\ExtraPaidResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...nse\ExtraPaidResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\ExtraPaidResponse|stdClass.
Loading history...
170
	}
171
172
173
	/**
174
	 * Функция добавления/редактирования заказа, только для заказчика.
175
	 *
176
	 * @param \carono\etxtru\config\TasksSaveTaskConfig|array $config
177
	 * @return \carono\etxtru\response\SaveTaskResponse|\stdClass
178
	 */
179
	public function saveTask($config)
180
	{
181
		$params = [];
182
		foreach ($config instanceof \carono\etxtru\ConfigAbstract ? $config->toArray() : $config as $key => $value) {
183
		    $params[$key] = $value;
184
		}
185
		return $this->getClient()->getContent('tasks.saveTask', $params, 'carono\etxtru\response\SaveTaskResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...onse\SaveTaskResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\SaveTaskResponse|stdClass.
Loading history...
186
	}
187
188
189
	/**
190
	 * Функция отмены просроченного заказа, только для заказчика. Отмененный заказ невозможно удалить,
191
	 * он будет существовать для истории 2 недели, после чего удалится автоматически.
192
	 *
193
	 * @param int $id Идентификатор просроченного заказа, обязательный параметр
194
	 * @param int $copy Флаг создания копии отменяемого заказа, если указано и значение 1, то создастся публикуемая копия
195
	 * заказа со сроком, задаваемым параметрами ниже
196
	 * @param string $deadline Новый срок сдачи в формате дд.мм.гггг, по умолчанию - текущее время плюс 5 суток для несрочного
197
	 * заказа или 5 часов для срочного
198
	 * @param string $timeline Новое время сдачи в формате чч:мм, 23:59 по умолчанию
199
	 * @return \carono\etxtru\response\FailTaskResponse|\stdClass
200
	 */
201
	public function failTask($id, $copy, $deadline, $timeline)
202
	{
203
		$params = [
204
			'id' => $id,
205
			'copy' => $copy,
206
			'deadline' => $deadline,
207
			'timeline' => $timeline
208
		];
209
		return $this->getClient()->getContent('tasks.failTask', $params, 'carono\etxtru\response\FailTaskResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...onse\FailTaskResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\FailTaskResponse|stdClass.
Loading history...
210
	}
211
212
213
	/**
214
	 * Функция копирования заказа, только для заказчика. Новый заказ будет публикуемым и доступный
215
	 * исполнителям, настройки автопринятия и мультизаказа не копируются.
216
	 *
217
	 * @param int $id Идентификатор копируемого заказа, обязательный параметр
218
	 * @param string $deadline Новый срок сдачи в формате дд.мм.гггг, не более 90 дней, по умолчанию или если некорректное - текущее
219
	 * время плюс 5 суток для несрочного заказа или 5 часов для срочного
220
	 * @param string $timeline Новое время сдачи в формате чч:мм, 23:59 по умолчанию
221
	 * @return \carono\etxtru\response\CopyTaskResponse|\stdClass
222
	 */
223
	public function copyTask($id, $deadline, $timeline)
224
	{
225
		$params = [
226
			'id' => $id,
227
			'deadline' => $deadline,
228
			'timeline' => $timeline
229
		];
230
		return $this->getClient()->getContent('tasks.copyTask', $params, 'carono\etxtru\response\CopyTaskResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...onse\CopyTaskResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\CopyTaskResponse|stdClass.
Loading history...
231
	}
232
233
234
	/**
235
	 * Функция увеличения срока сдачи заказа, только для заказчика. Если заказ просроченный, то он будет
236
	 * возвращен в работу, если в черновике, то возможна его публикации для ожидания подачи заявок.
237
	 *
238
	 * @param int $id Идентификатор заказа, обязательный параметр
239
	 * @param string $deadline Новый срок сдачи заказа в формате дд.мм.гггг (25.10.2013), должен быть не меньше текущего, но не более 90
240
	 * дней, обязательный параметр.
241
	 * @param string $timeline Новое время сдачи заказа в формате чч:мм (12:16), если не указано, то будет 23:59, необязательный
242
	 * параметр
243
	 * @param int $public Флаг публикации черновика, если 1, то заказ-черновик будет опубликован, иначе статус публикации не
244
	 * изменится
245
	 * @return \carono\etxtru\response\SetDeadlineResponse|\stdClass
246
	 */
247
	public function setDeadline($id, $deadline, $timeline, $public)
248
	{
249
		$params = [
250
			'id' => $id,
251
			'deadline' => $deadline,
252
			'timeline' => $timeline,
253
			'public' => $public
254
		];
255
		return $this->getClient()->getContent('tasks.setDeadline', $params, 'carono\etxtru\response\SetDeadlineResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...e\SetDeadlineResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\S...adlineResponse|stdClass.
Loading history...
256
	}
257
258
259
	/**
260
	 * Функция добавления комментария в заказ, только для заказчика или назначенного исполнителя.
261
	 *
262
	 * @param int $id Идентификатор заказа, обязательный параметр
263
	 * @param string $text Текст комментария, максимум 2048 символов, обязательный параметр.
264
	 * @param int $hide Флаг скрытия текста комментария (1 - скрывать, 0 или отсутствует - не скрывать), необязательный
265
	 * параметр
266
	 * @return \carono\etxtru\response\SaveCommentResponse|\stdClass
267
	 */
268
	public function saveComment($id, $text, $hide)
269
	{
270
		$params = [
271
			'id' => $id,
272
			'text' => $text,
273
			'hide' => $hide
274
		];
275
		return $this->getClient()->getContent('tasks.saveComment', $params, 'carono\etxtru\response\SaveCommentResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...e\SaveCommentResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\S...ommentResponse|stdClass.
Loading history...
276
	}
277
278
279
	/**
280
	 * Функция создает заявку в обратную связь на снятие исполнителя с заказа.
281
	 *
282
	 * @param int $id Идентификатор заказа, с которого снимать исполнителя, заказ должен быть в статусе "На проверке" и
283
	 * текущий исполнитель должен иметь хоть один сданный результат.
284
	 * @param string $text Текст заявки на снятие, причины, недочеты.
285
	 * @return \carono\etxtru\response\SendNoteFailResponse|\stdClass
286
	 */
287
	public function sendNoteFail($id, $text)
288
	{
289
		$params = [
290
			'id' => $id,
291
			'text' => $text
292
		];
293
		return $this->getClient()->getContent('tasks.sendNoteFail', $params, 'carono\etxtru\response\SendNoteFailResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...\SendNoteFailResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\S...teFailResponse|stdClass.
Loading history...
294
	}
295
}
296