dolibarr 19.0.4
|
Public Member Functions | |
__construct () | |
Constructor. | |
get ($id) | |
Get properties of a member object. | |
getByThirdparty ($thirdparty) | |
Get properties of a member object by linked thirdparty. | |
getByThirdpartyEmail ($email) | |
Get properties of a member object by linked thirdparty email. | |
getByThirdpartyBarcode ($barcode) | |
Get properties of a member object by linked thirdparty barcode. | |
index ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0, $typeid='', $category=0, $sqlfilters='', $properties='') | |
List members. | |
post ($request_data=null) | |
Create member object. | |
put ($id, $request_data=null) | |
Update member. | |
delete ($id) | |
Delete member. | |
getSubscriptions ($id) | |
List subscriptions of a member. | |
createSubscription ($id, $start_date, $end_date, $amount, $label='') | |
Add a subscription for a member. | |
getCategories ($id, $sortfield="s.rowid", $sortorder='ASC', $limit=0, $page=0) | |
Get categories for a member. | |
Public Member Functions inherited from DolibarrApi | |
__construct ($db, $cachedir='', $refreshCache=false) | |
Constructor. | |
Protected Member Functions | |
_cleanObjectDatas ($object) | |
Clean sensible object datas. | |
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. | |
_checkFilters ($sqlfilters, &$error='') | |
Return if a $sqlfilters parameter is valid Function no more used. | |
Private Member Functions | |
_validate ($data) | |
Validate fields before creating an object. | |
Additional Inherited Members | |
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 34 of file api_members.class.php.
|
protected |
Clean sensible object datas.
Object | $object | Object to clean |
Reimplemented from DolibarrApi.
Definition at line 438 of file api_members.class.php.
Referenced by get(), getByThirdparty(), getByThirdpartyBarcode(), getByThirdpartyEmail(), getSubscriptions(), and index().
|
private |
Validate fields before creating an object.
array | null | $data | Data to validate |
RestException |
Definition at line 419 of file api_members.class.php.
Referenced by post().
Members::createSubscription | ( | $id, | |
$start_date, | |||
$end_date, | |||
$amount, | |||
$label = '' ) |
Add a subscription for a member.
int | $id | ID of member |
string | $start_date | Start date {@from body} {@type timestamp} |
string | $end_date | End date {@from body} {@type timestamp} |
float | $amount | Amount (may be 0) {@from body} |
string | $label | Label {@from body} |
@url POST {id}/subscriptions
Definition at line 505 of file api_members.class.php.
Members::delete | ( | $id | ) |
Delete member.
int | $id | member ID |
Definition at line 380 of file api_members.class.php.
References DolibarrApi\_checkAccessToResource().
Members::get | ( | $id | ) |
Get properties of a member object.
Return an array with member informations
int | $id | ID of member |
RestException |
Definition at line 63 of file api_members.class.php.
References DolibarrApi\_checkAccessToResource(), and _cleanObjectDatas().
Members::getByThirdparty | ( | $thirdparty | ) |
Get properties of a member object by linked thirdparty.
Return an array with member informations
int | $thirdparty | ID of third party |
@url GET thirdparty/{thirdparty}
RestException | 401 |
RestException | 404 |
Definition at line 100 of file api_members.class.php.
References DolibarrApi\_checkAccessToResource(), and _cleanObjectDatas().
Members::getByThirdpartyBarcode | ( | $barcode | ) |
Get properties of a member object by linked thirdparty barcode.
Return an array with member informations
string | $barcode | Barcode of third party |
@url GET thirdparty/barcode/{barcode}
RestException | 401 |
RestException | 404 |
Definition at line 172 of file api_members.class.php.
References DolibarrApi\_checkAccessToResource(), and _cleanObjectDatas().
Members::getByThirdpartyEmail | ( | ) |
Get properties of a member object by linked thirdparty email.
Return an array with member informations
string | Email of third party |
@url GET thirdparty/email/{email}
RestException | 401 |
RestException | 404 |
Definition at line 133 of file api_members.class.php.
References DolibarrApi\_checkAccessToResource(), and _cleanObjectDatas().
Members::getCategories | ( | $id, | |
$sortfield = "s.rowid", | |||
$sortorder = 'ASC', | |||
$limit = 0, | |||
$page = 0 ) |
Get categories for a member.
int | $id | ID of member |
string | $sortfield | Sort field |
string | $sortorder | Sort order |
int | $limit | Limit for list |
int | $page | Page number |
@url GET {id}/categories
Definition at line 533 of file api_members.class.php.
Members::getSubscriptions | ( | $id | ) |
List subscriptions of a member.
Get a list of subscriptions
int | $id | ID of member |
RestException |
@url GET {id}/subscriptions
Definition at line 472 of file api_members.class.php.
References _cleanObjectDatas().
Members::index | ( | $sortfield = "t.rowid", | |
$sortorder = 'ASC', | |||
$limit = 100, | |||
$page = 0, | |||
$typeid = '', | |||
$category = 0, | |||
$sqlfilters = '', | |||
$properties = '' ) |
List members.
Get a list of members
string | $sortfield | Sort field |
string | $sortorder | Sort order |
int | $limit | Limit for list |
int | $page | Page number |
string | $typeid | ID of the type of member |
int | $category | Use this param to filter list by category |
string | $sqlfilters | Other criteria to filter answers separated by a comma. Example: "(t.ref:like:'SO-%') and ((t.date_creation:<:'20160101') or (t.nature:is:NULL))" |
string | $properties | Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names |
RestException |
Definition at line 215 of file api_members.class.php.
References _cleanObjectDatas(), DolibarrApi\_filterObjectProperties(), and forgeSQLFromUniversalSearchCriteria().
Members::post | ( | $request_data = null | ) |
Create member object.
array | $request_data | Request data |
Definition at line 284 of file api_members.class.php.
References _validate().
Members::put | ( | $id, | |
$request_data = null ) |
Update member.
int | $id | ID of member to update |
array | $request_data | Datas |
Definition at line 315 of file api_members.class.php.
References DolibarrApi\_checkAccessToResource().