1+ <?php
2+
3+ namespace Bitrix24 \CRM \Invoice ;
4+
5+ use Bitrix24 \Bitrix24Entity ;
6+
7+ /**
8+ * Class PersonType
9+ */
10+ class PersonType extends Bitrix24Entity
11+ {
12+ /**
13+ * @link https://dev.1c-bitrix.ru/rest_help/crm/invoice/crm_persontype_list.php
14+ *
15+ * @param array $order - order of task items
16+ * @param array $filter - filter array
17+ *
18+ * @return array
19+ *
20+ * @throws \Bitrix24\Exceptions\Bitrix24ApiException
21+ * @throws \Bitrix24\Exceptions\Bitrix24EmptyResponseException
22+ * @throws \Bitrix24\Exceptions\Bitrix24Exception
23+ * @throws \Bitrix24\Exceptions\Bitrix24IoException
24+ * @throws \Bitrix24\Exceptions\Bitrix24MethodNotFoundException
25+ * @throws \Bitrix24\Exceptions\Bitrix24PaymentRequiredException
26+ * @throws \Bitrix24\Exceptions\Bitrix24PortalDeletedException
27+ * @throws \Bitrix24\Exceptions\Bitrix24PortalRenamedException
28+ * @throws \Bitrix24\Exceptions\Bitrix24SecurityException
29+ * @throws \Bitrix24\Exceptions\Bitrix24TokenIsExpiredException
30+ * @throws \Bitrix24\Exceptions\Bitrix24TokenIsInvalidException
31+ * @throws \Bitrix24\Exceptions\Bitrix24WrongClientException
32+ */
33+ public function getList ($ order = array (), $ filter = array ())
34+ {
35+ $ fullResult = $ this ->client ->call (
36+ 'crm.persontype.list ' ,
37+ array (
38+ 'order ' => $ order ,
39+ 'filter ' => $ filter ,
40+ )
41+ );
42+
43+ return $ fullResult ;
44+ }
45+
46+
47+ /**
48+ * @link https://dev.1c-bitrix.ru/rest_help/crm/invoice/crm_persontype_fields.php
49+ *
50+ * @return array
51+ *
52+ * @throws \Bitrix24\Exceptions\Bitrix24ApiException
53+ * @throws \Bitrix24\Exceptions\Bitrix24EmptyResponseException
54+ * @throws \Bitrix24\Exceptions\Bitrix24Exception
55+ * @throws \Bitrix24\Exceptions\Bitrix24IoException
56+ * @throws \Bitrix24\Exceptions\Bitrix24MethodNotFoundException
57+ * @throws \Bitrix24\Exceptions\Bitrix24PaymentRequiredException
58+ * @throws \Bitrix24\Exceptions\Bitrix24PortalDeletedException
59+ * @throws \Bitrix24\Exceptions\Bitrix24PortalRenamedException
60+ * @throws \Bitrix24\Exceptions\Bitrix24SecurityException
61+ * @throws \Bitrix24\Exceptions\Bitrix24TokenIsExpiredException
62+ * @throws \Bitrix24\Exceptions\Bitrix24TokenIsInvalidException
63+ * @throws \Bitrix24\Exceptions\Bitrix24WrongClientException
64+ *
65+ */
66+ public function fields ()
67+ {
68+ $ fullResult = $ this ->client ->call (
69+ 'crm.persontype.fields ' ,
70+ array ()
71+ );
72+
73+ return $ fullResult ;
74+ }
75+ }
0 commit comments