1 | <?php |
||
17 | abstract class Service implements ConfigurableInterface |
||
18 | { |
||
19 | use ConfigurableTrait; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $name; |
||
25 | |||
26 | /** |
||
27 | * @var TransportInterface |
||
28 | */ |
||
29 | protected $transport; |
||
30 | |||
31 | /** |
||
32 | * @var CredentialsInterface |
||
33 | */ |
||
34 | protected $credentials; |
||
35 | |||
36 | /** |
||
37 | * @var bool |
||
38 | */ |
||
39 | private $useOperatorUnits = true; |
||
40 | |||
41 | /** |
||
42 | * @param string $name |
||
43 | */ |
||
44 | 49 | public function setName($name) |
|
48 | |||
49 | /** |
||
50 | * @param TransportInterface $transport |
||
51 | */ |
||
52 | 50 | public function setTransport(TransportInterface $transport) |
|
56 | |||
57 | /** |
||
58 | * @param CredentialsInterface $credentials |
||
59 | */ |
||
60 | 50 | public function setCredentials(CredentialsInterface $credentials) |
|
64 | |||
65 | /** |
||
66 | * @param bool $useOperatorUnits |
||
67 | */ |
||
68 | 1 | public function setUseOperatorUnits($useOperatorUnits) |
|
72 | |||
73 | /** |
||
74 | * Do API request with needle headers |
||
75 | * |
||
76 | * @param array $params |
||
77 | * @param array $headers |
||
78 | * @return array |
||
79 | * @throws ErrorResponseException |
||
80 | */ |
||
81 | 1 | public function request(array $params, $headers = []) |
|
121 | } |
||
122 |