Passed
Push — master ( f86309...3fa716 )
by Mr
01:59 queued 22s
created

Misc::createCall()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace UON\Endpoint;
4
5
use UON\Client;
6
7
/**
8
 * Class Misc
9
 * @package UON
10
 */
11
class Misc extends Client
12
{
13
    /**
14
     * Add flights into voucher
15
     *
16
     * @link    https://api.u-on.ru/{key}/avia/create.{_format}
17
     * @param   array $parameters - List of parameters
18
     * @return  array|false
19
     */
20
    public function createAvia(array $parameters)
21
    {
22
        $endpoint = '/avia/create';
23
        return $this->doRequest('post', $endpoint, $parameters);
24
    }
25
26
    /**
27
     * Add information about call
28
     *
29
     * @link    https://api.u-on.ru/{key}/call_history/create.{_format}
30
     * @param   array $parameters - List of parameters
31
     * @return  array|false
32
     */
33
    public function createCall(array $parameters)
34
    {
35
        $endpoint = '/call_history/create';
36
        return $this->doRequest('post', $endpoint, $parameters);
37
    }
38
39
    /**
40
     * Add information about mail item
41
     *
42
     * @link    https://api.u-on.ru/{key}/mail/create.{_format}
43
     * @param   array $parameters - List of parameters
44
     * @return  array|false
45
     */
46
    public function createMail(array $parameters)
47
    {
48
        $endpoint = '/mail/create';
49
        return $this->doRequest('post', $endpoint, $parameters);
50
    }
51
52
    /**
53
     * Get a list of currencies
54
     *
55
     * @link    https://api.u-on.ru/{key}/currency.{_format}
56
     * @param   array $parameters - List of parameters
57
     * @return  array|false
58
     */
59
    public function getCurrency(array $parameters = [])
60
    {
61
        $endpoint = '/currency';
62
        return $this->doRequest('get', $endpoint, $parameters);
63
    }
64
65
    /**
66
     * Get a list of managers
67
     *
68
     * @link    https://api.u-on.ru/{key}/manager.{_format}
69
     * @return  array|false
70
     */
71
    public function getManagers()
72
    {
73
        $endpoint = '/manager';
74
        return $this->doRequest('get', $endpoint);
75
    }
76
77
    /**
78
     * Get the list of offices
79
     *
80
     * @link    https://api.u-on.ru/{key}/company-office.{_format}
81
     * @param   array $parameters - List of parameters
82
     * @return  array|false
83
     */
84
    public function getOffices(array $parameters = [])
85
    {
86
        $endpoint = '/company-office';
87
        return $this->doRequest('get', $endpoint, $parameters);
88
    }
89
90
    /**
91
     * Get reason deny list
92
     *
93
     * @link    https://api.u-on.ru/{key}/reason_deny.{_format}
94
     * @return  array|false
95
     */
96
    public function getReasonDeny()
97
    {
98
        $endpoint = '/company-office';
99
        return $this->doRequest('get', $endpoint);
100
    }
101
}
102