AddCallRequest::getAvailableParams()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Phrlog\Zvonok\Phone\Request;
4
5
/**
6
 * Class AddCallRequest
7
 */
8
class AddCallRequest extends BaseRequest
9
{
10
    protected const URI = '/lk/cabapi_external/api/v1/phones/call/';
11
12
    /**
13
     * @var string
14
     */
15
    protected $phone;
16
17
    /**
18
     * @var string
19
     */
20
    protected $campaign_id;
21
22
    /**
23
     * AddCallRequest constructor.
24
     * @param string $phone
25
     * @param string $campaign_id
26
     */
27
    public function __construct(string $phone, string $campaign_id)
28
    {
29
        $this->phone = $phone;
30
        $this->campaign_id = $campaign_id;
31
    }
32
33
    /**
34
     * @param string $phone
35
     * @return $this
36
     */
37
    public function setPhone(string $phone): self
38
    {
39
        $this->phone = $phone;
40
41
        return $this;
42
    }
43
44
    /**
45
     * @param string $id
46
     * @return $this
47
     */
48
    public function setCampaignId(string $id): self
49
    {
50
        $this->campaign_id = $id;
51
52
        return $this;
53
    }
54
55
    /**
56
     * @return array
57
     */
58
    protected function getAvailableParams(): array
59
    {
60
        return ['phone', 'campaign_id'];
61
    }
62
63
    /**
64
     * @return string
65
     */
66
    protected function getUri(): string
67
    {
68
        return static::URI;
69
    }
70
}
71