Moov.Schedules (Moov v1.0.0)

Copy Markdown View Source

Recurring or future-dated transfers.

See https://docs.moov.io/api/money-movement/schedules/.

Summary

Functions

Retrieves a schedule.

Gets a single occurrence of a schedule (e.g. "next" or a specific date), per occurrence_filter.

Lists schedules for an account.

Replaces a schedule's configuration.

Functions

cancel(client, account_id, schedule_id)

@spec cancel(Moov.Client.t(), String.t(), String.t()) ::
  {:ok, term()} | {:error, Moov.Error.t()}

Cancels a schedule.

create(client, account_id, params)

@spec create(Moov.Client.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Creates a schedule.

params: :recurrence (e.g. %{interval: "monthly", start_date: "2026-07-01"}), and the same :source/:destination/:amount shape as Moov.Transfers.create/4.

get(client, account_id, schedule_id)

@spec get(Moov.Client.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Retrieves a schedule.

get_occurrence(client, account_id, schedule_id, occurrence_filter)

@spec get_occurrence(Moov.Client.t(), String.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Gets a single occurrence of a schedule (e.g. "next" or a specific date), per occurrence_filter.

list(client, account_id, opts \\ [])

@spec list(Moov.Client.t(), String.t(), keyword()) ::
  {:ok, [map()]} | {:error, Moov.Error.t()}

Lists schedules for an account.

update(client, account_id, schedule_id, params)

@spec update(Moov.Client.t(), String.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Replaces a schedule's configuration.