Skip to content

Commit

Permalink
AnalyticsService v2 (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x543 committed Sep 6, 2024
1 parent 00ed2fa commit 8b2bb27
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/Service/V2/AnalyticsService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

declare(strict_types=1);

namespace Gam6itko\OzonSeller\Service\V2;

use Gam6itko\OzonSeller\Service\AbstractService;

class AnalyticsService extends AbstractService
{
private $path = '/v2/analytics';

/**
* Method for getting a report on leftover stocks and products movement at Ozon warehouses.
*
* @see https://docs.ozon.ru/api/seller/en/#operation/AnalyticsAPI_AnalyticsGetStockOnWarehousesV2
*/
public function stockOnWarehouses(int $offset = 0, int $limit = 10, $warehouse_type = "ALL"): array
{
$body = [
'offset' => $offset,
'limit' => $limit,
'warehouse_type' => $warehouse_type
];

return $this->request(
'POST',
"{$this->path}/stock_on_warehouses",
$body
);
}

}

0 comments on commit 8b2bb27

Please sign in to comment.