controllers

package
v3.22.2 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	models.Account
	Balance           decimal.Decimal   `json:"balance" example:"2735.17"`           // Balance of the account, including all transactions referencing it
	ReconciledBalance decimal.Decimal   `json:"reconciledBalance" example:"2539.57"` // Balance of the account, including all reconciled transactions referencing it
	RecentEnvelopes   []models.Envelope `json:"recentEnvelopes"`                     // Envelopes recently used with this account

	Links struct {
		Self         string `json:"self" example:"https://example.com/api/v1/accounts/af892e10-7e0a-4fb8-b1bc-4b6d88401ed2"`                     // The account itself
		Transactions string `json:"transactions" example:"https://example.com/api/v1/transactions?account=af892e10-7e0a-4fb8-b1bc-4b6d88401ed2"` // Transactions referencing the account
	} `json:"links"`
}

Account is the API v1 representation of an Account in EZ.

type AccountCreateResponseV3 added in v3.14.0

type AccountCreateResponseV3 struct {
	Error *string             `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
	Data  []AccountResponseV3 `json:"data"`                                                          // List of created Accounts
}

type AccountCreateV3 added in v3.19.1

type AccountCreateV3 struct {
	Name               string          `json:"name" example:"Cash" default:"" gorm:"uniqueIndex:account_name_budget_id"`                          // Name of the account
	Note               string          `json:"note" example:"Money in my wallet" default:""`                                                      // A longer description for the account
	BudgetID           uuid.UUID       `json:"budgetId" example:"550dc009-cea6-4c12-b2a5-03446eb7b7cf" gorm:"uniqueIndex:account_name_budget_id"` // ID of the budget this account belongs to
	OnBudget           bool            `json:"onBudget" example:"true" default:"false"`                                                           // Does the account factor into the available budget? Always false when external: true
	External           bool            `json:"external" example:"false" default:"false"`                                                          // Does the account belong to the budget owner or not?
	InitialBalance     decimal.Decimal `json:"initialBalance" example:"173.12" default:"0"`                                                       // Balance of the account before any transactions were recorded
	InitialBalanceDate *time.Time      `json:"initialBalanceDate" example:"2017-05-12T00:00:00Z"`                                                 // Date of the initial balance
	Archived           bool            `json:"archived" example:"true" default:"false"`                                                           // Is the account archived?
	ImportHash         string          `json:"importHash" example:"867e3a26dc0baf73f4bff506f31a97f6c32088917e9e5cf1a5ed6f3f84a6fa70" default:""`  // The SHA256 hash of a unique combination of values to use in duplicate detection
}

AccountCreateV3 represents all user configurable parameters

func (AccountCreateV3) ToCreate added in v3.19.1

func (a AccountCreateV3) ToCreate() models.AccountCreate

ToCreate transforms the API representation into the model representation

type AccountListResponse

type AccountListResponse struct {
	Data []Account `json:"data"` // List of accounts
}

type AccountListResponseV3 added in v3.14.0

type AccountListResponseV3 struct {
	Data       []AccountV3 `json:"data"`                                                          // List of accounts
	Error      *string     `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
	Pagination *Pagination `json:"pagination"`                                                    // Pagination information
}

type AccountQueryFilter

type AccountQueryFilter struct {
	Name     string `form:"name" filterField:"false"`   // Fuzzy filter for the account name
	Note     string `form:"note" filterField:"false"`   // Fuzzy filter for the note
	BudgetID string `form:"budget"`                     // By budget ID
	OnBudget bool   `form:"onBudget"`                   // Is the account on-budget?
	External bool   `form:"external"`                   // Is the account external?
	Hidden   bool   `form:"hidden"`                     // Is the account hidden?
	Search   string `form:"search" filterField:"false"` // By string in name or note
}

func (AccountQueryFilter) ToCreate

type AccountQueryFilterV3 added in v3.14.0

type AccountQueryFilterV3 struct {
	Name     string `form:"name" filterField:"false"`     // Fuzzy filter for the account name
	Note     string `form:"note" filterField:"false"`     // Fuzzy filter for the note
	BudgetID string `form:"budget"`                       // By budget ID
	OnBudget bool   `form:"onBudget"`                     // Is the account on-budget?
	External bool   `form:"external"`                     // Is the account external?
	Archived bool   `form:"archived" filterField:"false"` // Is the account hidden?
	Search   string `form:"search" filterField:"false"`   // By string in name or note
	Offset   uint   `form:"offset" filterField:"false"`   // The offset of the first Account returned. Defaults to 0.
	Limit    int    `form:"limit" filterField:"false"`    // Maximum number of Accounts to return. Defaults to 50.
}

func (AccountQueryFilterV3) ToCreate added in v3.14.0

type AccountResponse

type AccountResponse struct {
	Data Account `json:"data"` // Data for the account
}

type AccountResponseV3 added in v3.14.0

type AccountResponseV3 struct {
	Data  *AccountV3 `json:"data"`                                                          // Data for the account
	Error *string    `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred for this transaction
}

type AccountV2 added in v3.2.4

type AccountV2 struct {
	models.Account
	Balance           decimal.Decimal `json:"balance" example:"2735.17"`           // Balance of the account, including all transactions referencing it
	ReconciledBalance decimal.Decimal `json:"reconciledBalance" example:"2539.57"` // Balance of the account, including all reconciled transactions referencing it
	RecentEnvelopes   []*uuid.UUID    `json:"recentEnvelopes"`                     // Envelopes recently used with this account

	Links struct {
		Self         string `json:"self" example:"https://example.com/api/v2/accounts/af892e10-7e0a-4fb8-b1bc-4b6d88401ed2"`                     // The account itself
		Transactions string `json:"transactions" example:"https://example.com/api/v2/transactions?account=af892e10-7e0a-4fb8-b1bc-4b6d88401ed2"` // Transactions referencing the account
	} `json:"links"`
}

AccountV2 is the API v2 representation of an Account in EZ.

type AccountV3 added in v3.14.0

type AccountV3 struct {
	models.Account
	Balance           decimal.Decimal `json:"balance" example:"2735.17"`           // Balance of the account, including all transactions referencing it
	ReconciledBalance decimal.Decimal `json:"reconciledBalance" example:"2539.57"` // Balance of the account, including all reconciled transactions referencing it
	RecentEnvelopes   []*uuid.UUID    `json:"recentEnvelopes"`                     // Envelopes recently used with this account
	Hidden            bool            `json:"hidden,omitempty"`                    // Remove the hidden field

	Links struct {
		Self         string `json:"self" example:"https://example.com/api/v3/accounts/af892e10-7e0a-4fb8-b1bc-4b6d88401ed2"`                     // The account itself
		Transactions string `json:"transactions" example:"https://example.com/api/v3/transactions?account=af892e10-7e0a-4fb8-b1bc-4b6d88401ed2"` // Transactions referencing the account
	} `json:"links"`
}

AccountV3 is the API v3 representation of an Account in EZ.

type Allocation added in v3.3.4

type Allocation struct {
	models.Allocation
	Links struct {
		Self string `json:"self" example:"https://example.com/api/v1/allocations/902cd93c-3724-4e46-8540-d014131282fc"` // The allocation itself
	} `json:"links"`
}

type AllocationListResponse

type AllocationListResponse struct {
	Data []Allocation `json:"data"` // Data for the allocation
}

type AllocationMode

type AllocationMode string

swagger:enum AllocationMode

const (
	AllocateLastMonthBudget AllocationMode = "ALLOCATE_LAST_MONTH_BUDGET"
	AllocateLastMonthSpend  AllocationMode = "ALLOCATE_LAST_MONTH_SPEND"
)

type AllocationQueryFilter

type AllocationQueryFilter struct {
	Month      string          `form:"month"`    // By month
	Amount     decimal.Decimal `form:"amount"`   // By exact amount
	EnvelopeID string          `form:"envelope"` // By the Envelope ID
}

func (AllocationQueryFilter) Parse

type AllocationResponse

type AllocationResponse struct {
	Data Allocation `json:"data"` // List of allocations
}

type Budget added in v3.3.4

type Budget struct {
	models.Budget
	Balance decimal.Decimal `json:"balance" example:"3423.42"` // DEPRECATED. Will be removed in API v2, see https://github.com/envelope-zero/backend/issues/526.
	Links   struct {
		Self             string `json:"self" example:"https://example.com/api/v1/budgets/550dc009-cea6-4c12-b2a5-03446eb7b7cf"`                                 // The budget itself
		Accounts         string `json:"accounts" example:"https://example.com/api/v1/accounts?budget=550dc009-cea6-4c12-b2a5-03446eb7b7cf"`                     // Accounts for this budget
		Categories       string `json:"categories" example:"https://example.com/api/v1/categories?budget=550dc009-cea6-4c12-b2a5-03446eb7b7cf"`                 // Categories for this budget
		Envelopes        string `json:"envelopes" example:"https://example.com/api/v1/envelopes?budget=550dc009-cea6-4c12-b2a5-03446eb7b7cf"`                   // Envelopes for this budget
		Transactions     string `json:"transactions" example:"https://example.com/api/v1/transactions?budget=550dc009-cea6-4c12-b2a5-03446eb7b7cf"`             // Transactions for this budget
		Month            string `json:"month" example:"https://example.com/api/v1/budgets/550dc009-cea6-4c12-b2a5-03446eb7b7cf/YYYY-MM"`                        // This uses 'YYYY-MM' for clients to replace with the actual year and month.
		GroupedMonth     string `json:"groupedMonth" example:"https://example.com/api/v1/months?budget=550dc009-cea6-4c12-b2a5-03446eb7b7cf&month=YYYY-MM"`     // This uses 'YYYY-MM' for clients to replace with the actual year and month.
		MonthAllocations string `json:"monthAllocations" example:"https://example.com/api/v1/months?budget=550dc009-cea6-4c12-b2a5-03446eb7b7cf&month=YYYY-MM"` // This uses 'YYYY-MM' for clients to replace with the actual year and month.
	} `json:"links"`
}

Budget is the API v1 representation of a Budget.

type BudgetAllocationMode

type BudgetAllocationMode struct {
	Mode AllocationMode `json:"mode" example:"ALLOCATE_LAST_MONTH_SPEND"` // Mode to allocate budget with
}

type BudgetCreateResponseV3 added in v3.12.0

type BudgetCreateResponseV3 struct {
	Error *string            `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
	Data  []BudgetResponseV3 `json:"data"`                                                          // List of created Budgets
}

type BudgetListResponse

type BudgetListResponse struct {
	Data []Budget `json:"data"` // List of budgets
}

type BudgetListResponseV3 added in v3.12.0

type BudgetListResponseV3 struct {
	Data       []BudgetV3  `json:"data"`                                                          // List of budgets
	Error      *string     `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
	Pagination *Pagination `json:"pagination"`                                                    // Pagination information
}

type BudgetMonthResponse

type BudgetMonthResponse struct {
	Data models.BudgetMonth `json:"data"` // Data for the budget's month
}

type BudgetMonthResponseV3 added in v3.12.0

type BudgetMonthResponseV3 struct {
	Data  *models.BudgetMonth `json:"data"`                                                          // Data for the budget's month
	Error *string             `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
}

type BudgetQueryFilter

type BudgetQueryFilter struct {
	Name     string `form:"name" filterField:"false"`   // By name
	Note     string `form:"note" filterField:"false"`   // By note
	Currency string `form:"currency"`                   // By currency
	Search   string `form:"search" filterField:"false"` // By string in name or note
}

type BudgetQueryFilterV3 added in v3.12.0

type BudgetQueryFilterV3 struct {
	Name     string `form:"name" filterField:"false"`   // By name
	Note     string `form:"note" filterField:"false"`   // By note
	Currency string `form:"currency"`                   // By currency
	Search   string `form:"search" filterField:"false"` // By string in name or note
	Offset   uint   `form:"offset" filterField:"false"` // The offset of the first Budget returned. Defaults to 0.
	Limit    int    `form:"limit" filterField:"false"`  // Maximum number of Budgets to return. Defaults to 50.
}

type BudgetResponse

type BudgetResponse struct {
	Data Budget `json:"data"` // Data for the budget
}

type BudgetResponseV3 added in v3.11.0

type BudgetResponseV3 struct {
	Data  *BudgetV3 `json:"data"`                                                          // Data for the budget
	Error *string   `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
}

type BudgetV3 added in v3.12.0

type BudgetV3 struct {
	models.Budget
	Links struct {
		Self         string `json:"self" example:"https://example.com/api/v3/budgets/550dc009-cea6-4c12-b2a5-03446eb7b7cf"`                      // The budget itself
		Accounts     string `json:"accounts" example:"https://example.com/api/v3/accounts?budget=550dc009-cea6-4c12-b2a5-03446eb7b7cf"`          // Accounts for this budget
		Categories   string `json:"categories" example:"https://example.com/api/v3/categories?budget=550dc009-cea6-4c12-b2a5-03446eb7b7cf"`      // Categories for this budget
		Envelopes    string `json:"envelopes" example:"https://example.com/api/v3/envelopes?budget=550dc009-cea6-4c12-b2a5-03446eb7b7cf"`        // Envelopes for this budget
		Transactions string `json:"transactions" example:"https://example.com/api/v3/transactions?budget=550dc009-cea6-4c12-b2a5-03446eb7b7cf"`  // Transactions for this budget
		Month        string `json:"month" example:"https://example.com/api/v3/months?budget=550dc009-cea6-4c12-b2a5-03446eb7b7cf&month=YYYY-MM"` // This uses 'YYYY-MM' for clients to replace with the actual year and month.
	} `json:"links"`
}

Budget is the API v3 representation of a Budget.

type Category

type Category struct {
	models.Category
	Envelopes []Envelope `json:"envelopes"` // Envelopes for the category
	Links     struct {
		Self      string `json:"self" example:"https://example.com/api/v1/categories/3b1ea324-d438-4419-882a-2fc91d71772f"`              // The category itself
		Envelopes string `json:"envelopes" example:"https://example.com/api/v1/envelopes?category=3b1ea324-d438-4419-882a-2fc91d71772f"` // Envelopes for this category
	} `json:"links"`
}

type CategoryCreateResponseV3 added in v3.16.0

type CategoryCreateResponseV3 struct {
	Data  []CategoryResponseV3 `json:"data"`                                                          // List of the created Categories or their respective error
	Error *string              `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
}

type CategoryCreateV3 added in v3.19.1

type CategoryCreateV3 struct {
	Name     string    `json:"name" gorm:"uniqueIndex:category_budget_name" example:"Saving" default:""`                        // Name of the category
	BudgetID uuid.UUID `json:"budgetId" gorm:"uniqueIndex:category_budget_name" example:"52d967d3-33f4-4b04-9ba7-772e5ab9d0ce"` // ID of the budget the category belongs to
	Note     string    `json:"note" example:"All envelopes for long-term saving" default:""`                                    // Notes about the category
	Archived bool      `json:"archived" example:"true" default:"false"`                                                         // Is the category hidden?
}

