dolibarr  21.0.0-alpha
Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | List of all members
Salaries Class Reference
Inheritance diagram for Salaries:
Inheritance graph
[legend]
Collaboration diagram for Salaries:
Collaboration graph
[legend]

Public Member Functions

 __construct ()
 Constructor.
 
 index ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0)
 Get the list of salaries. More...
 
 get ($id)
 Get salary by ID. More...
 
 post ($request_data=null)
 Create salary object. More...
 
 put ($id, $request_data=null)
 Update salary. More...
 
 getAllPayments ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0)
 Delete salary. More...
 
 getPayments ($pid)
 Get a given payment. More...
 
 addPayment ($id, $request_data=null)
 Create payment salary on a salary. More...
 
 updatePayment ($id, $request_data=null)
 Update paymentsalary. More...
 
- Public Member Functions inherited from DolibarrApi
 __construct ($db, $cachedir='', $refreshCache=false)
 Constructor. More...
 

Static Public Attributes

static $FIELDSPAYMENT
 array $FIELDS Mandatory fields, checked when creating an object
 

Protected Member Functions

 _cleanObjectDatas ($object)
 Clean sensible object datas. More...
 
- Protected Member Functions inherited from DolibarrApi
 _checkValForAPI ($field, $value, $object)
 Check and convert a string depending on its type/name. More...
 
 _filterObjectProperties ($object, $properties)
 Filter properties that will be returned on object. More...
 
 _checkFilters ($sqlfilters, &$error='')
 Return if a $sqlfilters parameter is valid Function no more used. More...
 

Private Member Functions

 _validate ($data)
 Delete a payment salary. More...
 
 _validatepayments ($data)
 Validate fields before creating an object. More...
 

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. More...
 
static _forge_criteria_callback ($matches)
 Function to forge a SQL criteria from a Generic filter string. More...
 

Detailed Description

Definition at line 31 of file api_salaries.class.php.

Member Function Documentation

◆ _cleanObjectDatas()

Salaries::_cleanObjectDatas (   $object)
protected

Clean sensible object datas.

Parameters
Object$objectObject to clean
Returns
Object Object with cleaned properties

Reimplemented from DolibarrApi.

Definition at line 464 of file api_salaries.class.php.

References $object.

◆ _validate()

Salaries::_validate (   $data)
private

Delete a payment salary.

Parameters
int$idID of payment salary
Returns
array

@url DELETE {id}/payments Validate fields before creating an object

Parameters
array | null$dataData to validate
Returns
array
Exceptions
RestException

Definition at line 423 of file api_salaries.class.php.

◆ _validatepayments()

Salaries::_validatepayments (   $data)
private

Validate fields before creating an object.

Parameters
array | null$dataData to validate
Returns
array
Exceptions
RestException

Definition at line 443 of file api_salaries.class.php.

◆ addPayment()

Salaries::addPayment (   $id,
  $request_data = null 
)

Create payment salary on a salary.

Parameters
int$idId of salary
array$request_dataRequest data
Returns
int ID of paymentsalary

@url POST {id}/payments

Exceptions
RestException

Definition at line 316 of file api_salaries.class.php.

◆ get()

Salaries::get (   $id)

Get salary by ID.

Parameters
int$idID of salary
Returns
Object Salary object
Exceptions
RestException

Definition at line 122 of file api_salaries.class.php.

◆ getAllPayments()

Salaries::getAllPayments (   $sortfield = "t.rowid",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0 
)

Delete salary.

Parameters
int$idID of salary
Returns
array Get the list of payment of salaries.
Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitLimit for list
int$pagePage number
Returns
array List of paymentsalary objects

@url GET /payments

Exceptions
RestException

Definition at line 238 of file api_salaries.class.php.

◆ getPayments()

Salaries::getPayments (   $pid)

Get a given payment.

Parameters
int$pidID of payment salary
Returns
Object PaymentSalary object

@url GET /payments/{pid}

Exceptions
RestException

Definition at line 290 of file api_salaries.class.php.

◆ index()

Salaries::index (   $sortfield = "t.rowid",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0 
)

Get the list of salaries.

Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitLimit for list
int$pagePage number
Returns
array List of salary objects
Exceptions
RestException

Definition at line 73 of file api_salaries.class.php.

◆ post()

Salaries::post (   $request_data = null)

Create salary object.

Parameters
array$request_dataRequest data
Returns
int ID of salary

Definition at line 143 of file api_salaries.class.php.

◆ put()

Salaries::put (   $id,
  $request_data = null 
)

Update salary.

Parameters
int$idID of salary
array$request_dataData
Returns
Object Updated object

Definition at line 169 of file api_salaries.class.php.

◆ updatePayment()

Salaries::updatePayment (   $id,
  $request_data = null 
)

Update paymentsalary.

Parameters
int$idID of paymentsalary
array$request_datadata
Returns
Object PaymentSalary object

@url POST {id}/payments

Exceptions
RestException

Definition at line 357 of file api_salaries.class.php.


The documentation for this class was generated from the following file: