Class BundledExchangeRates

java.lang.Object
com.eqixiac.equinix.design.cost.BundledExchangeRates
All Implemented Interfaces:
CurrencyConverter

public final class BundledExchangeRates extends Object implements CurrencyConverter
The SDK's bundled reference exchange rates: the European Central Bank's euro reference rates of 2026-11-11 (retrieved 2026-11-12 from https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml), plus the AED, which the ECB does not publish, derived from its peg of 3.6725 AED per USD. Loaded from /json/fx_reference_2026_11.json. Cross rates are computed through the euro. Every rate is CurrencyConverter.Kind.REFERENCE: an estimate whose converted ranges are widened by 5.0% either side, because the table ages from the day it was bundled.
  • Field Details

    • BAND_PERCENT

      public static final double BAND_PERCENT
      Widening applied to lines converted at a bundled rate, either side, in percent.
      See Also:
  • Method Details

    • standard

      public static BundledExchangeRates standard()
      Returns:
      the bundled table, loaded once
    • asOf

      public String asOf()
      Returns:
      the date of the bundled rates
    • currencies

      public Set<String> currencies()
      Returns:
      the currencies the table covers, sorted
    • rate

      public Optional<CurrencyConverter.Rate> rate(String from, String to)
      Specified by:
      rate in interface CurrencyConverter
      Parameters:
      from - ISO 4217 code
      to - ISO 4217 code
      Returns:
      the rate, or empty when this converter has none for the pair
    • name

      public String name()
      Specified by:
      name in interface CurrencyConverter
      Returns:
      a short name for reasons and diagnostics