CategoryCreateV3 represents all user configurable parameters

func (CategoryCreateV3) ToCreate added in v3.19.1

func (c CategoryCreateV3) ToCreate() models.CategoryCreate

ToCreate transforms the API representation into the model representation

type CategoryEnvelopesV3 added in v3.19.0

type CategoryEnvelopesV3 struct {
	models.Category
	Envelopes  []EnvelopeMonthV3 `json:"envelopes"`                // Slice of all envelopes
	Balance    decimal.Decimal   `json:"balance" example:"-10.13"` // Sum of the balances of the envelopes
	Allocation decimal.Decimal   `json:"allocation" example:"90"`  // Sum of allocations for the envelopes
	Spent      decimal.Decimal   `json:"spent" example:"100.13"`   // Sum spent for all envelopes
}

type CategoryListResponse

type CategoryListResponse struct {
	Data []Category `json:"data"` // List of categories
}

type CategoryListResponseV3 added in v3.16.0

type CategoryListResponseV3 struct {
	Data       []CategoryV3 `json:"data"`                                                          // List of Categories
	Error      *string      `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
	Pagination *Pagination  `json:"pagination"`                                                    // Pagination information
}

type CategoryQueryFilter

type CategoryQueryFilter struct {
	Name     string `form:"name" filterField:"false"`   // By name
	BudgetID string `form:"budget"`                     // By ID of the budget
	Note     string `form:"note" filterField:"false"`   // By note
	Hidden   bool   `form:"hidden"`                     // Is the category archived?
	Search   string `form:"search" filterField:"false"` // By string in name or note
}

func (CategoryQueryFilter) ToCreate

type CategoryQueryFilterV3 added in v3.16.0

type CategoryQueryFilterV3 struct {
	Name     string `form:"name" filterField:"false"`     // By name
	BudgetID string `form:"budget"`                       // By ID of the Budget
	Note     string `form:"note" filterField:"false"`     // By note
	Archived bool   `form:"archived" filterField:"false"` // Is the Category archived?
	Search   string `form:"search" filterField:"false"`   // By string in name or note
	Offset   uint   `form:"offset" filterField:"false"`   // The offset of the first Category returned. Defaults to 0.
	Limit    int    `form:"limit" filterField:"false"`    // Maximum number of Categories to return. Defaults to 50.
}

func (CategoryQueryFilterV3) ToCreate added in v3.16.0

type CategoryResponse

type CategoryResponse struct {
	Data Category `json:"data"` // Data for the category
}

type CategoryResponseV3 added in v3.16.0

type CategoryResponseV3 struct {
	Data  *CategoryV3 `json:"data"`                                                          // Data for the Category
	Error *string     `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
}

type CategoryV3 added in v3.16.0

type CategoryV3 struct {
	models.Category
	Envelopes []EnvelopeV3 `json:"envelopes"`        // Envelopes for the category
	Hidden    bool         `json:"hidden,omitempty"` // Remove the hidden field

	Links struct {
		Self      string `json:"self" example:"https://example.com/api/v3/categories/3b1ea324-d438-4419-882a-2fc91d71772f"`              // The category itself
		Envelopes string `json:"envelopes" example:"https://example.com/api/v3/envelopes?category=3b1ea324-d438-4419-882a-2fc91d71772f"` // Envelopes for this category
	} `json:"links"`
}

type Controller

type Controller struct {
	DB *gorm.DB
}

func (Controller) CleanupV3 added in v3.13.0

func (co Controller) CleanupV3(c *gin.Context)

@Summary Delete everything @Description Permanently deletes all resources @Tags v3 @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param confirm query string false "Confirmation to delete all resources. Must have the value 'yes-please-delete-everything'" @Router /v3 [delete]

func (Controller) CreateAccount

func (co Controller) CreateAccount(c *gin.Context)

CreateAccount creates a new account

@Summary		Create account
@Description	Creates a new account
@Tags			Accounts
@Produce		json
@Success		201		{object}	AccountResponse
@Failure		400		{object}	httperrors.HTTPError
@Failure		404		{object}	httperrors.HTTPError
@Failure		500		{object}	httperrors.HTTPError
@Param			account	body		models.AccountCreate	true	"Account"
@Router			/v1/accounts [post]
@Deprecated		true

func (Controller) CreateAccountsV3 added in v3.14.0

func (co Controller) CreateAccountsV3(c *gin.Context)

@Summary Creates accounts @Description Creates new accounts @Tags Accounts @Produce json @Success 201 {object} AccountCreateResponseV3 @Failure 400 {object} AccountCreateResponseV3 @Failure 404 {object} AccountCreateResponseV3 @Failure 500 {object} AccountCreateResponseV3 @Param accounts body []AccountCreateV3 true "Accounts" @Router /v3/accounts [post]

func (Controller) CreateAllocation

func (co Controller) CreateAllocation(c *gin.Context)

CreateAllocation creates a new allocation

@Summary		Create allocations
@Description	Create a new allocation of funds to an envelope for a specific month
@Tags			Allocations
@Produce		json
@Success		201			{object}	AllocationResponse
@Failure		400			{object}	httperrors.HTTPError
@Failure		404			{object}	httperrors.HTTPError
@Failure		500			{object}	httperrors.HTTPError
@Param			allocation	body		models.AllocationCreate	true	"Allocation"
@Router			/v1/allocations [post]
@Deprecated		true

func (Controller) CreateBudget

func (co Controller) CreateBudget(c *gin.Context)

CreateBudget creates a new budget

@Summary		Create budget
@Description	Creates a new budget
@Tags			Budgets
@Accept			json
@Produce		json
@Success		201		{object}	BudgetResponse
@Failure		400		{object}	httperrors.HTTPError
@Failure		500		{object}	httperrors.HTTPError
@Param			budget	body		models.BudgetCreate	true	"Budget"
@Router			/v1/budgets [post]
@Deprecated		true

func (Controller) CreateBudgetsV3 added in v3.12.0

func (co Controller) CreateBudgetsV3(c *gin.Context)

@Summary Create budget @Description Creates a new budget @Tags Budgets @Accept json @Produce json @Success 201 {object} BudgetCreateResponseV3 @Failure 400 {object} BudgetCreateResponseV3 @Failure 500 {object} BudgetCreateResponseV3 @Param budget body models.BudgetCreate true "Budget" @Router /v3/budgets [post]

func (Controller) CreateCategoriesV3 added in v3.16.0

func (co Controller) CreateCategoriesV3(c *gin.Context)

@Summary Create category @Description Creates a new category @Tags Categories @Produce json @Success 201 {object} CategoryCreateResponseV3 @Failure 400 {object} CategoryCreateResponseV3 @Failure 404 {object} CategoryCreateResponseV3 @Failure 500 {object} CategoryCreateResponseV3 @Param categories body []CategoryCreateV3 true "Categories" @Router /v3/categories [post]

func (Controller) CreateCategory

func (co Controller) CreateCategory(c *gin.Context)

CreateCategory creates a new category

@Summary		Create category
@Description	Creates a new category
@Tags			Categories
@Produce		json
@Success		201			{object}	CategoryResponse
@Failure		400			{object}	httperrors.HTTPError
@Failure		404			{object}	httperrors.HTTPError
@Failure		500			{object}	httperrors.HTTPError
@Param			category	body		models.CategoryCreate	true	"Category"
@Router			/v1/categories [post]
@Deprecated		true

func (Controller) CreateEnvelope

func (co Controller) CreateEnvelope(c *gin.Context)

@Summary Create envelope @Description Creates a new envelope @Tags Envelopes @Produce json @Success 201 {object} EnvelopeResponse @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param envelope body models.EnvelopeCreate true "Envelope" @Router /v1/envelopes [post] @Deprecated true

func (Controller) CreateEnvelopesV3 added in v3.15.0

func (co Controller) CreateEnvelopesV3(c *gin.Context)

@Summary Create envelope @Description Creates a new envelope @Tags Envelopes @Produce json @Success 201 {object} EnvelopeCreateResponseV3 @Failure 400 {object} EnvelopeCreateResponseV3 @Failure 404 {object} EnvelopeCreateResponseV3 @Failure 500 {object} EnvelopeCreateResponseV3 @Param envelope body []controllers.EnvelopeCreateV3 true "Envelopes" @Router /v3/envelopes [post]

func (Controller) CreateGoalsV3 added in v3.21.0

func (co Controller) CreateGoalsV3(c *gin.Context)

@Summary Create goals @Description Creates new goals @Tags Goals @Produce json @Success 201 {object} GoalCreateResponseV3 @Failure 400 {object} GoalCreateResponseV3 @Failure 404 {object} GoalCreateResponseV3 @Failure 500 {object} GoalCreateResponseV3 @Param goals body []GoalV3Editable true "Goals" @Router /v3/goals [post]

func (Controller) CreateMatchRules added in v3.1.2

func (co Controller) CreateMatchRules(c *gin.Context)

CreateMatchRulesV2 creates matchRules

@Summary		Create matchRules
@Description	Creates matchRules from the list of submitted matchRule data. The response code is the highest response code number that a single matchRule creation would have caused. If it is not equal to 201, at least one matchRule has an error.
@Tags			MatchRules
@Produce		json
@Success		201			{object}	[]ResponseMatchRule
@Failure		400			{object}	[]ResponseMatchRule
@Failure		404			{object}	httperrors.HTTPError
@Failure		500			{object}	[]ResponseMatchRule
@Param			matchRules	body		[]models.MatchRuleCreate	true	"MatchRules"
@Router			/v2/match-rules [post]
@Deprecated		true

func (Controller) CreateMatchRulesV3 added in v3.10.0

func (co Controller) CreateMatchRulesV3(c *gin.Context)

@Summary Create matchRules @Description Creates matchRules from the list of submitted matchRule data. The response code is the highest response code number that a single matchRule creation would have caused. If it is not equal to 201, at least one matchRule has an error. @Tags MatchRules @Produce json @Success 201 {object} MatchRuleCreateResponseV3 @Failure 400 {object} MatchRuleCreateResponseV3 @Failure 404 {object} MatchRuleCreateResponseV3 @Failure 500 {object} MatchRuleCreateResponseV3 @Param matchRules body []models.MatchRuleCreate true "MatchRules" @Router /v3/match-rules [post]

func (Controller) CreateMonthConfig

func (co Controller) CreateMonthConfig(c *gin.Context)

CreateMonthConfig creates a new month config

@Summary		Create MonthConfig
@Description	Creates a new MonthConfig
@Tags			MonthConfigs
@Produce		json
@Success		201			{object}	MonthConfigResponse
@Failure		400			{object}	httperrors.HTTPError
@Failure		404			{object}	httperrors.HTTPError
@Failure		500			{object}	httperrors.HTTPError
@Param			id			path		string						true	"ID of the Envelope"
@Param			month		path		string						true	"The month in YYYY-MM format"
@Param			monthConfig	body		models.MonthConfigCreate	true	"MonthConfig"
@Router			/v1/month-configs/{id}/{month} [post]
@Deprecated		true

func (Controller) CreateRenameRules

func (co Controller) CreateRenameRules(c *gin.Context)

CreateRenameRulesV2 creates renameRules

@Summary		Create renameRules
@Description	Creates renameRules from the list of submitted renameRule data. The response code is the highest response code number that a single renameRule creation would have caused. If it is not equal to 201, at least one renameRule has an error.
@Tags			RenameRules
@Produce		json
@Success		201			{object}	[]ResponseMatchRule
@Failure		400			{object}	[]ResponseMatchRule
@Failure		404			{object}	httperrors.HTTPError
@Failure		500			{object}	[]ResponseMatchRule
@Param			renameRules	body		[]models.MatchRuleCreate	true	"RenameRules"
@Router			/v2/rename-rules [post]
@Deprecated		true

func (Controller) CreateTransaction

func (co Controller) CreateTransaction(c *gin.Context)

CreateTransaction creates a new transaction

@Summary		Create transaction
@Description	Creates a new transaction
@Tags			Transactions
@Produce		json
@Success		201			{object}	TransactionResponse
@Failure		400			{object}	httperrors.HTTPError
@Failure		404			{object}	httperrors.HTTPError
@Failure		500			{object}	httperrors.HTTPError
@Param			transaction	body		models.TransactionCreate	true	"Transaction"
@Router			/v1/transactions [post]
@Deprecated		true

func (Controller) CreateTransactionsV2

func (co Controller) CreateTransactionsV2(c *gin.Context)

CreateTransactionsV2 creates transactions

@Summary		Create transactions
@Description	Creates transactions from the list of submitted transaction data. The response code is the highest response code number that a single transaction creation would have caused. If it is not equal to 201, at least one transaction has an error.
@Tags			Transactions
@Produce		json
@Success		201				{object}	[]ResponseTransactionV2
@Failure		400				{object}	httperrors.HTTPError
@Failure		404				{object}	[]ResponseTransactionV2
@Failure		500				{object}	[]ResponseTransactionV2
@Param			transactions	body		[]models.TransactionCreate	true	"Transactions"
@Router			/v2/transactions [post]
@Deprecated		true

func (Controller) CreateTransactionsV3 added in v3.6.0

func (co Controller) CreateTransactionsV3(c *gin.Context)

@Summary Create transactions @Description Creates transactions from the list of submitted transaction data. The response code is the highest response code number that a single transaction creation would have caused. If it is not equal to 201, at least one transaction has an error. @Tags Transactions @Produce json @Success 201 {object} TransactionCreateResponseV3 @Failure 400 {object} TransactionCreateResponseV3 @Failure 404 {object} TransactionCreateResponseV3 @Failure 500 {object} TransactionCreateResponseV3 @Param transactions body []models.TransactionCreate true "Transactions" @Router /v3/transactions [post]

func (Controller) DeleteAccount

func (co Controller) DeleteAccount(c *gin.Context)

DeleteAccount deletes an account

@Summary		Delete account
@Description	Deletes an account
@Tags			Accounts
@Produce		json
@Success		204
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v1/accounts/{id} [delete]
@Deprecated		true

func (Controller) DeleteAccountV3 added in v3.14.0

func (co Controller) DeleteAccountV3(c *gin.Context)

@Summary Delete account @Description Deletes an account @Tags Accounts @Produce json @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v3/accounts/{id} [delete]

func (Controller) DeleteAll

func (co Controller) DeleteAll(c *gin.Context)

DeleteAll permanently deletes all resources in the database

@Summary		Delete everything
@Description	Permanently deletes all resources
@Tags			v1
@Success		204
@Failure		500	{object}	httperrors.HTTPError
@Router			/v1 [delete]
@Deprecated		true

func (Controller) DeleteAllocation

func (co Controller) DeleteAllocation(c *gin.Context)

