File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ namespace Bitrix24 \CRM \Lead ;
3+ use Bitrix24 \Bitrix24Entity ;
4+
5+ /**
6+ * Class ProductRows
7+ */
8+ class ProductRows extends Bitrix24Entity
9+ {
10+ /**
11+ * Get list of lead products.
12+ * @link https://dev.1c-bitrix.ru/rest_help/crm/leads/crm_lead_productrows_get.php
13+ * @param int $id - lead id
14+ * @return array
15+ */
16+ public function get ($ id )
17+ {
18+ $ fullResult = $ this ->client ->call (
19+ 'crm.lead.productrows.get ' ,
20+ array (
21+ 'id ' => $ id
22+ )
23+ );
24+ return $ fullResult ;
25+ }
26+
27+ /**
28+ * Set lead products.
29+ * @link https://dev.1c-bitrix.ru/rest_help/crm/leads/crm_lead_productrows_set.php
30+ * @param int $id - lead id
31+ * @param array $rows - products data
32+ * @return array
33+ */
34+ public function set ($ id , $ rows )
35+ {
36+ $ fullResult = $ this ->client ->call (
37+ 'crm.lead.productrows.set ' ,
38+ array (
39+ 'id ' => $ id ,
40+ 'rows ' => $ rows
41+ )
42+ );
43+ return $ fullResult ;
44+ }
45+ }
You can’t perform that action at this time.
0 commit comments