dolibarr 21.0.0-alpha
|
Public Member Functions | |
__construct () | |
Constructor. | |
index ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0) | |
Get the list of salaries. | |
get ($id) | |
Get salary by ID. | |
post ($request_data=null) | |
Create salary object. | |
put ($id, $request_data=null) | |
Update salary. | |
getAllPayments ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0) | |
Delete salary. | |
getPayments ($pid) | |
Get a given payment. | |
addPayment ($id, $request_data=null) | |
Create payment salary on a salary. | |
updatePayment ($id, $request_data=null) | |
Update paymentsalary. | |
Public Member Functions inherited from DolibarrApi | |
__construct ($db, $cachedir='', $refreshCache=false) | |
Constructor. | |
Static Public Attributes | |
static | $FIELDSPAYMENT |
array $FIELDS Mandatory fields, checked when creating an object | |
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) | |
Delete a payment salary. | |
_validatepayments ($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 31 of file api_salaries.class.php.
|
protected |
Clean sensible object datas.
Object | $object | Object to clean |
Reimplemented from DolibarrApi.
Definition at line 464 of file api_salaries.class.php.
References $object.
Referenced by get(), getAllPayments(), getPayments(), and index().
|
private |
Delete a payment salary.
int | $id | ID of payment salary |
@url DELETE {id}/payments Validate fields before creating an object
array | null | $data | Data to validate |
RestException |
Definition at line 423 of file api_salaries.class.php.
Referenced by post().
|
private |
Validate fields before creating an object.
array | null | $data | Data to validate |
RestException |
Definition at line 443 of file api_salaries.class.php.
References $FIELDSPAYMENT.
Referenced by addPayment().
Salaries::addPayment | ( | $id, | |
$request_data = null ) |
Create payment salary on a salary.
int | $id | Id of salary |
array | $request_data | Request data |
@url POST {id}/payments
RestException |
Definition at line 316 of file api_salaries.class.php.
References $id, DolibarrApi\_checkValForAPI(), and _validatepayments().
Salaries::get | ( | $id | ) |
Get salary by ID.
int | $id | ID of salary |
RestException |
Definition at line 122 of file api_salaries.class.php.
References $id, and _cleanObjectDatas().
Salaries::getAllPayments | ( | $sortfield = "t.rowid", | |
$sortorder = 'ASC', | |||
$limit = 100, | |||
$page = 0 ) |
Delete salary.
int | $id | ID of salary |
string | $sortfield | Sort field |
string | $sortorder | Sort order |
int | $limit | Limit for list |
int | $page | Page number |
@url GET /payments
RestException |
Definition at line 238 of file api_salaries.class.php.
References _cleanObjectDatas(), and dol_syslog().
Salaries::getPayments | ( | $pid | ) |
Get a given payment.
int | $pid | ID of payment salary |
@url GET /payments/{pid}
RestException |
Definition at line 290 of file api_salaries.class.php.
References _cleanObjectDatas().
Salaries::index | ( | $sortfield = "t.rowid", | |
$sortorder = 'ASC', | |||
$limit = 100, | |||
$page = 0 ) |
Get the list of salaries.
string | $sortfield | Sort field |
string | $sortorder | Sort order |
int | $limit | Limit for list |
int | $page | Page number |
RestException |
Definition at line 73 of file api_salaries.class.php.
References _cleanObjectDatas(), and dol_syslog().
Salaries::post | ( | $request_data = null | ) |
Create salary object.
array | $request_data | Request data |
Definition at line 143 of file api_salaries.class.php.
References DolibarrApi\_checkValForAPI(), and _validate().
Salaries::put | ( | $id, | |
$request_data = null ) |
Update salary.
int | $id | ID of salary |
array | $request_data | Data |
Definition at line 169 of file api_salaries.class.php.
References $id, and DolibarrApi\_checkValForAPI().
Salaries::updatePayment | ( | $id, | |
$request_data = null ) |
Update paymentsalary.
int | $id | ID of paymentsalary |
array | $request_data | data |
@url POST {id}/payments
RestException |
Definition at line 357 of file api_salaries.class.php.
References $id, and DolibarrApi\_checkValForAPI().