Completed
Push — master ( 5e8ba0...5ef40e )
by dotzero
10s
created

Links::apiList()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 9.4285
cc 2
eloc 3
nc 2
nop 1
crap 6
1
<?php
2
3
namespace AmoCRM\Models;
4
5
/**
6
 * Class Links
7
 *
8
 * Класс модель для работы со Связями между сущностями
9
 *
10
 * @package AmoCRM\Models
11
 * @author [email protected]
12
 * @link https://github.com/dotzero/amocrm-php
13
 *
14
 * For the full copyright and license information, please view the LICENSE
15
 * file that was distributed with this source code.
16
 */
17
class Links extends AbstractModel
18
{
19
    /**
20
     * @var array Список доступный полей для модели (исключая кастомные поля)
21
     */
22
    protected $fields = [];
23
24
    /**
25
     * Связи между сущностями
26
     *
27
     * Метод для получения связей между сущностями аккаунта.
28
     * @link https://developers.amocrm.ru/rest_api/links/list.php
29
     * @param array $parameters Массив параметров к amoCRM API
30
     * @return array Ответ amoCRM API
31
     */
32
    public function apiList($parameters)
33
    {
34
        $response = $this->getRequest('/private/api/v2/json/links/list', $parameters);
35
36
        return isset($response['links']) ? $response['links'] : [];
37
    }
38
}
39