|
25 | 25 | /** |
26 | 26 | * API class for warehouses |
27 | 27 | * |
| 28 | + * @since 5.0.0 Initial implementation |
| 29 | + * |
28 | 30 | * @access protected |
29 | 31 | * @class DolibarrApiAccess {@requires user,external} |
30 | 32 | */ |
@@ -57,8 +59,10 @@ public function __construct() |
57 | 59 | * |
58 | 60 | * Return an array with warehouse information |
59 | 61 | * |
| 62 | + * @since 5.0.0 Initial implementation |
| 63 | + * |
60 | 64 | * @param int $id ID of warehouse |
61 | | - * @return Object Object with cleaned properties |
| 65 | + * @return Object Object with cleaned properties |
62 | 66 | * |
63 | 67 | * @url GET {id} |
64 | 68 | * |
@@ -192,7 +196,9 @@ public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, |
192 | 196 |
|
193 | 197 |
|
194 | 198 | /** |
195 | | - * Create warehouse object |
| 199 | + * Create a warehouse |
| 200 | + * |
| 201 | + * @since 5.0.0 Initial implementation |
196 | 202 | * |
197 | 203 | * @param array $request_data Request data |
198 | 204 | * @phan-param ?array<string,string> $request_data |
@@ -238,13 +244,15 @@ public function post($request_data = null) |
238 | 244 | } |
239 | 245 |
|
240 | 246 | /** |
241 | | - * Update warehouse |
| 247 | + * Update a warehouse |
242 | 248 | * |
243 | | - * @param int $id Id of warehouse to update |
244 | | - * @param array $request_data Data |
| 249 | + * @since 5.0.0 Initial implementation |
| 250 | + * |
| 251 | + * @param int $id ID of warehouse to update |
| 252 | + * @param array $request_data Data |
245 | 253 | * @phan-param ?array<string,string> $request_data |
246 | 254 | * @phpstan-param ?array<string,string> $request_data |
247 | | - * @return Object Updated object |
| 255 | + * @return Object Updated object |
248 | 256 | * |
249 | 257 | * @url PUT {id} |
250 | 258 | * |
@@ -307,10 +315,12 @@ public function put($id, $request_data = null) |
307 | 315 | } |
308 | 316 |
|
309 | 317 | /** |
310 | | - * Delete warehouse |
| 318 | + * Delete a warehouse |
| 319 | + * |
| 320 | + * @since 5.0.0 Initial implementation |
311 | 321 | * |
312 | | - * @param int $id Warehouse ID |
313 | | - * @return array |
| 322 | + * @param int $id Warehouse ID |
| 323 | + * @return array |
314 | 324 | * @phan-return array{success:array{code:int,message:string}} |
315 | 325 | * @phpstan-return array{success:array{code:int,message:string}} |
316 | 326 | * |
@@ -352,24 +362,24 @@ public function delete($id) |
352 | 362 | } |
353 | 363 |
|
354 | 364 | /** |
355 | | - * List Product in warehouses |
| 365 | + * List products in a warehouse |
356 | 366 | * |
357 | | - * Get a list of product in a warehouse |
| 367 | + * Get a list of products for a warehouse |
358 | 368 | * |
359 | 369 | * @since 23.0.0 Initial implementation |
360 | 370 | * |
361 | | - * @param int $id warehouse ID |
| 371 | + * @param int $id warehouse ID {@min 1} {@from body} {@required true} |
362 | 372 | * @param string $sortfield Sort field |
363 | 373 | * @param string $sortorder Sort order |
364 | | - * @param int $limit Limit for list |
| 374 | + * @param int $limit Limit for list |
365 | 375 | * @param int $page Page number |
366 | 376 | * @param int $includestockdata 1=Load also information about stock (slower), 0=No stock data (faster) (default) |
367 | | - * @param bool $includesubproducts Load information about subproducts |
368 | | - * @param bool $includeparentid Load also ID of parent product (if product is a variant of a parent product) |
| 377 | + * @param bool $includesubproducts Load information about subproducts |
| 378 | + * @param bool $includeparentid Load also ID of parent product (if product is a variant of a parent product) |
369 | 379 | * @param bool $includetrans Load also the translations of product label and description |
370 | | - * @param string $properties Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names |
| 380 | + * @param string $properties Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names |
371 | 381 | * @param bool $pagination_data If this parameter is set to true the response will include pagination data. Default value is false. Page starts from 0 |
372 | | - * @return array Array of product in warehouse |
| 382 | + * @return array Array of product in warehouse |
373 | 383 | * |
374 | 384 | * @phan-return Product[] |
375 | 385 | * @phpstan-return Product[] |
|
0 commit comments