|
|
| __construct () |
| | Constructor.
|
| |
| | get ($id) |
| | Get properties of an donation object. More...
|
| |
| | index ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0, $thirdparty_ids='', $sqlfilters='') |
| | List donations. More...
|
| |
| | post ($request_data=null) |
| | Create donation object. More...
|
| |
| | put ($id, $request_data=null) |
| | Update order general fields (won't touch lines of order) More...
|
| |
| | delete ($id) |
| | Delete donation. More...
|
| |
| | validate ($id, $idwarehouse=0, $notrigger=0) |
| | Validate an donation. More...
|
| |
| | __construct ($db, $cachedir='', $refreshCache=false) |
| | Constructor. More...
|
| |
Definition at line 29 of file api_donations.class.php.
◆ _cleanObjectDatas()
| Donations::_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 343 of file api_donations.class.php.
◆ _validate()
| Donations::_validate |
( |
|
$data | ) |
|
|
private |
Validate fields before create or update object.
- Parameters
-
| array | $data | Array with data to verify |
- Returns
- array
- Exceptions
-
Definition at line 365 of file api_donations.class.php.
◆ delete()
◆ get()
Get properties of an donation object.
Return an array with donation informations
- Parameters
-
- Returns
- array|mixed data without useless information
- Exceptions
-
Definition at line 64 of file api_donations.class.php.
◆ index()
| Donations::index |
( |
|
$sortfield = "t.rowid", |
|
|
|
$sortorder = 'ASC', |
|
|
|
$limit = 100, |
|
|
|
$page = 0, |
|
|
|
$thirdparty_ids = '', |
|
|
|
$sqlfilters = '' |
|
) |
| |
List donations.
Get a list of donations
- Parameters
-
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Limit for list |
| int | $page | Page number |
| string | $thirdparty_ids | Thirdparty ids to filter orders of (example '1' or '1,2,3') {@pattern /^[0-9,]*$/i} |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" |
- Returns
- array Array of order objects
- Exceptions
-
Definition at line 102 of file api_donations.class.php.
◆ post()
| Donations::post |
( |
|
$request_data = null | ) |
|
Create donation object.
- Parameters
-
| array | $request_data | Request data |
- Returns
- int ID of order
Definition at line 182 of file api_donations.class.php.
◆ put()
| Donations::put |
( |
|
$id, |
|
|
|
$request_data = null |
|
) |
| |
Update order general fields (won't touch lines of order)
- Parameters
-
| int | $id | Id of order to update |
| array | $request_data | Datas |
- Returns
- int
Definition at line 217 of file api_donations.class.php.
◆ validate()
| Donations::validate |
( |
|
$id, |
|
|
|
$idwarehouse = 0, |
|
|
|
$notrigger = 0 |
|
) |
| |
Validate an donation.
If you get a bad value for param notrigger check, provide this in body { "idwarehouse": 0, "notrigger": 0 }
- Parameters
-
| int | $id | Order ID |
| int | $idwarehouse | Warehouse ID |
| int | $notrigger | 1=Does not execute triggers, 0= execute triggers |
@url POST {id}/validate
- Exceptions
-
| RestException | 304 |
| RestException | 401 |
| RestException | 404 |
| RestException | 500 System error |
- Returns
- array
Definition at line 300 of file api_donations.class.php.
The documentation for this class was generated from the following file: