Packages

package forex

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. forex
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type ApiRequestResult = Either[OerResponseError, BigDecimal]
  2. trait CreateForex[F[_]] extends AnyRef
  3. type EodCache[F[_]] = LruMap[F, EodCacheKey, EodCacheValue]
  4. type EodCacheKey = (CurrencyUnit, CurrencyUnit, ZonedDateTime)
  5. type EodCacheValue = BigDecimal
  6. final case class Forex[F[_]](config: ForexConfig, client: OerClient[F]) extends Product with Serializable

    Starts building the fluent interface for currency look-up and conversion, Forex class has methods rate and convert, which set the source currency to the currency we are interested in.

    Starts building the fluent interface for currency look-up and conversion, Forex class has methods rate and convert, which set the source currency to the currency we are interested in. They return ForexLookupTo object which is then passed to methods in ForexLookupTo class in the fluent interface.

    config

    A configurator for Forex object

    client

    Passed down client that does actual work

  7. final case class ForexLookupTo[F[_]](conversionAmount: Double, fromCurr: CurrencyUnit, config: ForexConfig, client: OerClient[F]) extends Product with Serializable

    ForexLookupTo is the second part of the fluent interface, which passes parameters taken from Forex class to the next stage in the fluent interface and sets the target currency for the lookup/conversion.

    ForexLookupTo is the second part of the fluent interface, which passes parameters taken from Forex class to the next stage in the fluent interface and sets the target currency for the lookup/conversion. Method in this class returns ForexLookupWhen object which will be passed to the next stage in the fluent interface.

    conversionAmount

    The amount of money to be converted, it is set to 1 unit for look up operation.

    fromCurr

    The source currency

    config

    Forex config

    client

    Passed down client that does actual work

  8. final case class ForexLookupWhen[F[_]](conversionAmount: Double, fromCurr: CurrencyUnit, toCurr: CurrencyUnit, config: ForexConfig, client: OerClient[F]) extends Product with Serializable

    ForexLookupWhen is the final part of the fluent interface, methods in this class are the final stage of currency lookup/conversion

    ForexLookupWhen is the final part of the fluent interface, methods in this class are the final stage of currency lookup/conversion

    conversionAmount

    The amount of money to be converted, it is set to 1 for lookup operation

    fromCurr

    The source currency

    toCurr

    The target currency

    config

    Forex config

    client

    Passed down client that does actual work

  9. type NowishCache[F[_]] = LruMap[F, NowishCacheKey, NowishCacheValue]

    The two LRU caches we use

  10. type NowishCacheKey = (CurrencyUnit, CurrencyUnit)

    The key and value for each cache entry

  11. type NowishCacheValue = (ZonedDateTime, BigDecimal)
  12. final case class OerClient[F[_]](config: ForexConfig, nowishCache: Option[NowishCache[F]] = None, eodCache: Option[EodCache[F]] = None)(implicit evidence$1: Monad[F], T: Transport[F]) extends Product with Serializable

    Implements Json for Open Exchange Rates(http://openexchangerates.org)

    Implements Json for Open Exchange Rates(http://openexchangerates.org)

    config

    - a configurator for Forex object

    nowishCache

    - user defined nowishCache

    eodCache

    - user defined eodCache

  13. trait Transport[F[_]] extends AnyRef
  14. trait ZonedClock[F[_]] extends AnyRef

Value Members

  1. object CreateForex
  2. object Forex extends Serializable

    Companion object to get Forex object

  3. object OerClient extends Serializable

    Companion object for ForexClient class This class has one method for getting forex clients but for now there is only one client since we are only using OER

  4. object Transport
  5. object ZonedClock
  6. object errors
  7. object model
  8. object responses

Inherited from AnyRef

Inherited from Any

Ungrouped