ynab

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// GetAverageSpent gets the average amount spent each month in the given category over the past monthLookback months
	// It returns the dollars and cents of the average
	GetMonthlyAverageSpent(budget *model.Budget, category *model.BudgetCategory, monthLookback int) (int64, int16, error)

	// GetBudgets gets all currently-available budgets
	GetBudgets() ([]*model.Budget, error)

	// GetCategories gets all of the categories (in their groups) for the given budget
	GetCategories(budget *model.Budget) ([]*model.BudgetCategoryGroup, error)

	// GetReadyToAssign gets the amount ready to assign for the current month in dollars and cents
	GetReadyToAssign(budget *model.Budget) (int64, int16, error)

	// SetBudget sets the budgeted amount for the given budget and category.
	// The given dollars and cents should be what the budgeted amount _for the current budget_
	// should be. It should NOT be merely the delta of what is to be applied onto the existing budgeted amount.
	SetBudget(budget *model.Budget, category *model.BudgetCategory, newDollars int64, newCents int16) error
}

Client is a definition of interactions that can be made with YNAB

func NewReadOnlyClient added in v0.4.1

func NewReadOnlyClient(logger *zap.SugaredLogger, liveClient Client) Client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL