1 | <?php |
||
27 | class ClientConfiguration implements ClientConfigurationInterface |
||
28 | { |
||
29 | /** @var string */ |
||
30 | protected $apiMode = self::API_MODE_LIVE; |
||
31 | |||
32 | /** @var string */ |
||
33 | protected $clientId; |
||
34 | |||
35 | /** @var string */ |
||
36 | protected $clientSecret; |
||
37 | |||
38 | /** @var string */ |
||
39 | protected $customSandboxUrl; |
||
40 | |||
41 | /** @var string */ |
||
42 | protected $customLiveUrl; |
||
43 | |||
44 | /** @var string */ |
||
45 | protected $businessUuid; |
||
46 | |||
47 | /** @var string */ |
||
48 | protected $channelSet = ChannelSet::CHANNEL_OTHER_SHOPSYSTEM; |
||
49 | |||
50 | /** @var LoggerInterface */ |
||
51 | protected $logger; |
||
52 | |||
53 | /** |
||
54 | * @param string|null $clientId |
||
55 | * @param string|null $clientSecret |
||
56 | * @param string|null $businessUuid |
||
57 | */ |
||
58 | public function __construct( |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public function getClientId() |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | public function getClientSecret() |
||
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | public function getBusinessUuid() |
||
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | public function getApiMode() |
||
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | */ |
||
103 | public function getChannelSet() |
||
107 | |||
108 | /** |
||
109 | * {@inheritdoc} |
||
110 | */ |
||
111 | public function getCustomSandboxUrl() |
||
115 | |||
116 | /** |
||
117 | * @inheritdoc |
||
118 | */ |
||
119 | public function getCustomLiveUrl() |
||
123 | |||
124 | /** |
||
125 | * {@inheritdoc} |
||
126 | */ |
||
127 | public function getHash() |
||
131 | |||
132 | /** |
||
133 | * @return LoggerInterface |
||
134 | */ |
||
135 | public function getLogger() |
||
143 | |||
144 | /** |
||
145 | * Sets Client ID |
||
146 | * |
||
147 | * @param mixed $clientId |
||
148 | * |
||
149 | * @return self |
||
150 | */ |
||
151 | public function setClientId($clientId) |
||
157 | |||
158 | /** |
||
159 | * Sets Client Secret |
||
160 | * |
||
161 | * @param mixed $clientSecret |
||
162 | * |
||
163 | * @return self |
||
164 | */ |
||
165 | public function setClientSecret($clientSecret) |
||
171 | |||
172 | /** |
||
173 | * Sets Business UUID |
||
174 | * |
||
175 | * @param mixed $businessUuid |
||
176 | * |
||
177 | * @return self |
||
178 | */ |
||
179 | public function setBusinessUuid($businessUuid) |
||
185 | |||
186 | /** |
||
187 | * @param string $apiMode |
||
188 | * @return self |
||
189 | */ |
||
190 | public function setApiMode($apiMode) |
||
196 | |||
197 | /** |
||
198 | * Sets Channel set |
||
199 | * |
||
200 | * @param mixed $channelSet |
||
201 | * |
||
202 | * @return $this |
||
203 | * |
||
204 | * @throws \Exception |
||
205 | */ |
||
206 | public function setChannelSet($channelSet = null) |
||
215 | |||
216 | /** |
||
217 | * @internal |
||
218 | * |
||
219 | * Sets Custom sandbox API URL for all packages at once |
||
220 | * |
||
221 | * @param string $customSandboxUrl |
||
222 | * |
||
223 | * @return $this |
||
224 | */ |
||
225 | public function setCustomSandboxUrl($customSandboxUrl) |
||
231 | |||
232 | /** |
||
233 | * @internal |
||
234 | * |
||
235 | * Sets Custom live API URL for all packages at once |
||
236 | * |
||
237 | * @param string $customLiveUrl |
||
238 | * |
||
239 | * @return $this |
||
240 | */ |
||
241 | public function setCustomLiveUrl($customLiveUrl) |
||
247 | |||
248 | /** |
||
249 | * @param LoggerInterface $logger |
||
250 | * |
||
251 | * @return $this |
||
252 | */ |
||
253 | public function setLogger(LoggerInterface $logger) |
||
259 | |||
260 | /** |
||
261 | * @inheritdoc |
||
262 | */ |
||
263 | public function isLoaded() |
||
271 | |||
272 | /** |
||
273 | * @inheritdoc |
||
274 | */ |
||
275 | public function assertLoaded() |
||
283 | } |
||
284 |