Home > nifty-tou > TariffRate
An identifiable tariff rate.
Signature:
export default class TariffRate
The exponent
property can be used to maintain precision in amount
. For example an amount of 1.23
could be expressed as 123
with an exponent
of -2
.
Constructor | Modifiers | Description |
---|---|---|
(constructor)(id, amount, exponent, description) | Constructor. |
Property | Modifiers | Type | Description |
---|---|---|---|
amount | readonly |
number | Get the amount. |
description | readonly |
string | undefined | Get the description. |
exponent | readonly |
number | Get the exponent. |
id | readonly |
string | Get the identifier. |
Method | Modifiers | Description |
---|---|---|
parse(locale, id, amount, exponent, description) | static |
Parse locale string values into a TariffRate instance. |
toString() | Get a string representation. |