19
19
use Setono \PeakWMS \Client \Endpoint \ProductEndpointInterface ;
20
20
use Setono \PeakWMS \Client \Endpoint \SalesOrderEndpoint ;
21
21
use Setono \PeakWMS \Client \Endpoint \SalesOrderEndpointInterface ;
22
+ use Setono \PeakWMS \Client \Endpoint \StockEndpoint ;
23
+ use Setono \PeakWMS \Client \Endpoint \StockEndpointInterface ;
22
24
use Setono \PeakWMS \Client \Endpoint \WebhookEndpoint ;
23
25
use Setono \PeakWMS \Client \Endpoint \WebhookEndpointInterface ;
24
26
use Setono \PeakWMS \Exception \InternalServerErrorException ;
@@ -39,6 +41,8 @@ final class Client implements ClientInterface, LoggerAwareInterface
39
41
40
42
private ?SalesOrderEndpointInterface $ salesOrderEndpoint = null ;
41
43
44
+ private ?StockEndpointInterface $ stockEndpoint = null ;
45
+
42
46
private ?WebhookEndpointInterface $ webhookEndpoint = null ;
43
47
44
48
private ?HttpClientInterface $ httpClient = null ;
@@ -164,6 +168,16 @@ public function salesOrder(): SalesOrderEndpointInterface
164
168
return $ this ->salesOrderEndpoint ;
165
169
}
166
170
171
+ public function stock (): StockEndpointInterface
172
+ {
173
+ if (null === $ this ->stockEndpoint ) {
174
+ $ this ->stockEndpoint = new StockEndpoint ($ this , $ this ->getMapperBuilder (), 'stock ' );
175
+ $ this ->stockEndpoint ->setLogger ($ this ->logger );
176
+ }
177
+
178
+ return $ this ->stockEndpoint ;
179
+ }
180
+
167
181
public function webhook (): WebhookEndpointInterface
168
182
{
169
183
if (null === $ this ->webhookEndpoint ) {
0 commit comments