DeleteAllocation deletes an allocation

@Summary		Delete allocation
@Description	Deletes an allocation
@Tags			Allocations
@Success		204
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v1/allocations/{id} [delete]
@Deprecated		true

func (Controller) DeleteAllocations

func (co Controller) DeleteAllocations(c *gin.Context)

DeleteAllocations deletes all allocations for a month

@Summary		Delete allocations for a month
@Description	Deletes all allocation for the specified month
@Tags			Months
@Success		204
@Failure		400		{object}	httperrors.HTTPError
@Failure		404		{object}	httperrors.HTTPError
@Failure		500		{object}	httperrors.HTTPError
@Param			budget	query		string	true	"ID formatted as string"
@Param			month	query		string	true	"The month in YYYY-MM format"
@Router			/v1/months [delete]
@Deprecated		true

func (Controller) DeleteAllocationsMonth

func (co Controller) DeleteAllocationsMonth(c *gin.Context)

DeleteAllocationsMonth deletes all allocations for a specific month

@Summary		Delete allocations for a month
@Description	Deletes all allocation for the specified month. **Use DELETE /month endpoint with month and budgetId query parameters instead.**
@Tags			Budgets
@Success		204
@Failure		400		{object}	httperrors.HTTPError
@Failure		500		{object}	httperrors.HTTPError
@Param			month	path		string	true	"The month in YYYY-MM format"
@Param			id		path		string	true	"Budget ID formatted as string"
@Router			/v1/budgets/{id}/{month}/allocations [delete]
@Deprecated		true

func (Controller) DeleteAllocationsV3 added in v3.19.0

func (co Controller) DeleteAllocationsV3(c *gin.Context)

@Summary Delete allocations for a month @Description Deletes all allocation for the specified month @Tags Months @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param budget query string true "ID formatted as string" @Param month query string true "The month in YYYY-MM format" @Router /v3/months [delete]

func (Controller) DeleteBudget

func (co Controller) DeleteBudget(c *gin.Context)

Do stuff

@Summary		Delete budget
@Description	Deletes a budget
@Tags			Budgets
@Success		204
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v1/budgets/{id} [delete]
@Deprecated		true

func (Controller) DeleteBudgetV3 added in v3.12.0

func (co Controller) DeleteBudgetV3(c *gin.Context)

@Summary Delete budget @Description Deletes a budget @Tags Budgets @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v3/budgets/{id} [delete]

func (Controller) DeleteCategory

func (co Controller) DeleteCategory(c *gin.Context)

DeleteCategory deletes a specific category

@Summary		Delete category
@Description	Deletes a category
@Tags			Categories
@Success		204
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v1/categories/{id} [delete]
@Deprecated		true

func (Controller) DeleteCategoryV3 added in v3.16.0

func (co Controller) DeleteCategoryV3(c *gin.Context)

@Summary Delete category @Description Deletes a category @Tags Categories @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v3/categories/{id} [delete]

func (Controller) DeleteEnvelope

func (co Controller) DeleteEnvelope(c *gin.Context)

@Summary Delete envelope @Description Deletes an envelope @Tags Envelopes @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v1/envelopes/{id} [delete] @Deprecated true

func (Controller) DeleteEnvelopeV3 added in v3.15.0

func (co Controller) DeleteEnvelopeV3(c *gin.Context)

@Summary Delete envelope @Description Deletes an envelope @Tags Envelopes @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v3/envelopes/{id} [delete]

func (Controller) DeleteGoalV3 added in v3.21.0

func (co Controller) DeleteGoalV3(c *gin.Context)

@Summary Delete goal @Description Deletes a goal @Tags Goals @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v3/goals/{id} [delete]

func (Controller) DeleteMatchRule added in v3.1.2

func (co Controller) DeleteMatchRule(c *gin.Context)

DeleteMatchRule deletes an matchRule

@Summary		Delete matchRule
@Description	Deletes an matchRule
@Tags			MatchRules
@Success		204
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v2/match-rules/{id} [delete]
@Deprecated		true

func (Controller) DeleteMatchRuleV3 added in v3.10.0

func (co Controller) DeleteMatchRuleV3(c *gin.Context)

@Summary Delete matchRule @Description Deletes an matchRule @Tags MatchRules @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v3/match-rules/{id} [delete]

func (Controller) DeleteMonthConfig

func (co Controller) DeleteMonthConfig(c *gin.Context)

DeleteMonthConfig deletes configuration data for a specific envelope and month

@Summary		Delete MonthConfig
@Description	Deletes configuration settings for a specific month
@Tags			MonthConfigs
@Produce		json
@Success		204
@Failure		400		{object}	httperrors.HTTPError
@Failure		404		{object}	httperrors.HTTPError
@Failure		500		{object}	httperrors.HTTPError
@Param			id		path		string	true	"ID of the Envelope"
@Param			month	path		string	true	"The month in YYYY-MM format"
@Router			/v1/month-configs/{id}/{month} [delete]
@Deprecated		true

func (Controller) DeleteRenameRule

func (co Controller) DeleteRenameRule(c *gin.Context)

DeleteRenameRule deletes an renameRule

@Summary		Delete renameRule
@Description	Deletes an renameRule
@Tags			RenameRules
@Success		204
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v2/rename-rules/{id} [delete]
@Deprecated		true

func (Controller) DeleteTransaction

func (co Controller) DeleteTransaction(c *gin.Context)

DeleteTransaction deletes a specific transaction

@Summary		Delete transaction
@Description	Deletes a transaction
@Tags			Transactions
@Success		204
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v1/transactions/{id} [delete]
@Deprecated		true

func (Controller) DeleteTransactionV3 added in v3.8.0

func (co Controller) DeleteTransactionV3(c *gin.Context)

@Summary Delete transaction @Description Deletes a transaction @Tags Transactions @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v3/transactions/{id} [delete]

func (Controller) GetAccount

func (co Controller) GetAccount(c *gin.Context)

GetAccount returns data for a specific account

@Summary		Get account
@Description	Returns a specific account
@Tags			Accounts
@Produce		json
@Success		200	{object}	AccountResponse
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v1/accounts/{id} [get]
@Deprecated		true

func (Controller) GetAccountV3 added in v3.14.0

func (co Controller) GetAccountV3(c *gin.Context)

@Summary Get account @Description Returns a specific account @Tags Accounts @Produce json @Success 200 {object} AccountResponseV3 @Failure 400 {object} AccountResponseV3 @Failure 404 {object} AccountResponseV3 @Failure 500 {object} AccountResponseV3 @Param id path string true "ID formatted as string" @Router /v3/accounts/{id} [get]

func (Controller) GetAccounts

func (co Controller) GetAccounts(c *gin.Context)

GetAccounts returns a list of all accounts matching the filter parameters

@Summary		List accounts
@Description	Returns a list of accounts
@Tags			Accounts
@Produce		json
@Success		200	{object}	AccountListResponse
@Failure		400	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Router			/v1/accounts [get]
@Param			name		query	string	false	"Filter by name"
@Param			note		query	string	false	"Filter by note"
@Param			budget		query	string	false	"Filter by budget ID"
@Param			onBudget	query	bool	false	"Is the account on-budget?"
@Param			external	query	bool	false	"Is the account external?"
@Param			hidden		query	bool	false	"Is the account hidden?"
@Param			search		query	string	false	"Search for this text in name and note"
@Deprecated		true

func (Controller) GetAccountsV2 added in v3.2.0

func (co Controller) GetAccountsV2(c *gin.Context)

GetAccounts returns a list of all accounts matching the filter parameters

@Summary		List accounts
@Description	Returns a list of accounts
@Tags			Accounts
@Produce		json
@Success		200	{object}	AccountListResponse
@Failure		400	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Router			/v2/accounts [get]
@Param			name		query	string	false	"Filter by name"
@Param			note		query	string	false	"Filter by note"
@Param			budget		query	string	false	"Filter by budget ID"
@Param			onBudget	query	bool	false	"Is the account on-budget?"
@Param			external	query	bool	false	"Is the account external?"
@Param			hidden		query	bool	false	"Is the account hidden?"
@Param			search		query	string	false	"Search for this text in name and note"
@Deprecated		true

func (Controller) GetAccountsV3 added in v3.14.0

func (co Controller) GetAccountsV3(c *gin.Context)

@Summary List accounts @Description Returns a list of accounts @Tags Accounts @Produce json @Success 200 {object} AccountListResponseV3 @Failure 400 {object} AccountListResponseV3 @Failure 500 {object} AccountListResponseV3 @Router /v3/accounts [get] @Param name query string false "Filter by name" @Param note query string false "Filter by note" @Param budget query string false "Filter by budget ID" @Param onBudget query bool false "Is the account on-budget?" @Param external query bool false "Is the account external?" @Param archived query bool false "Is the account archived?" @Param search query string false "Search for this text in name and note" @Param offset query uint false "The offset of the first Account returned. Defaults to 0." @Param limit query int false "Maximum number of Accounts to return. Defaults to 50."

func (Controller) GetAllocation

func (co Controller) GetAllocation(c *gin.Context)

GetAllocation returns data about a specific allocation

@Summary		Get allocation
@Description	Returns a specific allocation
@Tags			Allocations
@Produce		json
@Success		200	{object}	AllocationResponse
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v1/allocations/{id} [get]
@Deprecated		true

func (Controller) GetAllocations

func (co Controller) GetAllocations(c *gin.Context)

GetAllocations returns a list of allocations matching the search parameters

@Summary		Get allocations
@Description	Returns a list of allocations
@Tags			Allocations
@Produce		json
@Success		200	{object}	AllocationListResponse
@Failure		400	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Router			/v1/allocations [get]
@Param			month		query	string	false	"Filter by month"
@Param			amount		query	string	false	"Filter by amount"
@Param			envelope	query	string	false	"Filter by envelope ID"
@Deprecated		true

func (Controller) GetBudget

func (co Controller) GetBudget(c *gin.Context)

GetBudget returns data for a single budget

@Summary		Get budget
@Description	Returns a specific budget
@Tags			Budgets
@Produce		json
@Success		200	{object}	BudgetResponse
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v1/budgets/{id} [get]
@Deprecated		true

func (Controller) GetBudgetMonth

func (co Controller) GetBudgetMonth(c *gin.Context)

GetBudgetMonth returns data for a month for a specific budget

@Summary		Get Budget month data
@Description	Returns data about a budget for a for a specific month. **Use GET /month endpoint with month and budgetId query parameters instead.**
@Tags			Budgets
@Produce		json
@Success		200		{object}	BudgetMonthResponse
@Failure		400		{object}	httperrors.HTTPError
@Failure		404		{object}	httperrors.HTTPError
@Failure		500		{object}	httperrors.HTTPError
@Param			id		path		string	true	"ID formatted as string"
@Param			month	path		string	true	"The month in YYYY-MM format"
@Router			/v1/budgets/{id}/{month} [get]
@Deprecated		true

func (Controller) GetBudgetV3 added in v3.12.0

func (co Controller) GetBudgetV3(c *gin.Context)

@Summary Get budget @Description Returns a specific budget @Tags Budgets @Produce json @Success 200 {object} BudgetResponseV3 @Failure 400 {object} BudgetResponseV3 @Failure 404 {object} BudgetResponseV3 @Failure 500 {object} BudgetResponseV3 @Param id path string true "ID formatted as string" @Router /v3/budgets/{id} [get]

func (Controller) GetBudgets

func (co Controller) GetBudgets(c *gin.Context)

GetBudgets returns data for all budgets filtered by the query parameters

@Summary		List budgets
@Description	Returns a list of budgets
@Tags			Budgets
@Produce		json
@Success		200	{object}	BudgetListResponse
@Failure		500	{object}	httperrors.HTTPError
@Router			/v1/budgets [get]
@Param			name		query	string	false	"Filter by name"
@Param			note		query	string	false	"Filter by note"
@Param			currency	query	string	false	"Filter by currency"
@Param			search		query	string	false	"Search for this text in name and note"
@Deprecated		true

func (Controller) GetBudgetsV3 added in v3.12.0

func (co Controller) GetBudgetsV3(c *gin.Context)

@Summary List budgets @Description Returns a list of budgets @Tags Budgets @Produce json @Success 200 {object} BudgetListResponseV3 @Failure 500 {object} BudgetListResponseV3 @Router /v3/budgets [get] @Param name query string false "Filter by name" @Param note query string false "Filter by note" @Param currency query string false "Filter by currency" @Param search query string false "Search for this text in name and note" @Param offset query uint false "The offset of the first Budget returned. Defaults to 0." @Param limit query int false "Maximum number of Budgets to return. Defaults to 50."

func (Controller) GetCategories

func (co Controller) GetCategories(c *gin.Context)

GetCategories returns a list of categories filtered by the query parameters

@Summary		Get categories
@Description	Returns a list of categories
@Tags			Categories
@Produce		json
@Success		200	{object}	CategoryListResponse
@Failure		400	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Router			/v1/categories [get]
@Param			name	query	string	false	"Filter by name"
@Param			note	query	string	false	"Filter by note"
@Param			budget	query	string	false	"Filter by budget ID"
@Param			hidden	query	bool	false	"Is the category hidden?"
@Param			search	query	string	false	"Search for this text in name and note"
@Deprecated		true

func (Controller) GetCategoriesV3 added in v3.16.0

func (co Controller) GetCategoriesV3(c *gin.Context)

@Summary Get categories @Description Returns a list of categories @Tags Categories @Produce json @Success 200 {object} CategoryListResponseV3 @Failure 400 {object} CategoryListResponseV3 @Failure 500 {object} CategoryListResponseV3 @Router /v3/categories [get] @Param name query string false "Filter by name" @Param note query string false "Filter by note" @Param budget query string false "Filter by budget ID" @Param hidden query bool false "Is the category hidden?" @Param search query string false "Search for this text in name and note" @Param offset query uint false "The offset of the first Category returned. Defaults to 0." @Param limit query int false "Maximum number of Categories to return. Defaults to 50."

func (Controller) GetCategory

func (co Controller) GetCategory(c *gin.Context)

GetCategory returns data for a specific category

@Summary		Get category
@Description	Returns a specific category
@Tags			Categories
@Produce		json
@Success		200	{object}	CategoryResponse
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v1/categories/{id} [get]
@Deprecated		true

func (Controller) GetCategoryV3 added in v3.16.0

func (co Controller) GetCategoryV3(c *gin.Context)

@Summary Get category @Description Returns a specific category @Tags Categories @Produce json @Success 200 {object} CategoryResponseV3 @Failure 400 {object} CategoryResponseV3 @Failure 404 {object} CategoryResponseV3 @Failure 500 {object} CategoryResponseV3 @Param id path string true "ID formatted as string" @Router /v3/categories/{id} [get]

func (Controller) GetEnvelope

func (co Controller) GetEnvelope(c *gin.Context)

