dolibarr 20.0.0
|
Public Member Functions | |
__construct () | |
Constructor. | |
get ($id) | |
Get properties of a subscription object. | |
index ($sortfield="dateadh", $sortorder='ASC', $limit=100, $page=0, $sqlfilters='', $properties='') | |
List subscriptions. | |
post ($request_data=null) | |
Create subscription object. | |
put ($id, $request_data=null) | |
Update subscription. | |
delete ($id) | |
Delete subscription. | |
Public Member Functions inherited from DolibarrApi | |
__construct ($db, $cachedir='', $refreshCache=false) | |
Constructor. | |
Private Member Functions | |
_validate ($data) | |
Validate fields before creating an object. | |
Additional Inherited Members | |
Protected Member Functions inherited from DolibarrApi | |
_checkValForAPI ($field, $value, $object) | |
Check and convert a string depending on its type/name. | |
_filterObjectProperties ($object, $properties) | |
Filter properties that will be returned on object. | |
_cleanObjectDatas ($object) | |
Clean sensible object datas. | |
_checkFilters ($sqlfilters, &$error='') | |
Return if a $sqlfilters parameter is valid Function no more used. | |
Static Protected Member Functions inherited from DolibarrApi | |
static | _checkAccessToResource ($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') |
Check access by user to a given resource. | |
static | _forge_criteria_callback ($matches) |
Function to forge a SQL criteria from a Generic filter string. | |
Definition at line 28 of file api_subscriptions.class.php.
|
private |
Validate fields before creating an object.
array | null | $data | Data to validate |
RestException |
Definition at line 265 of file api_subscriptions.class.php.
Referenced by post().
Subscriptions::delete | ( | $id | ) |
Delete subscription.
int | $id | ID of subscription to delete |
RestException | 403 Access denied |
RestException | 404 No Subscription found |
RestException | 409 No Subscription deleted |
RestException | 500 Error when deleting Subscription |
Definition at line 230 of file api_subscriptions.class.php.
Subscriptions::get | ( | $id | ) |
Get properties of a subscription object.
Return an array with subscription information
int | $id | ID of subscription |
RestException | 403 Access denied |
RestException | 404 No Subscription found |
Definition at line 60 of file api_subscriptions.class.php.
References DolibarrApi\_cleanObjectDatas().
Subscriptions::index | ( | $sortfield = "dateadh", | |
$sortorder = 'ASC', | |||
$limit = 100, | |||
$page = 0, | |||
$sqlfilters = '', | |||
$properties = '' ) |
List subscriptions.
Get a list of subscriptions
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.import_key:<:'20160101')" |
string | $properties | Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names |
RestException | 403 Access denied |
RestException | 404 No Subscription found |
RestException | 503 Error when retrieving Subscription list |
Definition at line 92 of file api_subscriptions.class.php.
References DolibarrApi\_cleanObjectDatas(), DolibarrApi\_filterObjectProperties(), and forgeSQLFromUniversalSearchCriteria().
Subscriptions::post | ( | $request_data = null | ) |
Create subscription object.
array | $request_data | Request data |
RestException | 403 Access denied |
RestException | 500 Error when creating Subscription |
Definition at line 152 of file api_subscriptions.class.php.
References DolibarrApi\_checkValForAPI(), _validate(), and sanitizeVal().
Subscriptions::put | ( | $id, | |
$request_data = null ) |
Update subscription.
int | $id | ID of subscription to update |
array | $request_data | Datas |
RestException | 403 Access denied |
RestException | 404 No Subscription found |
RestException | 500 Error when updating Subscription |
Definition at line 187 of file api_subscriptions.class.php.
References DolibarrApi\_checkValForAPI(), and sanitizeVal().