|
dolibarr 25.0.0-alpha
|


Public Member Functions | |
| __construct () | |
| Constructor. | |
| get ($id) | |
| Get properties of a VAT payment (declaration) object. | |
| index ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0, $sqlfilters='', $properties='', $pagination_data=false) | |
| List VAT payments (declarations). | |
| post ($request_data=null) | |
| Create a VAT payment (declaration). | |
| put ($id, $request_data=null) | |
| Update a VAT payment (declaration). | |
| delete ($id) | |
| Delete a VAT payment (declaration). | |
| getAllPayments ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0) | |
| List all VAT payments. | |
| getPayments ($id) | |
| Get the list of payments of a given VAT declaration. | |
| getPayment ($pid) | |
| Get a given VAT payment. | |
| addPayment ($id, $request_data=null) | |
| Add a payment to a VAT declaration. | |
| deletePayment ($pid) | |
| Delete a VAT payment. | |
Public Member Functions inherited from DolibarrApi | |
| __construct ($db, $cachedir='', $refreshCache=false) | |
| Constructor. | |
Protected Member Functions | |
| _cleanObjectDatas ($object) | |
| Clean sensitive object data. | |
Protected Member Functions inherited from DolibarrApi | |
| _checkValForAPI ($field, $value, $object) | |
| Check and convert a string depending on its type/name. | |
| _checkValExtrafieldsForAPI ($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) | |
| Validate fields before creating a VAT declaration. | |
| _validatePayment ($data) | |
| Validate fields before creating a VAT payment. | |
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', $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. | |
Definition at line 34 of file api_vatpayments.class.php.
|
protected |
Clean sensitive object data.
| Object | $object | Object to clean |
Reimplemented from DolibarrApi.
Definition at line 574 of file api_vatpayments.class.php.
References $object.
Referenced by get(), getAllPayments(), getPayment(), getPayments(), and index().
|
private |
Validate fields before creating a VAT declaration.
| ?array<string,string> | $data Data to validate |
| RestException | 400 Missing mandatory field |
Definition at line 529 of file api_vatpayments.class.php.
Referenced by post().
|
private |
Validate fields before creating a VAT payment.
| ?array<string,string> | $data Data to validate |
| RestException | 400 Missing mandatory field |
Definition at line 552 of file api_vatpayments.class.php.
Referenced by addPayment().
| VatPayments::addPayment | ( | $id, | |
| $request_data = null ) |
Add a payment to a VAT declaration.
| int | $id | ID of the VAT declaration |
| array | $request_data | Request data (datepaye, amount, paiementtype, [num_payment], [accountid]) @phan-param ?array<string,string> $request_data @phpstan-param ?array<string,string> $request_data |
@url POST {id}/payments
| RestException | 400 Missing mandatory field |
| RestException | 403 Access denied |
| RestException | 500 Error when creating the payment |
Definition at line 451 of file api_vatpayments.class.php.
References $id, _validatePayment(), and isModEnabled().
| VatPayments::delete | ( | $id | ) |
Delete a VAT payment (declaration).
| int | $id | ID of the VAT declaration |
| RestException | 403 Access denied, or VAT declaration with payments |
| RestException | 404 VAT payment not found |
| RestException | 500 Error when deleting the VAT payment |
Definition at line 284 of file api_vatpayments.class.php.
References $id.
| VatPayments::deletePayment | ( | $pid | ) |
Delete a VAT payment.
| int | $pid | ID of the payment |
@url DELETE payments/{pid}
| RestException | 403 Access denied |
| RestException | 404 Payment not found |
| RestException | 500 Error when deleting the payment |
Definition at line 497 of file api_vatpayments.class.php.
| VatPayments::get | ( | $id | ) |
Get properties of a VAT payment (declaration) object.
| int | $id | ID of the VAT declaration |
| RestException | 403 Access denied |
| RestException | 404 VAT payment not found |
Definition at line 73 of file api_vatpayments.class.php.
References $id, and _cleanObjectDatas().
| VatPayments::getAllPayments | ( | $sortfield = "t.rowid", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0 ) |
List all VAT payments.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Limit for list |
| int | $page | Page number |
@url GET /payments
| RestException | 403 Access denied |
| RestException | 503 Error when retrieving list |
Definition at line 331 of file api_vatpayments.class.php.
References _cleanObjectDatas().
| VatPayments::getPayment | ( | $pid | ) |
Get a given VAT payment.
| int | $pid | ID of the payment |
@url GET payments/{pid}
| RestException | 403 Access denied |
| RestException | 404 Payment not found |
Definition at line 421 of file api_vatpayments.class.php.
References _cleanObjectDatas().
| VatPayments::getPayments | ( | $id | ) |
Get the list of payments of a given VAT declaration.
| int | $id | ID of the VAT declaration |
@url GET {id}/payments
| RestException | 403 Access denied |
| RestException | 503 Error when retrieving list |
Definition at line 381 of file api_vatpayments.class.php.
References $id, and _cleanObjectDatas().
| VatPayments::index | ( | $sortfield = "t.rowid", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $sqlfilters = '', | |||
| $properties = '', | |||
| $pagination_data = false ) |
List VAT payments (declarations).
| 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 |
| RestException | 400 Bad value for sqlfilters |
| RestException | 403 Access denied |
| RestException | 503 Error when retrieving list |
Definition at line 108 of file api_vatpayments.class.php.
References _cleanObjectDatas(), DolibarrApi\_filterObjectProperties(), dol_syslog(), and forgeSQLFromUniversalSearchCriteria().
| VatPayments::post | ( | $request_data = null | ) |
Create a VAT payment (declaration).
| array | $request_data | Request data @phan-param ?array<string,string> $request_data @phpstan-param ?array<string,string> $request_data |
| RestException | 400 Missing mandatory field |
| RestException | 403 Access denied |
| RestException | 500 Error when creating the VAT payment |
Definition at line 192 of file api_vatpayments.class.php.
References DolibarrApi\_checkValForAPI(), _validate(), and sanitizeVal().
| VatPayments::put | ( | $id, | |
| $request_data = null ) |
Update a VAT payment (declaration).
| int | $id | ID of the VAT declaration |
| array | $request_data | Request data @phan-param ?array<string,string> $request_data @phpstan-param ?array<string,string> $request_data |
| RestException | 403 Access denied |
| RestException | 404 VAT payment not found |
| RestException | 500 Error when updating the VAT payment |
Definition at line 232 of file api_vatpayments.class.php.
References $id, DolibarrApi\_checkValExtrafieldsForAPI(), DolibarrApi\_checkValForAPI(), and sanitizeVal().