@Summary Get envelope @Description Returns a specific envelope @Tags Envelopes @Produce json @Success 200 {object} EnvelopeResponse @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v1/envelopes/{id} [get] @Deprecated true

func (Controller) GetEnvelopeMonth

func (co Controller) GetEnvelopeMonth(c *gin.Context)

@Summary Get Envelope month data @Description Returns data about an envelope for a for a specific month. **Use GET /month endpoint with month and budgetId query parameters instead.** @Tags Envelopes @Produce json @Success 200 {object} EnvelopeMonthResponse @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Param month path string true "The month in YYYY-MM format" @Router /v1/envelopes/{id}/{month} [get] @Deprecated true

func (Controller) GetEnvelopeV3 added in v3.15.0

func (co Controller) GetEnvelopeV3(c *gin.Context)

@Summary Get Envelope @Description Returns a specific Envelope @Tags Envelopes @Produce json @Success 200 {object} EnvelopeResponseV3 @Failure 400 {object} EnvelopeResponseV3 @Failure 404 {object} EnvelopeResponseV3 @Failure 500 {object} EnvelopeResponseV3 @Param id path string true "ID formatted as string" @Router /v3/envelopes/{id} [get]

func (Controller) GetEnvelopes

func (co Controller) GetEnvelopes(c *gin.Context)

@Summary Get envelopes @Description Returns a list of envelopes @Tags Envelopes @Produce json @Success 200 {object} EnvelopeListResponse @Failure 400 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Router /v1/envelopes [get] @Param name query string false "Filter by name" @Param note query string false "Filter by note" @Param category query string false "Filter by category ID" @Param hidden query bool false "Is the envelope hidden?" @Param search query string false "Search for this text in name and note" @Deprecated true

func (Controller) GetEnvelopesV3 added in v3.15.0

func (co Controller) GetEnvelopesV3(c *gin.Context)

@Summary Get envelopes @Description Returns a list of envelopes @Tags Envelopes @Produce json @Success 200 {object} EnvelopeListResponseV3 @Failure 400 {object} EnvelopeListResponseV3 @Failure 500 {object} EnvelopeListResponseV3 @Router /v3/envelopes [get] @Param name query string false "Filter by name" @Param note query string false "Filter by note" @Param category query string false "Filter by category ID" @Param archived query bool false "Is the envelope archived?" @Param search query string false "Search for this text in name and note" @Param offset query uint false "The offset of the first Envelope returned. Defaults to 0." @Param limit query int false "Maximum number of Envelopes to return. Defaults to 50."

func (Controller) GetGoalV3 added in v3.21.0

func (co Controller) GetGoalV3(c *gin.Context)

@Summary Get goal @Description Returns a specific goal @Tags Goals @Produce json @Success 200 {object} GoalResponseV3 @Failure 400 {object} GoalResponseV3 @Failure 404 {object} GoalResponseV3 @Failure 500 {object} GoalResponseV3 @Param id path string true "ID formatted as string" @Router /v3/goals/{id} [get]

func (Controller) GetGoalsV3 added in v3.21.0

func (co Controller) GetGoalsV3(c *gin.Context)

@Summary Get goals @Description Returns a list of goals @Tags Goals @Produce json @Success 200 {object} GoalListResponseV3 @Failure 400 {object} GoalListResponseV3 @Failure 500 {object} GoalListResponseV3 @Router /v3/goals [get] @Param name query string false "Filter by name" @Param note query string false "Filter by note" @Param search query string false "Search for this text in name and note" @Param archived query bool false "Is the goal archived?" @Param envelope query string false "Filter by envelope ID" @Param month query string false "Month of the goal. Ignores exact time, matches on the month of the RFC3339 timestamp provided." @Param fromMonth query string false "Goals for this and later months. Ignores exact time, matches on the month of the RFC3339 timestamp provided." @Param untilMonth query string false "Goals for this and earlier months. Ignores exact time, matches on the month of the RFC3339 timestamp provided." @Param amount query string false "Filter by amount" @Param amountLessOrEqual query string false "Amount less than or equal to this" @Param amountMoreOrEqual query string false "Amount more than or equal to this" @Param offset query uint false "The offset of the first goal returned. Defaults to 0." @Param limit query int false "Maximum number of goal to return. Defaults to 50."

func (Controller) GetHealthz added in v3.3.0

func (co Controller) GetHealthz(c *gin.Context)

GetHealthz returns data about the application health

@Summary		Get health
@Description	Returns the application health and, if not healthy, an error
@Tags			General
@Produce		json
@Success		204
@Failure		500	{object} httperrors.HTTPError
@Router			/healthz [get]

func (Controller) GetImportV3 added in v3.11.0

func (Controller) GetImportV3(c *gin.Context)

@Summary Import API overview @Description Returns general information about the v3 API @Tags Import @Success 200 {object} ImportV3Response @Router /v3/import [get]

func (Controller) GetMatchRule added in v3.1.2

func (co Controller) GetMatchRule(c *gin.Context)

GetMatchRule returns data about a specific matchRule

@Summary		Get matchRule
@Description	Returns a specific matchRule
@Tags			MatchRules
@Produce		json
@Success		200	{object}	models.MatchRule
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v2/match-rules/{id} [get]
@Deprecated		true

func (Controller) GetMatchRuleV3 added in v3.10.0

func (co Controller) GetMatchRuleV3(c *gin.Context)

@Summary Get matchRule @Description Returns a specific matchRule @Tags MatchRules @Produce json @Success 200 {object} MatchRuleResponseV3 @Failure 400 {object} MatchRuleResponseV3 @Failure 404 {object} MatchRuleResponseV3 @Failure 500 {object} MatchRuleResponseV3 @Param id path string true "ID formatted as string" @Router /v3/match-rules/{id} [get]

func (Controller) GetMatchRules added in v3.1.2

func (co Controller) GetMatchRules(c *gin.Context)

GetMatchRules returns a list of matchRules matching the search parameters

@Summary		Get matchRules
@Description	Returns a list of matchRules
@Tags			MatchRules
@Produce		json
@Success		200			{object}	[]models.MatchRule
@Failure		400			{object}	httperrors.HTTPError
@Failure		500			{object}	httperrors.HTTPError
@Param			priority	query		uint	false	"Filter by priority"
@Param			match		query		string	false	"Filter by match"
@Param			account		query		string	false	"Filter by account ID"
@Router			/v2/match-rules [get]
@Deprecated		true

func (Controller) GetMatchRulesV3 added in v3.10.0

func (co Controller) GetMatchRulesV3(c *gin.Context)

@Summary Get matchRules @Description Returns a list of matchRules @Tags MatchRules @Produce json @Success 200 {object} MatchRuleListResponseV3 @Failure 400 {object} MatchRuleListResponseV3 @Failure 500 {object} MatchRuleListResponseV3 @Param priority query uint false "Filter by priority" @Param match query string false "Filter by match" @Param account query string false "Filter by account ID" @Param offset query uint false "The offset of the first Match Rule returned. Defaults to 0." @Param limit query int false "Maximum number of Match Rules to return. Defaults to 50.". @Router /v3/match-rules [get]

func (Controller) GetMonth

func (co Controller) GetMonth(c *gin.Context)

GetMonth returns data for a specific budget and month

@Summary		Get data about a month
@Description	Returns data about a specific month.
@Tags			Months
@Produce		json
@Success		200		{object}	MonthResponse
@Failure		400		{object}	httperrors.HTTPError
@Failure		404		{object}	httperrors.HTTPError
@Failure		500		{object}	httperrors.HTTPError
@Param			budget	query		string	true	"ID formatted as string"
@Param			month	query		string	true	"The month in YYYY-MM format"
@Router			/v1/months [get]
@Deprecated		true

func (Controller) GetMonthConfig

func (co Controller) GetMonthConfig(c *gin.Context)

GetMonthConfig returns config for a specific envelope and month

@Summary		Get MonthConfig
@Description	Returns configuration for a specific month
@Tags			MonthConfigs
@Produce		json
@Success		200		{object}	MonthConfigResponse
@Failure		400		{object}	httperrors.HTTPError
@Failure		404		{object}	httperrors.HTTPError
@Failure		500		{object}	httperrors.HTTPError
@Param			id		path		string	true	"ID of the Envelope"
@Param			month	path		string	true	"The month in YYYY-MM format"
@Router			/v1/month-configs/{id}/{month} [get]
@Deprecated		true

func (Controller) GetMonthConfigV3 added in v3.17.0

func (co Controller) GetMonthConfigV3(c *gin.Context)

@Summary Get MonthConfig @Description Returns configuration for a specific month @Tags Envelopes @Produce json @Success 200 {object} MonthConfigResponseV3 @Failure 400 {object} MonthConfigResponseV3 @Failure 404 {object} MonthConfigResponseV3 @Failure 500 {object} MonthConfigResponseV3 @Param id path string true "ID of the Envelope" @Param month path string true "The month in YYYY-MM format" @Router /v3/envelopes/{id}/{month} [get]

func (Controller) GetMonthConfigs

func (co Controller) GetMonthConfigs(c *gin.Context)

GetMonthConfigs returns all month configs filtered by the query parameters

@Summary		List MonthConfigs
@Description	Returns a list of MonthConfigs
@Tags			MonthConfigs
@Produce		json
@Success		200			{object}	MonthConfigListResponse
@Failure		400			{object}	httperrors.HTTPError
@Failure		500			{object}	httperrors.HTTPError
@Param			envelope	query		string	false	"Filter by name"
@Param			month		query		string	false	"Filter by month"
@Router			/v1/month-configs [get]
@Deprecated		true

func (Controller) GetMonthV3 added in v3.19.0

func (co Controller) GetMonthV3(c *gin.Context)

@Summary Get data about a month @Description Returns data about a specific month. @Tags Months @Produce json @Success 200 {object} MonthResponseV3 @Failure 400 {object} MonthResponseV3 @Failure 404 {object} MonthResponseV3 @Failure 500 {object} MonthResponseV3 @Param budget query string true "ID formatted as string" @Param month query string true "The month in YYYY-MM format" @Router /v3/months [get]

func (Controller) GetRenameRule

func (co Controller) GetRenameRule(c *gin.Context)

GetRenameRule returns data about a specific renameRule

@Summary		Get renameRule
@Description	Returns a specific renameRule
@Tags			RenameRules
@Produce		json
@Success		200	{object}	RenameRuleResponse
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v2/rename-rules/{id} [get]
@Deprecated		true

func (Controller) GetRenameRules

func (co Controller) GetRenameRules(c *gin.Context)

GetRenameRules returns a list of renameRules matching the search parameters

@Summary		Get renameRules
@Description	Returns a list of renameRules
@Tags			RenameRules
@Produce		json
@Success		200			{object}	RenameRuleListResponse
@Failure		400			{object}	httperrors.HTTPError
@Failure		500			{object}	httperrors.HTTPError
@Param			priority	query		uint	false	"Filter by priority"
@Param			match		query		string	false	"Filter by match"
@Param			account		query		string	false	"Filter by account ID"
@Router			/v2/rename-rules [get]
@Deprecated		true

func (Controller) GetTransaction

func (co Controller) GetTransaction(c *gin.Context)

GetTransaction returns a specific transaction

@Summary		Get transaction
@Description	Returns a specific transaction
@Tags			Transactions
@Produce		json
@Success		200	{object}	TransactionResponse
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v1/transactions/{id} [get]
@Deprecated		true

func (Controller) GetTransactionV3 added in v3.7.0

func (co Controller) GetTransactionV3(c *gin.Context)

@Summary Get transaction @Description Returns a specific transaction @Tags Transactions @Produce json @Success 200 {object} TransactionResponseV3 @Failure 400 {object} TransactionResponseV3 @Failure 404 {object} TransactionResponseV3 @Failure 500 {object} TransactionResponseV3 @Param id path string true "ID formatted as string" @Router /v3/transactions/{id} [get]

func (Controller) GetTransactions

func (co Controller) GetTransactions(c *gin.Context)

GetTransactions returns transactions filtered by the query parameters

@Summary		Get transactions
@Description	Returns a list of transactions
@Tags			Transactions
@Produce		json
@Success		200	{object}	TransactionListResponse
@Failure		400	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Router			/v1/transactions [get]
@Param			date					query	string	false	"Date of the transaction. Ignores exact time, matches on the day of the RFC3339 timestamp provided."
@Param			fromDate				query	string	false	"Transactions at and after this date. Ignores exact time, matches on the day of the RFC3339 timestamp provided."
@Param			untilDate				query	string	false	"Transactions before and at this date. Ignores exact time, matches on the day of the RFC3339 timestamp provided."
@Param			amount					query	string	false	"Filter by amount"
@Param			amountLessOrEqual		query	string	false	"Amount less than or equal to this"
@Param			amountMoreOrEqual		query	string	false	"Amount more than or equal to this"
@Param			note					query	string	false	"Filter by note"
@Param			budget					query	string	false	"Filter by budget ID"
@Param			account					query	string	false	"Filter by ID of associated account, regardeless of source or destination"
@Param			source					query	string	false	"Filter by source account ID"
@Param			destination				query	string	false	"Filter by destination account ID"
@Param			envelope				query	string	false	"Filter by envelope ID"
@Param			reconciled				query	bool	false	"DEPRECATED. Filter by reconcilication state"
@Param			reconciledSource		query	bool	false	"Reconcilication state in source account"
@Param			reconciledDestination	query	bool	false	"Reconcilication state in destination account"
@Deprecated		true

func (Controller) GetTransactionsV3 added in v3.5.0

func (co Controller) GetTransactionsV3(c *gin.Context)

@Summary Get transactions @Description Returns a list of transactions @Tags Transactions @Produce json @Success 200 {object} TransactionListResponseV3 @Failure 400 {object} TransactionListResponseV3 @Failure 500 {object} TransactionListResponseV3 @Router /v3/transactions [get] @Param date query string false "Date of the transaction. Ignores exact time, matches on the day of the RFC3339 timestamp provided." @Param fromDate query string false "Transactions at and after this date. Ignores exact time, matches on the day of the RFC3339 timestamp provided." @Param untilDate query string false "Transactions before and at this date. Ignores exact time, matches on the day of the RFC3339 timestamp provided." @Param amount query string false "Filter by amount" @Param amountLessOrEqual query string false "Amount less than or equal to this" @Param amountMoreOrEqual query string false "Amount more than or equal to this" @Param note query string false "Filter by note" @Param budget query string false "Filter by budget ID" @Param account query string false "Filter by ID of associated account, regardeless of source or destination" @Param source query string false "Filter by source account ID" @Param destination query string false "Filter by destination account ID" @Param envelope query string false "Filter by envelope ID" @Param reconciledSource query bool false "Reconcilication state in source account" @Param reconciledDestination query bool false "Reconcilication state in destination account" @Param offset query uint false "The offset of the first Transaction returned. Defaults to 0." @Param limit query int false "Maximum number of Transactions to return. Defaults to 50."

