1 | <?php |
||
9 | class LeadService implements ServiceInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var RequestHandler |
||
13 | */ |
||
14 | protected $request; |
||
15 | |||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | protected $fields = []; |
||
20 | |||
21 | /** |
||
22 | * @var |
||
23 | */ |
||
24 | protected $response; |
||
25 | |||
26 | /** |
||
27 | * @var array Lead |
||
28 | */ |
||
29 | protected $lead = []; |
||
30 | |||
31 | /** |
||
32 | * LeadService constructor. |
||
33 | * @param RequestHandler $requestHandler |
||
34 | */ |
||
35 | 2 | public function __construct(RequestHandler $requestHandler) |
|
39 | |||
40 | /** |
||
41 | * @param Lead $lead |
||
42 | */ |
||
43 | 2 | public function add(EntityInterface $lead) |
|
49 | |||
50 | 2 | public function createLead() |
|
62 | |||
63 | 2 | public function getResponse() |
|
67 | |||
68 | /** |
||
69 | * @return bool |
||
70 | */ |
||
71 | 2 | protected function checkResponse() |
|
79 | |||
80 | /** |
||
81 | * @return string |
||
82 | */ |
||
83 | 2 | protected function getLink() |
|
87 | |||
88 | /** |
||
89 | * Fill fields for response |
||
90 | */ |
||
91 | 2 | protected function composeAddFields() |
|
101 | } |