|
| __construct () |
| Constructor.
|
|
| get ($id) |
| Get properties of a bom object. More...
|
|
| index ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0, $sqlfilters='', $properties='') |
| List boms. More...
|
|
| post ($request_data=null) |
| Create bom object. More...
|
|
| put ($id, $request_data=null) |
| Update bom. More...
|
|
| delete ($id) |
| Delete bom. More...
|
|
| getLines ($id) |
| Get lines of an BOM. More...
|
|
| postLine ($id, $request_data=null) |
| Add a line to given BOM. More...
|
|
| putLine ($id, $lineid, $request_data=null) |
| Update a line to given BOM. More...
|
|
| deleteLine ($id, $lineid) |
| Delete a line to given BOM. More...
|
|
| __construct ($db, $cachedir='', $refreshCache=false) |
| Constructor. More...
|
|
Definition at line 38 of file api_boms.class.php.
◆ _cleanObjectDatas()
Boms::_cleanObjectDatas |
( |
|
$object | ) |
|
|
protected |
Clean sensible object datas.
- Parameters
-
Object | $object | Object to clean |
- Returns
- Object Object with cleaned properties
Reimplemented from DolibarrApi.
Definition at line 501 of file api_boms.class.php.
References $object.
◆ _validate()
Validate fields before create or update object.
- Parameters
-
array | $data | Array of data to validate |
- Returns
- array
- Exceptions
-
Definition at line 572 of file api_boms.class.php.
◆ checkRefNumbering()
Boms::checkRefNumbering |
( |
| ) |
|
|
private |
◆ delete()
Delete bom.
- Parameters
-
- Returns
- array
- Exceptions
-
RestException | 403 Access denied |
RestException | 404 BOM not found |
RestException | 500 Error deleting bom |
Definition at line 279 of file api_boms.class.php.
◆ deleteLine()
Boms::deleteLine |
( |
|
$id, |
|
|
|
$lineid |
|
) |
| |
Delete a line to given BOM.
- Parameters
-
int | $id | Id of BOM to update |
int | $lineid | Id of line to delete |
@url DELETE {id}/lines/{lineid}
- Returns
- array
- Exceptions
-
RestException | 403 Access denied |
RestException | 404 BOM not found |
RestException | 500 Error deleting bom line |
Definition at line 454 of file api_boms.class.php.
◆ get()
Get properties of a bom object.
Return an array with bom information
- Parameters
-
- Returns
- Object Object with cleaned properties
@url GET {id}
- Exceptions
-
RestException | 403 Access denied |
RestException | 404 BOM not found |
Definition at line 69 of file api_boms.class.php.
◆ getLines()
Get lines of an BOM.
- Parameters
-
@url GET {id}/lines
- Returns
- array
- Exceptions
-
RestException | 403 Access denied |
RestException | 404 BOM not found |
Definition at line 317 of file api_boms.class.php.
◆ index()
Boms::index |
( |
|
$sortfield = "t.rowid" , |
|
|
|
$sortorder = 'ASC' , |
|
|
|
$limit = 100 , |
|
|
|
$page = 0 , |
|
|
|
$sqlfilters = '' , |
|
|
|
$properties = '' |
|
) |
| |
List boms.
Get a list of boms
- Parameters
-
string | $sortfield | Sort field |
string | $sortorder | Sort order |
int | $limit | Limit for list |
int | $page | Page number |
string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" |
string | $properties | Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names |
- Returns
- array Array of order objects
- Exceptions
-
RestException | 400 Bad sqlfilters |
RestException | 403 Access denied |
RestException | 503 Error retrieving list of boms |
Definition at line 105 of file api_boms.class.php.
◆ post()
Boms::post |
( |
|
$request_data = null | ) |
|
Create bom object.
- Parameters
-
array | $request_data | Request datas |
- Returns
- int ID of bom
- Exceptions
-
RestException | 403 Access denied |
RestException | 500 Error retrieving list of boms |
Definition at line 188 of file api_boms.class.php.
◆ postLine()
Boms::postLine |
( |
|
$id, |
|
|
|
$request_data = null |
|
) |
| |
Add a line to given BOM.
- Parameters
-
int | $id | Id of BOM to update |
array | $request_data | BOMLine data |
@url POST {id}/lines
- Returns
- int
- Exceptions
-
RestException | 403 Access denied |
RestException | 404 BOM not found |
RestException | 500 Error adding bom line |
Definition at line 353 of file api_boms.class.php.
◆ put()
Boms::put |
( |
|
$id, |
|
|
|
$request_data = null |
|
) |
| |
Update bom.
- Parameters
-
int | $id | Id of bom to update |
array | $request_data | Datas |
- Returns
- Object Object after update
- Exceptions
-
RestException | 403 Access denied |
RestException | 404 BOM not found |
RestException | 500 Error updating bom |
Definition at line 225 of file api_boms.class.php.
◆ putLine()
Boms::putLine |
( |
|
$id, |
|
|
|
$lineid, |
|
|
|
$request_data = null |
|
) |
| |
Update a line to given BOM.
- Parameters
-
int | $id | Id of BOM to update |
int | $lineid | Id of line to update |
array | $request_data | BOMLine data |
@url PUT {id}/lines/{lineid}
- Returns
- object|bool
- Exceptions
-
RestException | 403 Access denied |
RestException | 404 BOM not found |
Definition at line 403 of file api_boms.class.php.
The documentation for this class was generated from the following file: