Issues (73)

src/request/UsersRequest.php (10 issues)

1
<?php
2
3
/**
4
 * This class is generated using the package carono/codegen
5
 */
6
7
namespace carono\etxtru\request;
8
9
class UsersRequest extends \carono\etxtru\RequestAbstract
10
{
11
	/**
12
	 * Возвращает список исполнителей без сортировки.
13
	 *
14
	 * @param \carono\etxtru\config\UsersGetListConfig|array $config
15
	 * @return \carono\etxtru\response\GetListResponse|\stdClass
16
	 */
17
	public function getList($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('users.getList', $params, 'carono\etxtru\response\GetListResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...ponse\GetListResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\GetListResponse|stdClass.
Loading history...
24
	}
25
26
27
	/**
28
	 * Функция возвращает список пользователей, находящихся в черном и белом списке текущего
29
	 * пользователя.
30
	 *
31
	 * @param int $count Число пользователей для выборке, не более 100 за запрос (по умолчанию)
32
	 * @param int $from Смещение от последней записи в выборке, по умолчанию 0
33
	 * @param int $id_group Идентификатор группы БС/ЧС, если не определен, то выборка по параметру type
34
	 * @param string $type Тип списка (whiteList - белый список, blackList - черный), по умолчанию все вместе
35
	 * @return \carono\etxtru\response\GetBWResponse|\stdClass
36
	 */
37
	public function getBW($count, $from, $id_group, $type)
38
	{
39
		$params = [
40
			'count' => $count,
41
			'from' => $from,
42
			'id_group' => $id_group,
43
			'type' => $type
44
		];
45
		return $this->getClient()->getContent('users.getBW', $params, 'carono\etxtru\response\GetBWResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...esponse\GetBWResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\GetBWResponse|stdClass.
Loading history...
46
	}
47
48
49
	/**
50
	 * Функция возвращает примечание к указанному пользователю.
51
	 *
52
	 * @param int $id Идентификатор пользователя, обязательный параметр
53
	 * @return \carono\etxtru\response\GetNoteResponse|\stdClass
54
	 */
55
	public function getNote($id)
56
	{
57
		$params = [
58
			'id' => $id
59
		];
60
		return $this->getClient()->getContent('users.getNote', $params, 'carono\etxtru\response\GetNoteResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...ponse\GetNoteResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\GetNoteResponse|stdClass.
Loading history...
61
	}
62
63
64
	/**
65
	 * Функция возвращает подробную информацию об указанном пользователе.
66
	 *
67
	 * @param int $id Идентификатор пользователя, полуобязательный параметр, имеет приоритет над параметром login
68
	 * @param string $login Логин пользователя, полуобязательный параметр, может указываться при отсутствии параметра id
69
	 * @return \carono\etxtru\response\GetUserResponse|\stdClass
70
	 */
71
	public function getUser($id, $login)
72
	{
73
		$params = [
74
			'id' => $id,
75
			'login' => $login
76
		];
77
		return $this->getClient()->getContent('users.getUser', $params, 'carono\etxtru\response\GetUserResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...ponse\GetUserResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\GetUserResponse|stdClass.
Loading history...
78
	}
79
80
81
	/**
82
	 * Функция возвращает виды работ и минимальные цены исполнителя по ним.
83
	 *
84
	 * @param int $id Идентификатор пользователя (исполнителя), обязательный параметр
85
	 * @return \carono\etxtru\response\GetWorksResponse|\stdClass
86
	 */
87
	public function getWorks($id)
88
	{
89
		$params = [
90
			'id' => $id
91
		];
92
		return $this->getClient()->getContent('users.getWorks', $params, 'carono\etxtru\response\GetWorksResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...onse\GetWorksResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\GetWorksResponse|stdClass.
Loading history...
93
	}
94
95
96
	/**
97
	 * Функция возвращает отзывы указанного незаблокированного пользователя. Отзывы разделены на два
98
	 * массива - negative (отрицательные отзывы) и positive (положительные) и сгруппированы по авторам.
99
	 *
100
	 * @param int $id Идентификатор пользователя, обязательный параметр
101
	 * @return \carono\etxtru\response\GetReportsResponse|\stdClass
102
	 */
103
	public function getReports($id)
104
	{
105
		$params = [
106
			'id' => $id
107
		];
108
		return $this->getClient()->getContent('users.getReports', $params, 'carono\etxtru\response\GetReportsResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...se\GetReportsResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\GetReportsResponse|stdClass.
Loading history...
109
	}
110
111
112
	/**
113
	 * Функция добавляет/редактирует отзыв пользователю.
114
	 *
115
	 * @param \carono\etxtru\config\UsersSetReportConfig|array $config
116
	 * @return \carono\etxtru\response\SetReportResponse|\stdClass
117
	 */
118
	public function setReport($config)
119
	{
120
		$params = [];
121
		foreach ($config instanceof \carono\etxtru\ConfigAbstract ? $config->toArray() : $config as $key => $value) {
122
		    $params[$key] = $value;
123
		}
124
		return $this->getClient()->getContent('users.setReport', $params, 'carono\etxtru\response\SetReportResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...nse\SetReportResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\SetReportResponse|stdClass.
Loading history...
125
	}
126
127
128
	/**
129
	 * Функция возвращает количество белых и черных списков, в которых находится пользователь.
130
	 *
131
	 * @param int $id Идентификатор пользователя, обязательный параметр
132
	 * @return \carono\etxtru\response\GetUserBWResponse|\stdClass
133
	 */
134
	public function getUserBW($id)
135
	{
136
		$params = [
137
			'id' => $id
138
		];
139
		return $this->getClient()->getContent('users.getUserBW', $params, 'carono\etxtru\response\GetUserBWResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...nse\GetUserBWResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\GetUserBWResponse|stdClass.
Loading history...
140
	}
141
142
143
	/**
144
	 * Функция добавляет или удаляет пользователя в черный/белый список.
145
	 *
146
	 * @param int $id Идентификатор добавляемого/удаляемого пользователя, обязательный параметр
147
	 * @param int $id_group Идентификатор группы БС/ЧС, если не определен, то "без группы"
148
	 * @param string $type Тип действия: whiteList - в белый список, blackList - в черный, delete - удалить из списка
149
	 * @return \carono\etxtru\response\SetUserBWResponse|\stdClass
150
	 */
151
	public function setUserBW($id, $id_group, $type)
152
	{
153
		$params = [
154
			'id' => $id,
155
			'id_group' => $id_group,
156
			'type' => $type
157
		];
158
		return $this->getClient()->getContent('users.setUserBW', $params, 'carono\etxtru\response\SetUserBWResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...nse\SetUserBWResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\SetUserBWResponse|stdClass.
Loading history...
159
	}
160
161
162
	/**
163
	 * Функция возвращает состояние лицевого счета текущего пользователя.
164
	 *
165
	 * @return \carono\etxtru\response\GetBalanceResponse|\stdClass
166
	 */
167
	public function getBalance()
168
	{
169
		$params = [];
170
		return $this->getClient()->getContent('users.getBalance', $params, 'carono\etxtru\response\GetBalanceResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...se\GetBalanceResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\GetBalanceResponse|stdClass.
Loading history...
171
	}
172
}
173