EasyCurrency
Extends:
Plugin for automatic currency conversion, tax handling, etc.
Constructor Summary
| Public Constructor | ||
| public |
This is a singleton class - do not create instances directly. |
|
Member Summary
| Private Members | ||
| private |
|
|
| private |
_resolver: src/easycurrency/resolver.js~CurrencyResolver |
|
| private |
|
|
Method Summary
| Public Methods | ||
| public |
Adds the current tax rate to the given amount |
|
| public |
Convert an amount to another currency. |
|
| public |
Format a value as a currency |
|
| public |
getState(): * |
|
| public |
initialize(config: *) Start running EasyCurrency on the current page. |
|
| public |
setActiveCurrency(currency: String) Sets the active currency, and refreshs any money spans. |
|
| public |
setCurrencyResolver(resolver: src/easycurrency/resolver.js~CurrencyResolver) Overrides the default currency resolver, which provides information about the available currencies. |
|
Public Constructors
Private Members
private _resolver: src/easycurrency/resolver.js~CurrencyResolver source
Public Methods
public convert(amount: js-money | Number, to: String, from: null | String) source
Convert an amount to another currency.
public format(amount: js-money | Number, currency: String | null) source
Format a value as a currency
public initialize(config: *) source
Start running EasyCurrency on the current page.
Params:
| Name | Type | Attribute | Description |
| config | * |
public setActiveCurrency(currency: String) source
Sets the active currency, and refreshs any money spans.
Params:
| Name | Type | Attribute | Description |
| currency | String | Currency code |
public setCurrencyResolver(resolver: src/easycurrency/resolver.js~CurrencyResolver) source
Overrides the default currency resolver, which provides information about the available currencies.
Params:
| Name | Type | Attribute | Description |
| resolver | src/easycurrency/resolver.js~CurrencyResolver |
