@@ -65,6 +65,30 @@ public function getCommission(string $ean, float $unitPrice, ?Enum\GetCommission
6565 return $ this ->request ('GET ' , $ url , $ options , $ responseTypes );
6666 }
6767
68+ /**
69+ * Gets a list of all commissions using EAN.
70+ * @param Model\Ean[] $products
71+ * @return Model\BulkCommissionRatesMultiStatusResponse
72+ * @throws Exception\ConnectException when an error occurred in the HTTP connection.
73+ * @throws Exception\ResponseException when an unexpected response was received.
74+ * @throws Exception\UnauthorizedException when the request was unauthorized.
75+ * @throws Exception\RateLimitException when the throttling limit has been reached for the API user.
76+ * @throws Exception\Exception when something unexpected went wrong.
77+ */
78+ public function getCommissionRates (array $ products ): Model \BulkCommissionRatesMultiStatusResponse
79+ {
80+ $ url = "retailer/commissions " ;
81+ $ options = [
82+ 'body ' => Model \CommissionProducts::constructFromArray (['products ' => $ products ]),
83+ 'produces ' => 'application/vnd.retailer.v10+json ' ,
84+ 'consumes ' => 'application/vnd.retailer.v10+json ' ,
85+ ];
86+ $ responseTypes = [
87+ ];
88+
89+ return $ this ->request ('POST ' , $ url , $ options , $ responseTypes );
90+ }
91+
6892 /**
6993 * Gets the details of a catalog product by means of its EAN.
7094 * @param string $ean The EAN number associated with this product.
@@ -229,6 +253,41 @@ public function getPerformanceIndicators(Enum\GetPerformanceIndicatorsName $name
229253 return $ this ->request ('GET ' , $ url , $ options , $ responseTypes )->performanceIndicators ;
230254 }
231255
256+ /**
257+ * Gets a list of product ranks.
258+ * @param string $ean The EAN number associated with this product.
259+ * @param string $date Filters search results to a specific date. The date must be in the past, no more than three
260+ * months back, and up to yesterday.
261+ * @param Enum\GetProductRanksType|null $type Determines the search type, either 'SEARCH' for specific queries or
262+ * 'BROWSE' for broader category searches. In order to retrieve all results, it can be sent as "null".
263+ * @param int|null $page The requested page number with a page size of 50 items.
264+ * @param string|null $AcceptLanguage The language to search for.
265+ * @return Model\ProductRanks
266+ * @throws Exception\ConnectException when an error occurred in the HTTP connection.
267+ * @throws Exception\ResponseException when an unexpected response was received.
268+ * @throws Exception\UnauthorizedException when the request was unauthorized.
269+ * @throws Exception\RateLimitException when the throttling limit has been reached for the API user.
270+ * @throws Exception\Exception when something unexpected went wrong.
271+ */
272+ public function getProductRanks (string $ ean , string $ date , ?Enum \GetProductRanksType $ type = null , ?int $ page = 1 , ?string $ AcceptLanguage = null ): Model \ProductRanks
273+ {
274+ $ url = "retailer/insights/product-ranks " ;
275+ $ options = [
276+ 'query ' => [
277+ 'ean ' => $ ean ,
278+ 'date ' => $ date ,
279+ 'type ' => $ type ?->value,
280+ 'page ' => $ page ,
281+ ],
282+ 'produces ' => 'application/vnd.retailer.v10+json ' ,
283+ ];
284+ $ responseTypes = [
285+ '200 ' => Model \ProductRanks::class,
286+ ];
287+
288+ return $ this ->request ('GET ' , $ url , $ options , $ responseTypes );
289+ }
290+
232291 /**
233292 * Get sales forecast to estimate the sales expectations on the total bol.com platform for the requested number of
234293 * weeks ahead.
0 commit comments