dolibarr  19.0.0-dev
Public Member Functions | Protected Member Functions | List of all members
MultiCurrencies Class Reference
Inheritance diagram for MultiCurrencies:
Inheritance graph
[legend]
Collaboration diagram for MultiCurrencies:
Collaboration graph
[legend]

Public Member Functions

 __construct ()
 Constructor.
 
 index ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $sqlfilters='')
 List Currencies. More...
 
 get ($id)
 Get properties of a Currency object. More...
 
 getByCode ($code)
 Get properties of a Currency object by code. More...
 
 getRates ($id)
 List Currency rates. More...
 
 post ($request_data=null)
 Create Currency object. More...
 
 put ($id, $request_data=null)
 Update Currency. More...
 
 delete ($id)
 Delete Currency. More...
 
 updateRate ($id, $request_data=null)
 Update Currency rate @url PUT {id}/rates. More...
 
- Public Member Functions inherited from DolibarrApi
 __construct ($db, $cachedir='', $refreshCache=false)
 Constructor. More...
 

Protected Member Functions

 _cleanObjectDatas ($object)
 Clean sensible object datas. More...
 
 _cleanObjectDatasRate ($object)
 Clean sensible MultiCurrencyRate object datas. More...
 
- Protected Member Functions inherited from DolibarrApi
 _checkValForAPI ($field, $value, $object)
 Check and convert a string depending on its type/name. More...
 
 _checkFilters ($sqlfilters, &$error='')
 Return if a $sqlfilters parameter is valid Function no more used. 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 access by user to a given resource. More...
 
static _forge_criteria_callback ($matches)
 Function to forge a SQL criteria from a Generic filter string. More...
 

Detailed Description

Definition at line 29 of file api_multicurrencies.class.php.

Member Function Documentation

◆ _cleanObjectDatas()

MultiCurrencies::_cleanObjectDatas (   $object)
protected

Clean sensible object datas.

Parameters
MultiCurrency$objectObject to clean
Returns
Object Object with cleaned properties

Reimplemented from DolibarrApi.

Definition at line 339 of file api_multicurrencies.class.php.

◆ _cleanObjectDatasRate()

MultiCurrencies::_cleanObjectDatasRate (   $object)
protected

Clean sensible MultiCurrencyRate object datas.

Parameters
MultiCurrency$objectObject to clean
Returns
Object Object with cleaned properties

Definition at line 365 of file api_multicurrencies.class.php.

◆ delete()

MultiCurrencies::delete (   $id)

Delete Currency.

Parameters
int$idCurrency ID
Returns
array
Exceptions
RestException

Definition at line 274 of file api_multicurrencies.class.php.

◆ get()

MultiCurrencies::get (   $id)

Get properties of a Currency object.

Return an array with Currency informations

Parameters
int$idID of Currency
Returns
Object Object with cleaned properties
Exceptions
RestException

Definition at line 116 of file api_multicurrencies.class.php.

◆ getByCode()

MultiCurrencies::getByCode (   $code)

Get properties of a Currency object by code.

Return an array with Currency informations @url GET /bycode/{code}

Parameters
string$codeCode of Currency (ex: EUR)
Returns
array|mixed Data without useless information
Exceptions
RestException

Definition at line 141 of file api_multicurrencies.class.php.

◆ getRates()

MultiCurrencies::getRates (   $id)

List Currency rates.

Get a list of Currency rates

@url GET {id}/rates

Parameters
int$idID of Currency
Returns
array|mixed Data without useless information
Exceptions
RestException

Definition at line 166 of file api_multicurrencies.class.php.

◆ index()

MultiCurrencies::index (   $sortfield = "t.rowid",
  $sortorder = 'ASC',
  $limit = 100,
  $sqlfilters = '' 
)

List Currencies.

Get a list of Currencies

Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitLimit for list
string$sqlfiltersOther criteria to filter answers separated by a comma. Syntax example "(t.product_id:=:1) and (t.date_creation:<:'20160101')"
Returns
array Array of warehouse objects
Exceptions
RestException

Definition at line 54 of file api_multicurrencies.class.php.

◆ post()

MultiCurrencies::post (   $request_data = null)

Create Currency object.

Parameters
array$request_dataRequest data
Returns
int ID of Currency
Exceptions
RestException

Definition at line 197 of file api_multicurrencies.class.php.

◆ put()

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

Update Currency.

Parameters
int$idId of Currency to update
array$request_dataDatas
Returns
array The updated Currency
Exceptions
RestException

Definition at line 241 of file api_multicurrencies.class.php.

◆ updateRate()

MultiCurrencies::updateRate (   $id,
  $request_data = null 
)

Update Currency rate @url PUT {id}/rates.

Parameters
int$idCurrency ID
array$request_dataRequest data
Returns
Object|false Object with cleaned properties
Exceptions
RestException

Definition at line 308 of file api_multicurrencies.class.php.


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