dolibarr  7.0.0-beta
Public Member Functions | List of all members
Subscriptions Class Reference
+ Inheritance diagram for Subscriptions:
+ Collaboration diagram for Subscriptions:

Public Member Functions

 __construct ()
 Constructor.
 
 get ($id)
 Get properties of a subscription object. More...
 
 index ($sortfield="dateadh", $sortorder= 'ASC', $limit=100, $page=0, $sqlfilters= '')
 List subscriptions. More...
 
 post ($request_data=null)
 Create subscription object. More...
 
 put ($id, $request_data=null)
 Update subscription. More...
 
 delete ($id)
 Delete subscription. More...
 
 _validate ($data)
 Validate fields before creating an object. More...
 
- Public Member Functions inherited from DolibarrApi
 __construct ($db, $cachedir='', $refreshCache=false)
 Constructor. More...
 
 _cleanObjectDatas ($object)
 Executed method when API is called without parameter. More...
 
 _checkFilters ($sqlfilters)
 Return if a $sqlfilters parameter is valid. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from DolibarrApi
static _checkAccessToResource ($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid')
 Check user access to a resource. More...
 
static _forge_criteria_callback ($matches)
 Function to forge a SQL criteria. More...
 

Detailed Description

Definition at line 28 of file api_subscriptions.class.php.

Member Function Documentation

Subscriptions::_validate (   $data)

Validate fields before creating an object.

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

Definition at line 243 of file api_subscriptions.class.php.

Referenced by post().

Subscriptions::delete (   $id)

Delete subscription.

Parameters
int$idID of subscription to delete
Returns
array

Definition at line 211 of file api_subscriptions.class.php.

Subscriptions::get (   $id)

Get properties of a subscription object.

Return an array with subscription informations

Parameters
int$idID of subscription
Returns
array|mixed data without useless information
Exceptions
RestException

Definition at line 59 of file api_subscriptions.class.php.

References DolibarrApi\_cleanObjectDatas().

Subscriptions::index (   $sortfield = "dateadh",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0,
  $sqlfilters = '' 
)

List subscriptions.

Get a list of subscriptions

Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitLimit for list
int$pagePage number
string$sqlfiltersOther criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.import_key:<:'20160101')"
Returns
array Array of subscription objects
Exceptions
RestException

Definition at line 88 of file api_subscriptions.class.php.

References DolibarrApi\_checkFilters(), and DolibarrApi\_cleanObjectDatas().

Subscriptions::post (   $request_data = null)

Create subscription object.

Parameters
array$request_dataRequest data
Returns
int ID of subscription

Definition at line 153 of file api_subscriptions.class.php.

References _validate().

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

Update subscription.

Parameters
int$idID of subscription to update
array$request_dataDatas
Returns
int

Definition at line 178 of file api_subscriptions.class.php.


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