Closed asirota closed 4 years ago
Made api token global so it's only fetched once. Currency semanticType
in any schema now dynamically matches the currency code on the user's account.
@stephenpoole are currently hard-coded CURRENCY_CAD in objects like Contact
now dynamically switched to the right currency type? There are several that have been hard coded and should be altered to the right system currency type. Example:
{ name: "Balance", label: "Balance", dataType: "NUMBER", semantics: { conceptType: "DIMENSION", semanticGroup: "CURRENCY", semanticType: "CURRENCY_CAD" }
Even though they exist in schema, they're replaced at runtime. Could probably just remove them if it's confusing.
@stephenpoole that's ok -- it's not a problem.
When adding an extra charge or currency field in the schema add the currency type to the meta data on the schema. The currently set currency is available in the /accounts endpoint in this structure:
The values are encoded as followed and could be mapped to equivalent currency semantic type in GDS