GoCardlessClient.Resources.TaxRates (GoCardlessClient v2.0.0)

Copy Markdown View Source

GoCardless Tax Rates API.

Tax rates applied to GoCardless fees for VAT/GST accounting in applicable jurisdictions. Read-only — managed by GoCardless.

Example

{:ok, %{items: rates}} = GoCardlessClient.Resources.TaxRates.list(client)
current = Enum.find(rates, &is_nil(&1["end_date"]))

Summary

Functions

Eagerly collects all tax rates into a list.

Retrieves a single tax rate by ID.

Returns a page of tax rates.

Returns a lazy Stream over all pages of tax 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 tax rates into a list.

get(client, id, opts \\ [])

Retrieves a single tax rate by ID.

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 tax rates.

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

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

Returns a lazy Stream over all pages of tax rates.