world.money.conversion
Members list
Type members
Classlikes
Encapsulates metadata about a currency conversion or exchange rate.
Encapsulates metadata about a currency conversion or exchange rate.
Value parameters
- provider
-
A string identifying the source of the exchange rate data (e.g. "ECB", "IMF", "MyBank-API").
- rateTimestamp
-
Optional timestamp indicating when the rate was valid.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ConversionContext.type
A query for requesting an exchange rate between two currencies.
A query for requesting an exchange rate between two currencies.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Represents the conversion rate between two currencies.
Represents the conversion rate between two currencies.
Value parameters
- base
-
The base currency.
- context
-
Optional metadata about the rate, such as its source and timestamp.
- rate
-
The conversion factor. This is the value of the
termcurrency that one unit of thebasecurrency is worth. - term
-
The term (or counter) currency.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ConversionRate.type
A trait for providing exchange rates.
A trait for providing exchange rates.
This is the central SPI (Service Provider Interface) for currency conversion. Users can implement this trait to fetch exchange rates from any source, such as a web API, a database, or a local file.
Well-behaved implementations should handle finding direct rates (e.g., EUR -> USD), inverse rates (if only USD -> EUR is available), and potentially chained or cross-rates (e.g., KES -> ZAR via USD).
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any