Spending and income goals: budgeting targets scoped to a category and date range (for example "spend less than £500/month on groceries").
Summary
Functions
Creates a spending/income goal. attrs typically includes "category",
"targetAmount", and "period" (e.g. "monthly").
Deletes a spending/income goal.
Fetches a single spending/income goal, including current progress.
Lists spending/income goals for the user identified by token.
Types
@type goal() :: map()
Functions
@spec create(MoneyHub.Config.t(), String.t(), map()) :: {:ok, goal()} | {:error, MoneyHub.Error.t()}
Creates a spending/income goal. attrs typically includes "category",
"targetAmount", and "period" (e.g. "monthly").
@spec delete(MoneyHub.Config.t(), String.t(), String.t()) :: :ok | {:error, MoneyHub.Error.t()}
Deletes a spending/income goal.
@spec get(MoneyHub.Config.t(), String.t(), String.t()) :: {:ok, goal()} | {:error, MoneyHub.Error.t()}
Fetches a single spending/income goal, including current progress.
@spec list(MoneyHub.Config.t(), String.t()) :: {:ok, [goal()]} | {:error, MoneyHub.Error.t()}
Lists spending/income goals for the user identified by token.