Completed
Push — master ( f7db99...180f32 )
by Dmitry
03:22
created

Clients   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 42
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 9 1
A update() 0 9 1
1
<?php
2
/**
3
 * @author Dmitry Gladyshev <[email protected]>
4
 * @created 29.11.16 14:09
5
 */
6
7
namespace Yandex\Direct\Service;
8
9
use Yandex\Direct\Exception\Exception;
10
use Yandex\Direct\Service;
11
12
/**
13
 * Class Clients
14
 * @package Yandex\Direct\Service
15
 */
16
final class Clients extends Service
17
{
18
    /**
19
     * Возвращает параметры рекламодателя и представителя.
20
     *
21
     * @param array $FieldNames
22
     * @return array
23
     * @throws Exception
24
     *
25
     * @see https://tech.yandex.ru/direct/doc/ref-v5/clients/get-docpage/
26
     */
27
    public function get($FieldNames)
28
    {
29
        return $this->request([
30
            'method' => 'get',
31
            'params' => [
32
                'FieldNames' => $FieldNames
33
            ]
34
        ]);
35
    }
36
37
    /**
38
     * Изменяет параметры рекламодателя и настройки пользователя — представителя рекламодателя.
39
     *
40
     * @param $Clients
41
     * @return array
42
     *
43
     * @throws Exception
44
     * @throws \Yandex\Direct\Exception\ErrorResponseException
45
     *
46
     * @see https://yandex.ru/dev/direct/doc/ref-v5/clients/update-docpage/
47
     */
48
    public function update($Clients)
49
    {
50
        return $this->request([
51
            'method' => 'update',
52
            'params' => [
53
                'Clients' => $Clients
54
            ]
55
        ]);
56
    }
57
}
58