|
|
| __construct () |
| | Constructor.
|
| |
| | get ($id) |
| | Get properties of a various payment (manual journal entry) object.
|
| |
| | index ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0, $sqlfilters='', $properties='', $pagination_data=false) |
| | List various payments (manual journal entries).
|
| |
| | post ($request_data=null) |
| | Create a various payment (manual journal entry).
|
| |
| | put ($id, $request_data=null) |
| | Update a various payment (manual journal entry).
|
| |
| | delete ($id) |
| | Delete a various payment (manual journal entry).
|
| |
| | __construct ($db, $cachedir='', $refreshCache=false) |
| | Constructor.
|
| |
|
| static | _checkAccessToResource ($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $parenttableforentity='') |
| | Check access by user to a given resource.
|
| |
| static | _forge_criteria_callback ($matches) |
| | Function to forge a SQL criteria from a Generic filter string.
|
| |
◆ _cleanObjectDatas()
| VariousPayments::_cleanObjectDatas |
( |
| $object | ) |
|
|
protected |
◆ _validate()
| VariousPayments::_validate |
( |
| $data | ) |
|
|
private |
Validate fields before creating an object.
- Parameters
-
| ?array<string,string> | $data Data to validate |
- Returns
- array<string,string>
- Exceptions
-
| RestException | 400 Missing mandatory field |
Definition at line 308 of file api_variouspayments.class.php.
Referenced by post().
◆ delete()
| VariousPayments::delete |
( |
| $id | ) |
|
Delete a various payment (manual journal entry).
- Parameters
-
| int | $id | ID of the various payment |
- Returns
- array @phan-return array{success:array{code:int,message:string}} @phpstan-return array{success:array{code:int,message:string}}
- Exceptions
-
| RestException | 403 Access denied |
| RestException | 404 Various payment not found |
| RestException | 500 Error when deleting the various payment |
Definition at line 274 of file api_variouspayments.class.php.
References $id.
◆ get()
| VariousPayments::get |
( |
| $id | ) |
|
Get properties of a various payment (manual journal entry) object.
Return an array with the various payment information.
- Parameters
-
| int | $id | ID of the various payment |
- Returns
- Object Object with cleaned properties
- Exceptions
-
| RestException | 403 Access denied |
| RestException | 404 Various payment not found |
Definition at line 61 of file api_variouspayments.class.php.
References $id, and _cleanObjectDatas().
◆ index()
| VariousPayments::index |
( |
| $sortfield = "t.rowid", |
|
|
| $sortorder = 'ASC', |
|
|
| $limit = 100, |
|
|
| $page = 0, |
|
|
| $sqlfilters = '', |
|
|
| $properties = '', |
|
|
| $pagination_data = false ) |
List various payments (manual journal entries).
Get a list of various payments.
- Parameters
-
| 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.datep:>=:'20240101') and (t.amount:<:100)" |
| string | $properties | Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names |
| bool | $pagination_data | If this parameter is set to true the response will include pagination data. Default value is false. Page starts from 0 |
- Returns
- array Array of various payment objects @phan-return PaymentVarious[]|array{data:PaymentVarious[],pagination:array{total:int,page:int,page_count:int,limit:int}} @phpstan-return PaymentVarious[]|array{data:PaymentVarious[],pagination:array{total:int,page:int,page_count:int,limit:int}}
- Exceptions
-
| RestException | 400 Bad value for sqlfilters |
| RestException | 403 Access denied |
| RestException | 503 Error when retrieving list |
Definition at line 98 of file api_variouspayments.class.php.
References _cleanObjectDatas(), DolibarrApi\_filterObjectProperties(), dol_syslog(), and forgeSQLFromUniversalSearchCriteria().
◆ post()
| VariousPayments::post |
( |
| $request_data = null | ) |
|
Create a various payment (manual journal entry).
- Parameters
-
| array | $request_data | Request data @phan-param ?array<string,string> $request_data @phpstan-param ?array<string,string> $request_data |
- Returns
- int ID of the created various payment
- Exceptions
-
| RestException | 400 Missing mandatory field |
| RestException | 403 Access denied |
| RestException | 500 Error when creating the various payment |
Definition at line 182 of file api_variouspayments.class.php.
References DolibarrApi\_checkValForAPI(), _validate(), and sanitizeVal().
◆ put()
| VariousPayments::put |
( |
| $id, |
|
|
| $request_data = null ) |
Update a various payment (manual journal entry).
- Parameters
-
| int | $id | ID of the various payment |
| array | $request_data | Request data @phan-param ?array<string,string> $request_data @phpstan-param ?array<string,string> $request_data |
- Returns
- Object Updated object with cleaned properties
- Exceptions
-
| RestException | 403 Access denied |
| RestException | 404 Various payment not found |
| RestException | 500 Error when updating the various payment |
Definition at line 222 of file api_variouspayments.class.php.
References $id, DolibarrApi\_checkValExtrafieldsForAPI(), DolibarrApi\_checkValForAPI(), and sanitizeVal().
The documentation for this class was generated from the following file: