Home > nifty-tou > TariffRate > parse
Parse locale string values into a TariffRate
instance.
Signature:
static parse(locale: string, id: string, amount: string, exponent?: string, description?: string): TariffRate;
Parameter | Type | Description |
---|---|---|
locale | string | the locale to parse the amount and exponent string values as |
id | string | the identifier |
amount | string | the amount, as a number string in the locale locale |
exponent | string | (Optional) a base-10 exponent to interpret amount in, as a number string in the locale locale; if not provided then 0 is assumed |
description | string | (Optional) a description |
Returns:
the new instance
TypeError if the amount or exponent can not be parsed as numbers