Currency Converter

The CurrencyConverter model is used to define a converter for an Organization. It identifies the underlying API to be used, which can be data-driven ( supported by default in Platform), or it can be external web service, i.e. Yahoo Finance, XE, etc. (requiring the developer to write an adapter).

A CurrencyConverter instance is referenced when calling the CurrencyConversionService. You cannot perform a currency conversion without a CurrencyConverter instance.

Creating Currency Converter

Creating a CurrencyConverter is just like creating any other model and can be done via XML or CSV and loaded into the database as part of the dataset. CurrencyConverter has a name, a model link to Organization and an used defined string identifying the API to be used.

Table 5.1. CurrencyConverter Fields

Field

Description

ValueChainId

Value Chain which owns the Converter. (KEY field)

Name

Uniquely identifies this CurrencyConverter under the parent Organization. (KEY field)

Organization

Owning organization who is defining this CurrencyConverter. (KEY field)

API

Can contain the value "Data", indicating this conversion is driven by CurrencyConversionFactor rows, or can be a value pre-registered with CurrencyConversionService.registerAPI.