func (Controller) Import

func (co Controller) Import(c *gin.Context)

Import imports a YNAB 4 budget

@Summary		Import
@Description	Imports budgets from YNAB 4. **Please use /v1/import/ynab4, which works exactly the same.**
@Tags			Import
@Accept			multipart/form-data
@Produce		json
@Success		204
@Failure		400			{object}	httperrors.HTTPError
@Failure		500			{object}	httperrors.HTTPError
@Param			file		formData	file	true	"File to import"
@Param			budgetName	query		string	false	"Name of the Budget to create"
@Router			/v1/import [post]
@Deprecated		true

func (Controller) ImportYnab4

func (co Controller) ImportYnab4(c *gin.Context)

ImportYnab4 imports a YNAB 4 budget

@Summary		Import YNAB 4 budget
@Description	Imports budgets from YNAB 4
@Tags			Import
@Accept			multipart/form-data
@Produce		json
@Success		201			{object}	BudgetResponse
@Failure		400			{object}	httperrors.HTTPError
@Failure		500			{object}	httperrors.HTTPError
@Param			file		formData	file	true	"File to import"
@Param			budgetName	query		string	false	"Name of the Budget to create"
@Router			/v1/import/ynab4 [post]
@Deprecated		true

func (Controller) ImportYnab4V3 added in v3.11.0

func (co Controller) ImportYnab4V3(c *gin.Context)

@Summary Import YNAB 4 budget @Description Imports budgets from YNAB 4 @Tags Import @Accept multipart/form-data @Produce json @Success 201 {object} BudgetResponseV3 @Failure 400 {object} BudgetResponseV3 @Failure 500 {object} BudgetResponseV3 @Param file formData file true "File to import" @Param budgetName query string false "Name of the Budget to create" @Router /v3/import/ynab4 [post]

func (Controller) ImportYnabImportPreview

func (co Controller) ImportYnabImportPreview(c *gin.Context)

ImportYnabImportPreview parses a YNAB import format CSV and returns a preview of transactions to be imported into Envelope Zero.

@Summary		Transaction Import Preview
@Description	Returns a preview of transactions to be imported after parsing a YNAB Import format csv file
@Tags			Import
@Accept			multipart/form-data
@Produce		json
@Success		200			{object}	ImportPreviewList
@Failure		400			{object}	httperrors.HTTPError
@Failure		404			{object}	httperrors.HTTPError
@Failure		500			{object}	httperrors.HTTPError
@Param			file		formData	file	true	"File to import"
@Param			accountId	query		string	false	"ID of the account to import transactions for"
@Router			/v1/import/ynab-import-preview [post]
@Deprecated		true

func (Controller) ImportYnabImportPreviewV3 added in v3.11.0

func (co Controller) ImportYnabImportPreviewV3(c *gin.Context)

@Summary Transaction Import Preview @Description Returns a preview of transactions to be imported after parsing a YNAB Import format csv file @Tags Import @Accept multipart/form-data @Produce json @Success 200 {object} ImportPreviewListV3 @Failure 400 {object} ImportPreviewListV3 @Failure 404 {object} ImportPreviewListV3 @Failure 500 {object} ImportPreviewListV3 @Param file formData file true "File to import" @Param accountId query string false "ID of the account to import transactions for" @Router /v3/import/ynab-import-preview [post]

func (Controller) OptionsAccountDetail

func (co Controller) OptionsAccountDetail(c *gin.Context)

OptionsAccountDetail returns the allowed HTTP verbs

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			Accounts
@Success		204
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v1/accounts/{id} [options]
@Deprecated		true

func (Controller) OptionsAccountDetailV3 added in v3.14.0

func (co Controller) OptionsAccountDetailV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Accounts @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v3/accounts/{id} [options].

func (Controller) OptionsAccountList

func (co Controller) OptionsAccountList(c *gin.Context)

OptionsAccountList returns the allowed HTTP verbs

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			Accounts
@Success		204
@Router			/v1/accounts [options]
@Deprecated		true

func (Controller) OptionsAccountListV2 added in v3.2.0

func (co Controller) OptionsAccountListV2(c *gin.Context)

OptionsAccountList returns the allowed HTTP verbs

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			Accounts
@Success		204
@Router			/v2/accounts [options]
@Deprecated		true

func (Controller) OptionsAccountListV3 added in v3.14.0

func (co Controller) OptionsAccountListV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Accounts @Success 204 @Router /v3/accounts [options].

func (Controller) OptionsAllocationDetail

func (co Controller) OptionsAllocationDetail(c *gin.Context)

OptionsAllocationDetail returns the allowed HTTP verbs

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			Allocations
@Success		204
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v1/allocations/{id} [options]
@Deprecated		true

func (Controller) OptionsAllocationList

func (co Controller) OptionsAllocationList(c *gin.Context)

OptionsAllocationList returns the allowed HTTP verbs

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			Allocations
@Success		204
@Router			/v1/allocations [options]
@Deprecated		true

func (Controller) OptionsBudgetDetail

func (co Controller) OptionsBudgetDetail(c *gin.Context)

OptionsBudgetDetail returns the allowed HTTP methods

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			Budgets
@Success		204
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v1/budgets/{id} [options]
@Deprecated		true

func (Controller) OptionsBudgetDetailV3 added in v3.12.0

func (co Controller) OptionsBudgetDetailV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Budgets @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v3/budgets/{id} [options]

func (Controller) OptionsBudgetList

func (co Controller) OptionsBudgetList(c *gin.Context)

OptionsBudgetList returns the allowed HTTP methods

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			Budgets
@Success		204
@Router			/v1/budgets [options]
@Deprecated		true

func (Controller) OptionsBudgetListV3 added in v3.12.0

func (co Controller) OptionsBudgetListV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Budgets @Success 204 @Router /v3/budgets [options]

func (Controller) OptionsBudgetMonth

func (co Controller) OptionsBudgetMonth(c *gin.Context)

OptionsBudgetMonth returns the allowed HTTP methods

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs. **Use OPTIONS /month endpoint with month and budgetId query parameters instead.**
@Tags			Budgets
@Success		204
@Failure		400		{object}	httperrors.HTTPError
@Failure		404		{object}	httperrors.HTTPError
@Failure		500		{object}	httperrors.HTTPError
@Param			id		path		string	true	"ID formatted as string"
@Param			month	path		string	true	"The month in YYYY-MM format"
@Router			/v1/budgets/{id}/{month} [options]
@Deprecated		true

func (Controller) OptionsBudgetMonthAllocations

func (co Controller) OptionsBudgetMonthAllocations(c *gin.Context)

OptionsBudgetMonthAllocations returns the allowed HTTP methods

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs. **Use OPTIONS /month endpoint with month and budgetId query parameters instead.**
@Tags			Budgets
@Success		204
@Failure		400		{object}	httperrors.HTTPError
@Failure		404		{object}	httperrors.HTTPError
@Failure		500		{object}	httperrors.HTTPError
@Param			id		path		string	true	"ID formatted as string"
@Param			month	path		string	true	"The month in YYYY-MM format"
@Router			/v1/budgets/{id}/{month}/allocations [options]
@Deprecated		true

func (Controller) OptionsCategoryDetail

func (co Controller) OptionsCategoryDetail(c *gin.Context)

OptionsCategoryDetail returns the allowed HTTP methods

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			Categories
@Success		204
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v1/categories/{id} [options]
@Deprecated		true

func (Controller) OptionsCategoryDetailV3 added in v3.16.0

func (co Controller) OptionsCategoryDetailV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Categories @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v3/categories/{id} [options]

func (Controller) OptionsCategoryList

func (co Controller) OptionsCategoryList(c *gin.Context)

OptionsCategoryList returns the allowed HTTP methods

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			Categories
@Success		204
@Router			/v1/categories [options]
@Deprecated		true

func (Controller) OptionsCategoryListV3 added in v3.16.0

func (co Controller) OptionsCategoryListV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Categories @Success 204 @Router /v3/categories [options]

func (Controller) OptionsEnvelopeDetail

