|
dolibarr 18.0.8
|


Public Member Functions | |
| __construct () | |
| Constructor. | |
| index ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $sqlfilters='') | |
| List Currencies. | |
| get ($id) | |
| Get properties of a Currency object. | |
| getByCode ($code) | |
| Get properties of a Currency object by code. | |
| getRates ($id) | |
| List Currency rates. | |
| post ($request_data=null) | |
| Create Currency object. | |
| put ($id, $request_data=null) | |
| Update Currency. | |
| delete ($id) | |
| Delete Currency. | |
| updateRate ($id, $request_data=null) | |
| Update Currency rate @url PUT {id}/rates. | |
Public Member Functions inherited from DolibarrApi | |
| __construct ($db, $cachedir='', $refreshCache=false) | |
| Constructor. | |
Protected Member Functions | |
| _cleanObjectDatas ($object) | |
| Clean sensible object datas. | |
| _cleanObjectDatasRate ($object) | |
| Clean sensible MultiCurrencyRate object datas. | |
Protected Member Functions inherited from DolibarrApi | |
| _checkValForAPI ($field, $value, $object) | |
| Check and convert a string depending on its type/name. | |
| _checkFilters ($sqlfilters, &$error='') | |
| Return if a $sqlfilters parameter is valid Function no more used. | |
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. | |
| static | _forge_criteria_callback ($matches) |
| Function to forge a SQL criteria from a Generic filter string. | |
Definition at line 29 of file api_multicurrencies.class.php.
|
protected |
Clean sensible object datas.
| MultiCurrency | $object | Object to clean |
Reimplemented from DolibarrApi.
Definition at line 339 of file api_multicurrencies.class.php.
References _cleanObjectDatasRate().
Referenced by get(), getByCode(), index(), and updateRate().
|
protected |
Clean sensible MultiCurrencyRate object datas.
| MultiCurrency | $object | Object to clean |
Definition at line 365 of file api_multicurrencies.class.php.
Referenced by _cleanObjectDatas(), and getRates().
| MultiCurrencies::delete | ( | $id | ) |
Delete Currency.
| int | $id | Currency ID |
| RestException |
Definition at line 274 of file api_multicurrencies.class.php.
| MultiCurrencies::get | ( | $id | ) |
Get properties of a Currency object.
Return an array with Currency informations
| int | $id | ID of Currency |
| RestException |
Definition at line 116 of file api_multicurrencies.class.php.
References _cleanObjectDatas().
| MultiCurrencies::getByCode | ( | $code | ) |
Get properties of a Currency object by code.
Return an array with Currency informations @url GET /bycode/{code}
| string | $code | Code of Currency (ex: EUR) |
| RestException |
Definition at line 141 of file api_multicurrencies.class.php.
References _cleanObjectDatas().
| MultiCurrencies::getRates | ( | $id | ) |
List Currency rates.
Get a list of Currency rates
@url GET {id}/rates
| int | $id | ID of Currency |
| RestException |
Definition at line 166 of file api_multicurrencies.class.php.
References _cleanObjectDatasRate().
| MultiCurrencies::index | ( | $sortfield = "t.rowid", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $sqlfilters = '' ) |
List Currencies.
Get a list of Currencies
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Limit for list |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.product_id:=:1) and (t.date_creation:<:'20160101')" |
| RestException |
Definition at line 54 of file api_multicurrencies.class.php.
References DolibarrApi\_checkFilters(), and _cleanObjectDatas().
| MultiCurrencies::post | ( | $request_data = null | ) |
Create Currency object.
| array | $request_data | Request data |
| RestException |
Definition at line 197 of file api_multicurrencies.class.php.
| MultiCurrencies::put | ( | $id, | |
| $request_data = null ) |
Update Currency.
| int | $id | Id of Currency to update |
| array | $request_data | Datas |
| RestException |
Definition at line 241 of file api_multicurrencies.class.php.
| MultiCurrencies::updateRate | ( | $id, | |
| $request_data = null ) |
Update Currency rate @url PUT {id}/rates.
| int | $id | Currency ID |
| array | $request_data | Request data |
| RestException |
Definition at line 308 of file api_multicurrencies.class.php.
References _cleanObjectDatas().