Updated PHPDoc (#36191)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
8c983073a3
commit
48defa3a87
2 changed files with 36 additions and 18 deletions
|
|
@ -25,6 +25,8 @@ require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
|
|||
/**
|
||||
* API class for stock movements
|
||||
*
|
||||
* @since 5.0.0 Initial implementation
|
||||
*
|
||||
* @access protected
|
||||
* @class DolibarrApiAccess {@requires user,external}
|
||||
*/
|
||||
|
|
@ -59,6 +61,8 @@ class StockMovements extends DolibarrApi
|
|||
*
|
||||
* Return an array with stock movement information
|
||||
*
|
||||
* @since 5.0.0 Initial implementation
|
||||
*
|
||||
* @param int $id ID of movement
|
||||
* @return Object Object with cleaned properties
|
||||
*
|
||||
|
|
@ -84,7 +88,9 @@ class StockMovements extends DolibarrApi
|
|||
}*/
|
||||
|
||||
/**
|
||||
* Get a list of stock movement
|
||||
* Get a list of stock movements
|
||||
*
|
||||
* @since 5.0.0 Initial implementation
|
||||
*
|
||||
* @param string $sortfield Sort field
|
||||
* @param string $sortorder Sort order
|
||||
|
|
@ -181,6 +187,8 @@ class StockMovements extends DolibarrApi
|
|||
* $eatBy Eat-by date. Will be used if a batch does not exist yet and will be created.
|
||||
* sellBy Sell-by date. Will be used if a batch does not exist yet and will be created.
|
||||
*
|
||||
* @since 5.0.0 Initial implementation
|
||||
*
|
||||
* @param int $product_id ID product id {@min 1} {@from body} {@required true}
|
||||
* @param int $warehouse_id ID warehouse {@min 1} {@from body} {@required true}
|
||||
* @param float $qty Qty to add (Use negative value for a stock decrease) {@from body} {@required true}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/api_products.class.php';
|
|||
/**
|
||||
* API class for warehouses
|
||||
*
|
||||
* @since 5.0.0 Initial implementation
|
||||
*
|
||||
* @access protected
|
||||
* @class DolibarrApiAccess {@requires user,external}
|
||||
*/
|
||||
|
|
@ -57,8 +59,10 @@ class Warehouses extends DolibarrApi
|
|||
*
|
||||
* Return an array with warehouse information
|
||||
*
|
||||
* @since 5.0.0 Initial implementation
|
||||
*
|
||||
* @param int $id ID of warehouse
|
||||
* @return Object Object with cleaned properties
|
||||
* @return Object Object with cleaned properties
|
||||
*
|
||||
* @url GET {id}
|
||||
*
|
||||
|
|
@ -192,7 +196,9 @@ class Warehouses extends DolibarrApi
|
|||
|
||||
|
||||
/**
|
||||
* Create warehouse object
|
||||
* Create a warehouse
|
||||
*
|
||||
* @since 5.0.0 Initial implementation
|
||||
*
|
||||
* @param array $request_data Request data
|
||||
* @phan-param ?array<string,string> $request_data
|
||||
|
|
@ -238,13 +244,15 @@ class Warehouses extends DolibarrApi
|
|||
}
|
||||
|
||||
/**
|
||||
* Update warehouse
|
||||
* Update a warehouse
|
||||
*
|
||||
* @param int $id Id of warehouse to update
|
||||
* @param array $request_data Data
|
||||
* @since 5.0.0 Initial implementation
|
||||
*
|
||||
* @param int $id ID of warehouse to update
|
||||
* @param array $request_data Data
|
||||
* @phan-param ?array<string,string> $request_data
|
||||
* @phpstan-param ?array<string,string> $request_data
|
||||
* @return Object Updated object
|
||||
* @return Object Updated object
|
||||
*
|
||||
* @url PUT {id}
|
||||
*
|
||||
|
|
@ -307,10 +315,12 @@ class Warehouses extends DolibarrApi
|
|||
}
|
||||
|
||||
/**
|
||||
* Delete warehouse
|
||||
* Delete a warehouse
|
||||
*
|
||||
* @param int $id Warehouse ID
|
||||
* @return array
|
||||
* @since 5.0.0 Initial implementation
|
||||
*
|
||||
* @param int $id Warehouse ID
|
||||
* @return array
|
||||
* @phan-return array{success:array{code:int,message:string}}
|
||||
* @phpstan-return array{success:array{code:int,message:string}}
|
||||
*
|
||||
|
|
@ -352,24 +362,24 @@ class Warehouses extends DolibarrApi
|
|||
}
|
||||
|
||||
/**
|
||||
* List Product in warehouses
|
||||
* List products in a warehouse
|
||||
*
|
||||
* Get a list of product in a warehouse
|
||||
* Get a list of products for a warehouse
|
||||
*
|
||||
* @since 23.0.0 Initial implementation
|
||||
*
|
||||
* @param int $id warehouse ID
|
||||
* @param int $id warehouse ID {@min 1} {@from body} {@required true}
|
||||
* @param string $sortfield Sort field
|
||||
* @param string $sortorder Sort order
|
||||
* @param int $limit Limit for list
|
||||
* @param int $limit Limit for list
|
||||
* @param int $page Page number
|
||||
* @param int $includestockdata 1=Load also information about stock (slower), 0=No stock data (faster) (default)
|
||||
* @param bool $includesubproducts Load information about subproducts
|
||||
* @param bool $includeparentid Load also ID of parent product (if product is a variant of a parent product)
|
||||
* @param bool $includesubproducts Load information about subproducts
|
||||
* @param bool $includeparentid Load also ID of parent product (if product is a variant of a parent product)
|
||||
* @param bool $includetrans Load also the translations of product label and description
|
||||
* @param string $properties Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names
|
||||
* @param string $properties Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names
|
||||
* @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
|
||||
* @return array Array of product in warehouse
|
||||
* @return array Array of product in warehouse
|
||||
*
|
||||
* @phan-return Product[]
|
||||
* @phpstan-return Product[]
|
||||
|
|
|
|||
Loading…
Reference in a new issue