func (co Controller) OptionsEnvelopeDetail(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Envelopes @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v1/envelopes/{id} [options] @Deprecated true

func (Controller) OptionsEnvelopeDetailV3 added in v3.15.0

func (co Controller) OptionsEnvelopeDetailV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Envelopes @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v3/envelopes/{id} [options]

func (Controller) OptionsEnvelopeList

func (co Controller) OptionsEnvelopeList(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Envelopes @Success 204 @Router /v1/envelopes [options] @Deprecated true

func (Controller) OptionsEnvelopeListV3 added in v3.15.0

func (co Controller) OptionsEnvelopeListV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Envelopes @Success 204 @Router /v3/envelopes [options]

func (Controller) OptionsGoalDetailV3 added in v3.21.0

func (co Controller) OptionsGoalDetailV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Goals @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v3/goals/{id} [options]

func (Controller) OptionsGoalsV3 added in v3.21.0

func (co Controller) OptionsGoalsV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Goals @Success 204 @Router /v3/goals [options]

func (Controller) OptionsHealthz added in v3.3.0

func (co Controller) OptionsHealthz(c *gin.Context)

OptionsHealthz returns the allowed HTTP verbs

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			General
@Success		204
@Router			/healthz [options]

func (Controller) OptionsImport

func (co Controller) OptionsImport(c *gin.Context)

OptionsImport returns the allowed HTTP methods

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs. **Please use /v1/import/ynab4, which works exactly the same.**
@Tags			Import
@Success		204
@Router			/v1/import [options]
@Deprecated		true

func (Controller) OptionsImportV3 added in v3.11.0

func (co Controller) OptionsImportV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs. @Tags Import @Success 204 @Router /v3/import [options]

func (Controller) OptionsImportYnab4

func (co Controller) OptionsImportYnab4(c *gin.Context)

OptionsImportYnab4 returns the allowed HTTP methods

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			Import
@Success		204
@Router			/v1/import/ynab4 [options]
@Deprecated		true

func (Controller) OptionsImportYnab4V3 added in v3.11.0

func (co Controller) OptionsImportYnab4V3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Import @Success 204 @Router /v3/import/ynab4 [options]

func (Controller) OptionsImportYnabImportPreview

func (co Controller) OptionsImportYnabImportPreview(c *gin.Context)

OptionsImportYnab4 returns the allowed HTTP methods

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			Import
@Success		204
@Router			/v1/import/ynab-import-preview [options]
@Deprecated		true

func (Controller) OptionsImportYnabImportPreviewV3 added in v3.11.0

func (co Controller) OptionsImportYnabImportPreviewV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Import @Success 204 @Router /v3/import/ynab-import-preview [options]

func (Controller) OptionsMatchRuleDetail added in v3.1.2

func (co Controller) OptionsMatchRuleDetail(c *gin.Context)

OptionsMatchRuleDetail returns the allowed HTTP verbs

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			MatchRules
@Success		204
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v2/match-rules/{id} [options]
@Deprecated		true

func (Controller) OptionsMatchRuleDetailV3 added in v3.10.0

func (co Controller) OptionsMatchRuleDetailV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags MatchRules @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v3/match-rules/{id} [options]

func (Controller) OptionsMatchRuleList added in v3.1.2

func (co Controller) OptionsMatchRuleList(c *gin.Context)

OptionsMatchRuleList returns the allowed HTTP verbs

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			MatchRules
@Success		204
@Router			/v2/match-rules [options]
@Deprecated		true

func (Controller) OptionsMatchRuleListV3 added in v3.10.0

func (co Controller) OptionsMatchRuleListV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags MatchRules @Success 204 @Router /v3/match-rules [options]

func (Controller) OptionsMonth

func (co Controller) OptionsMonth(c *gin.Context)

OptionsMonth returns the allowed HTTP methods

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs.
@Tags			Months
@Success		204
@Router			/v1/months [options]
@Deprecated		true

func (Controller) OptionsMonthConfigDetail

func (co Controller) OptionsMonthConfigDetail(c *gin.Context)

OptionsMonthConfigDetail returns the allowed HTTP methods

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			MonthConfigs
@Success		204
@Failure		400		{object}	httperrors.HTTPError
@Failure		404		{object}	httperrors.HTTPError
@Failure		500		{object}	httperrors.HTTPError
@Param			id		path		string	true	"ID of the Envelope"
@Param			month	path		string	true	"The month in YYYY-MM format"
@Router			/v1/month-configs/{id}/{month} [options]
@Deprecated		true

func (Controller) OptionsMonthConfigDetailV3 added in v3.17.0

func (co Controller) OptionsMonthConfigDetailV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Envelopes @Success 204 @Failure 400 {object} httperrors.HTTPError @Param id path string true "ID of the Envelope" @Param month path string true "The month in YYYY-MM format" @Router /v3/envelopes/{id}/{month} [options]

func (Controller) OptionsMonthConfigList

func (co Controller) OptionsMonthConfigList(c *gin.Context)

OptionsMonthConfigList returns the allowed HTTP methods

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs.
@Tags			MonthConfigs
@Success		204
@Router			/v1/month-configs [options]
@Deprecated		true

func (Controller) OptionsMonthV3 added in v3.19.0

func (co Controller) OptionsMonthV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs. @Tags Months @Success 204 @Router /v3/months [options]

func (Controller) OptionsRenameRuleDetail

func (co Controller) OptionsRenameRuleDetail(c *gin.Context)

OptionsRenameRuleDetail returns the allowed HTTP verbs

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			RenameRules
@Success		204
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v2/rename-rules/{id} [options]
@Deprecated		true

func (Controller) OptionsRenameRuleList

func (co Controller) OptionsRenameRuleList(c *gin.Context)

OptionsRenameRuleList returns the allowed HTTP verbs

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			RenameRules
@Success		204
@Router			/v2/rename-rules [options]
@Deprecated		true

func (Controller) OptionsTransactionDetail

func (co Controller) OptionsTransactionDetail(c *gin.Context)

OptionsTransactionDetail returns the allowed HTTP methods

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			Transactions
@Success		204
@Failure		400	{object}	httperrors.HTTPError
@Failure		404	{object}	httperrors.HTTPError
@Failure		500	{object}	httperrors.HTTPError
@Param			id	path		string	true	"ID formatted as string"
@Router			/v1/transactions/{id} [options]
@Deprecated		true

func (Controller) OptionsTransactionDetailV3 added in v3.7.0

func (co Controller) OptionsTransactionDetailV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Transactions @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Router /v3/transactions/{id} [options]

func (Controller) OptionsTransactionList

func (co Controller) OptionsTransactionList(c *gin.Context)

OptionsTransactionList returns the allowed HTTP methods

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			Transactions
@Success		204
@Router			/v1/transactions [options]
@Deprecated		true

func (Controller) OptionsTransactionsV2

func (co Controller) OptionsTransactionsV2(c *gin.Context)

OptionsTransactionsV2 returns the allowed HTTP methods

@Summary		Allowed HTTP verbs
@Description	Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
@Tags			Transactions
@Success		204
@Router			/v2/transactions [options]
@Deprecated		true

func (Controller) OptionsTransactionsV3 added in v3.5.0

func (co Controller) OptionsTransactionsV3(c *gin.Context)

@Summary Allowed HTTP verbs @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs @Tags Transactions @Success 204 @Router /v3/transactions [options]

func (Controller) RegisterAccountRoutes

func (co Controller) RegisterAccountRoutes(r *gin.RouterGroup)

RegisterAccountRoutes registers the routes for accounts with the RouterGroup that is passed.

func (Controller) RegisterAccountRoutesV2 added in v3.2.0

func (co Controller) RegisterAccountRoutesV2(r *gin.RouterGroup)

RegisterAccountRoutes registers the routes for accounts with the RouterGroup that is passed.

func (Controller) RegisterAccountRoutesV3 added in v3.14.0

func (co Controller) RegisterAccountRoutesV3(r *gin.RouterGroup)

RegisterAccountRoutesV3 registers the routes for accounts with the RouterGroup that is passed.

func (Controller) RegisterAllocationRoutes

func (co Controller) RegisterAllocationRoutes(r *gin.RouterGroup)

RegisterAllocationRoutes registers the routes for allocations with the RouterGroup that is passed.

func (Controller) RegisterBudgetRoutes

func (co Controller) RegisterBudgetRoutes(r *gin.RouterGroup)

RegisterBudgetRoutes registers the routes for budgets with the RouterGroup that is passed.

func (Controller) RegisterBudgetRoutesV3 added in v3.12.0

func (co Controller) RegisterBudgetRoutesV3(r *gin.RouterGroup)

RegisterBudgetRoutesV3 registers the routes for Budgets with the RouterGroup that is passed.

func (Controller) RegisterCategoryRoutes

func (co Controller) RegisterCategoryRoutes(r *gin.RouterGroup)

RegisterCategoryRoutes registers the routes for categories with the RouterGroup that is passed.

func (Controller) RegisterCategoryRoutesV3 added in v3.16.0

func (co Controller) RegisterCategoryRoutesV3(r *gin.RouterGroup)

RegisterCategoryRoutesV3 registers the routes for categories with the RouterGroup that is passed.

func (Controller) RegisterEnvelopeRoutes

func (co Controller) RegisterEnvelopeRoutes(r *gin.RouterGroup)

RegisterEnvelopeRoutes registers the routes for envelopes with the RouterGroup that is passed.

func (Controller) RegisterEnvelopeRoutesV3 added in v3.15.0

func (co Controller) RegisterEnvelopeRoutesV3(r *gin.RouterGroup)

RegisterEnvelopeRoutes registers the routes for envelopes with the RouterGroup that is passed.

func (Controller) RegisterGoalRoutesV3 added in v3.21.0

func (co Controller) RegisterGoalRoutesV3(r *gin.RouterGroup)

func (Controller) RegisterHealthzRoutes added in v3.3.0

func (co Controller) RegisterHealthzRoutes(r *gin.RouterGroup)

RegisterHealthzRoutes registers the routes for the healthz endpoint.

func (Controller) RegisterImportRoutes

func (co Controller) RegisterImportRoutes(r *gin.RouterGroup)

RegisterImportRoutes registers the routes for imports.

func (Controller) RegisterImportRoutesV3 added in v3.11.0

func (co Controller) RegisterImportRoutesV3(r *gin.RouterGroup)

RegisterImportRoutes registers the routes for imports.

func (Controller) RegisterMatchRuleRoutes added in v3.1.2

func (co Controller) RegisterMatchRuleRoutes(r *gin.RouterGroup)

RegisterMatchRuleRoutes registers the routes for matchRules with the RouterGroup that is passed.

func (Controller) RegisterMatchRuleRoutesV3 added in v3.10.0

func (co Controller) RegisterMatchRuleRoutesV3(r *gin.RouterGroup)

RegisterMatchRuleRoutesV3 registers the routes for matchRules with the RouterGroup that is passed.

func (Controller) RegisterMonthConfigRoutes

func (co Controller) RegisterMonthConfigRoutes(r *gin.RouterGroup)

RegisterMonthConfigRoutes registers the routes for transactions with the RouterGroup that is passed.

func (Controller) RegisterMonthConfigRoutesV3 added in v3.17.0

func (co Controller) RegisterMonthConfigRoutesV3(r *gin.RouterGroup)

RegisterMonthConfigRoutesV3 registers the routes for transactions with the RouterGroup that is passed.

func (Controller) RegisterMonthRoutes

func (co Controller) RegisterMonthRoutes(r *gin.RouterGroup)

RegisterMonthRoutes registers the routes for months with the RouterGroup that is passed.

func (Controller) RegisterMonthRoutesV3 added in v3.19.0

func (co Controller) RegisterMonthRoutesV3(r *gin.RouterGroup)

RegisterMonthRoutesV3 registers the routes for months with the RouterGroup that is passed.

func (Controller) RegisterRenameRuleRoutes

func (co Controller) RegisterRenameRuleRoutes(r *gin.RouterGroup)

RegisterRenameRuleRoutes registers the routes for renameRules with the RouterGroup that is passed.

func (Controller) RegisterTransactionRoutes

func (co Controller) RegisterTransactionRoutes(r *gin.RouterGroup)

RegisterTransactionRoutes registers the routes for transactions with the RouterGroup that is passed.

func (Controller) RegisterTransactionRoutesV2

func (co Controller) RegisterTransactionRoutesV2(r *gin.RouterGroup)

RegisterTransactionRoutesV2 registers the routes for transactions with the RouterGroup that is passed.

func (Controller) RegisterTransactionRoutesV3 added in v3.5.0

func (co Controller) RegisterTransactionRoutesV3(r *gin.RouterGroup)

RegisterTransactionRoutesV3 registers the routes for transactions with the RouterGroup that is passed.

func (Controller) SetAllocations

func (co Controller) SetAllocations(c *gin.Context)

SetAllocations sets all allocations for a month

@Summary		Set allocations for a month
@Description	Sets allocations for a month for all envelopes that do not have an allocation yet
@Tags			Months
@Success		204
@Failure		400		{object}	httperrors.HTTPError
@Failure		404		{object}	httperrors.HTTPError
@Failure		500		{object}	httperrors.HTTPError
@Param			budget	query		string					true	"ID formatted as string"
@Param			month	query		string					true	"The month in YYYY-MM format"
@Param			mode	body		BudgetAllocationMode	true	"Budget"
@Router			/v1/months [post]
@Deprecated		true

func (Controller) SetAllocationsMonth

func (co Controller) SetAllocationsMonth(c *gin.Context)

SetAllocationsMonth sets all allocations for a specific month

@Summary		Set allocations for a month
@Description	Sets allocations for a month for all envelopes that do not have an allocation yet. **Deprecated. Use POST /month endpoint with month and budgetId query parameters instead.**
@Tags			Budgets
@Success		204
@Failure		400		{object}	httperrors.HTTPError
@Failure		404		{object}	httperrors.HTTPError
@Failure		500		{object}	httperrors.HTTPError
@Param			month	path		string					true	"The month in YYYY-MM format"
@Param			id		path		string					true	"Budget ID formatted as string"
@Param			mode	body		BudgetAllocationMode	true	"Budget"
@Router			/v1/budgets/{id}/{month}/allocations [post]
@Deprecated		true

func (Controller) SetAllocationsV3 added in v3.19.0

func (co Controller) SetAllocationsV3(c *gin.Context)

@Summary Set allocations for a month @Description Sets allocations for a month for all envelopes that do not have an allocation yet @Tags Months @Success 204 @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param budget query string true "ID formatted as string" @Param month query string true "The month in YYYY-MM format" @Param mode body BudgetAllocationMode true "Budget" @Router /v3/months [post]

func (Controller) UpdateAccount

func (co Controller) UpdateAccount(c *gin.Context)

UpdateAccount updates data for a specific account

@Summary		Update account
@Description	Updates an account. Only values to be updated need to be specified.
@Tags			Accounts
@Produce		json
@Success		200		{object}	AccountResponse
@Failure		400		{object}	httperrors.HTTPError
@Failure		404		{object}	httperrors.HTTPError
@Failure		500		{object}	httperrors.HTTPError
@Param			id		path		string					true	"ID formatted as string"
@Param			account	body		models.AccountCreate	true	"Account"
@Router			/v1/accounts/{id} [patch]
@Deprecated		true

func (Controller) UpdateAccountV3 added in v3.14.0

func (co Controller) UpdateAccountV3(c *gin.Context)

@Summary Update account @Description Updates an account. Only values to be updated need to be specified. @Tags Accounts @Produce json @Success 200 {object} AccountResponseV3 @Failure 400 {object} AccountResponseV3 @Failure 404 {object} AccountResponseV3 @Failure 500 {object} AccountResponseV3 @Param id path string true "ID formatted as string" @Param account body AccountCreateV3 true "Account" @Router /v3/accounts/{id} [patch]

func (Controller) UpdateAllocation

func (co Controller) UpdateAllocation(c *gin.Context)

UpdateAllocation updates allocation data

@Summary		Update allocation
@Description	Update an allocation. Only values to be updated need to be specified.
@Tags			Allocations
@Accept			json
@Produce		json
@Success		200			{object}	AllocationResponse
@Failure		400			{object}	httperrors.HTTPError
@Failure		404			{object}	httperrors.HTTPError
@Failure		500			{object}	httperrors.HTTPError
@Param			id			path		string					true	"ID formatted as string"
@Param			allocation	body		models.AllocationCreate	true	"Allocation"
@Router			/v1/allocations/{id} [patch]
@Deprecated		true

func (Controller) UpdateBudget

func (co Controller) UpdateBudget(c *gin.Context)

UpdateBudget updates data for a budget

@Summary		Update budget
@Description	Update an existing budget. Only values to be updated need to be specified.
@Tags			Budgets
@Accept			json
@Produce		json
@Success		200		{object}	BudgetResponse
@Failure		400		{object}	httperrors.HTTPError
@Failure		404		{object}	httperrors.HTTPError
@Failure		500		{object}	httperrors.HTTPError
@Param			id		path		string				true	"ID formatted as string"
@Param			budget	body		models.BudgetCreate	true	"Budget"
@Router			/v1/budgets/{id} [patch]
@Deprecated		true

func (Controller) UpdateBudgetV3 added in v3.12.0

func (co Controller) UpdateBudgetV3(c *gin.Context)

@Summary Update budget @Description Update an existing budget. Only values to be updated need to be specified. @Tags Budgets @Accept json @Produce json @Success 200 {object} BudgetResponseV3 @Failure 400 {object} BudgetResponseV3 @Failure 404 {object} BudgetResponseV3 @Failure 500 {object} BudgetResponseV3 @Param id path string true "ID formatted as string" @Param budget body models.BudgetCreate true "Budget" @Router /v3/budgets/{id} [patch]

func (Controller) UpdateCategory

func (co Controller) UpdateCategory(c *gin.Context)

UpdateCategory updates data for a specific category

@Summary		Update category
@Description	Update an existing category. Only values to be updated need to be specified.
@Tags			Categories
@Accept			json
@Produce		json
@Success		200			{object}	CategoryResponse
@Failure		400			{object}	httperrors.HTTPError
@Failure		404			{object}	httperrors.HTTPError
@Failure		500			{object}	httperrors.HTTPError
@Param			id			path		string					true	"ID formatted as string"
@Param			category	body		models.CategoryCreate	true	"Category"
@Router			/v1/categories/{id} [patch]
@Deprecated		true

func (Controller) UpdateCategoryV3 added in v3.16.0

func (co Controller) UpdateCategoryV3(c *gin.Context)

@Summary Update category @Description Update an existing category. Only values to be updated need to be specified. @Tags Categories @Accept json @Produce json @Success 200 {object} CategoryResponseV3 @Failure 400 {object} CategoryResponseV3 @Failure 404 {object} CategoryResponseV3 @Failure 500 {object} CategoryResponseV3 @Param id path string true "ID formatted as string" @Param category body CategoryCreateV3 true "Category" @Router /v3/categories/{id} [patch]

func (Controller) UpdateEnvelope

func (co Controller) UpdateEnvelope(c *gin.Context)

@Summary Update envelope @Description Updates an existing envelope. Only values to be updated need to be specified. @Tags Envelopes @Accept json @Produce json @Success 200 {object} EnvelopeResponse @Failure 400 {object} httperrors.HTTPError @Failure 404 {object} httperrors.HTTPError @Failure 500 {object} httperrors.HTTPError @Param id path string true "ID formatted as string" @Param envelope body models.EnvelopeCreate true "Envelope" @Router /v1/envelopes/{id} [patch] @Deprecated true

func (Controller) UpdateEnvelopeV3 added in v3.15.0

func (co Controller) UpdateEnvelopeV3(c *gin.Context)

@Summary Update envelope @Description Updates an existing envelope. Only values to be updated need to be specified. @Tags Envelopes @Accept json @Produce json @Success 200 {object} EnvelopeResponseV3 @Failure 400 {object} EnvelopeResponseV3 @Failure 404 {object} EnvelopeResponseV3 @Failure 500 {object} EnvelopeResponseV3 @Param id path string true "ID formatted as string" @Param envelope body controllers.EnvelopeCreateV3 true "Envelope" @Router /v3/envelopes/{id} [patch]

func (Controller) UpdateGoalV3 added in v3.21.0

func (co Controller) UpdateGoalV3(c *gin.Context)

@Summary Update goal @Description Updates an existing goal. Only values to be updated need to be specified. @Tags Goals @Accept json @Produce json @Success 200 {object} GoalResponseV3 @Failure 400 {object} GoalResponseV3 @Failure 404 {object} GoalResponseV3 @Failure 500 {object} GoalResponseV3 @Param id path string true "ID formatted as string" @Param goal body GoalV3Editable true "Goal" @Router /v3/goals/{id} [patch]

func (Controller) UpdateMatchRule added in v3.1.2

func (co Controller) UpdateMatchRule(c *gin.Context)

UpdateMatchRule updates matchRule data

@Summary		Update matchRule
@Description	Update an matchRule. Only values to be updated need to be specified.
@Tags			MatchRules
@Accept			json
@Produce		json
@Success		200			{object}	models.MatchRule
@Failure		400			{object}	httperrors.HTTPError
@Failure		404			{object}	httperrors.HTTPError
@Failure		500			{object}	httperrors.HTTPError
@Param			id			path		string					true	"ID formatted as string"
@Param			matchRule	body		models.MatchRuleCreate	true	"MatchRule"
@Router			/v2/match-rules/{id} [patch]
@Deprecated		true

func (Controller) UpdateMatchRuleV3 added in v3.10.0

func (co Controller) UpdateMatchRuleV3(c *gin.Context)

@Summary Update matchRule @Description Update a matchRule. Only values to be updated need to be specified. @Tags MatchRules @Accept json @Produce json @Success 200 {object} MatchRuleResponseV3 @Failure 400 {object} MatchRuleResponseV3 @Failure 404 {object} MatchRuleResponseV3 @Failure 500 {object} MatchRuleResponseV3 @Param id path string true "ID formatted as string" @Param matchRule body models.MatchRuleCreate true "MatchRule" @Router /v3/match-rules/{id} [patch]

func (Controller) UpdateMonthConfig

func (co Controller) UpdateMonthConfig(c *gin.Context)

UpdateMonthConfig updates configuration data for a specific envelope and month

@Summary		Update MonthConfig
@Description	Changes settings of an existing MonthConfig
@Tags			MonthConfigs
@Produce		json
@Success		201			{object}	MonthConfigResponse
@Failure		400			{object}	httperrors.HTTPError
@Failure		404			{object}	httperrors.HTTPError
@Failure		500			{object}	httperrors.HTTPError
@Param			id			path		string						true	"ID of the Envelope"
@Param			month		path		string						true	"The month in YYYY-MM format"
@Param			monthConfig	body		models.MonthConfigCreate	true	"MonthConfig"
@Router			/v1/month-configs/{id}/{month} [patch]
@Deprecated		true

func (Controller) UpdateMonthConfigV3 added in v3.17.0

func (co Controller) UpdateMonthConfigV3(c *gin.Context)

@Summary Update MonthConfig @Description Changes configuration for a Month. If there is no configuration for the month yet, this endpoint transparently creates a configuration resource. @Tags Envelopes @Produce json @Success 201 {object} MonthConfigResponseV3 @Failure 400 {object} MonthConfigResponseV3 @Failure 404 {object} MonthConfigResponseV3 @Failure 500 {object} MonthConfigResponseV3 @Param id path string true "ID of the Envelope" @Param month path string true "The month in YYYY-MM format" @Param monthConfig body MonthConfigCreateV3 true "MonthConfig" @Router /v3/envelopes/{id}/{month} [patch]

func (Controller) UpdateRenameRule

func (co Controller) UpdateRenameRule(c *gin.Context)

UpdateRenameRule updates renameRule data

@Summary		Update renameRule
@Description	Update an renameRule. Only values to be updated need to be specified.
@Tags			RenameRules
@Accept			json
@Produce		json
@Success		200	{object}	RenameRuleResponse
@Failure		400	{object}	httperrors.HTTPError
@Failure		404
@Failure		500			{object}	httperrors.HTTPError
@Param			id			path		string					true	"ID formatted as string"
@Param			renameRule	body		models.MatchRuleCreate	true	"RenameRule"
@Router			/v2/rename-rules/{id} [patch]
@Deprecated		true

func (Controller) UpdateTransaction

func (co Controller) UpdateTransaction(c *gin.Context)

UpdateTransaction updates a specific transaction

@Summary		Update transaction
@Description	Updates an existing transaction. Only values to be updated need to be specified.
@Tags			Transactions
@Accept			json
@Produce		json
@Success		200			{object}	TransactionResponse
@Failure		400			{object}	httperrors.HTTPError
@Failure		404			{object}	httperrors.HTTPError
@Failure		500			{object}	httperrors.HTTPError
@Param			id			path		string						true	"ID formatted as string"
@Param			transaction	body		models.TransactionCreate	true	"Transaction"
@Router			/v1/transactions/{id} [patch]
@Deprecated		true

func (Controller) UpdateTransactionV3 added in v3.8.0

func (co Controller) UpdateTransactionV3(c *gin.Context)

@Summary Update transaction @Description Updates an existing transaction. Only values to be updated need to be specified. @Tags Transactions @Accept json @Produce json @Success 200 {object} TransactionResponseV3 @Failure 400 {object} TransactionResponseV3 @Failure 404 {object} TransactionResponseV3 @Failure 500 {object} TransactionResponseV3 @Param id path string true "ID formatted as string" @Param transaction body models.TransactionCreate true "Transaction" @Router /v3/transactions/{id} [patch]

type Envelope added in v3.3.4

type Envelope struct {
	models.Envelope
	Links struct {
		Self         string `json:"self" example:"https://example.com/api/v1/envelopes/45b6b5b9-f746-4ae9-b77b-7688b91f8166"`                     // The envelope itself
		Allocations  string `json:"allocations" example:"https://example.com/api/v1/allocations?envelope=45b6b5b9-f746-4ae9-b77b-7688b91f8166"`   // the envelope's allocations
		Month        string `json:"month" example:"https://example.com/api/v1/envelopes/45b6b5b9-f746-4ae9-b77b-7688b91f8166/YYYY-MM"`            // Month information endpoint. This will always end in 'YYYY-MM' for clients to use replace with actual numbers.
		Transactions string `json:"transactions" example:"https://example.com/api/v1/transactions?envelope=45b6b5b9-f746-4ae9-b77b-7688b91f8166"` // The envelope's transactions
	} `json:"links"` // Links to related resources
}

type EnvelopeCreateResponseV3 added in v3.15.0

type EnvelopeCreateResponseV3 struct {
	Data  []EnvelopeResponseV3 `json:"data"`                                                          // Data for the Envelope
	Error *string              `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
}

type EnvelopeCreateV3 added in v3.19.1

type EnvelopeCreateV3 struct {
	Name       string    `json:"name" gorm:"uniqueIndex:envelope_category_name" example:"Groceries" default:""`                       // Name of the envelope
	CategoryID uuid.UUID `json:"categoryId" gorm:"uniqueIndex:envelope_category_name" example:"878c831f-af99-4a71-b3ca-80deb7d793c1"` // ID of the category the envelope belongs to
	Note       string    `json:"note" example:"For stuff bought at supermarkets and drugstores" default:""`                           // Notes about the envelope
	Archived   bool      `json:"archived" example:"true" default:"false"`                                                             // Is the envelope hidden?
}

EnvelopeCreateV3 represents all user configurable parameters

func (EnvelopeCreateV3) ToCreate added in v3.19.1

func (e EnvelopeCreateV3) ToCreate() models.EnvelopeCreate

ToCreate transforms the API representation into the model representation

type EnvelopeListResponse

type EnvelopeListResponse struct {
	Data []Envelope `json:"data"` // List of Envelopes
}

type EnvelopeListResponseV3 added in v3.15.0

type EnvelopeListResponseV3 struct {
	Data       []EnvelopeV3 `json:"data"`                                                          // List of Envelopes
	Error      *string      `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
	Pagination *Pagination  `json:"pagination"`                                                    // Pagination information
}

type EnvelopeMonthResponse

type EnvelopeMonthResponse struct {
	Data models.EnvelopeMonth `json:"data"` // Data for the month for the envelope
}

type EnvelopeMonthResponseV3 added in v3.15.0

type EnvelopeMonthResponseV3 struct {
	Data  *models.EnvelopeMonth `json:"data"`                                                          // Data for the month for the envelope
	Error *string               `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
}

type EnvelopeMonthV3 added in v3.19.0

type EnvelopeMonthV3 struct {
	models.Envelope
	Spent      decimal.Decimal `json:"spent" example:"73.12"`      // The amount spent over the whole month
	Balance    decimal.Decimal `json:"balance" example:"12.32"`    // The balance at the end of the monht
	Allocation decimal.Decimal `json:"allocation" example:"85.44"` // The amount of money allocated
	Links      EnvelopeV3Links `json:"links"`
}

EnvelopeMonthV3 contains data about an Envelope for a specific month.

type EnvelopeQueryFilter

type EnvelopeQueryFilter struct {
	Name       string `form:"name" filterField:"false"`   // By name
	CategoryID string `form:"category"`                   // By the ID of the category
	Note       string `form:"note" filterField:"false"`   // By the note
	Hidden     bool   `form:"hidden"`                     // Is the envelope archived?
	Search     string `form:"search" filterField:"false"` // By string in name or note
}

func (EnvelopeQueryFilter) ToCreate

type EnvelopeQueryFilterV3 added in v3.15.0

type EnvelopeQueryFilterV3 struct {
	Name       string `form:"name" filterField:"false"`     // By name
	CategoryID string `form:"category"`                     // By the ID of the category
	Note       string `form:"note" filterField:"false"`     // By the note
	Archived   bool   `form:"archived" filterField:"false"` // Is the envelope archived?
	Search     string `form:"search" filterField:"false"`   // By string in name or note
	Offset     uint   `form:"offset" filterField:"false"`   // The offset of the first Envelope returned. Defaults to 0.
	Limit      int    `form:"limit" filterField:"false"`    // Maximum number of Envelopes to return. Defaults to 50.
}

func (EnvelopeQueryFilterV3) ToCreate added in v3.15.0

type EnvelopeResponse

type EnvelopeResponse struct {
	Data Envelope `json:"data"` // Data for the Envelope
}

type EnvelopeResponseV3 added in v3.15.0

type EnvelopeResponseV3 struct {
	Data  *EnvelopeV3 `json:"data"`                                                          // Data for the Envelope
	Error *string     `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
}

type EnvelopeV3 added in v3.15.0

type EnvelopeV3 struct {
	models.Envelope
	Links  EnvelopeV3Links `json:"links"`            // Links to related resources
	Hidden bool            `json:"hidden,omitempty"` // Remove the hidden field
}
type EnvelopeV3Links struct {
	Self         string `json:"self" example:"https://example.com/api/v3/envelopes/45b6b5b9-f746-4ae9-b77b-7688b91f8166"`                     // The envelope itself
	Transactions string `json:"transactions" example:"https://example.com/api/v3/transactions?envelope=45b6b5b9-f746-4ae9-b77b-7688b91f8166"` // The envelope's transactions
	Month        string `json:"month" example:"https://example.com/api/v3/envelopes/45b6b5b9-f746-4ae9-b77b-7688b91f8166/YYYY-MM"`            // The MonthConfig for the envelope
}

type GoalCreateResponseV3 added in v3.21.0

type GoalCreateResponseV3 struct {
	Error *string          `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
	Data  []GoalResponseV3 `json:"data"`                                                          // List of created resources
}

type GoalListResponseV3 added in v3.21.0

type GoalListResponseV3 struct {
	Data       []GoalV3    `json:"data"`                                                          // List of resources
	Error      *string     `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
	Pagination *Pagination `json:"pagination"`                                                    // Pagination information
}

type GoalQueryFilterV3 added in v3.21.0

type GoalQueryFilterV3 struct {
	Name              string          `form:"name" filterField:"false"`              // By name
	Note              string          `form:"note" filterField:"false"`              // By the note
	Search            string          `form:"search" filterField:"false"`            // By string in name or note
	Archived          bool            `form:"archived"`                              // Is the goal archived?
	EnvelopeID        string          `form:"envelope"`                              // ID of the envelope
	Month             string          `form:"month"`                                 // Exact month
	FromMonth         string          `form:"fromMonth" filterField:"false"`         // From this month
	UntilMonth        string          `form:"untilMonth" filterField:"false"`        // Until this month
	Amount            decimal.Decimal `form:"amount"`                                // Exact amount
	AmountLessOrEqual decimal.Decimal `form:"amountLessOrEqual" filterField:"false"` // Amount less than or equal to this
	AmountMoreOrEqual decimal.Decimal `form:"amountMoreOrEqual" filterField:"false"` // Amount more than or equal to this
	Offset            uint            `form:"offset" filterField:"false"`            // The offset of the first goal returned. Defaults to 0.
	Limit             int             `form:"limit" filterField:"false"`             // Maximum number of goals to return. Defaults to 50.
}

type GoalResponseV3 added in v3.21.0

type GoalResponseV3 struct {
	Error *string `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
	Data  *GoalV3 `json:"data"`                                                          // The resource
}

type GoalV3 added in v3.21.0

type GoalV3 struct {
	models.DefaultModel
	GoalV3Editable
	Links GoalV3Links `json:"links"`
}

type GoalV3Editable added in v3.21.0

type GoalV3Editable struct {
	Name       string          `json:"name" example:"New TV" default:""`                                     // Name of the goal
	Note       string          `json:"note" example:"We want to replace the old CRT TV soon-ish" default:""` // Note about the goal
	EnvelopeID uuid.UUID       `json:"envelopeId" example:"f81566d9-af4d-4f13-9830-c62c4b5e4c7e"`            // The ID of the envelope this goal is for
	Amount     decimal.Decimal `json:"amount" example:"127" default:"0"`                                     // How much money should be saved for this goal?
	Month      types.Month     `json:"month" example:"2024-07-01T00:00:00.000000Z"`                          // The month the balance of the envelope should be the set amount
	Archived   bool            `json:"archived" example:"true" default:"false"`                              // If this goal is still in use or not
}
type GoalV3Links struct {
	Self     string `json:"self" example:"https://example.com/api/v3/goals/438cc6c0-9baf-49fd-a75a-d76bd5cab19c"`         // The Goal itself
	Envelope string `json:"envelope" example:"https://example.com/api/v3/envelopes/c1a96ae4-80e3-4827-8ed0-c7656f224fee"` // The Envelope this goal references
}

type HealthResponse added in v3.3.0

type HealthResponse struct {
	Error error `json:"error" example:"The database cannot be accessed"`
}

type ImportPreviewList

type ImportPreviewList struct {
	Data []importer.TransactionPreview `json:"data"` // List of transaction previews
}

type ImportPreviewListV3 added in v3.11.0

type ImportPreviewListV3 struct {
	Data  []importer.TransactionPreviewV3 `json:"data"`                                                          // List of transaction previews
	Error *string                         `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred for this Match Rule
}

type ImportPreviewQuery

type ImportPreviewQuery struct {
	AccountID string `form:"accountId" binding:"required"` // ID of the account to import the transactions for
}

type ImportQuery

type ImportQuery struct {
	BudgetName string `form:"budgetName" binding:"required"` // Name for the new budget
}
type ImportV3Links struct {
	Ynab4             string `json:"transactions" example:"https://example.com/api/v3/import/ynab4"`             // URL of YNAB4 import endpoint
	YnabImportPreview string `json:"matchRules" example:"https://example.com/api/v3/import/ynab-import-preview"` // URL of YNAB Import preview endpoint
}

type ImportV3Response added in v3.11.0

type ImportV3Response struct {
	Links ImportV3Links `json:"links"` // Links for the v3 API
}

type MatchRule added in v3.3.4

type MatchRule struct {
	models.MatchRule
	Links struct {
		Self string `json:"self" example:"https://example.com/api/v2/match-rules/95685c82-53c6-455d-b235-f49960b73b21"` // The match rule itself
	} `json:"links"`
}

type MatchRuleCreateResponseV3 added in v3.10.0

type MatchRuleCreateResponseV3 struct {
	Error *string               `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
	Data  []MatchRuleResponseV3 `json:"data"`                                                          // List of created Match Rules
}

type MatchRuleListResponseV3 added in v3.10.0

type MatchRuleListResponseV3 struct {
	Data       []MatchRuleV3 `json:"data"`                                                          // List of Match Rules
	Error      *string       `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
	Pagination *Pagination   `json:"pagination"`                                                    // Pagination information
}

type MatchRuleQueryFilter added in v3.1.2

type MatchRuleQueryFilter struct {
	Priority  uint   `form:"month"`   // By priority
	Match     string `form:"match"`   // By match
	AccountID string `form:"account"` // By ID of the account they map to
}

MatchRuleQueryFilter contains the fields that Match Rules can be filtered with.

func (MatchRuleQueryFilter) Parse added in v3.1.2

Parse returns a models.MatchRuleCreate struct that represents the MatchRuleQueryFilter.

type MatchRuleQueryFilterV3 added in v3.10.0

type MatchRuleQueryFilterV3 struct {
	Priority  uint   `form:"priority"`                   // By priority
	Match     string `form:"match" filterField:"false"`  // By match
	AccountID string `form:"account"`                    // By ID of the Account they map to
	Offset    uint   `form:"offset" filterField:"false"` // The offset of the first Match Rule returned. Defaults to 0.
	Limit     int    `form:"limit" filterField:"false"`  // Maximum number of Match Rules to return. Defaults to 50.
}

MatchRuleQueryFilter contains the fields that Match Rules can be filtered with.

func (MatchRuleQueryFilterV3) Parse added in v3.10.0

Parse returns a models.MatchRuleCreate struct that represents the MatchRuleQueryFilter.

type MatchRuleResponseV3 added in v3.10.0

type MatchRuleResponseV3 struct {
	Error *string      `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred for this Match Rule
	Data  *MatchRuleV3 `json:"data"`                                                          // The Match Rule data, if creation was successful
}

type MatchRuleV3 added in v3.10.0

type MatchRuleV3 struct {
	models.MatchRule
	Links struct {
		Self string `json:"self" example:"https://example.com/api/v3/match-rules/95685c82-53c6-455d-b235-f49960b73b21"` // The match rule itself
	} `json:"links"`
}

MatchRuleV3 is the API representation of a Match Rule.

type MonthConfig added in v3.3.4

type MonthConfig struct {
	models.MonthConfig
	Links struct {
		Self     string `json:"self" example:"https://example.com/api/v1/month-configs/61027ebb-ab75-4a49-9e23-a104ddd9ba6b/2017-10"` // The month config itself
		Envelope string `json:"envelope" example:"https://example.com/api/v1/envelopes/61027ebb-ab75-4a49-9e23-a104ddd9ba6b"`         // The envelope this config belongs to
	} `json:"links"`
}

type MonthConfigCreateV3 added in v3.18.0

type MonthConfigCreateV3 struct {
	Note       string          `json:"note" example:"Added 200€ here because we replaced Tim's expensive vase" default:""`                               // A note for the month config
	Allocation decimal.Decimal `json:"allocation" gorm:"-" example:"22.01" minimum:"0.00000001" maximum:"999999999999.99999999" multipleOf:"0.00000001"` // The maximum value is "999999999999.99999999", swagger unfortunately rounds this.
}

MonthConfigCreateV3 contains the fields relevant for MonthConfigs in APIv3.

func (MonthConfigCreateV3) ToCreate added in v3.18.0

func (m MonthConfigCreateV3) ToCreate() (create models.MonthConfigCreate)

ToCreate is used to transform the API representation into the model representation

type MonthConfigFilter

type MonthConfigFilter struct {
	EnvelopeID uuid.UUID
	Month      types.Month
}

type MonthConfigListResponse

type MonthConfigListResponse struct {
	Data []MonthConfig `json:"data"` // List of month configs
}

type MonthConfigListResponseV3 added in v3.17.0

type MonthConfigListResponseV3 struct {
	Data       []MonthConfigV3 `json:"data"`                                                          // List of Month Configs
	Error      *string         `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
	Pagination *Pagination     `json:"pagination"`                                                    // Pagination information
}

type MonthConfigQueryFilter

type MonthConfigQueryFilter struct {
	EnvelopeID string `form:"envelope"` // By ID of the envelope
	Month      string `form:"month"`    // By month
}

func (MonthConfigQueryFilter) Parse

type MonthConfigResponse

type MonthConfigResponse struct {
	Data MonthConfig `json:"data"` // Data for the month
}

type MonthConfigResponseV3 added in v3.17.0

type MonthConfigResponseV3 struct {
	Data  *MonthConfigV3 `json:"data"`                                                          // Config for the month
	Error *string        `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
}

type MonthConfigV3 added in v3.17.0

type MonthConfigV3 struct {
	models.MonthConfig
	OverspendMode string `json:"overspendMode,omitempty"` // Ignore this. It is here to override the OverspendMode from models.MonthConfigCreate and will be removed with 4.0.0
	Links         struct {
		Self     string `json:"self" example:"https://example.com/api/v3/envelopes/61027ebb-ab75-4a49-9e23-a104ddd9ba6b/2017-10"` // The Month Config itself
		Envelope string `json:"envelope" example:"https://example.com/api/v3/envelopes/61027ebb-ab75-4a49-9e23-a104ddd9ba6b"`     // The Envelope this config belongs to
	} `json:"links"`
}

type MonthResponse

type MonthResponse struct {
	Data models.Month `json:"data"` // Data for the month
}

type MonthResponseV3 added in v3.19.0

type MonthResponseV3 struct {
	Data  *MonthV3 `json:"data"`  // Data for the month
	Error *string  `json:"error"` // The error, if any occurred
}

type MonthV3 added in v3.19.0

type MonthV3 struct {
	ID         uuid.UUID             `json:"id" example:"1e777d24-3f5b-4c43-8000-04f65f895578"` // The ID of the Budget
	Name       string                `json:"name" example:"Zero budget"`                        // The name of the Budget
	Month      types.Month           `json:"month" example:"2006-05-01T00:00:00.000000Z"`       // The month
	Income     decimal.Decimal       `json:"income" example:"2317.34"`                          // The total income for the month (sum of all incoming transactions without an Envelope)
	Available  decimal.Decimal       `json:"available" example:"217.34"`                        // The amount available to budget
	Balance    decimal.Decimal       `json:"balance" example:"5231.37"`                         // The sum of all envelope balances
	Spent      decimal.Decimal       `json:"spent" example:"133.70"`                            // The amount of money spent in this month
	Allocation decimal.Decimal       `json:"allocation" example:"1200.50"`                      // The sum of all allocations for this month
	Categories []CategoryEnvelopesV3 `json:"categories"`                                        // A list of envelope month calculations grouped by category
}

type Pagination added in v3.5.0

type Pagination struct {
	Count  int   `json:"count" example:"25"`  // The amount of records returned in this response
	Offset uint  `json:"offset" example:"50"` // The offset for the first record returned
	Limit  int   `json:"limit" example:"25"`  // The maximum amount of resources to return for this request
	Total  int64 `json:"total" example:"827"` // The total number of resources matching the query
}

Pagination contains information about the pagination for collection endpoint responses.

type QueryMonth

type QueryMonth struct {
	Month time.Time `form:"month" time_format:"2006-01" time_utc:"1" example:"2022-07"` // Year and month
}

type RenameRuleListResponse

type RenameRuleListResponse struct {
	Data []models.MatchRule `json:"data"` // List of rename rules
}

type RenameRuleQueryFilter

type RenameRuleQueryFilter struct {
	Priority  uint   `form:"month"`   // By priority
	Match     string `form:"match"`   // By match
	AccountID string `form:"account"` // By ID of the account they map to
}

func (RenameRuleQueryFilter) Parse

type RenameRuleResponse

type RenameRuleResponse struct {
	Data models.MatchRule `json:"data"` // Data for the rename rule
}

type ResponseMatchRule added in v3.1.2

type ResponseMatchRule struct {
	Error string    `json:"error" example:"A human readable error message"` // This field contains a human readable error message
	Data  MatchRule `json:"data"`                                           // This field contains the MatchRule data
}

type ResponseTransactionV2

type ResponseTransactionV2 struct {
	Error string        `json:"error" example:"A human readable error message"` // This field contains a human readable error message
	Data  TransactionV2 `json:"data"`                                           // This field contains the Transaction data
}

type Transaction added in v3.3.2

type Transaction struct {
	models.Transaction
	Links struct {
		Self string `json:"self" example:"https://example.com/api/v1/transactions/d430d7c3-d14c-4712-9336-ee56965a6673"` // The transaction itself
	} `json:"links"` // Links for the transaction
}

Transaction is the API v1 representation of a Transaction in EZ.

type TransactionCreateResponseV3 added in v3.6.0

type TransactionCreateResponseV3 struct {
	Error *string                 `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
	Data  []TransactionResponseV3 `json:"data"`                                                          // List of created Transactions
}

type TransactionListResponse

type TransactionListResponse struct {
	Data []Transaction `json:"data"` // List of transactions
}

type TransactionListResponseV3 added in v3.5.0

type TransactionListResponseV3 struct {
	Data       []TransactionV3 `json:"data"`                                                          // List of transactions
	Error      *string         `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred
	Pagination *Pagination     `json:"pagination"`                                                    // Pagination information
}

type TransactionQueryFilterV1 added in v3.5.0

type TransactionQueryFilterV1 struct {
	Date                  time.Time       `form:"date" filterField:"false"`              // Exact date. Time is ignored.
	FromDate              time.Time       `form:"fromDate" filterField:"false"`          // From this date. Time is ignored.
	UntilDate             time.Time       `form:"untilDate" filterField:"false"`         // Until this date. Time is ignored.
	Amount                decimal.Decimal `form:"amount"`                                // Exact amount
	AmountLessOrEqual     decimal.Decimal `form:"amountLessOrEqual" filterField:"false"` // Amount less than or equal to this
	AmountMoreOrEqual     decimal.Decimal `form:"amountMoreOrEqual" filterField:"false"` // Amount more than or equal to this
	Note                  string          `form:"note" filterField:"false"`              // Note contains this string
	BudgetID              string          `form:"budget"`                                // ID of the budget
	SourceAccountID       string          `form:"source"`                                // ID of the source account
	DestinationAccountID  string          `form:"destination"`                           // ID of the destination account
	EnvelopeID            string          `form:"envelope"`                              // ID of the envelope
	ReconciledSource      bool            `form:"reconciledSource"`                      // Is the transaction reconciled in the source account?
	ReconciledDestination bool            `form:"reconciledDestination"`                 // Is the transaction reconciled in the destination account?
	AccountID             string          `form:"account" filterField:"false"`           // ID of either source or destination account
	Offset                uint            `form:"offset" filterField:"false"`            // The offset of the first Transaction returned. Defaults to 0.
	Limit                 int             `form:"limit" filterField:"false"`             // Maximum number of transactions to return. Defaults to 50.
	Reconciled            bool            `form:"reconciled"`                            // DEPRECATED. Do not use, this field does not work as intended. See https://github.com/envelope-zero/backend/issues/528. Use reconciledSource and reconciledDestination instead.
}

func (TransactionQueryFilterV1) ToCreateHandleErrors added in v3.5.0

func (f TransactionQueryFilterV1) ToCreateHandleErrors(c *gin.Context) (models.TransactionCreate, bool)

ToCreateHandleErrors parses the query string and returns a TransactionCreate struct for the database request.

This method is deprecated, use ToCreate() and handle errors in the calling method.

type TransactionQueryFilterV3 added in v3.5.0

type TransactionQueryFilterV3 struct {
	Date                  time.Time       `form:"date" filterField:"false"`              // Exact date. Time is ignored.
	FromDate              time.Time       `form:"fromDate" filterField:"false"`          // From this date. Time is ignored.
	UntilDate             time.Time       `form:"untilDate" filterField:"false"`         // Until this date. Time is ignored.
	Amount                decimal.Decimal `form:"amount"`                                // Exact amount
	AmountLessOrEqual     decimal.Decimal `form:"amountLessOrEqual" filterField:"false"` // Amount less than or equal to this
	AmountMoreOrEqual     decimal.Decimal `form:"amountMoreOrEqual" filterField:"false"` // Amount more than or equal to this
	Note                  string          `form:"note" filterField:"false"`              // Note contains this string
	BudgetID              string          `form:"budget"`                                // ID of the budget
	SourceAccountID       string          `form:"source"`                                // ID of the source account
	DestinationAccountID  string          `form:"destination"`                           // ID of the destination account
	EnvelopeID            string          `form:"envelope"`                              // ID of the envelope
	ReconciledSource      bool            `form:"reconciledSource"`                      // Is the transaction reconciled in the source account?
	ReconciledDestination bool            `form:"reconciledDestination"`                 // Is the transaction reconciled in the destination account?
	AccountID             string          `form:"account" filterField:"false"`           // ID of either source or destination account
	Offset                uint            `form:"offset" filterField:"false"`            // The offset of the first Transaction returned. Defaults to 0.
	Limit                 int             `form:"limit" filterField:"false"`             // Maximum number of transactions to return. Defaults to 50.
}

func (TransactionQueryFilterV3) ToCreate added in v3.5.0

ToCreate parses the query string and returns a TransactionCreate struct for the database request. On error, it returns httperrors.ErrorStatus struct with.

type TransactionResponse

type TransactionResponse struct {
	Data Transaction `json:"data"` // Data for the transaction
}

type TransactionResponseV3 added in v3.6.0

type TransactionResponseV3 struct {
	Error *string        `json:"error" example:"the specified resource ID is not a valid UUID"` // The error, if any occurred for this transaction
	Data  *TransactionV3 `json:"data"`                                                          // The Transaction data, if creation was successful
}

type TransactionV2 added in v3.3.2

type TransactionV2 struct {
	models.Transaction
	Links struct {
		Self string `json:"self" example:"https://example.com/api/v2/transactions/d430d7c3-d14c-4712-9336-ee56965a6673"` // The transaction itself
	} `json:"links"` // Links for the transaction
}

type TransactionV3 added in v3.5.0

type TransactionV3 struct {
	models.Transaction
	Reconciled bool `json:"reconciled,omitempty"` // Remove the reconciled field
	Links      struct {
		Self string `json:"self" example:"https://example.com/api/v3/transactions/d430d7c3-d14c-4712-9336-ee56965a6673"` // The transaction itself
	} `json:"links"` // Links for the transaction
}

TransactionV3 is the representation of a Transaction in API v3.

type URIMonth

type URIMonth struct {
	Month time.Time `uri:"month" time_format:"2006-01" time_utc:"1" example:"2013-11"` // Year and month
}

Jump to

Keyboard shortcuts

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