|
| __construct () |
| Constructor.
|
|
| get ($id) |
| Get properties of a subscription object.
|
|
| index ($sortfield="dateadh", $sortorder='ASC', $limit=100, $page=0, $sqlfilters='', $properties='', $pagination_data=false) |
| List subscriptions.
|
|
| post ($request_data=null) |
| Create subscription object.
|
|
| put ($id, $request_data=null) |
| Update subscription.
|
|
| delete ($id) |
| Delete subscription.
|
|
| __construct ($db, $cachedir='', $refreshCache=false) |
| Constructor.
|
|
|
| _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 sensitive object data @phpstan-template T of Object.
|
|
| _checkFilters ($sqlfilters, &$error='') |
| Return if a $sqlfilters parameter is valid Function no more used.
|
|
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 29 of file api_subscriptions.class.php.
◆ _validate()
Subscriptions::_validate |
( |
| $data | ) |
|
|
private |
Validate fields before creating an object.
- Parameters
-
?array<null|int|float|string> | $data Data to validate |
- Returns
- array<string,null|int|float|string>
- Exceptions
-
Definition at line 295 of file api_subscriptions.class.php.
Referenced by post().
◆ delete()
Subscriptions::delete |
( |
| $id | ) |
|
Delete subscription.
- Parameters
-
int | $id | ID of subscription to delete |
- Returns
- array @phan-return array<string,array{code:int,message:string}> @phpstan-return array<string,array{code:int,message:string}>
- Exceptions
-
Definition at line 260 of file api_subscriptions.class.php.
References $id.
◆ get()
Subscriptions::get |
( |
| $id | ) |
|
◆ index()
Subscriptions::index |
( |
| $sortfield = "dateadh", |
|
|
| $sortorder = 'ASC', |
|
|
| $limit = 100, |
|
|
| $page = 0, |
|
|
| $sqlfilters = '', |
|
|
| $properties = '', |
|
|
| $pagination_data = false ) |
List subscriptions.
Get a list of subscriptions
- 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.import_key:<:'20160101')" |
string | $properties | Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names |
bool | $pagination_data | If this parameter is set to true the response will include pagination data. Default value is false. Page starts from 0* |
- Returns
- array Array of subscription objects @phan-return array{data:Subscription[],pagination:array{total:int,page:int,page_count:int,limit:int}}|array<int,Subscription> @phpstan-return array{data:Subscription[],pagination:array{total:int,page:int,page_count:int,limit:int}}|array<int,Subscription>
- Exceptions
-
RestException | 403 Access denied |
RestException | 404 No Subscription found |
RestException | 503 Error when retrieving Subscription list |
Definition at line 96 of file api_subscriptions.class.php.
References $conf, DolibarrApi\_cleanObjectDatas(), DolibarrApi\_filterObjectProperties(), and forgeSQLFromUniversalSearchCriteria().
◆ post()
Subscriptions::post |
( |
| $request_data = null | ) |
|
◆ put()
Subscriptions::put |
( |
| $id, |
|
|
| $request_data = null ) |
The documentation for this class was generated from the following file: