|
dolibarr
13.0.2
|
Inheritance diagram for Tickets:
Collaboration diagram for Tickets:Public Member Functions | |
| __construct () | |
| Constructor. | |
| get ($id) | |
| Get properties of a Ticket object. More... | |
| getByTrackId ($track_id) | |
| Get properties of a Ticket object from track id. More... | |
| getByRef ($ref) | |
| Get properties of a Ticket object from ref. More... | |
| index ($socid=0, $sortfield="t.rowid", $sortorder="ASC", $limit=100, $page=0, $sqlfilters= '') | |
| List tickets. More... | |
| post ($request_data=null) | |
| Create ticket object. More... | |
| postNewMessage ($request_data=null) | |
| Create ticket object. More... | |
| put ($id, $request_data=null) | |
| Update ticket. More... | |
| delete ($id) | |
| Delete ticket. More... | |
Public Member Functions inherited from DolibarrApi | |
| __construct ($db, $cachedir= '', $refreshCache=false) | |
| Constructor. More... | |
Protected Member Functions | |
| _cleanObjectDatas ($object) | |
| Clean sensible object datas. More... | |
Protected Member Functions inherited from DolibarrApi | |
| _cleanObjectDatas ($object) | |
| Executed method when API is called without parameter. More... | |
| _checkFilters ($sqlfilters) | |
| Return if a $sqlfilters parameter is valid. More... | |
Private Member Functions | |
| getCommon ($id=0, $track_id= '', $ref= '') | |
| Get properties of a Ticket object Return an array with ticket informations. More... | |
| _validate ($data) | |
| Validate fields before create or update object. More... | |
| _validateMessage ($data) | |
| Validate fields before create or update object message. 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 user access to a resource. More... | |
| static | _forge_criteria_callback ($matches) |
| Function to forge a SQL criteria. More... | |
Definition at line 30 of file api_tickets.class.php.
|
protected |
Clean sensible object datas.
| Object | $object | Object to clean |
Definition at line 498 of file api_tickets.class.php.
Referenced by getCommon(), and index().
|
private |
Validate fields before create or update object.
| array | $data | Data to validate |
| RestException |
Definition at line 456 of file api_tickets.class.php.
Referenced by post().
|
private |
Validate fields before create or update object message.
| array | $data | Data to validate |
| RestException |
Definition at line 476 of file api_tickets.class.php.
Referenced by postNewMessage().
| Tickets::delete | ( | $id | ) |
Delete ticket.
| int | $id | Ticket ID |
Definition at line 422 of file api_tickets.class.php.
References DolibarrApi\_checkAccessToResource().
| Tickets::get | ( | $id | ) |
Get properties of a Ticket object.
Return an array with ticket informations
| int | $id | ID of ticket |
| RestException | 401 |
| RestException | 403 |
| RestException | 404 |
Definition at line 75 of file api_tickets.class.php.
References getCommon().
| Tickets::getByRef | ( | $ref | ) |
Get properties of a Ticket object from ref.
Return an array with ticket informations
| string | $ref | Reference for ticket |
GET ref/{ref}
| RestException | 401 |
| RestException | 403 |
| RestException | 404 |
Definition at line 113 of file api_tickets.class.php.
References getCommon().
| Tickets::getByTrackId | ( | $track_id | ) |
Get properties of a Ticket object from track id.
Return an array with ticket informations
| string | $track_id | Tracking ID of ticket |
GET track_id/{track_id}
| RestException | 401 |
| RestException | 403 |
| RestException | 404 |
Definition at line 94 of file api_tickets.class.php.
References getCommon().
|
private |
Get properties of a Ticket object Return an array with ticket informations.
| int | $id | ID of ticket |
| string | $track_id | Tracking ID of ticket |
| string | $ref | Reference for ticket |
Definition at line 132 of file api_tickets.class.php.
References DolibarrApi\_checkAccessToResource(), _cleanObjectDatas(), db, and dolGetFirstLastname().
Referenced by get(), getByRef(), and getByTrackId().
| Tickets::index | ( | $socid = 0, |
|
$sortfield = "t.rowid", |
|||
$sortorder = "ASC", |
|||
$limit = 100, |
|||
$page = 0, |
|||
$sqlfilters = '' |
|||
| ) |
List tickets.
Get a list of tickets
| int | $socid | Filter list with thirdparty ID |
| 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.date_creation:<:'20160101') and (t.fk_statut:=:1)" |
Definition at line 232 of file api_tickets.class.php.
References DolibarrApi\_checkFilters(), _cleanObjectDatas(), and db.
| Tickets::post | ( | $request_data = null | ) |
Create ticket object.
| array | $request_data | Request datas |
Definition at line 324 of file api_tickets.class.php.
References _validate(), db, and generate_random_id().
| Tickets::postNewMessage | ( | $request_data = null | ) |
Create ticket object.
| array | $request_data | Request datas |
Definition at line 357 of file api_tickets.class.php.
References _validateMessage(), and db.
| Tickets::put | ( | $id, | |
$request_data = null |
|||
| ) |
Update ticket.
| int | $id | Id of ticket to update |
| array | $request_data | Datas |
Definition at line 389 of file api_tickets.class.php.
References DolibarrApi\_checkAccessToResource().