| Total Complexity | 5 |
| Total Lines | 61 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 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 |
||
| 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 |
||
| 69 | } |
||
| 70 | } |
||
| 71 |