GoCardlessClient.Resources.CurrencyExchangeRates (GoCardlessClient v2.0.0)

Copy Markdown View Source

GoCardless Currency Exchange Rates API.

Returns current exchange rates used by GoCardless for FX collections and payouts. Read-only — there is no create or update endpoint.

Summary

Functions

Eagerly collects all exchange rates into a list.

Returns a page of exchange rates. Filter by :source currency.

Returns a lazy Stream over all pages of exchange rates.

Functions

collect_all(client, params \\ %{}, opts \\ [])

@spec collect_all(GoCardlessClient.Client.t(), map(), keyword()) ::
  {:ok, [map()]}
  | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}

Eagerly collects all exchange rates into a list.

list(client, params \\ %{}, opts \\ [])

@spec list(GoCardlessClient.Client.t(), map(), keyword()) ::
  {:ok, %{items: [map()], meta: map()}}
  | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}

Returns a page of exchange rates. Filter by :source currency.

stream(client, params \\ %{}, opts \\ [])

@spec stream(GoCardlessClient.Client.t(), map(), keyword()) :: Enumerable.t()

Returns a lazy Stream over all pages of exchange rates.