ynab

package module
v0.77.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 12 Imported by: 0

README

ynab

Go client for the YNAB API, generated from the official OpenAPI spec using oapi-codegen.

Installation

go get thde.io/ynab

Usage

client, err := ynab.New(
    ynab.WithBearerToken("your-personal-access-token"),
)
if err != nil {
    log.Fatal(err)
}

resp, err := client.GetBudgetsWithResponse(ctx, nil)

Get a personal access token from your YNAB developer settings.

Use WithUserAgent to identify your application in requests:

client, err := ynab.New(
    ynab.WithBearerToken("your-personal-access-token"),
    ynab.WithUserAgent("my-app/1.0"),
)

Rate limiting

The YNAB API allows 200 requests per hour. Use WithRateLimiter to avoid hitting the limit:

// Use the built-in default (200 req/hour, burst 1):
client, err := ynab.New(
    ynab.WithBearerToken("your-personal-access-token"),
    ynab.WithRateLimiter(nil),
)

// Or bring your own limiter:
limiter := rate.NewLimiter(rate.Every(time.Hour/200), 5)
client, err := ynab.New(
    ynab.WithBearerToken("your-personal-access-token"),
    ynab.WithRateLimiter(limiter),
)

Delta requests

Most endpoints accept a LastKnowledgeOfServer parameter. When set, the server returns only entities that changed since that point, making repeated polling much cheaper. Each response includes a ServerKnowledge value to use on the next call.

var knowledge int64

// First call, fetch everything.
resp, err := client.GetAccountsWithResponse(ctx, budgetID, &ynab.GetAccountsParams{})

// Persist resp.JSON200.Data.ServerKnowledge, then on subsequent calls:
resp, err = client.GetAccountsWithResponse(ctx, budgetID, &ynab.GetAccountsParams{
    LastKnowledgeOfServer: knowledge,
})
knowledge = resp.JSON200.Data.ServerKnowledge

See the YNAB API docs for details.

Development

make generate  # regenerate client from the YNAB OpenAPI spec
make test      # run tests
make lint      # run linters
make lint-fix  # run linters and auto-fix issues
make update    # update dependencies and regenerate

License

MIT

Documentation

Overview

Package ynab provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.

Package ynab provides a client for the YNAB (You Need A Budget) API.

Index

Examples

Constants

View Source
const (
	BearerScopes = "bearer.Scopes"
)
View Source
const ProductionURL = ServerURLHTTPSAPIYNABComV1
View Source
const ServerURLHTTPSAPIYNABComV1 = "https://api.ynab.com/v1"

ServerURLHTTPSAPIYNABComV1 defines the Server URL for

Variables

This section is empty.

Functions

func NewCreateAccountRequest

func NewCreateAccountRequest(server string, budgetID string, body CreateAccountJSONRequestBody) (*http.Request, error)

NewCreateAccountRequest calls the generic CreateAccount builder with application/json body

func NewCreateAccountRequestWithBody

func NewCreateAccountRequestWithBody(server string, budgetID string, contentType string, body io.Reader) (*http.Request, error)

NewCreateAccountRequestWithBody generates requests for CreateAccount with any type of body

func NewCreateScheduledTransactionRequest

func NewCreateScheduledTransactionRequest(server string, budgetID string, body CreateScheduledTransactionJSONRequestBody) (*http.Request, error)

NewCreateScheduledTransactionRequest calls the generic CreateScheduledTransaction builder with application/json body

func NewCreateScheduledTransactionRequestWithBody

func NewCreateScheduledTransactionRequestWithBody(server string, budgetID string, contentType string, body io.Reader) (*http.Request, error)

NewCreateScheduledTransactionRequestWithBody generates requests for CreateScheduledTransaction with any type of body

func NewCreateTransactionRequest

func NewCreateTransactionRequest(server string, budgetID string, body CreateTransactionJSONRequestBody) (*http.Request, error)

NewCreateTransactionRequest calls the generic CreateTransaction builder with application/json body

func NewCreateTransactionRequestWithBody

func NewCreateTransactionRequestWithBody(server string, budgetID string, contentType string, body io.Reader) (*http.Request, error)

NewCreateTransactionRequestWithBody generates requests for CreateTransaction with any type of body

func NewDeleteScheduledTransactionRequest

func NewDeleteScheduledTransactionRequest(server string, budgetID string, scheduledTransactionID string) (*http.Request, error)

NewDeleteScheduledTransactionRequest generates requests for DeleteScheduledTransaction

func NewDeleteTransactionRequest

func NewDeleteTransactionRequest(server string, budgetID string, transactionID string) (*http.Request, error)

NewDeleteTransactionRequest generates requests for DeleteTransaction

func NewGetAccountByIDRequest

func NewGetAccountByIDRequest(server string, budgetID string, accountID openapi_types.UUID) (*http.Request, error)

NewGetAccountByIDRequest generates requests for GetAccountByID

func NewGetAccountsRequest

func NewGetAccountsRequest(server string, budgetID string, params *GetAccountsParams) (*http.Request, error)

NewGetAccountsRequest generates requests for GetAccounts

func NewGetBudgetByIDRequest

func NewGetBudgetByIDRequest(server string, budgetID string, params *GetBudgetByIDParams) (*http.Request, error)

NewGetBudgetByIDRequest generates requests for GetBudgetByID

func NewGetBudgetMonthRequest

func NewGetBudgetMonthRequest(server string, budgetID string, month openapi_types.Date) (*http.Request, error)

NewGetBudgetMonthRequest generates requests for GetBudgetMonth

func NewGetBudgetMonthsRequest

func NewGetBudgetMonthsRequest(server string, budgetID string, params *GetBudgetMonthsParams) (*http.Request, error)

NewGetBudgetMonthsRequest generates requests for GetBudgetMonths

func NewGetBudgetSettingsByIDRequest

func NewGetBudgetSettingsByIDRequest(server string, budgetID string) (*http.Request, error)

NewGetBudgetSettingsByIDRequest generates requests for GetBudgetSettingsByID

func NewGetBudgetsRequest

func NewGetBudgetsRequest(server string, params *GetBudgetsParams) (*http.Request, error)

NewGetBudgetsRequest generates requests for GetBudgets

func NewGetCategoriesRequest

func NewGetCategoriesRequest(server string, budgetID string, params *GetCategoriesParams) (*http.Request, error)

NewGetCategoriesRequest generates requests for GetCategories

func NewGetCategoryByIDRequest

func NewGetCategoryByIDRequest(server string, budgetID string, categoryID string) (*http.Request, error)

NewGetCategoryByIDRequest generates requests for GetCategoryByID

func NewGetMonthCategoryByIDRequest

func NewGetMonthCategoryByIDRequest(server string, budgetID string, month openapi_types.Date, categoryID string) (*http.Request, error)

NewGetMonthCategoryByIDRequest generates requests for GetMonthCategoryByID

func NewGetPayeeByIDRequest

func NewGetPayeeByIDRequest(server string, budgetID string, payeeID string) (*http.Request, error)

NewGetPayeeByIDRequest generates requests for GetPayeeByID

func NewGetPayeeLocationByIDRequest

func NewGetPayeeLocationByIDRequest(server string, budgetID string, payeeLocationID string) (*http.Request, error)

NewGetPayeeLocationByIDRequest generates requests for GetPayeeLocationByID

func NewGetPayeeLocationsByPayeeRequest

func NewGetPayeeLocationsByPayeeRequest(server string, budgetID string, payeeID string) (*http.Request, error)

NewGetPayeeLocationsByPayeeRequest generates requests for GetPayeeLocationsByPayee

func NewGetPayeeLocationsRequest

func NewGetPayeeLocationsRequest(server string, budgetID string) (*http.Request, error)

NewGetPayeeLocationsRequest generates requests for GetPayeeLocations

func NewGetPayeesRequest

func NewGetPayeesRequest(server string, budgetID string, params *GetPayeesParams) (*http.Request, error)

NewGetPayeesRequest generates requests for GetPayees

func NewGetScheduledTransactionByIDRequest

func NewGetScheduledTransactionByIDRequest(server string, budgetID string, scheduledTransactionID string) (*http.Request, error)

NewGetScheduledTransactionByIDRequest generates requests for GetScheduledTransactionByID

func NewGetScheduledTransactionsRequest

func NewGetScheduledTransactionsRequest(server string, budgetID string, params *GetScheduledTransactionsParams) (*http.Request, error)

NewGetScheduledTransactionsRequest generates requests for GetScheduledTransactions

func NewGetTransactionByIDRequest

func NewGetTransactionByIDRequest(server string, budgetID string, transactionID string) (*http.Request, error)

NewGetTransactionByIDRequest generates requests for GetTransactionByID

func NewGetTransactionsByAccountRequest

func NewGetTransactionsByAccountRequest(server string, budgetID string, accountID string, params *GetTransactionsByAccountParams) (*http.Request, error)

NewGetTransactionsByAccountRequest generates requests for GetTransactionsByAccount

func NewGetTransactionsByCategoryRequest

func NewGetTransactionsByCategoryRequest(server string, budgetID string, categoryID string, params *GetTransactionsByCategoryParams) (*http.Request, error)

NewGetTransactionsByCategoryRequest generates requests for GetTransactionsByCategory

func NewGetTransactionsByMonthRequest

func NewGetTransactionsByMonthRequest(server string, budgetID string, month string, params *GetTransactionsByMonthParams) (*http.Request, error)

NewGetTransactionsByMonthRequest generates requests for GetTransactionsByMonth

func NewGetTransactionsByPayeeRequest

func NewGetTransactionsByPayeeRequest(server string, budgetID string, payeeID string, params *GetTransactionsByPayeeParams) (*http.Request, error)

NewGetTransactionsByPayeeRequest generates requests for GetTransactionsByPayee

func NewGetTransactionsRequest

func NewGetTransactionsRequest(server string, budgetID string, params *GetTransactionsParams) (*http.Request, error)

NewGetTransactionsRequest generates requests for GetTransactions

func NewGetUserRequest

func NewGetUserRequest(server string) (*http.Request, error)

NewGetUserRequest generates requests for GetUser

func NewImportTransactionsRequest

func NewImportTransactionsRequest(server string, budgetID string) (*http.Request, error)

NewImportTransactionsRequest generates requests for ImportTransactions

func NewUpdateCategoryRequest

func NewUpdateCategoryRequest(server string, budgetID string, categoryID string, body UpdateCategoryJSONRequestBody) (*http.Request, error)

NewUpdateCategoryRequest calls the generic UpdateCategory builder with application/json body

func NewUpdateCategoryRequestWithBody

func NewUpdateCategoryRequestWithBody(server string, budgetID string, categoryID string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateCategoryRequestWithBody generates requests for UpdateCategory with any type of body

func NewUpdateMonthCategoryRequest

func NewUpdateMonthCategoryRequest(server string, budgetID string, month openapi_types.Date, categoryID string, body UpdateMonthCategoryJSONRequestBody) (*http.Request, error)

NewUpdateMonthCategoryRequest calls the generic UpdateMonthCategory builder with application/json body

func NewUpdateMonthCategoryRequestWithBody

func NewUpdateMonthCategoryRequestWithBody(server string, budgetID string, month openapi_types.Date, categoryID string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateMonthCategoryRequestWithBody generates requests for UpdateMonthCategory with any type of body

func NewUpdatePayeeRequest

func NewUpdatePayeeRequest(server string, budgetID string, payeeID string, body UpdatePayeeJSONRequestBody) (*http.Request, error)

NewUpdatePayeeRequest calls the generic UpdatePayee builder with application/json body

func NewUpdatePayeeRequestWithBody

func NewUpdatePayeeRequestWithBody(server string, budgetID string, payeeID string, contentType string, body io.Reader) (*http.Request, error)

NewUpdatePayeeRequestWithBody generates requests for UpdatePayee with any type of body

func NewUpdateScheduledTransactionRequest

func NewUpdateScheduledTransactionRequest(server string, budgetID string, scheduledTransactionID string, body UpdateScheduledTransactionJSONRequestBody) (*http.Request, error)

NewUpdateScheduledTransactionRequest calls the generic UpdateScheduledTransaction builder with application/json body

func NewUpdateScheduledTransactionRequestWithBody

func NewUpdateScheduledTransactionRequestWithBody(server string, budgetID string, scheduledTransactionID string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateScheduledTransactionRequestWithBody generates requests for UpdateScheduledTransaction with any type of body

func NewUpdateTransactionRequest

func NewUpdateTransactionRequest(server string, budgetID string, transactionID string, body UpdateTransactionJSONRequestBody) (*http.Request, error)

NewUpdateTransactionRequest calls the generic UpdateTransaction builder with application/json body

func NewUpdateTransactionRequestWithBody

func NewUpdateTransactionRequestWithBody(server string, budgetID string, transactionID string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateTransactionRequestWithBody generates requests for UpdateTransaction with any type of body

func NewUpdateTransactionsRequest

func NewUpdateTransactionsRequest(server string, budgetID string, body UpdateTransactionsJSONRequestBody) (*http.Request, error)

NewUpdateTransactionsRequest calls the generic UpdateTransactions builder with application/json body

func NewUpdateTransactionsRequestWithBody

func NewUpdateTransactionsRequestWithBody(server string, budgetID string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateTransactionsRequestWithBody generates requests for UpdateTransactions with any type of body

Types

type Account

type Account struct {
	// Balance The current balance of the account in milliunits format
	Balance int64 `json:"balance"`

	// ClearedBalance The current cleared balance of the account in milliunits format
	ClearedBalance int64 `json:"cleared_balance"`

	// Closed Whether this account is closed or not
	Closed              bool                     `json:"closed"`
	DebtEscrowAmounts   LoanAccountPeriodicValue `json:"debt_escrow_amounts,omitzero"`
	DebtInterestRates   LoanAccountPeriodicValue `json:"debt_interest_rates,omitzero"`
	DebtMinimumPayments LoanAccountPeriodicValue `json:"debt_minimum_payments,omitzero"`

	// DebtOriginalBalance This field is deprecated and will always be null.
	DebtOriginalBalance int64 `json:"debt_original_balance,omitzero"`

	// Deleted Whether or not the account has been deleted.  Deleted accounts will only be included in delta requests.
	Deleted bool `json:"deleted"`

	// DirectImportInError If an account linked to a financial institution (direct_import_linked=true) and the linked connection is not in a healthy state, this will be true.
	DirectImportInError bool `json:"direct_import_in_error,omitempty,omitzero"`

	// DirectImportLinked Whether or not the account is linked to a financial institution for automatic transaction import.
	DirectImportLinked bool               `json:"direct_import_linked,omitempty,omitzero"`
	ID                 openapi_types.UUID `json:"id"`

	// LastReconciledAt A date/time specifying when the account was last reconciled.
	LastReconciledAt time.Time `json:"last_reconciled_at,omitzero"`
	Name             string    `json:"name"`
	Note             string    `json:"note,omitzero"`

	// OnBudget Whether this account is on budget or not
	OnBudget bool `json:"on_budget"`

	// TransferPayeeID The payee id which should be used when transferring to this account
	TransferPayeeID openapi_types.UUID `json:"transfer_payee_id"`

	// Type The type of account
	Type AccountType `json:"type"`

	// UnclearedBalance The current uncleared balance of the account in milliunits format
	UnclearedBalance int64 `json:"uncleared_balance"`
}

Account defines model for Account.

type AccountResponse

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

AccountResponse defines model for AccountResponse.

type AccountType

type AccountType string

AccountType The type of account

const (
	AutoLoan       AccountType = "autoLoan"
	Cash           AccountType = "cash"
	Checking       AccountType = "checking"
	CreditCard     AccountType = "creditCard"
	LineOfCredit   AccountType = "lineOfCredit"
	MedicalDebt    AccountType = "medicalDebt"
	Mortgage       AccountType = "mortgage"
	OtherAsset     AccountType = "otherAsset"
	OtherDebt      AccountType = "otherDebt"
	OtherLiability AccountType = "otherLiability"
	PersonalLoan   AccountType = "personalLoan"
	Savings        AccountType = "savings"
	StudentLoan    AccountType = "studentLoan"
)

Defines values for AccountType.

type AccountsResponse

type AccountsResponse struct {
	Data struct {
		Accounts []Account `json:"accounts"`

		// ServerKnowledge The knowledge of the server
		ServerKnowledge int64 `json:"server_knowledge"`
	} `json:"data"`
}

AccountsResponse defines model for AccountsResponse.

type BudgetDetail

type BudgetDetail struct {
	Accounts       []Account       `json:"accounts,omitempty,omitzero"`
	Categories     []Category      `json:"categories,omitempty,omitzero"`
	CategoryGroups []CategoryGroup `json:"category_groups,omitempty,omitzero"`

	// CurrencyFormat The currency format setting for the budget.  In some cases the format will not be available and will be specified as null.
	CurrencyFormat CurrencyFormat `json:"currency_format,omitzero"`

	// DateFormat The date format setting for the budget.  In some cases the format will not be available and will be specified as null.
	DateFormat DateFormat `json:"date_format,omitzero"`

	// FirstMonth The earliest budget month
	FirstMonth openapi_types.Date `json:"first_month,omitempty,omitzero"`
	ID         openapi_types.UUID `json:"id"`

	// LastModifiedOn The last time any changes were made to the budget from either a web or mobile client
	LastModifiedOn time.Time `json:"last_modified_on,omitempty,omitzero"`

	// LastMonth The latest budget month
	LastMonth                openapi_types.Date            `json:"last_month,omitempty,omitzero"`
	Months                   []MonthDetail                 `json:"months,omitempty,omitzero"`
	Name                     string                        `json:"name"`
	PayeeLocations           []PayeeLocation               `json:"payee_locations,omitempty,omitzero"`
	Payees                   []Payee                       `json:"payees,omitempty,omitzero"`
	ScheduledSubtransactions []ScheduledSubTransaction     `json:"scheduled_subtransactions,omitempty,omitzero"`
	ScheduledTransactions    []ScheduledTransactionSummary `json:"scheduled_transactions,omitempty,omitzero"`
	Subtransactions          []SubTransaction              `json:"subtransactions,omitempty,omitzero"`
	Transactions             []TransactionSummary          `json:"transactions,omitempty,omitzero"`
}

BudgetDetail defines model for BudgetDetail.

type BudgetDetailResponse

type BudgetDetailResponse struct {
	Data struct {
		Budget BudgetDetail `json:"budget"`

		// ServerKnowledge The knowledge of the server
		ServerKnowledge int64 `json:"server_knowledge"`
	} `json:"data"`
}

BudgetDetailResponse defines model for BudgetDetailResponse.

type BudgetSettings

type BudgetSettings struct {
	// CurrencyFormat The currency format setting for the budget.  In some cases the format will not be available and will be specified as null.
	CurrencyFormat CurrencyFormat `json:"currency_format"`

	// DateFormat The date format setting for the budget.  In some cases the format will not be available and will be specified as null.
	DateFormat DateFormat `json:"date_format"`
}

BudgetSettings defines model for BudgetSettings.

type BudgetSettingsResponse

type BudgetSettingsResponse struct {
	Data struct {
		Settings BudgetSettings `json:"settings"`
	} `json:"data"`
}

BudgetSettingsResponse defines model for BudgetSettingsResponse.

type BudgetSummary

type BudgetSummary struct {
	// Accounts The budget accounts (only included if `include_accounts=true` specified as query parameter)
	Accounts []Account `json:"accounts,omitempty,omitzero"`

	// CurrencyFormat The currency format setting for the budget.  In some cases the format will not be available and will be specified as null.
	CurrencyFormat CurrencyFormat `json:"currency_format,omitzero"`

	// DateFormat The date format setting for the budget.  In some cases the format will not be available and will be specified as null.
	DateFormat DateFormat `json:"date_format,omitzero"`

	// FirstMonth The earliest budget month
	FirstMonth openapi_types.Date `json:"first_month,omitempty,omitzero"`
	ID         openapi_types.UUID `json:"id"`

	// LastModifiedOn The last time any changes were made to the budget from either a web or mobile client
	LastModifiedOn time.Time `json:"last_modified_on,omitempty,omitzero"`

	// LastMonth The latest budget month
	LastMonth openapi_types.Date `json:"last_month,omitempty,omitzero"`
	Name      string             `json:"name"`
}

BudgetSummary defines model for BudgetSummary.

type BudgetSummaryResponse

type BudgetSummaryResponse struct {
	Data struct {
		Budgets       []BudgetSummary `json:"budgets"`
		DefaultBudget BudgetSummary   `json:"default_budget,omitzero"`
	} `json:"data"`
}

BudgetSummaryResponse defines model for BudgetSummaryResponse.

type CategoriesResponse

type CategoriesResponse struct {
	Data struct {
		CategoryGroups []CategoryGroupWithCategories `json:"category_groups"`

		// ServerKnowledge The knowledge of the server
		ServerKnowledge int64 `json:"server_knowledge"`
	} `json:"data"`
}

CategoriesResponse defines model for CategoriesResponse.

type Category

type Category struct {
	// Activity Activity amount in milliunits format
	Activity int64 `json:"activity"`

	// Balance Balance in milliunits format
	Balance int64 `json:"balance"`

	// Budgeted Budgeted amount in milliunits format
	Budgeted          int64              `json:"budgeted"`
	CategoryGroupID   openapi_types.UUID `json:"category_group_id"`
	CategoryGroupName string             `json:"category_group_name,omitempty,omitzero"`

	// Deleted Whether or not the category has been deleted.  Deleted categories will only be included in delta requests.
	Deleted bool `json:"deleted"`

	// GoalCadence The goal cadence. Value in range 0-14. There are two subsets of these values which behave differently. For values 0, 1, 2, and 13, the goal's due date repeats every goal_cadence * goal_cadence_frequency, where 0 = None, 1 = Monthly, 2 = Weekly, and 13 = Yearly. For example, goal_cadence 1 with goal_cadence_frequency 2 means the goal is due every other month. For values 3-12 and 14, goal_cadence_frequency is ignored and the goal's due date repeats every goal_cadence, where 3 = Every 2 Months, 4 = Every 3 Months, ..., 12 = Every 11 Months, and 14 = Every 2 Years.
	GoalCadence int32 `json:"goal_cadence,omitzero"`

	// GoalCadenceFrequency The goal cadence frequency. When goal_cadence is 0, 1, 2, or 13, a goal's due date repeats every goal_cadence * goal_cadence_frequency. For example, goal_cadence 1 with goal_cadence_frequency 2 means the goal is due every other month.  When goal_cadence is 3-12 or 14, goal_cadence_frequency is ignored.
	GoalCadenceFrequency int32 `json:"goal_cadence_frequency,omitzero"`

	// GoalCreationMonth The month a goal was created
	GoalCreationMonth openapi_types.Date `json:"goal_creation_month,omitzero"`

	// GoalDay A day offset modifier for the goal's due date. When goal_cadence is 2 (Weekly), this value specifies which day of the week the goal is due (0 = Sunday, 6 = Saturday). Otherwise, this value specifies which day of the month the goal is due (1 = 1st, 31 = 31st, null = Last day of Month).
	GoalDay int32 `json:"goal_day,omitzero"`

	// GoalMonthsToBudget The number of months, including the current month, left in the current goal period.
	GoalMonthsToBudget int32 `json:"goal_months_to_budget,omitzero"`

	// GoalNeedsWholeAmount Indicates the monthly rollover behavior for "NEED"-type goals. When "true", the goal will always ask for the target amount in the new month ("Set Aside"). When "false", previous month category funding is used ("Refill"). For other goal types, this field will be null.
	GoalNeedsWholeAmount bool `json:"goal_needs_whole_amount,omitzero"`

	// GoalOverallFunded The total amount funded towards the goal within the current goal period.
	GoalOverallFunded int64 `json:"goal_overall_funded,omitzero"`

	// GoalOverallLeft The amount of funding still needed to complete the goal within the current goal period.
	GoalOverallLeft int64 `json:"goal_overall_left,omitzero"`

	// GoalPercentageComplete The percentage completion of the goal
	GoalPercentageComplete int32 `json:"goal_percentage_complete,omitzero"`

	// GoalSnoozedAt The date/time the goal was snoozed.  If the goal is not snoozed, this will be null.
	GoalSnoozedAt time.Time `json:"goal_snoozed_at,omitzero"`

	// GoalTarget The goal target amount in milliunits
	GoalTarget int64 `json:"goal_target,omitzero"`

	// GoalTargetMonth The original target month for the goal to be completed.  Only some goal types specify this date.
	GoalTargetMonth openapi_types.Date `json:"goal_target_month,omitzero"`

	// GoalType The type of goal, if the category has a goal (TB='Target Category Balance', TBD='Target Category Balance by Date', MF='Monthly Funding', NEED='Plan Your Spending')
	GoalType CategoryGoalType `json:"goal_type,omitzero"`

	// GoalUnderFunded The amount of funding still needed in the current month to stay on track towards completing the goal within the current goal period. This amount will generally correspond to the 'Underfunded' amount in the web and mobile clients except when viewing a category with a Needed for Spending Goal in a future month.  The web and mobile clients will ignore any funding from a prior goal period when viewing category with a Needed for Spending Goal in a future month.
	GoalUnderFunded int64 `json:"goal_under_funded,omitzero"`

	// Hidden Whether or not the category is hidden
	Hidden bool               `json:"hidden"`
	ID     openapi_types.UUID `json:"id"`
	Name   string             `json:"name"`
	Note   string             `json:"note,omitzero"`

	// OriginalCategoryGroupID DEPRECATED: No longer used.  Value will always be null.
	OriginalCategoryGroupID openapi_types.UUID `json:"original_category_group_id,omitzero"`
}

Category defines model for Category.

type CategoryGoalType

type CategoryGoalType string

CategoryGoalType The type of goal, if the category has a goal (TB='Target Category Balance', TBD='Target Category Balance by Date', MF='Monthly Funding', NEED='Plan Your Spending')

const (
	CategoryGoalTypeDEBT        CategoryGoalType = "DEBT"
	CategoryGoalTypeLessThanNil CategoryGoalType = "<nil>"
	CategoryGoalTypeMF          CategoryGoalType = "MF"
	CategoryGoalTypeNEED        CategoryGoalType = "NEED"
	CategoryGoalTypeTB          CategoryGoalType = "TB"
	CategoryGoalTypeTBD         CategoryGoalType = "TBD"
)

Defines values for CategoryGoalType.

type CategoryGroup

type CategoryGroup struct {
	// Deleted Whether or not the category group has been deleted.  Deleted category groups will only be included in delta requests.
	Deleted bool `json:"deleted"`

	// Hidden Whether or not the category group is hidden
	Hidden bool               `json:"hidden"`
	ID     openapi_types.UUID `json:"id"`
	Name   string             `json:"name"`
}

CategoryGroup defines model for CategoryGroup.

type CategoryGroupWithCategories

type CategoryGroupWithCategories struct {
	// Categories Category group categories.  Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
	Categories []Category `json:"categories"`

	// Deleted Whether or not the category group has been deleted.  Deleted category groups will only be included in delta requests.
	Deleted bool `json:"deleted"`

	// Hidden Whether or not the category group is hidden
	Hidden bool               `json:"hidden"`
	ID     openapi_types.UUID `json:"id"`
	Name   string             `json:"name"`
}

CategoryGroupWithCategories defines model for CategoryGroupWithCategories.

type CategoryResponse

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

CategoryResponse defines model for CategoryResponse.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) CreateAccount

func (c *Client) CreateAccount(ctx context.Context, budgetID string, body CreateAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateAccountWithBody

func (c *Client) CreateAccountWithBody(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateScheduledTransaction

func (c *Client) CreateScheduledTransaction(ctx context.Context, budgetID string, body CreateScheduledTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateScheduledTransactionWithBody

func (c *Client) CreateScheduledTransactionWithBody(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateTransaction

func (c *Client) CreateTransaction(ctx context.Context, budgetID string, body CreateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateTransactionWithBody

func (c *Client) CreateTransactionWithBody(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteScheduledTransaction

func (c *Client) DeleteScheduledTransaction(ctx context.Context, budgetID string, scheduledTransactionID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteTransaction

func (c *Client) DeleteTransaction(ctx context.Context, budgetID string, transactionID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetAccountByID

func (c *Client) GetAccountByID(ctx context.Context, budgetID string, accountID openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetAccounts

func (c *Client) GetAccounts(ctx context.Context, budgetID string, params *GetAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetBudgetByID

func (c *Client) GetBudgetByID(ctx context.Context, budgetID string, params *GetBudgetByIDParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetBudgetMonth

func (c *Client) GetBudgetMonth(ctx context.Context, budgetID string, month openapi_types.Date, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetBudgetMonths

func (c *Client) GetBudgetMonths(ctx context.Context, budgetID string, params *GetBudgetMonthsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetBudgetSettingsByID

func (c *Client) GetBudgetSettingsByID(ctx context.Context, budgetID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetBudgets

func (c *Client) GetBudgets(ctx context.Context, params *GetBudgetsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCategories

func (c *Client) GetCategories(ctx context.Context, budgetID string, params *GetCategoriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCategoryByID

func (c *Client) GetCategoryByID(ctx context.Context, budgetID string, categoryID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetMonthCategoryByID

func (c *Client) GetMonthCategoryByID(ctx context.Context, budgetID string, month openapi_types.Date, categoryID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPayeeByID

func (c *Client) GetPayeeByID(ctx context.Context, budgetID string, payeeID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPayeeLocationByID

func (c *Client) GetPayeeLocationByID(ctx context.Context, budgetID string, payeeLocationID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPayeeLocations

func (c *Client) GetPayeeLocations(ctx context.Context, budgetID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPayeeLocationsByPayee

func (c *Client) GetPayeeLocationsByPayee(ctx context.Context, budgetID string, payeeID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPayees

func (c *Client) GetPayees(ctx context.Context, budgetID string, params *GetPayeesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetScheduledTransactionByID

func (c *Client) GetScheduledTransactionByID(ctx context.Context, budgetID string, scheduledTransactionID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetScheduledTransactions

func (c *Client) GetScheduledTransactions(ctx context.Context, budgetID string, params *GetScheduledTransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTransactionByID

func (c *Client) GetTransactionByID(ctx context.Context, budgetID string, transactionID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTransactions

func (c *Client) GetTransactions(ctx context.Context, budgetID string, params *GetTransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTransactionsByAccount

func (c *Client) GetTransactionsByAccount(ctx context.Context, budgetID string, accountID string, params *GetTransactionsByAccountParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTransactionsByCategory

func (c *Client) GetTransactionsByCategory(ctx context.Context, budgetID string, categoryID string, params *GetTransactionsByCategoryParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTransactionsByMonth

func (c *Client) GetTransactionsByMonth(ctx context.Context, budgetID string, month string, params *GetTransactionsByMonthParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTransactionsByPayee

func (c *Client) GetTransactionsByPayee(ctx context.Context, budgetID string, payeeID string, params *GetTransactionsByPayeeParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ImportTransactions

func (c *Client) ImportTransactions(ctx context.Context, budgetID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateCategory

func (c *Client) UpdateCategory(ctx context.Context, budgetID string, categoryID string, body UpdateCategoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateCategoryWithBody

func (c *Client) UpdateCategoryWithBody(ctx context.Context, budgetID string, categoryID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateMonthCategory

func (c *Client) UpdateMonthCategory(ctx context.Context, budgetID string, month openapi_types.Date, categoryID string, body UpdateMonthCategoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateMonthCategoryWithBody

func (c *Client) UpdateMonthCategoryWithBody(ctx context.Context, budgetID string, month openapi_types.Date, categoryID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdatePayee

func (c *Client) UpdatePayee(ctx context.Context, budgetID string, payeeID string, body UpdatePayeeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdatePayeeWithBody

func (c *Client) UpdatePayeeWithBody(ctx context.Context, budgetID string, payeeID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateScheduledTransaction

func (c *Client) UpdateScheduledTransaction(ctx context.Context, budgetID string, scheduledTransactionID string, body UpdateScheduledTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateScheduledTransactionWithBody

func (c *Client) UpdateScheduledTransactionWithBody(ctx context.Context, budgetID string, scheduledTransactionID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateTransaction

func (c *Client) UpdateTransaction(ctx context.Context, budgetID string, transactionID string, body UpdateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateTransactionWithBody

func (c *Client) UpdateTransactionWithBody(ctx context.Context, budgetID string, transactionID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateTransactions

func (c *Client) UpdateTransactions(ctx context.Context, budgetID string, body UpdateTransactionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateTransactionsWithBody

func (c *Client) UpdateTransactionsWithBody(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetBudgets request
	GetBudgets(ctx context.Context, params *GetBudgetsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetBudgetByID request
	GetBudgetByID(ctx context.Context, budgetID string, params *GetBudgetByIDParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetAccounts request
	GetAccounts(ctx context.Context, budgetID string, params *GetAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateAccountWithBody request with any body
	CreateAccountWithBody(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateAccount(ctx context.Context, budgetID string, body CreateAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetAccountByID request
	GetAccountByID(ctx context.Context, budgetID string, accountID openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransactionsByAccount request
	GetTransactionsByAccount(ctx context.Context, budgetID string, accountID string, params *GetTransactionsByAccountParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCategories request
	GetCategories(ctx context.Context, budgetID string, params *GetCategoriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCategoryByID request
	GetCategoryByID(ctx context.Context, budgetID string, categoryID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateCategoryWithBody request with any body
	UpdateCategoryWithBody(ctx context.Context, budgetID string, categoryID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateCategory(ctx context.Context, budgetID string, categoryID string, body UpdateCategoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransactionsByCategory request
	GetTransactionsByCategory(ctx context.Context, budgetID string, categoryID string, params *GetTransactionsByCategoryParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetBudgetMonths request
	GetBudgetMonths(ctx context.Context, budgetID string, params *GetBudgetMonthsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetBudgetMonth request
	GetBudgetMonth(ctx context.Context, budgetID string, month openapi_types.Date, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetMonthCategoryByID request
	GetMonthCategoryByID(ctx context.Context, budgetID string, month openapi_types.Date, categoryID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateMonthCategoryWithBody request with any body
	UpdateMonthCategoryWithBody(ctx context.Context, budgetID string, month openapi_types.Date, categoryID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateMonthCategory(ctx context.Context, budgetID string, month openapi_types.Date, categoryID string, body UpdateMonthCategoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransactionsByMonth request
	GetTransactionsByMonth(ctx context.Context, budgetID string, month string, params *GetTransactionsByMonthParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPayeeLocations request
	GetPayeeLocations(ctx context.Context, budgetID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPayeeLocationByID request
	GetPayeeLocationByID(ctx context.Context, budgetID string, payeeLocationID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPayees request
	GetPayees(ctx context.Context, budgetID string, params *GetPayeesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPayeeByID request
	GetPayeeByID(ctx context.Context, budgetID string, payeeID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdatePayeeWithBody request with any body
	UpdatePayeeWithBody(ctx context.Context, budgetID string, payeeID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdatePayee(ctx context.Context, budgetID string, payeeID string, body UpdatePayeeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPayeeLocationsByPayee request
	GetPayeeLocationsByPayee(ctx context.Context, budgetID string, payeeID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransactionsByPayee request
	GetTransactionsByPayee(ctx context.Context, budgetID string, payeeID string, params *GetTransactionsByPayeeParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetScheduledTransactions request
	GetScheduledTransactions(ctx context.Context, budgetID string, params *GetScheduledTransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateScheduledTransactionWithBody request with any body
	CreateScheduledTransactionWithBody(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateScheduledTransaction(ctx context.Context, budgetID string, body CreateScheduledTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteScheduledTransaction request
	DeleteScheduledTransaction(ctx context.Context, budgetID string, scheduledTransactionID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetScheduledTransactionByID request
	GetScheduledTransactionByID(ctx context.Context, budgetID string, scheduledTransactionID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateScheduledTransactionWithBody request with any body
	UpdateScheduledTransactionWithBody(ctx context.Context, budgetID string, scheduledTransactionID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateScheduledTransaction(ctx context.Context, budgetID string, scheduledTransactionID string, body UpdateScheduledTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetBudgetSettingsByID request
	GetBudgetSettingsByID(ctx context.Context, budgetID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransactions request
	GetTransactions(ctx context.Context, budgetID string, params *GetTransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateTransactionsWithBody request with any body
	UpdateTransactionsWithBody(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateTransactions(ctx context.Context, budgetID string, body UpdateTransactionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateTransactionWithBody request with any body
	CreateTransactionWithBody(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateTransaction(ctx context.Context, budgetID string, body CreateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ImportTransactions request
	ImportTransactions(ctx context.Context, budgetID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteTransaction request
	DeleteTransaction(ctx context.Context, budgetID string, transactionID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransactionByID request
	GetTransactionByID(ctx context.Context, budgetID string, transactionID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateTransactionWithBody request with any body
	UpdateTransactionWithBody(ctx context.Context, budgetID string, transactionID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateTransaction(ctx context.Context, budgetID string, transactionID string, body UpdateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetUser request
	GetUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithBearerToken

func WithBearerToken(token string) ClientOption

WithBearerToken returns a ClientOption that sets the Authorization header with the provided token.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRateLimiter

func WithRateLimiter(l *rate.Limiter) ClientOption

WithRateLimiter returns a ClientOption that throttles outgoing requests using the provided rate.Limiter. This is useful for staying within the YNAB API limit of 200 requests per hour.

If l is nil, a new limiter matching the YNAB rate limit (200 req/hour, burst 1) is created.

Example
package main

import (
	"log"
	"time"

	"golang.org/x/time/rate"
	"thde.io/ynab"
)

func main() {
	// Stay within the YNAB API limit of 200 requests per hour.
	limiter := rate.NewLimiter(rate.Every(time.Hour/200), 1)

	client, err := ynab.New(
		ynab.WithBearerToken("your-personal-access-token"),
		ynab.WithRateLimiter(limiter),
	)
	if err != nil {
		log.Fatal(err)
	}

	_ = client
}

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

func WithUserAgent

func WithUserAgent(agent string) ClientOption

WithUserAgent returns a ClientOption that sets the User-Agent header with the provided token.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func New

func New(opts ...ClientOption) (*ClientWithResponses, error)

New creates a new YNAB client pointing to the production endpoint with the provided options. In most cases, you should use this function to create a new client.

Example
package main

import (
	"context"
	"log"

	"thde.io/ynab"
)

func main() {
	client, err := ynab.New(
		ynab.WithBearerToken("your-personal-access-token"),
	)
	if err != nil {
		log.Fatal(err)
	}

	resp, err := client.GetUserWithResponse(context.Background())
	if err != nil {
		log.Fatal(err)
	}

	_ = resp
}

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) CreateAccountWithBodyWithResponse

func (c *ClientWithResponses) CreateAccountWithBodyWithResponse(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAccountResponse, error)

CreateAccountWithBodyWithResponse request with arbitrary body returning *CreateAccountResponse

func (*ClientWithResponses) CreateAccountWithResponse

func (c *ClientWithResponses) CreateAccountWithResponse(ctx context.Context, budgetID string, body CreateAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAccountResponse, error)

func (*ClientWithResponses) CreateScheduledTransactionWithBodyWithResponse

func (c *ClientWithResponses) CreateScheduledTransactionWithBodyWithResponse(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateScheduledTransactionResponse, error)

CreateScheduledTransactionWithBodyWithResponse request with arbitrary body returning *CreateScheduledTransactionResponse

func (*ClientWithResponses) CreateScheduledTransactionWithResponse

func (c *ClientWithResponses) CreateScheduledTransactionWithResponse(ctx context.Context, budgetID string, body CreateScheduledTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateScheduledTransactionResponse, error)

func (*ClientWithResponses) CreateTransactionWithBodyWithResponse

func (c *ClientWithResponses) CreateTransactionWithBodyWithResponse(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTransactionResponse, error)

CreateTransactionWithBodyWithResponse request with arbitrary body returning *CreateTransactionResponse

func (*ClientWithResponses) CreateTransactionWithResponse

func (c *ClientWithResponses) CreateTransactionWithResponse(ctx context.Context, budgetID string, body CreateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTransactionResponse, error)

func (*ClientWithResponses) DeleteScheduledTransactionWithResponse

func (c *ClientWithResponses) DeleteScheduledTransactionWithResponse(ctx context.Context, budgetID string, scheduledTransactionID string, reqEditors ...RequestEditorFn) (*DeleteScheduledTransactionResponse, error)

DeleteScheduledTransactionWithResponse request returning *DeleteScheduledTransactionResponse

func (*ClientWithResponses) DeleteTransactionWithResponse

func (c *ClientWithResponses) DeleteTransactionWithResponse(ctx context.Context, budgetID string, transactionID string, reqEditors ...RequestEditorFn) (*DeleteTransactionResponse, error)

DeleteTransactionWithResponse request returning *DeleteTransactionResponse

func (*ClientWithResponses) GetAccountByIDWithResponse

func (c *ClientWithResponses) GetAccountByIDWithResponse(ctx context.Context, budgetID string, accountID openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetAccountByIDResponse, error)

GetAccountByIDWithResponse request returning *GetAccountByIDResponse

func (*ClientWithResponses) GetAccountsWithResponse

func (c *ClientWithResponses) GetAccountsWithResponse(ctx context.Context, budgetID string, params *GetAccountsParams, reqEditors ...RequestEditorFn) (*GetAccountsResponse, error)

GetAccountsWithResponse request returning *GetAccountsResponse

func (*ClientWithResponses) GetBudgetByIDWithResponse

func (c *ClientWithResponses) GetBudgetByIDWithResponse(ctx context.Context, budgetID string, params *GetBudgetByIDParams, reqEditors ...RequestEditorFn) (*GetBudgetByIDResponse, error)

GetBudgetByIDWithResponse request returning *GetBudgetByIDResponse

func (*ClientWithResponses) GetBudgetMonthWithResponse

func (c *ClientWithResponses) GetBudgetMonthWithResponse(ctx context.Context, budgetID string, month openapi_types.Date, reqEditors ...RequestEditorFn) (*GetBudgetMonthResponse, error)

GetBudgetMonthWithResponse request returning *GetBudgetMonthResponse

func (*ClientWithResponses) GetBudgetMonthsWithResponse

func (c *ClientWithResponses) GetBudgetMonthsWithResponse(ctx context.Context, budgetID string, params *GetBudgetMonthsParams, reqEditors ...RequestEditorFn) (*GetBudgetMonthsResponse, error)

GetBudgetMonthsWithResponse request returning *GetBudgetMonthsResponse

func (*ClientWithResponses) GetBudgetSettingsByIDWithResponse

func (c *ClientWithResponses) GetBudgetSettingsByIDWithResponse(ctx context.Context, budgetID string, reqEditors ...RequestEditorFn) (*GetBudgetSettingsByIDResponse, error)

GetBudgetSettingsByIDWithResponse request returning *GetBudgetSettingsByIDResponse

func (*ClientWithResponses) GetBudgetsWithResponse

func (c *ClientWithResponses) GetBudgetsWithResponse(ctx context.Context, params *GetBudgetsParams, reqEditors ...RequestEditorFn) (*GetBudgetsResponse, error)

GetBudgetsWithResponse request returning *GetBudgetsResponse

func (*ClientWithResponses) GetCategoriesWithResponse

func (c *ClientWithResponses) GetCategoriesWithResponse(ctx context.Context, budgetID string, params *GetCategoriesParams, reqEditors ...RequestEditorFn) (*GetCategoriesResponse, error)

GetCategoriesWithResponse request returning *GetCategoriesResponse

func (*ClientWithResponses) GetCategoryByIDWithResponse

func (c *ClientWithResponses) GetCategoryByIDWithResponse(ctx context.Context, budgetID string, categoryID string, reqEditors ...RequestEditorFn) (*GetCategoryByIDResponse, error)

GetCategoryByIDWithResponse request returning *GetCategoryByIDResponse

func (*ClientWithResponses) GetMonthCategoryByIDWithResponse

func (c *ClientWithResponses) GetMonthCategoryByIDWithResponse(ctx context.Context, budgetID string, month openapi_types.Date, categoryID string, reqEditors ...RequestEditorFn) (*GetMonthCategoryByIDResponse, error)

GetMonthCategoryByIDWithResponse request returning *GetMonthCategoryByIDResponse

func (*ClientWithResponses) GetPayeeByIDWithResponse

func (c *ClientWithResponses) GetPayeeByIDWithResponse(ctx context.Context, budgetID string, payeeID string, reqEditors ...RequestEditorFn) (*GetPayeeByIDResponse, error)

GetPayeeByIDWithResponse request returning *GetPayeeByIDResponse

func (*ClientWithResponses) GetPayeeLocationByIDWithResponse

func (c *ClientWithResponses) GetPayeeLocationByIDWithResponse(ctx context.Context, budgetID string, payeeLocationID string, reqEditors ...RequestEditorFn) (*GetPayeeLocationByIDResponse, error)

GetPayeeLocationByIDWithResponse request returning *GetPayeeLocationByIDResponse

func (*ClientWithResponses) GetPayeeLocationsByPayeeWithResponse

func (c *ClientWithResponses) GetPayeeLocationsByPayeeWithResponse(ctx context.Context, budgetID string, payeeID string, reqEditors ...RequestEditorFn) (*GetPayeeLocationsByPayeeResponse, error)

GetPayeeLocationsByPayeeWithResponse request returning *GetPayeeLocationsByPayeeResponse

func (*ClientWithResponses) GetPayeeLocationsWithResponse

func (c *ClientWithResponses) GetPayeeLocationsWithResponse(ctx context.Context, budgetID string, reqEditors ...RequestEditorFn) (*GetPayeeLocationsResponse, error)

GetPayeeLocationsWithResponse request returning *GetPayeeLocationsResponse

func (*ClientWithResponses) GetPayeesWithResponse

func (c *ClientWithResponses) GetPayeesWithResponse(ctx context.Context, budgetID string, params *GetPayeesParams, reqEditors ...RequestEditorFn) (*GetPayeesResponse, error)

GetPayeesWithResponse request returning *GetPayeesResponse

func (*ClientWithResponses) GetScheduledTransactionByIDWithResponse

func (c *ClientWithResponses) GetScheduledTransactionByIDWithResponse(ctx context.Context, budgetID string, scheduledTransactionID string, reqEditors ...RequestEditorFn) (*GetScheduledTransactionByIDResponse, error)

GetScheduledTransactionByIDWithResponse request returning *GetScheduledTransactionByIDResponse

func (*ClientWithResponses) GetScheduledTransactionsWithResponse

func (c *ClientWithResponses) GetScheduledTransactionsWithResponse(ctx context.Context, budgetID string, params *GetScheduledTransactionsParams, reqEditors ...RequestEditorFn) (*GetScheduledTransactionsResponse, error)

GetScheduledTransactionsWithResponse request returning *GetScheduledTransactionsResponse

func (*ClientWithResponses) GetTransactionByIDWithResponse

func (c *ClientWithResponses) GetTransactionByIDWithResponse(ctx context.Context, budgetID string, transactionID string, reqEditors ...RequestEditorFn) (*GetTransactionByIDResponse, error)

GetTransactionByIDWithResponse request returning *GetTransactionByIDResponse

func (*ClientWithResponses) GetTransactionsByAccountWithResponse

func (c *ClientWithResponses) GetTransactionsByAccountWithResponse(ctx context.Context, budgetID string, accountID string, params *GetTransactionsByAccountParams, reqEditors ...RequestEditorFn) (*GetTransactionsByAccountResponse, error)

GetTransactionsByAccountWithResponse request returning *GetTransactionsByAccountResponse

func (*ClientWithResponses) GetTransactionsByCategoryWithResponse

func (c *ClientWithResponses) GetTransactionsByCategoryWithResponse(ctx context.Context, budgetID string, categoryID string, params *GetTransactionsByCategoryParams, reqEditors ...RequestEditorFn) (*GetTransactionsByCategoryResponse, error)

GetTransactionsByCategoryWithResponse request returning *GetTransactionsByCategoryResponse

func (*ClientWithResponses) GetTransactionsByMonthWithResponse

func (c *ClientWithResponses) GetTransactionsByMonthWithResponse(ctx context.Context, budgetID string, month string, params *GetTransactionsByMonthParams, reqEditors ...RequestEditorFn) (*GetTransactionsByMonthResponse, error)

GetTransactionsByMonthWithResponse request returning *GetTransactionsByMonthResponse

func (*ClientWithResponses) GetTransactionsByPayeeWithResponse

func (c *ClientWithResponses) GetTransactionsByPayeeWithResponse(ctx context.Context, budgetID string, payeeID string, params *GetTransactionsByPayeeParams, reqEditors ...RequestEditorFn) (*GetTransactionsByPayeeResponse, error)

GetTransactionsByPayeeWithResponse request returning *GetTransactionsByPayeeResponse

func (*ClientWithResponses) GetTransactionsWithResponse

func (c *ClientWithResponses) GetTransactionsWithResponse(ctx context.Context, budgetID string, params *GetTransactionsParams, reqEditors ...RequestEditorFn) (*GetTransactionsResponse, error)

GetTransactionsWithResponse request returning *GetTransactionsResponse

func (*ClientWithResponses) GetUserWithResponse

func (c *ClientWithResponses) GetUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUserResponse, error)

GetUserWithResponse request returning *GetUserResponse

func (*ClientWithResponses) ImportTransactionsWithResponse

func (c *ClientWithResponses) ImportTransactionsWithResponse(ctx context.Context, budgetID string, reqEditors ...RequestEditorFn) (*ImportTransactionsResponse, error)

ImportTransactionsWithResponse request returning *ImportTransactionsResponse

func (*ClientWithResponses) UpdateCategoryWithBodyWithResponse

func (c *ClientWithResponses) UpdateCategoryWithBodyWithResponse(ctx context.Context, budgetID string, categoryID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCategoryResponse, error)

UpdateCategoryWithBodyWithResponse request with arbitrary body returning *UpdateCategoryResponse

func (*ClientWithResponses) UpdateCategoryWithResponse

func (c *ClientWithResponses) UpdateCategoryWithResponse(ctx context.Context, budgetID string, categoryID string, body UpdateCategoryJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCategoryResponse, error)

func (*ClientWithResponses) UpdateMonthCategoryWithBodyWithResponse

func (c *ClientWithResponses) UpdateMonthCategoryWithBodyWithResponse(ctx context.Context, budgetID string, month openapi_types.Date, categoryID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonthCategoryResponse, error)

UpdateMonthCategoryWithBodyWithResponse request with arbitrary body returning *UpdateMonthCategoryResponse

func (*ClientWithResponses) UpdateMonthCategoryWithResponse

func (c *ClientWithResponses) UpdateMonthCategoryWithResponse(ctx context.Context, budgetID string, month openapi_types.Date, categoryID string, body UpdateMonthCategoryJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonthCategoryResponse, error)

func (*ClientWithResponses) UpdatePayeeWithBodyWithResponse

func (c *ClientWithResponses) UpdatePayeeWithBodyWithResponse(ctx context.Context, budgetID string, payeeID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePayeeResponse, error)

UpdatePayeeWithBodyWithResponse request with arbitrary body returning *UpdatePayeeResponse

func (*ClientWithResponses) UpdatePayeeWithResponse

func (c *ClientWithResponses) UpdatePayeeWithResponse(ctx context.Context, budgetID string, payeeID string, body UpdatePayeeJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePayeeResponse, error)

func (*ClientWithResponses) UpdateScheduledTransactionWithBodyWithResponse

func (c *ClientWithResponses) UpdateScheduledTransactionWithBodyWithResponse(ctx context.Context, budgetID string, scheduledTransactionID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateScheduledTransactionResponse, error)

UpdateScheduledTransactionWithBodyWithResponse request with arbitrary body returning *UpdateScheduledTransactionResponse

func (*ClientWithResponses) UpdateScheduledTransactionWithResponse

func (c *ClientWithResponses) UpdateScheduledTransactionWithResponse(ctx context.Context, budgetID string, scheduledTransactionID string, body UpdateScheduledTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateScheduledTransactionResponse, error)

func (*ClientWithResponses) UpdateTransactionWithBodyWithResponse

func (c *ClientWithResponses) UpdateTransactionWithBodyWithResponse(ctx context.Context, budgetID string, transactionID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTransactionResponse, error)

UpdateTransactionWithBodyWithResponse request with arbitrary body returning *UpdateTransactionResponse

func (*ClientWithResponses) UpdateTransactionWithResponse

func (c *ClientWithResponses) UpdateTransactionWithResponse(ctx context.Context, budgetID string, transactionID string, body UpdateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTransactionResponse, error)

func (*ClientWithResponses) UpdateTransactionsWithBodyWithResponse

func (c *ClientWithResponses) UpdateTransactionsWithBodyWithResponse(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTransactionsResponse, error)

UpdateTransactionsWithBodyWithResponse request with arbitrary body returning *UpdateTransactionsResponse

func (*ClientWithResponses) UpdateTransactionsWithResponse

func (c *ClientWithResponses) UpdateTransactionsWithResponse(ctx context.Context, budgetID string, body UpdateTransactionsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTransactionsResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetBudgetsWithResponse request
	GetBudgetsWithResponse(ctx context.Context, params *GetBudgetsParams, reqEditors ...RequestEditorFn) (*GetBudgetsResponse, error)

	// GetBudgetByIDWithResponse request
	GetBudgetByIDWithResponse(ctx context.Context, budgetID string, params *GetBudgetByIDParams, reqEditors ...RequestEditorFn) (*GetBudgetByIDResponse, error)

	// GetAccountsWithResponse request
	GetAccountsWithResponse(ctx context.Context, budgetID string, params *GetAccountsParams, reqEditors ...RequestEditorFn) (*GetAccountsResponse, error)

	// CreateAccountWithBodyWithResponse request with any body
	CreateAccountWithBodyWithResponse(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAccountResponse, error)

	CreateAccountWithResponse(ctx context.Context, budgetID string, body CreateAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAccountResponse, error)

	// GetAccountByIDWithResponse request
	GetAccountByIDWithResponse(ctx context.Context, budgetID string, accountID openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetAccountByIDResponse, error)

	// GetTransactionsByAccountWithResponse request
	GetTransactionsByAccountWithResponse(ctx context.Context, budgetID string, accountID string, params *GetTransactionsByAccountParams, reqEditors ...RequestEditorFn) (*GetTransactionsByAccountResponse, error)

	// GetCategoriesWithResponse request
	GetCategoriesWithResponse(ctx context.Context, budgetID string, params *GetCategoriesParams, reqEditors ...RequestEditorFn) (*GetCategoriesResponse, error)

	// GetCategoryByIDWithResponse request
	GetCategoryByIDWithResponse(ctx context.Context, budgetID string, categoryID string, reqEditors ...RequestEditorFn) (*GetCategoryByIDResponse, error)

	// UpdateCategoryWithBodyWithResponse request with any body
	UpdateCategoryWithBodyWithResponse(ctx context.Context, budgetID string, categoryID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCategoryResponse, error)

	UpdateCategoryWithResponse(ctx context.Context, budgetID string, categoryID string, body UpdateCategoryJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCategoryResponse, error)

	// GetTransactionsByCategoryWithResponse request
	GetTransactionsByCategoryWithResponse(ctx context.Context, budgetID string, categoryID string, params *GetTransactionsByCategoryParams, reqEditors ...RequestEditorFn) (*GetTransactionsByCategoryResponse, error)

	// GetBudgetMonthsWithResponse request
	GetBudgetMonthsWithResponse(ctx context.Context, budgetID string, params *GetBudgetMonthsParams, reqEditors ...RequestEditorFn) (*GetBudgetMonthsResponse, error)

	// GetBudgetMonthWithResponse request
	GetBudgetMonthWithResponse(ctx context.Context, budgetID string, month openapi_types.Date, reqEditors ...RequestEditorFn) (*GetBudgetMonthResponse, error)

	// GetMonthCategoryByIDWithResponse request
	GetMonthCategoryByIDWithResponse(ctx context.Context, budgetID string, month openapi_types.Date, categoryID string, reqEditors ...RequestEditorFn) (*GetMonthCategoryByIDResponse, error)

	// UpdateMonthCategoryWithBodyWithResponse request with any body
	UpdateMonthCategoryWithBodyWithResponse(ctx context.Context, budgetID string, month openapi_types.Date, categoryID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonthCategoryResponse, error)

	UpdateMonthCategoryWithResponse(ctx context.Context, budgetID string, month openapi_types.Date, categoryID string, body UpdateMonthCategoryJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonthCategoryResponse, error)

	// GetTransactionsByMonthWithResponse request
	GetTransactionsByMonthWithResponse(ctx context.Context, budgetID string, month string, params *GetTransactionsByMonthParams, reqEditors ...RequestEditorFn) (*GetTransactionsByMonthResponse, error)

	// GetPayeeLocationsWithResponse request
	GetPayeeLocationsWithResponse(ctx context.Context, budgetID string, reqEditors ...RequestEditorFn) (*GetPayeeLocationsResponse, error)

	// GetPayeeLocationByIDWithResponse request
	GetPayeeLocationByIDWithResponse(ctx context.Context, budgetID string, payeeLocationID string, reqEditors ...RequestEditorFn) (*GetPayeeLocationByIDResponse, error)

	// GetPayeesWithResponse request
	GetPayeesWithResponse(ctx context.Context, budgetID string, params *GetPayeesParams, reqEditors ...RequestEditorFn) (*GetPayeesResponse, error)

	// GetPayeeByIDWithResponse request
	GetPayeeByIDWithResponse(ctx context.Context, budgetID string, payeeID string, reqEditors ...RequestEditorFn) (*GetPayeeByIDResponse, error)

	// UpdatePayeeWithBodyWithResponse request with any body
	UpdatePayeeWithBodyWithResponse(ctx context.Context, budgetID string, payeeID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePayeeResponse, error)

	UpdatePayeeWithResponse(ctx context.Context, budgetID string, payeeID string, body UpdatePayeeJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePayeeResponse, error)

	// GetPayeeLocationsByPayeeWithResponse request
	GetPayeeLocationsByPayeeWithResponse(ctx context.Context, budgetID string, payeeID string, reqEditors ...RequestEditorFn) (*GetPayeeLocationsByPayeeResponse, error)

	// GetTransactionsByPayeeWithResponse request
	GetTransactionsByPayeeWithResponse(ctx context.Context, budgetID string, payeeID string, params *GetTransactionsByPayeeParams, reqEditors ...RequestEditorFn) (*GetTransactionsByPayeeResponse, error)

	// GetScheduledTransactionsWithResponse request
	GetScheduledTransactionsWithResponse(ctx context.Context, budgetID string, params *GetScheduledTransactionsParams, reqEditors ...RequestEditorFn) (*GetScheduledTransactionsResponse, error)

	// CreateScheduledTransactionWithBodyWithResponse request with any body
	CreateScheduledTransactionWithBodyWithResponse(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateScheduledTransactionResponse, error)

	CreateScheduledTransactionWithResponse(ctx context.Context, budgetID string, body CreateScheduledTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateScheduledTransactionResponse, error)

	// DeleteScheduledTransactionWithResponse request
	DeleteScheduledTransactionWithResponse(ctx context.Context, budgetID string, scheduledTransactionID string, reqEditors ...RequestEditorFn) (*DeleteScheduledTransactionResponse, error)

	// GetScheduledTransactionByIDWithResponse request
	GetScheduledTransactionByIDWithResponse(ctx context.Context, budgetID string, scheduledTransactionID string, reqEditors ...RequestEditorFn) (*GetScheduledTransactionByIDResponse, error)

	// UpdateScheduledTransactionWithBodyWithResponse request with any body
	UpdateScheduledTransactionWithBodyWithResponse(ctx context.Context, budgetID string, scheduledTransactionID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateScheduledTransactionResponse, error)

	UpdateScheduledTransactionWithResponse(ctx context.Context, budgetID string, scheduledTransactionID string, body UpdateScheduledTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateScheduledTransactionResponse, error)

	// GetBudgetSettingsByIDWithResponse request
	GetBudgetSettingsByIDWithResponse(ctx context.Context, budgetID string, reqEditors ...RequestEditorFn) (*GetBudgetSettingsByIDResponse, error)

	// GetTransactionsWithResponse request
	GetTransactionsWithResponse(ctx context.Context, budgetID string, params *GetTransactionsParams, reqEditors ...RequestEditorFn) (*GetTransactionsResponse, error)

	// UpdateTransactionsWithBodyWithResponse request with any body
	UpdateTransactionsWithBodyWithResponse(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTransactionsResponse, error)

	UpdateTransactionsWithResponse(ctx context.Context, budgetID string, body UpdateTransactionsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTransactionsResponse, error)

	// CreateTransactionWithBodyWithResponse request with any body
	CreateTransactionWithBodyWithResponse(ctx context.Context, budgetID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTransactionResponse, error)

	CreateTransactionWithResponse(ctx context.Context, budgetID string, body CreateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTransactionResponse, error)

	// ImportTransactionsWithResponse request
	ImportTransactionsWithResponse(ctx context.Context, budgetID string, reqEditors ...RequestEditorFn) (*ImportTransactionsResponse, error)

	// DeleteTransactionWithResponse request
	DeleteTransactionWithResponse(ctx context.Context, budgetID string, transactionID string, reqEditors ...RequestEditorFn) (*DeleteTransactionResponse, error)

	// GetTransactionByIDWithResponse request
	GetTransactionByIDWithResponse(ctx context.Context, budgetID string, transactionID string, reqEditors ...RequestEditorFn) (*GetTransactionByIDResponse, error)

	// UpdateTransactionWithBodyWithResponse request with any body
	UpdateTransactionWithBodyWithResponse(ctx context.Context, budgetID string, transactionID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTransactionResponse, error)

	UpdateTransactionWithResponse(ctx context.Context, budgetID string, transactionID string, body UpdateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTransactionResponse, error)

	// GetUserWithResponse request
	GetUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUserResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateAccountJSONRequestBody

type CreateAccountJSONRequestBody = PostAccountWrapper

CreateAccountJSONRequestBody defines body for CreateAccount for application/json ContentType.

type CreateAccountResponse

type CreateAccountResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *AccountResponse
	JSON400      *ErrorResponse
}

func ParseCreateAccountResponse

func ParseCreateAccountResponse(rsp *http.Response) (*CreateAccountResponse, error)

ParseCreateAccountResponse parses an HTTP response from a CreateAccountWithResponse call

func (CreateAccountResponse) Status

func (r CreateAccountResponse) Status() string

Status returns HTTPResponse.Status

func (CreateAccountResponse) StatusCode

func (r CreateAccountResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateScheduledTransactionJSONRequestBody

type CreateScheduledTransactionJSONRequestBody = PostScheduledTransactionWrapper

CreateScheduledTransactionJSONRequestBody defines body for CreateScheduledTransaction for application/json ContentType.

type CreateScheduledTransactionResponse

type CreateScheduledTransactionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *ScheduledTransactionResponse
	JSON400      *ErrorResponse
}

func ParseCreateScheduledTransactionResponse

func ParseCreateScheduledTransactionResponse(rsp *http.Response) (*CreateScheduledTransactionResponse, error)

ParseCreateScheduledTransactionResponse parses an HTTP response from a CreateScheduledTransactionWithResponse call

func (CreateScheduledTransactionResponse) Status

Status returns HTTPResponse.Status

func (CreateScheduledTransactionResponse) StatusCode

func (r CreateScheduledTransactionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateTransactionJSONRequestBody

type CreateTransactionJSONRequestBody = PostTransactionsWrapper

CreateTransactionJSONRequestBody defines body for CreateTransaction for application/json ContentType.

type CreateTransactionResponse

type CreateTransactionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *SaveTransactionsResponse
	JSON400      *ErrorResponse
	JSON409      *ErrorResponse
}

func ParseCreateTransactionResponse

func ParseCreateTransactionResponse(rsp *http.Response) (*CreateTransactionResponse, error)

ParseCreateTransactionResponse parses an HTTP response from a CreateTransactionWithResponse call

func (CreateTransactionResponse) Status

func (r CreateTransactionResponse) Status() string

Status returns HTTPResponse.Status

func (CreateTransactionResponse) StatusCode

func (r CreateTransactionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CurrencyFormat

type CurrencyFormat struct {
	CurrencySymbol   string `json:"currency_symbol"`
	DecimalDigits    int32  `json:"decimal_digits"`
	DecimalSeparator string `json:"decimal_separator"`
	DisplaySymbol    bool   `json:"display_symbol"`
	ExampleFormat    string `json:"example_format"`
	GroupSeparator   string `json:"group_separator"`
	ISOCode          string `json:"iso_code"`
	SymbolFirst      bool   `json:"symbol_first"`
}

CurrencyFormat The currency format setting for the budget. In some cases the format will not be available and will be specified as null.

type DateFormat

type DateFormat struct {
	Format string `json:"format"`
}

DateFormat The date format setting for the budget. In some cases the format will not be available and will be specified as null.

type DeleteScheduledTransactionResponse

type DeleteScheduledTransactionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ScheduledTransactionResponse
	JSON404      *ErrorResponse
}

func ParseDeleteScheduledTransactionResponse

func ParseDeleteScheduledTransactionResponse(rsp *http.Response) (*DeleteScheduledTransactionResponse, error)

ParseDeleteScheduledTransactionResponse parses an HTTP response from a DeleteScheduledTransactionWithResponse call

func (DeleteScheduledTransactionResponse) Status

Status returns HTTPResponse.Status

func (DeleteScheduledTransactionResponse) StatusCode

func (r DeleteScheduledTransactionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteTransactionResponse

type DeleteTransactionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TransactionResponse
	JSON404      *ErrorResponse
}

func ParseDeleteTransactionResponse

func ParseDeleteTransactionResponse(rsp *http.Response) (*DeleteTransactionResponse, error)

ParseDeleteTransactionResponse parses an HTTP response from a DeleteTransactionWithResponse call

func (DeleteTransactionResponse) Status

func (r DeleteTransactionResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteTransactionResponse) StatusCode

func (r DeleteTransactionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ErrorDetail

type ErrorDetail struct {
	Detail string `json:"detail"`
	ID     string `json:"id"`
	Name   string `json:"name"`
}

ErrorDetail defines model for ErrorDetail.

type ErrorResponse

type ErrorResponse struct {
	Error ErrorDetail `json:"error"`
}

ErrorResponse defines model for ErrorResponse.

type ExistingTransaction

type ExistingTransaction struct {
	AccountID openapi_types.UUID `json:"account_id,omitempty,omitzero"`

	// Amount The transaction amount in milliunits format.  Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
	Amount int64 `json:"amount,omitempty,omitzero"`

	// Approved Whether or not the transaction is approved.  If not supplied, transaction will be unapproved by default.
	Approved bool `json:"approved,omitempty,omitzero"`

	// CategoryID The category for the transaction.  To configure a split transaction, you can specify null for `category_id` and provide a `subtransactions` array as part of the transaction object.  If an existing transaction is a split, the `category_id` cannot be changed.  Credit Card Payment categories are not permitted and will be ignored if supplied.
	CategoryID openapi_types.UUID `json:"category_id,omitzero"`

	// Cleared The cleared status of the transaction
	Cleared TransactionClearedStatus `json:"cleared,omitempty,omitzero"`

	// Date The transaction date in ISO format (e.g. 2016-12-01).  Future dates (scheduled transactions) are not permitted.  Split transaction dates cannot be changed and if a different date is supplied it will be ignored.
	Date openapi_types.Date `json:"date,omitempty,omitzero"`

	// FlagColor The transaction flag
	FlagColor TransactionFlagColor `json:"flag_color,omitzero"`
	Memo      string               `json:"memo,omitzero"`

	// PayeeID The payee for the transaction.  To create a transfer between two accounts, use the account transfer payee pointing to the target account.  Account transfer payees are specified as `transfer_payee_id` on the account resource.
	PayeeID openapi_types.UUID `json:"payee_id,omitzero"`

	// PayeeName The payee name.  If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee.
	PayeeName string `json:"payee_name,omitzero"`

	// Subtransactions An array of subtransactions to configure a transaction as a split. Updating `subtransactions` on an existing split transaction is not supported.
	Subtransactions []SaveSubTransaction `json:"subtransactions,omitempty,omitzero"`
}

ExistingTransaction defines model for ExistingTransaction.

type GetAccountByIDResponse

type GetAccountByIDResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *AccountResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetAccountByIDResponse

func ParseGetAccountByIDResponse(rsp *http.Response) (*GetAccountByIDResponse, error)

ParseGetAccountByIDResponse parses an HTTP response from a GetAccountByIDWithResponse call

func (GetAccountByIDResponse) Status

func (r GetAccountByIDResponse) Status() string

Status returns HTTPResponse.Status

func (GetAccountByIDResponse) StatusCode

func (r GetAccountByIDResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetAccountsParams

type GetAccountsParams struct {
	// LastKnowledgeOfServer The starting server knowledge.  If provided, only entities that have changed since `last_knowledge_of_server` will be included.
	LastKnowledgeOfServer int64 `form:"last_knowledge_of_server,omitempty" json:"last_knowledge_of_server,omitempty,omitzero"`
}

GetAccountsParams defines parameters for GetAccounts.

type GetAccountsResponse

type GetAccountsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *AccountsResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetAccountsResponse

func ParseGetAccountsResponse(rsp *http.Response) (*GetAccountsResponse, error)

ParseGetAccountsResponse parses an HTTP response from a GetAccountsWithResponse call

func (GetAccountsResponse) Status

func (r GetAccountsResponse) Status() string

Status returns HTTPResponse.Status

func (GetAccountsResponse) StatusCode

func (r GetAccountsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetBudgetByIDParams

type GetBudgetByIDParams struct {
	// LastKnowledgeOfServer The starting server knowledge.  If provided, only entities that have changed since `last_knowledge_of_server` will be included.
	LastKnowledgeOfServer int64 `form:"last_knowledge_of_server,omitempty" json:"last_knowledge_of_server,omitempty,omitzero"`
}

GetBudgetByIDParams defines parameters for GetBudgetByID.

type GetBudgetByIDResponse

type GetBudgetByIDResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *BudgetDetailResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetBudgetByIDResponse

func ParseGetBudgetByIDResponse(rsp *http.Response) (*GetBudgetByIDResponse, error)

ParseGetBudgetByIDResponse parses an HTTP response from a GetBudgetByIDWithResponse call

func (GetBudgetByIDResponse) Status

func (r GetBudgetByIDResponse) Status() string

Status returns HTTPResponse.Status

func (GetBudgetByIDResponse) StatusCode

func (r GetBudgetByIDResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetBudgetMonthResponse

type GetBudgetMonthResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *MonthDetailResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetBudgetMonthResponse

func ParseGetBudgetMonthResponse(rsp *http.Response) (*GetBudgetMonthResponse, error)

ParseGetBudgetMonthResponse parses an HTTP response from a GetBudgetMonthWithResponse call

func (GetBudgetMonthResponse) Status

func (r GetBudgetMonthResponse) Status() string

Status returns HTTPResponse.Status

func (GetBudgetMonthResponse) StatusCode

func (r GetBudgetMonthResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetBudgetMonthsParams

type GetBudgetMonthsParams struct {
	// LastKnowledgeOfServer The starting server knowledge.  If provided, only entities that have changed since `last_knowledge_of_server` will be included.
	LastKnowledgeOfServer int64 `form:"last_knowledge_of_server,omitempty" json:"last_knowledge_of_server,omitempty,omitzero"`
}

GetBudgetMonthsParams defines parameters for GetBudgetMonths.

type GetBudgetMonthsResponse

type GetBudgetMonthsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *MonthSummariesResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetBudgetMonthsResponse

func ParseGetBudgetMonthsResponse(rsp *http.Response) (*GetBudgetMonthsResponse, error)

ParseGetBudgetMonthsResponse parses an HTTP response from a GetBudgetMonthsWithResponse call

func (GetBudgetMonthsResponse) Status

func (r GetBudgetMonthsResponse) Status() string

Status returns HTTPResponse.Status

func (GetBudgetMonthsResponse) StatusCode

func (r GetBudgetMonthsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetBudgetSettingsByIDResponse

type GetBudgetSettingsByIDResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *BudgetSettingsResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetBudgetSettingsByIDResponse

func ParseGetBudgetSettingsByIDResponse(rsp *http.Response) (*GetBudgetSettingsByIDResponse, error)

ParseGetBudgetSettingsByIDResponse parses an HTTP response from a GetBudgetSettingsByIDWithResponse call

func (GetBudgetSettingsByIDResponse) Status

Status returns HTTPResponse.Status

func (GetBudgetSettingsByIDResponse) StatusCode

func (r GetBudgetSettingsByIDResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetBudgetsParams

type GetBudgetsParams struct {
	// IncludeAccounts Whether to include the list of budget accounts
	IncludeAccounts bool `form:"include_accounts,omitempty" json:"include_accounts,omitempty,omitzero"`
}

GetBudgetsParams defines parameters for GetBudgets.

type GetBudgetsResponse

type GetBudgetsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *BudgetSummaryResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetBudgetsResponse

func ParseGetBudgetsResponse(rsp *http.Response) (*GetBudgetsResponse, error)

ParseGetBudgetsResponse parses an HTTP response from a GetBudgetsWithResponse call

func (GetBudgetsResponse) Status

func (r GetBudgetsResponse) Status() string

Status returns HTTPResponse.Status

func (GetBudgetsResponse) StatusCode

func (r GetBudgetsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCategoriesParams

type GetCategoriesParams struct {
	// LastKnowledgeOfServer The starting server knowledge.  If provided, only entities that have changed since `last_knowledge_of_server` will be included.
	LastKnowledgeOfServer int64 `form:"last_knowledge_of_server,omitempty" json:"last_knowledge_of_server,omitempty,omitzero"`
}

GetCategoriesParams defines parameters for GetCategories.

type GetCategoriesResponse

type GetCategoriesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CategoriesResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetCategoriesResponse

func ParseGetCategoriesResponse(rsp *http.Response) (*GetCategoriesResponse, error)

ParseGetCategoriesResponse parses an HTTP response from a GetCategoriesWithResponse call

func (GetCategoriesResponse) Status

func (r GetCategoriesResponse) Status() string

Status returns HTTPResponse.Status

func (GetCategoriesResponse) StatusCode

func (r GetCategoriesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCategoryByIDResponse

type GetCategoryByIDResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CategoryResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetCategoryByIDResponse

func ParseGetCategoryByIDResponse(rsp *http.Response) (*GetCategoryByIDResponse, error)

ParseGetCategoryByIDResponse parses an HTTP response from a GetCategoryByIDWithResponse call

func (GetCategoryByIDResponse) Status

func (r GetCategoryByIDResponse) Status() string

Status returns HTTPResponse.Status

func (GetCategoryByIDResponse) StatusCode

func (r GetCategoryByIDResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetMonthCategoryByIDResponse

type GetMonthCategoryByIDResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CategoryResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetMonthCategoryByIDResponse

func ParseGetMonthCategoryByIDResponse(rsp *http.Response) (*GetMonthCategoryByIDResponse, error)

ParseGetMonthCategoryByIDResponse parses an HTTP response from a GetMonthCategoryByIDWithResponse call

func (GetMonthCategoryByIDResponse) Status

Status returns HTTPResponse.Status

func (GetMonthCategoryByIDResponse) StatusCode

func (r GetMonthCategoryByIDResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPayeeByIDResponse

type GetPayeeByIDResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PayeeResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetPayeeByIDResponse

func ParseGetPayeeByIDResponse(rsp *http.Response) (*GetPayeeByIDResponse, error)

ParseGetPayeeByIDResponse parses an HTTP response from a GetPayeeByIDWithResponse call

func (GetPayeeByIDResponse) Status

func (r GetPayeeByIDResponse) Status() string

Status returns HTTPResponse.Status

func (GetPayeeByIDResponse) StatusCode

func (r GetPayeeByIDResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPayeeLocationByIDResponse

type GetPayeeLocationByIDResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PayeeLocationResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetPayeeLocationByIDResponse

func ParseGetPayeeLocationByIDResponse(rsp *http.Response) (*GetPayeeLocationByIDResponse, error)

ParseGetPayeeLocationByIDResponse parses an HTTP response from a GetPayeeLocationByIDWithResponse call

func (GetPayeeLocationByIDResponse) Status

Status returns HTTPResponse.Status

func (GetPayeeLocationByIDResponse) StatusCode

func (r GetPayeeLocationByIDResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPayeeLocationsByPayeeResponse

type GetPayeeLocationsByPayeeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PayeeLocationsResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetPayeeLocationsByPayeeResponse

func ParseGetPayeeLocationsByPayeeResponse(rsp *http.Response) (*GetPayeeLocationsByPayeeResponse, error)

ParseGetPayeeLocationsByPayeeResponse parses an HTTP response from a GetPayeeLocationsByPayeeWithResponse call

func (GetPayeeLocationsByPayeeResponse) Status

Status returns HTTPResponse.Status

func (GetPayeeLocationsByPayeeResponse) StatusCode

func (r GetPayeeLocationsByPayeeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPayeeLocationsResponse

type GetPayeeLocationsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PayeeLocationsResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetPayeeLocationsResponse

func ParseGetPayeeLocationsResponse(rsp *http.Response) (*GetPayeeLocationsResponse, error)

ParseGetPayeeLocationsResponse parses an HTTP response from a GetPayeeLocationsWithResponse call

func (GetPayeeLocationsResponse) Status

func (r GetPayeeLocationsResponse) Status() string

Status returns HTTPResponse.Status

func (GetPayeeLocationsResponse) StatusCode

func (r GetPayeeLocationsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPayeesParams

type GetPayeesParams struct {
	// LastKnowledgeOfServer The starting server knowledge.  If provided, only entities that have changed since `last_knowledge_of_server` will be included.
	LastKnowledgeOfServer int64 `form:"last_knowledge_of_server,omitempty" json:"last_knowledge_of_server,omitempty,omitzero"`
}

GetPayeesParams defines parameters for GetPayees.

type GetPayeesResponse

type GetPayeesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PayeesResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetPayeesResponse

func ParseGetPayeesResponse(rsp *http.Response) (*GetPayeesResponse, error)

ParseGetPayeesResponse parses an HTTP response from a GetPayeesWithResponse call

func (GetPayeesResponse) Status

func (r GetPayeesResponse) Status() string

Status returns HTTPResponse.Status

func (GetPayeesResponse) StatusCode

func (r GetPayeesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetScheduledTransactionByIDResponse

type GetScheduledTransactionByIDResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ScheduledTransactionResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetScheduledTransactionByIDResponse

func ParseGetScheduledTransactionByIDResponse(rsp *http.Response) (*GetScheduledTransactionByIDResponse, error)

ParseGetScheduledTransactionByIDResponse parses an HTTP response from a GetScheduledTransactionByIDWithResponse call

func (GetScheduledTransactionByIDResponse) Status

Status returns HTTPResponse.Status

func (GetScheduledTransactionByIDResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetScheduledTransactionsParams

type GetScheduledTransactionsParams struct {
	// LastKnowledgeOfServer The starting server knowledge.  If provided, only entities that have changed since `last_knowledge_of_server` will be included.
	LastKnowledgeOfServer int64 `form:"last_knowledge_of_server,omitempty" json:"last_knowledge_of_server,omitempty,omitzero"`
}

GetScheduledTransactionsParams defines parameters for GetScheduledTransactions.

type GetScheduledTransactionsResponse

type GetScheduledTransactionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ScheduledTransactionsResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetScheduledTransactionsResponse

func ParseGetScheduledTransactionsResponse(rsp *http.Response) (*GetScheduledTransactionsResponse, error)

ParseGetScheduledTransactionsResponse parses an HTTP response from a GetScheduledTransactionsWithResponse call

func (GetScheduledTransactionsResponse) Status

Status returns HTTPResponse.Status

func (GetScheduledTransactionsResponse) StatusCode

func (r GetScheduledTransactionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTransactionByIDResponse

type GetTransactionByIDResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TransactionResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetTransactionByIDResponse

func ParseGetTransactionByIDResponse(rsp *http.Response) (*GetTransactionByIDResponse, error)

ParseGetTransactionByIDResponse parses an HTTP response from a GetTransactionByIDWithResponse call

func (GetTransactionByIDResponse) Status

Status returns HTTPResponse.Status

func (GetTransactionByIDResponse) StatusCode

func (r GetTransactionByIDResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTransactionsByAccountParams

type GetTransactionsByAccountParams struct {
	// SinceDate If specified, only transactions on or after this date will be included.  The date should be ISO formatted (e.g. 2016-12-30).
	SinceDate openapi_types.Date `form:"since_date,omitempty" json:"since_date,omitempty,omitzero"`

	// Type If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported.
	Type GetTransactionsByAccountParamsType `form:"type,omitempty" json:"type,omitempty,omitzero"`

	// LastKnowledgeOfServer The starting server knowledge.  If provided, only entities that have changed since `last_knowledge_of_server` will be included.
	LastKnowledgeOfServer int64 `form:"last_knowledge_of_server,omitempty" json:"last_knowledge_of_server,omitempty,omitzero"`
}

GetTransactionsByAccountParams defines parameters for GetTransactionsByAccount.

type GetTransactionsByAccountParamsType

type GetTransactionsByAccountParamsType string

GetTransactionsByAccountParamsType defines parameters for GetTransactionsByAccount.

const (
	GetTransactionsByAccountParamsTypeUnapproved    GetTransactionsByAccountParamsType = "unapproved"
	GetTransactionsByAccountParamsTypeUncategorized GetTransactionsByAccountParamsType = "uncategorized"
)

Defines values for GetTransactionsByAccountParamsType.

type GetTransactionsByAccountResponse

type GetTransactionsByAccountResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TransactionsResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetTransactionsByAccountResponse

func ParseGetTransactionsByAccountResponse(rsp *http.Response) (*GetTransactionsByAccountResponse, error)

ParseGetTransactionsByAccountResponse parses an HTTP response from a GetTransactionsByAccountWithResponse call

func (GetTransactionsByAccountResponse) Status

Status returns HTTPResponse.Status

func (GetTransactionsByAccountResponse) StatusCode

func (r GetTransactionsByAccountResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTransactionsByCategoryParams

type GetTransactionsByCategoryParams struct {
	// SinceDate If specified, only transactions on or after this date will be included.  The date should be ISO formatted (e.g. 2016-12-30).
	SinceDate openapi_types.Date `form:"since_date,omitempty" json:"since_date,omitempty,omitzero"`

	// Type If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported.
	Type GetTransactionsByCategoryParamsType `form:"type,omitempty" json:"type,omitempty,omitzero"`

	// LastKnowledgeOfServer The starting server knowledge.  If provided, only entities that have changed since `last_knowledge_of_server` will be included.
	LastKnowledgeOfServer int64 `form:"last_knowledge_of_server,omitempty" json:"last_knowledge_of_server,omitempty,omitzero"`
}

GetTransactionsByCategoryParams defines parameters for GetTransactionsByCategory.

type GetTransactionsByCategoryParamsType

type GetTransactionsByCategoryParamsType string

GetTransactionsByCategoryParamsType defines parameters for GetTransactionsByCategory.

const (
	GetTransactionsByCategoryParamsTypeUnapproved    GetTransactionsByCategoryParamsType = "unapproved"
	GetTransactionsByCategoryParamsTypeUncategorized GetTransactionsByCategoryParamsType = "uncategorized"
)

Defines values for GetTransactionsByCategoryParamsType.

type GetTransactionsByCategoryResponse

type GetTransactionsByCategoryResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *HybridTransactionsResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetTransactionsByCategoryResponse

func ParseGetTransactionsByCategoryResponse(rsp *http.Response) (*GetTransactionsByCategoryResponse, error)

ParseGetTransactionsByCategoryResponse parses an HTTP response from a GetTransactionsByCategoryWithResponse call

func (GetTransactionsByCategoryResponse) Status

Status returns HTTPResponse.Status

func (GetTransactionsByCategoryResponse) StatusCode

func (r GetTransactionsByCategoryResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTransactionsByMonthParams

type GetTransactionsByMonthParams struct {
	// SinceDate If specified, only transactions on or after this date will be included.  The date should be ISO formatted (e.g. 2016-12-30).
	SinceDate openapi_types.Date `form:"since_date,omitempty" json:"since_date,omitempty,omitzero"`

	// Type If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported.
	Type GetTransactionsByMonthParamsType `form:"type,omitempty" json:"type,omitempty,omitzero"`

	// LastKnowledgeOfServer The starting server knowledge.  If provided, only entities that have changed since `last_knowledge_of_server` will be included.
	LastKnowledgeOfServer int64 `form:"last_knowledge_of_server,omitempty" json:"last_knowledge_of_server,omitempty,omitzero"`
}

GetTransactionsByMonthParams defines parameters for GetTransactionsByMonth.

type GetTransactionsByMonthParamsType

type GetTransactionsByMonthParamsType string

GetTransactionsByMonthParamsType defines parameters for GetTransactionsByMonth.

const (
	GetTransactionsByMonthParamsTypeUnapproved    GetTransactionsByMonthParamsType = "unapproved"
	GetTransactionsByMonthParamsTypeUncategorized GetTransactionsByMonthParamsType = "uncategorized"
)

Defines values for GetTransactionsByMonthParamsType.

type GetTransactionsByMonthResponse

type GetTransactionsByMonthResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TransactionsResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetTransactionsByMonthResponse

func ParseGetTransactionsByMonthResponse(rsp *http.Response) (*GetTransactionsByMonthResponse, error)

ParseGetTransactionsByMonthResponse parses an HTTP response from a GetTransactionsByMonthWithResponse call

func (GetTransactionsByMonthResponse) Status

Status returns HTTPResponse.Status

func (GetTransactionsByMonthResponse) StatusCode

func (r GetTransactionsByMonthResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTransactionsByPayeeParams

type GetTransactionsByPayeeParams struct {
	// SinceDate If specified, only transactions on or after this date will be included.  The date should be ISO formatted (e.g. 2016-12-30).
	SinceDate openapi_types.Date `form:"since_date,omitempty" json:"since_date,omitempty,omitzero"`

	// Type If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported.
	Type GetTransactionsByPayeeParamsType `form:"type,omitempty" json:"type,omitempty,omitzero"`

	// LastKnowledgeOfServer The starting server knowledge.  If provided, only entities that have changed since `last_knowledge_of_server` will be included.
	LastKnowledgeOfServer int64 `form:"last_knowledge_of_server,omitempty" json:"last_knowledge_of_server,omitempty,omitzero"`
}

GetTransactionsByPayeeParams defines parameters for GetTransactionsByPayee.

type GetTransactionsByPayeeParamsType

type GetTransactionsByPayeeParamsType string

GetTransactionsByPayeeParamsType defines parameters for GetTransactionsByPayee.

const (
	GetTransactionsByPayeeParamsTypeUnapproved    GetTransactionsByPayeeParamsType = "unapproved"
	GetTransactionsByPayeeParamsTypeUncategorized GetTransactionsByPayeeParamsType = "uncategorized"
)

Defines values for GetTransactionsByPayeeParamsType.

type GetTransactionsByPayeeResponse

type GetTransactionsByPayeeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *HybridTransactionsResponse
	JSON404      *ErrorResponse
	JSONDefault  *ErrorResponse
}

func ParseGetTransactionsByPayeeResponse

func ParseGetTransactionsByPayeeResponse(rsp *http.Response) (*GetTransactionsByPayeeResponse, error)

ParseGetTransactionsByPayeeResponse parses an HTTP response from a GetTransactionsByPayeeWithResponse call

func (GetTransactionsByPayeeResponse) Status

Status returns HTTPResponse.Status

func (GetTransactionsByPayeeResponse) StatusCode

func (r GetTransactionsByPayeeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTransactionsParams

type GetTransactionsParams struct {
	// SinceDate If specified, only transactions on or after this date will be included.  The date should be ISO formatted (e.g. 2016-12-30).
	SinceDate openapi_types.Date `form:"since_date,omitempty" json:"since_date,omitempty,omitzero"`

	// Type If specified, only transactions of the specified type will be included. "uncategorized" and "unapproved" are currently supported.
	Type GetTransactionsParamsType `form:"type,omitempty" json:"type,omitempty,omitzero"`

	// LastKnowledgeOfServer The starting server knowledge.  If provided, only entities that have changed since `last_knowledge_of_server` will be included.
	LastKnowledgeOfServer int64 `form:"last_knowledge_of_server,omitempty" json:"last_knowledge_of_server,omitempty,omitzero"`
}

GetTransactionsParams defines parameters for GetTransactions.

type GetTransactionsParamsType

type GetTransactionsParamsType string

GetTransactionsParamsType defines parameters for GetTransactions.

const (
	Unapproved    GetTransactionsParamsType = "unapproved"
	Uncategorized GetTransactionsParamsType = "uncategorized"
)

Defines values for GetTransactionsParamsType.

type GetTransactionsResponse

type GetTransactionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TransactionsResponse
	JSON400      *ErrorResponse
	JSON404      *ErrorResponse
}

func ParseGetTransactionsResponse

func ParseGetTransactionsResponse(rsp *http.Response) (*GetTransactionsResponse, error)

ParseGetTransactionsResponse parses an HTTP response from a GetTransactionsWithResponse call

func (GetTransactionsResponse) Status

func (r GetTransactionsResponse) Status() string

Status returns HTTPResponse.Status

func (GetTransactionsResponse) StatusCode

func (r GetTransactionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUserResponse

type GetUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *UserResponse
	JSONDefault  *ErrorResponse
}

func ParseGetUserResponse

func ParseGetUserResponse(rsp *http.Response) (*GetUserResponse, error)

ParseGetUserResponse parses an HTTP response from a GetUserWithResponse call

func (GetUserResponse) Status

func (r GetUserResponse) Status() string

Status returns HTTPResponse.Status

func (GetUserResponse) StatusCode

func (r GetUserResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type HybridTransaction

type HybridTransaction struct {
	AccountID   openapi_types.UUID `json:"account_id"`
	AccountName string             `json:"account_name"`

	// Amount The transaction amount in milliunits format
	Amount int64 `json:"amount"`

	// Approved Whether or not the transaction is approved
	Approved   bool               `json:"approved"`
	CategoryID openapi_types.UUID `json:"category_id,omitzero"`

	// CategoryName The name of the category.  If a split transaction, this will be 'Split'.
	CategoryName string `json:"category_name,omitempty,omitzero"`

	// Cleared The cleared status of the transaction
	Cleared TransactionClearedStatus `json:"cleared"`

	// Date The transaction date in ISO format (e.g. 2016-12-01)
	Date openapi_types.Date `json:"date"`

	// DebtTransactionType If the transaction is a debt/loan account transaction, the type of transaction
	DebtTransactionType HybridTransactionDebtTransactionType `json:"debt_transaction_type,omitzero"`

	// Deleted Whether or not the transaction has been deleted.  Deleted transactions will only be included in delta requests.
	Deleted bool `json:"deleted"`

	// FlagColor The transaction flag
	FlagColor TransactionFlagColor `json:"flag_color,omitzero"`

	// FlagName The customized name of a transaction flag
	FlagName TransactionFlagName `json:"flag_name,omitzero"`
	ID       string              `json:"id"`

	// ImportID If the transaction was imported, this field is a unique (by account) import identifier.  If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'.  For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'.  If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'.
	ImportID string `json:"import_id,omitzero"`

	// ImportPayeeName If the transaction was imported, the payee name that was used when importing and before applying any payee rename rules
	ImportPayeeName string `json:"import_payee_name,omitzero"`

	// ImportPayeeNameOriginal If the transaction was imported, the original payee name as it appeared on the statement
	ImportPayeeNameOriginal string `json:"import_payee_name_original,omitzero"`

	// MatchedTransactionID If transaction is matched, the id of the matched transaction
	MatchedTransactionID string `json:"matched_transaction_id,omitzero"`
	Memo                 string `json:"memo,omitzero"`

	// ParentTransactionID For subtransaction types, this is the id of the parent transaction.  For transaction types, this id will be always be null.
	ParentTransactionID string             `json:"parent_transaction_id,omitzero"`
	PayeeID             openapi_types.UUID `json:"payee_id,omitzero"`
	PayeeName           string             `json:"payee_name,omitzero"`

	// TransferAccountID If a transfer transaction, the account to which it transfers
	TransferAccountID openapi_types.UUID `json:"transfer_account_id,omitzero"`

	// TransferTransactionID If a transfer transaction, the id of transaction on the other side of the transfer
	TransferTransactionID string `json:"transfer_transaction_id,omitzero"`

	// Type Whether the hybrid transaction represents a regular transaction or a subtransaction
	Type HybridTransactionType `json:"type"`
}

HybridTransaction defines model for HybridTransaction.

type HybridTransactionDebtTransactionType

type HybridTransactionDebtTransactionType string

HybridTransactionDebtTransactionType If the transaction is a debt/loan account transaction, the type of transaction

const (
	HybridTransactionDebtTransactionTypeBalanceAdjustment HybridTransactionDebtTransactionType = "balanceAdjustment"
	HybridTransactionDebtTransactionTypeCharge            HybridTransactionDebtTransactionType = "charge"
	HybridTransactionDebtTransactionTypeCredit            HybridTransactionDebtTransactionType = "credit"
	HybridTransactionDebtTransactionTypeEscrow            HybridTransactionDebtTransactionType = "escrow"
	HybridTransactionDebtTransactionTypeFee               HybridTransactionDebtTransactionType = "fee"
	HybridTransactionDebtTransactionTypeInterest          HybridTransactionDebtTransactionType = "interest"
	HybridTransactionDebtTransactionTypeLessThanNil       HybridTransactionDebtTransactionType = "<nil>"
	HybridTransactionDebtTransactionTypePayment           HybridTransactionDebtTransactionType = "payment"
	HybridTransactionDebtTransactionTypeRefund            HybridTransactionDebtTransactionType = "refund"
)

Defines values for HybridTransactionDebtTransactionType.

type HybridTransactionType

type HybridTransactionType string

HybridTransactionType Whether the hybrid transaction represents a regular transaction or a subtransaction

const (
	Subtransaction HybridTransactionType = "subtransaction"
	Transaction    HybridTransactionType = "transaction"
)

Defines values for HybridTransactionType.

type HybridTransactionsResponse

type HybridTransactionsResponse struct {
	Data struct {
		// ServerKnowledge The knowledge of the server
		ServerKnowledge int64               `json:"server_knowledge,omitempty,omitzero"`
		Transactions    []HybridTransaction `json:"transactions"`
	} `json:"data"`
}

HybridTransactionsResponse defines model for HybridTransactionsResponse.

type ImportTransactionsResponse

type ImportTransactionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TransactionsImportResponse
	JSON201      *TransactionsImportResponse
	JSON400      *ErrorResponse
}

func ParseImportTransactionsResponse

func ParseImportTransactionsResponse(rsp *http.Response) (*ImportTransactionsResponse, error)

ParseImportTransactionsResponse parses an HTTP response from a ImportTransactionsWithResponse call

func (ImportTransactionsResponse) Status

Status returns HTTPResponse.Status

func (ImportTransactionsResponse) StatusCode

func (r ImportTransactionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LoanAccountPeriodicValue

type LoanAccountPeriodicValue map[string]int64

LoanAccountPeriodicValue defines model for LoanAccountPeriodicValue.

type MonthDetail

type MonthDetail struct {
	// Activity The total amount of transactions in the month, excluding those categorized to 'Inflow: Ready to Assign'
	Activity int64 `json:"activity"`

	// AgeOfMoney The Age of Money as of the month
	AgeOfMoney int32 `json:"age_of_money,omitzero"`

	// Budgeted The total amount budgeted in the month
	Budgeted int64 `json:"budgeted"`

	// Categories The budget month categories.  Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified.
	Categories []Category `json:"categories"`

	// Deleted Whether or not the month has been deleted.  Deleted months will only be included in delta requests.
	Deleted bool `json:"deleted"`

	// Income The total amount of transactions categorized to 'Inflow: Ready to Assign' in the month
	Income int64              `json:"income"`
	Month  openapi_types.Date `json:"month"`
	Note   string             `json:"note,omitzero"`

	// ToBeBudgeted The available amount for 'Ready to Assign'
	ToBeBudgeted int64 `json:"to_be_budgeted"`
}

MonthDetail defines model for MonthDetail.

type MonthDetailResponse

type MonthDetailResponse struct {
	Data struct {
		Month MonthDetail `json:"month"`
	} `json:"data"`
}

MonthDetailResponse defines model for MonthDetailResponse.

type MonthSummariesResponse

type MonthSummariesResponse struct {
	Data struct {
		Months []MonthSummary `json:"months"`

		// ServerKnowledge The knowledge of the server
		ServerKnowledge int64 `json:"server_knowledge"`
	} `json:"data"`
}

MonthSummariesResponse defines model for MonthSummariesResponse.

type MonthSummary

type MonthSummary struct {
	// Activity The total amount of transactions in the month, excluding those categorized to 'Inflow: Ready to Assign'
	Activity int64 `json:"activity"`

	// AgeOfMoney The Age of Money as of the month
	AgeOfMoney int32 `json:"age_of_money,omitzero"`

	// Budgeted The total amount budgeted in the month
	Budgeted int64 `json:"budgeted"`

	// Deleted Whether or not the month has been deleted.  Deleted months will only be included in delta requests.
	Deleted bool `json:"deleted"`

	// Income The total amount of transactions categorized to 'Inflow: Ready to Assign' in the month
	Income int64              `json:"income"`
	Month  openapi_types.Date `json:"month"`
	Note   string             `json:"note,omitzero"`

	// ToBeBudgeted The available amount for 'Ready to Assign'
	ToBeBudgeted int64 `json:"to_be_budgeted"`
}

MonthSummary defines model for MonthSummary.

type NewTransaction

type NewTransaction struct {
	AccountID openapi_types.UUID `json:"account_id,omitempty,omitzero"`

	// Amount The transaction amount in milliunits format.  Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
	Amount int64 `json:"amount,omitempty,omitzero"`

	// Approved Whether or not the transaction is approved.  If not supplied, transaction will be unapproved by default.
	Approved bool `json:"approved,omitempty,omitzero"`

	// CategoryID The category for the transaction.  To configure a split transaction, you can specify null for `category_id` and provide a `subtransactions` array as part of the transaction object.  If an existing transaction is a split, the `category_id` cannot be changed.  Credit Card Payment categories are not permitted and will be ignored if supplied.
	CategoryID openapi_types.UUID `json:"category_id,omitzero"`

	// Cleared The cleared status of the transaction
	Cleared TransactionClearedStatus `json:"cleared,omitempty,omitzero"`

	// Date The transaction date in ISO format (e.g. 2016-12-01).  Future dates (scheduled transactions) are not permitted.  Split transaction dates cannot be changed and if a different date is supplied it will be ignored.
	Date openapi_types.Date `json:"date,omitempty,omitzero"`

	// FlagColor The transaction flag
	FlagColor TransactionFlagColor `json:"flag_color,omitzero"`

	// ImportID If specified, a new transaction will be assigned this `import_id` and considered "imported".  We will also attempt to match this imported transaction to an existing "user-entered" transaction on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.<br><br>Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'.  If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'.  Using a consistent format will prevent duplicates through Direct Import and File Based Import.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a "user-entered" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API).
	ImportID string `json:"import_id,omitzero"`
	Memo     string `json:"memo,omitzero"`

	// PayeeID The payee for the transaction.  To create a transfer between two accounts, use the account transfer payee pointing to the target account.  Account transfer payees are specified as `transfer_payee_id` on the account resource.
	PayeeID openapi_types.UUID `json:"payee_id,omitzero"`

	// PayeeName The payee name.  If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee.
	PayeeName string `json:"payee_name,omitzero"`

	// Subtransactions An array of subtransactions to configure a transaction as a split. Updating `subtransactions` on an existing split transaction is not supported.
	Subtransactions []SaveSubTransaction `json:"subtransactions,omitempty,omitzero"`
}

NewTransaction defines model for NewTransaction.

type PatchCategoryWrapper

type PatchCategoryWrapper struct {
	Category SaveCategory `json:"category"`
}

PatchCategoryWrapper defines model for PatchCategoryWrapper.

type PatchMonthCategoryWrapper

type PatchMonthCategoryWrapper struct {
	Category SaveMonthCategory `json:"category"`
}

PatchMonthCategoryWrapper defines model for PatchMonthCategoryWrapper.

type PatchPayeeWrapper

type PatchPayeeWrapper struct {
	Payee SavePayee `json:"payee"`
}

PatchPayeeWrapper defines model for PatchPayeeWrapper.

type PatchTransactionsWrapper

type PatchTransactionsWrapper struct {
	Transactions []SaveTransactionWithIDOrImportID `json:"transactions"`
}

PatchTransactionsWrapper defines model for PatchTransactionsWrapper.

type Payee

type Payee struct {
	// Deleted Whether or not the payee has been deleted.  Deleted payees will only be included in delta requests.
	Deleted bool               `json:"deleted"`
	ID      openapi_types.UUID `json:"id"`
	Name    string             `json:"name"`

	// TransferAccountID If a transfer payee, the `account_id` to which this payee transfers to
	TransferAccountID string `json:"transfer_account_id,omitzero"`
}

Payee defines model for Payee.

type PayeeLocation

type PayeeLocation struct {
	// Deleted Whether or not the payee location has been deleted.  Deleted payee locations will only be included in delta requests.
	Deleted   bool               `json:"deleted"`
	ID        openapi_types.UUID `json:"id"`
	Latitude  string             `json:"latitude"`
	Longitude string             `json:"longitude"`
	PayeeID   openapi_types.UUID `json:"payee_id"`
}

PayeeLocation defines model for PayeeLocation.

type PayeeLocationResponse

type PayeeLocationResponse struct {
	Data struct {
		PayeeLocation PayeeLocation `json:"payee_location"`
	} `json:"data"`
}

PayeeLocationResponse defines model for PayeeLocationResponse.

type PayeeLocationsResponse

type PayeeLocationsResponse struct {
	Data struct {
		PayeeLocations []PayeeLocation `json:"payee_locations"`
	} `json:"data"`
}

PayeeLocationsResponse defines model for PayeeLocationsResponse.

type PayeeResponse

type PayeeResponse struct {
	Data struct {
		Payee Payee `json:"payee"`
	} `json:"data"`
}

PayeeResponse defines model for PayeeResponse.

type PayeesResponse

type PayeesResponse struct {
	Data struct {
		Payees []Payee `json:"payees"`

		// ServerKnowledge The knowledge of the server
		ServerKnowledge int64 `json:"server_knowledge"`
	} `json:"data"`
}

PayeesResponse defines model for PayeesResponse.

type PostAccountWrapper

type PostAccountWrapper struct {
	Account SaveAccount `json:"account"`
}

PostAccountWrapper defines model for PostAccountWrapper.

type PostScheduledTransactionWrapper

type PostScheduledTransactionWrapper struct {
	ScheduledTransaction SaveScheduledTransaction `json:"scheduled_transaction"`
}

PostScheduledTransactionWrapper defines model for PostScheduledTransactionWrapper.

type PostTransactionsWrapper

type PostTransactionsWrapper struct {
	Transaction  NewTransaction   `json:"transaction,omitempty,omitzero"`
	Transactions []NewTransaction `json:"transactions,omitempty,omitzero"`
}

PostTransactionsWrapper defines model for PostTransactionsWrapper.

type PutScheduledTransactionWrapper

type PutScheduledTransactionWrapper struct {
	ScheduledTransaction SaveScheduledTransaction `json:"scheduled_transaction"`
}

PutScheduledTransactionWrapper defines model for PutScheduledTransactionWrapper.

type PutTransactionWrapper

type PutTransactionWrapper struct {
	Transaction ExistingTransaction `json:"transaction"`
}

PutTransactionWrapper defines model for PutTransactionWrapper.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type SaveAccount

type SaveAccount struct {
	// Balance The current balance of the account in milliunits format
	Balance int64 `json:"balance"`

	// Name The name of the account
	Name string `json:"name"`

	// Type The type of account
	Type AccountType `json:"type"`
}

SaveAccount defines model for SaveAccount.

type SaveCategory

type SaveCategory struct {
	CategoryGroupID openapi_types.UUID `json:"category_group_id,omitempty,omitzero"`

	// GoalTarget The goal target amount in milliunits format.  This amount can only be changed if the category already has a configured goal (goal_type != null).
	GoalTarget int64  `json:"goal_target,omitzero"`
	Name       string `json:"name,omitzero"`
	Note       string `json:"note,omitzero"`
}

SaveCategory defines model for SaveCategory.

type SaveCategoryResponse

type SaveCategoryResponse struct {
	Data struct {
		Category Category `json:"category"`

		// ServerKnowledge The knowledge of the server
		ServerKnowledge int64 `json:"server_knowledge"`
	} `json:"data"`
}

SaveCategoryResponse defines model for SaveCategoryResponse.

type SaveMonthCategory

type SaveMonthCategory struct {
	// Budgeted Budgeted amount in milliunits format
	Budgeted int64 `json:"budgeted"`
}

SaveMonthCategory defines model for SaveMonthCategory.

type SavePayee

type SavePayee struct {
	// Name The name of the payee. The name must be a maximum of 500 characters.
	Name string `json:"name,omitempty,omitzero"`
}

SavePayee defines model for SavePayee.

type SavePayeeResponse

type SavePayeeResponse struct {
	Data struct {
		Payee Payee `json:"payee"`

		// ServerKnowledge The knowledge of the server
		ServerKnowledge int64 `json:"server_knowledge"`
	} `json:"data"`
}

SavePayeeResponse defines model for SavePayeeResponse.

type SaveScheduledTransaction

type SaveScheduledTransaction struct {
	AccountID openapi_types.UUID `json:"account_id"`

	// Amount The scheduled transaction amount in milliunits format.
	Amount int64 `json:"amount,omitempty,omitzero"`

	// CategoryID The category for the scheduled transaction. Credit Card Payment categories are not permitted. Creating a split scheduled transaction is not currently supported.
	CategoryID openapi_types.UUID `json:"category_id,omitzero"`

	// Date The scheduled transaction date in ISO format (e.g. 2016-12-01).  This should be a future date no more than 5 years into the future.
	Date openapi_types.Date `json:"date"`

	// FlagColor The transaction flag
	FlagColor TransactionFlagColor `json:"flag_color,omitzero"`

	// Frequency The scheduled transaction frequency
	Frequency ScheduledTransactionFrequency `json:"frequency,omitempty,omitzero"`
	Memo      string                        `json:"memo,omitzero"`

	// PayeeID The payee for the scheduled transaction.  To create a transfer between two accounts, use the account transfer payee pointing to the target account.  Account transfer payees are specified as `transfer_payee_id` on the account resource.
	PayeeID openapi_types.UUID `json:"payee_id,omitzero"`

	// PayeeName The payee name for the the scheduled transaction.  If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a payee with the same name or (2) creation of a new payee.
	PayeeName string `json:"payee_name,omitzero"`
}

SaveScheduledTransaction defines model for SaveScheduledTransaction.

type SaveSubTransaction

type SaveSubTransaction struct {
	// Amount The subtransaction amount in milliunits format.
	Amount int64 `json:"amount"`

	// CategoryID The category for the subtransaction.  Credit Card Payment categories are not permitted and will be ignored if supplied.
	CategoryID openapi_types.UUID `json:"category_id,omitzero"`
	Memo       string             `json:"memo,omitzero"`

	// PayeeID The payee for the subtransaction.
	PayeeID openapi_types.UUID `json:"payee_id,omitzero"`

	// PayeeName The payee name.  If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified on parent transaction) or (2) a payee with the same name or (3) creation of a new payee.
	PayeeName string `json:"payee_name,omitzero"`
}

SaveSubTransaction defines model for SaveSubTransaction.

type SaveTransactionWithIDOrImportID

type SaveTransactionWithIDOrImportID struct {
	AccountID openapi_types.UUID `json:"account_id,omitempty,omitzero"`

	// Amount The transaction amount in milliunits format.  Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
	Amount int64 `json:"amount,omitempty,omitzero"`

	// Approved Whether or not the transaction is approved.  If not supplied, transaction will be unapproved by default.
	Approved bool `json:"approved,omitempty,omitzero"`

	// CategoryID The category for the transaction.  To configure a split transaction, you can specify null for `category_id` and provide a `subtransactions` array as part of the transaction object.  If an existing transaction is a split, the `category_id` cannot be changed.  Credit Card Payment categories are not permitted and will be ignored if supplied.
	CategoryID openapi_types.UUID `json:"category_id,omitzero"`

	// Cleared The cleared status of the transaction
	Cleared TransactionClearedStatus `json:"cleared,omitempty,omitzero"`

	// Date The transaction date in ISO format (e.g. 2016-12-01).  Future dates (scheduled transactions) are not permitted.  Split transaction dates cannot be changed and if a different date is supplied it will be ignored.
	Date openapi_types.Date `json:"date,omitempty,omitzero"`

	// FlagColor The transaction flag
	FlagColor TransactionFlagColor `json:"flag_color,omitzero"`

	// ID If specified, this id will be used to lookup a transaction by its `id` for the purpose of updating the transaction itself. If not specified, an `import_id` should be supplied.
	ID string `json:"id,omitzero"`

	// ImportID If specified, this id will be used to lookup a transaction by its `import_id` for the purpose of updating the transaction itself. If not specified, an `id` should be supplied.  You may not provide both an `id` and an `import_id` and updating an `import_id` on an existing transaction is not allowed.
	ImportID string `json:"import_id,omitzero"`
	Memo     string `json:"memo,omitzero"`

	// PayeeID The payee for the transaction.  To create a transfer between two accounts, use the account transfer payee pointing to the target account.  Account transfer payees are specified as `transfer_payee_id` on the account resource.
	PayeeID openapi_types.UUID `json:"payee_id,omitzero"`

	// PayeeName The payee name.  If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee.
	PayeeName string `json:"payee_name,omitzero"`

	// Subtransactions An array of subtransactions to configure a transaction as a split. Updating `subtransactions` on an existing split transaction is not supported.
	Subtransactions []SaveSubTransaction `json:"subtransactions,omitempty,omitzero"`
}

SaveTransactionWithIDOrImportID defines model for SaveTransactionWithIdOrImportId.

type SaveTransactionWithOptionalFields

type SaveTransactionWithOptionalFields struct {
	AccountID openapi_types.UUID `json:"account_id,omitempty,omitzero"`

	// Amount The transaction amount in milliunits format.  Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
	Amount int64 `json:"amount,omitempty,omitzero"`

	// Approved Whether or not the transaction is approved.  If not supplied, transaction will be unapproved by default.
	Approved bool `json:"approved,omitempty,omitzero"`

	// CategoryID The category for the transaction.  To configure a split transaction, you can specify null for `category_id` and provide a `subtransactions` array as part of the transaction object.  If an existing transaction is a split, the `category_id` cannot be changed.  Credit Card Payment categories are not permitted and will be ignored if supplied.
	CategoryID openapi_types.UUID `json:"category_id,omitzero"`

	// Cleared The cleared status of the transaction
	Cleared TransactionClearedStatus `json:"cleared,omitempty,omitzero"`

	// Date The transaction date in ISO format (e.g. 2016-12-01).  Future dates (scheduled transactions) are not permitted.  Split transaction dates cannot be changed and if a different date is supplied it will be ignored.
	Date openapi_types.Date `json:"date,omitempty,omitzero"`

	// FlagColor The transaction flag
	FlagColor TransactionFlagColor `json:"flag_color,omitzero"`
	Memo      string               `json:"memo,omitzero"`

	// PayeeID The payee for the transaction.  To create a transfer between two accounts, use the account transfer payee pointing to the target account.  Account transfer payees are specified as `transfer_payee_id` on the account resource.
	PayeeID openapi_types.UUID `json:"payee_id,omitzero"`

	// PayeeName The payee name.  If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee.
	PayeeName string `json:"payee_name,omitzero"`

	// Subtransactions An array of subtransactions to configure a transaction as a split. Updating `subtransactions` on an existing split transaction is not supported.
	Subtransactions []SaveSubTransaction `json:"subtransactions,omitempty,omitzero"`
}

SaveTransactionWithOptionalFields defines model for SaveTransactionWithOptionalFields.

type SaveTransactionsResponse

type SaveTransactionsResponse struct {
	Data struct {
		// DuplicateImportIDs If multiple transactions were specified, a list of import_ids that were not created because of an existing `import_id` found on the same account
		DuplicateImportIDs []string `json:"duplicate_import_ids,omitempty,omitzero"`

		// ServerKnowledge The knowledge of the server
		ServerKnowledge int64             `json:"server_knowledge"`
		Transaction     TransactionDetail `json:"transaction,omitempty,omitzero"`

		// TransactionIDs The transaction ids that were saved
		TransactionIDs []string `json:"transaction_ids"`

		// Transactions If multiple transactions were specified, the transactions that were saved
		Transactions []TransactionDetail `json:"transactions,omitempty,omitzero"`
	} `json:"data"`
}

SaveTransactionsResponse defines model for SaveTransactionsResponse.

type ScheduledSubTransaction

type ScheduledSubTransaction struct {
	// Amount The scheduled subtransaction amount in milliunits format
	Amount       int64              `json:"amount"`
	CategoryID   openapi_types.UUID `json:"category_id,omitzero"`
	CategoryName string             `json:"category_name,omitzero"`

	// Deleted Whether or not the scheduled subtransaction has been deleted. Deleted scheduled subtransactions will only be included in delta requests.
	Deleted                bool               `json:"deleted"`
	ID                     openapi_types.UUID `json:"id"`
	Memo                   string             `json:"memo,omitzero"`
	PayeeID                openapi_types.UUID `json:"payee_id,omitzero"`
	PayeeName              string             `json:"payee_name,omitzero"`
	ScheduledTransactionID openapi_types.UUID `json:"scheduled_transaction_id"`

	// TransferAccountID If a transfer, the account_id which the scheduled subtransaction transfers to
	TransferAccountID openapi_types.UUID `json:"transfer_account_id,omitzero"`
}

ScheduledSubTransaction defines model for ScheduledSubTransaction.

type ScheduledTransactionDetail

type ScheduledTransactionDetail struct {
	AccountID   openapi_types.UUID `json:"account_id"`
	AccountName string             `json:"account_name"`

	// Amount The scheduled transaction amount in milliunits format
	Amount     int64              `json:"amount"`
	CategoryID openapi_types.UUID `json:"category_id,omitzero"`

	// CategoryName The name of the category.  If a split scheduled transaction, this will be 'Split'.
	CategoryName string `json:"category_name,omitzero"`

	// DateFirst The first date for which the Scheduled Transaction was scheduled.
	DateFirst openapi_types.Date `json:"date_first"`

	// DateNext The next date for which the Scheduled Transaction is scheduled.
	DateNext openapi_types.Date `json:"date_next"`

	// Deleted Whether or not the scheduled transaction has been deleted.  Deleted scheduled transactions will only be included in delta requests.
	Deleted bool `json:"deleted"`

	// FlagColor The transaction flag
	FlagColor TransactionFlagColor `json:"flag_color,omitzero"`

	// FlagName The customized name of a transaction flag
	FlagName  TransactionFlagName                 `json:"flag_name,omitzero"`
	Frequency ScheduledTransactionDetailFrequency `json:"frequency"`
	ID        openapi_types.UUID                  `json:"id"`
	Memo      string                              `json:"memo,omitzero"`
	PayeeID   openapi_types.UUID                  `json:"payee_id,omitzero"`
	PayeeName string                              `json:"payee_name,omitzero"`

	// Subtransactions If a split scheduled transaction, the subtransactions.
	Subtransactions []ScheduledSubTransaction `json:"subtransactions"`

	// TransferAccountID If a transfer, the account_id which the scheduled transaction transfers to
	TransferAccountID openapi_types.UUID `json:"transfer_account_id,omitzero"`
}

ScheduledTransactionDetail defines model for ScheduledTransactionDetail.

type ScheduledTransactionDetailFrequency

type ScheduledTransactionDetailFrequency string

ScheduledTransactionDetailFrequency defines model for ScheduledTransactionDetail.Frequency.

const (
	ScheduledTransactionDetailFrequencyDaily           ScheduledTransactionDetailFrequency = "daily"
	ScheduledTransactionDetailFrequencyEvery3Months    ScheduledTransactionDetailFrequency = "every3Months"
	ScheduledTransactionDetailFrequencyEvery4Months    ScheduledTransactionDetailFrequency = "every4Months"
	ScheduledTransactionDetailFrequencyEvery4Weeks     ScheduledTransactionDetailFrequency = "every4Weeks"
	ScheduledTransactionDetailFrequencyEveryOtherMonth ScheduledTransactionDetailFrequency = "everyOtherMonth"
	ScheduledTransactionDetailFrequencyEveryOtherWeek  ScheduledTransactionDetailFrequency = "everyOtherWeek"
	ScheduledTransactionDetailFrequencyEveryOtherYear  ScheduledTransactionDetailFrequency = "everyOtherYear"
	ScheduledTransactionDetailFrequencyMonthly         ScheduledTransactionDetailFrequency = "monthly"
	ScheduledTransactionDetailFrequencyNever           ScheduledTransactionDetailFrequency = "never"
	ScheduledTransactionDetailFrequencyTwiceAMonth     ScheduledTransactionDetailFrequency = "twiceAMonth"
	ScheduledTransactionDetailFrequencyTwiceAYear      ScheduledTransactionDetailFrequency = "twiceAYear"
	ScheduledTransactionDetailFrequencyWeekly          ScheduledTransactionDetailFrequency = "weekly"
	ScheduledTransactionDetailFrequencyYearly          ScheduledTransactionDetailFrequency = "yearly"
)

Defines values for ScheduledTransactionDetailFrequency.

type ScheduledTransactionFrequency

type ScheduledTransactionFrequency string

ScheduledTransactionFrequency The scheduled transaction frequency

const (
	ScheduledTransactionFrequencyDaily           ScheduledTransactionFrequency = "daily"
	ScheduledTransactionFrequencyEvery3Months    ScheduledTransactionFrequency = "every3Months"
	ScheduledTransactionFrequencyEvery4Months    ScheduledTransactionFrequency = "every4Months"
	ScheduledTransactionFrequencyEvery4Weeks     ScheduledTransactionFrequency = "every4Weeks"
	ScheduledTransactionFrequencyEveryOtherMonth ScheduledTransactionFrequency = "everyOtherMonth"
	ScheduledTransactionFrequencyEveryOtherWeek  ScheduledTransactionFrequency = "everyOtherWeek"
	ScheduledTransactionFrequencyEveryOtherYear  ScheduledTransactionFrequency = "everyOtherYear"
	ScheduledTransactionFrequencyMonthly         ScheduledTransactionFrequency = "monthly"
	ScheduledTransactionFrequencyNever           ScheduledTransactionFrequency = "never"
	ScheduledTransactionFrequencyTwiceAMonth     ScheduledTransactionFrequency = "twiceAMonth"
	ScheduledTransactionFrequencyTwiceAYear      ScheduledTransactionFrequency = "twiceAYear"
	ScheduledTransactionFrequencyWeekly          ScheduledTransactionFrequency = "weekly"
	ScheduledTransactionFrequencyYearly          ScheduledTransactionFrequency = "yearly"
)

Defines values for ScheduledTransactionFrequency.

type ScheduledTransactionResponse

type ScheduledTransactionResponse struct {
	Data struct {
		ScheduledTransaction ScheduledTransactionDetail `json:"scheduled_transaction"`
	} `json:"data"`
}

ScheduledTransactionResponse defines model for ScheduledTransactionResponse.

type ScheduledTransactionSummary

type ScheduledTransactionSummary struct {
	AccountID openapi_types.UUID `json:"account_id"`

	// Amount The scheduled transaction amount in milliunits format
	Amount     int64              `json:"amount"`
	CategoryID openapi_types.UUID `json:"category_id,omitzero"`

	// DateFirst The first date for which the Scheduled Transaction was scheduled.
	DateFirst openapi_types.Date `json:"date_first"`

	// DateNext The next date for which the Scheduled Transaction is scheduled.
	DateNext openapi_types.Date `json:"date_next"`

	// Deleted Whether or not the scheduled transaction has been deleted.  Deleted scheduled transactions will only be included in delta requests.
	Deleted bool `json:"deleted"`

	// FlagColor The transaction flag
	FlagColor TransactionFlagColor `json:"flag_color,omitzero"`

	// FlagName The customized name of a transaction flag
	FlagName  TransactionFlagName                  `json:"flag_name,omitzero"`
	Frequency ScheduledTransactionSummaryFrequency `json:"frequency"`
	ID        openapi_types.UUID                   `json:"id"`
	Memo      string                               `json:"memo,omitzero"`
	PayeeID   openapi_types.UUID                   `json:"payee_id,omitzero"`

	// TransferAccountID If a transfer, the account_id which the scheduled transaction transfers to
	TransferAccountID openapi_types.UUID `json:"transfer_account_id,omitzero"`
}

ScheduledTransactionSummary defines model for ScheduledTransactionSummary.

type ScheduledTransactionSummaryFrequency

type ScheduledTransactionSummaryFrequency string

ScheduledTransactionSummaryFrequency defines model for ScheduledTransactionSummary.Frequency.

const (
	Daily           ScheduledTransactionSummaryFrequency = "daily"
	Every3Months    ScheduledTransactionSummaryFrequency = "every3Months"
	Every4Months    ScheduledTransactionSummaryFrequency = "every4Months"
	Every4Weeks     ScheduledTransactionSummaryFrequency = "every4Weeks"
	EveryOtherMonth ScheduledTransactionSummaryFrequency = "everyOtherMonth"
	EveryOtherWeek  ScheduledTransactionSummaryFrequency = "everyOtherWeek"
	EveryOtherYear  ScheduledTransactionSummaryFrequency = "everyOtherYear"
	Monthly         ScheduledTransactionSummaryFrequency = "monthly"
	Never           ScheduledTransactionSummaryFrequency = "never"
	TwiceAMonth     ScheduledTransactionSummaryFrequency = "twiceAMonth"
	TwiceAYear      ScheduledTransactionSummaryFrequency = "twiceAYear"
	Weekly          ScheduledTransactionSummaryFrequency = "weekly"
	Yearly          ScheduledTransactionSummaryFrequency = "yearly"
)

Defines values for ScheduledTransactionSummaryFrequency.

type ScheduledTransactionsResponse

type ScheduledTransactionsResponse struct {
	Data struct {
		ScheduledTransactions []ScheduledTransactionDetail `json:"scheduled_transactions"`

		// ServerKnowledge The knowledge of the server
		ServerKnowledge int64 `json:"server_knowledge"`
	} `json:"data"`
}

ScheduledTransactionsResponse defines model for ScheduledTransactionsResponse.

type SubTransaction

type SubTransaction struct {
	// Amount The subtransaction amount in milliunits format
	Amount       int64              `json:"amount"`
	CategoryID   openapi_types.UUID `json:"category_id,omitzero"`
	CategoryName string             `json:"category_name,omitzero"`

	// Deleted Whether or not the subtransaction has been deleted.  Deleted subtransactions will only be included in delta requests.
	Deleted       bool               `json:"deleted"`
	ID            string             `json:"id"`
	Memo          string             `json:"memo,omitzero"`
	PayeeID       openapi_types.UUID `json:"payee_id,omitzero"`
	PayeeName     string             `json:"payee_name,omitzero"`
	TransactionID string             `json:"transaction_id"`

	// TransferAccountID If a transfer, the account_id which the subtransaction transfers to
	TransferAccountID openapi_types.UUID `json:"transfer_account_id,omitzero"`

	// TransferTransactionID If a transfer, the id of transaction on the other side of the transfer
	TransferTransactionID string `json:"transfer_transaction_id,omitzero"`
}

SubTransaction defines model for SubTransaction.

type TransactionClearedStatus

type TransactionClearedStatus string

TransactionClearedStatus The cleared status of the transaction

const (
	Cleared    TransactionClearedStatus = "cleared"
	Reconciled TransactionClearedStatus = "reconciled"
	Uncleared  TransactionClearedStatus = "uncleared"
)

Defines values for TransactionClearedStatus.

type TransactionDetail

type TransactionDetail struct {
	AccountID   openapi_types.UUID `json:"account_id"`
	AccountName string             `json:"account_name"`

	// Amount The transaction amount in milliunits format
	Amount int64 `json:"amount"`

	// Approved Whether or not the transaction is approved
	Approved   bool               `json:"approved"`
	CategoryID openapi_types.UUID `json:"category_id,omitzero"`

	// CategoryName The name of the category.  If a split transaction, this will be 'Split'.
	CategoryName string `json:"category_name,omitzero"`

	// Cleared The cleared status of the transaction
	Cleared TransactionClearedStatus `json:"cleared"`

	// Date The transaction date in ISO format (e.g. 2016-12-01)
	Date openapi_types.Date `json:"date"`

	// DebtTransactionType If the transaction is a debt/loan account transaction, the type of transaction
	DebtTransactionType TransactionDetailDebtTransactionType `json:"debt_transaction_type,omitzero"`

	// Deleted Whether or not the transaction has been deleted.  Deleted transactions will only be included in delta requests.
	Deleted bool `json:"deleted"`

	// FlagColor The transaction flag
	FlagColor TransactionFlagColor `json:"flag_color,omitzero"`

	// FlagName The customized name of a transaction flag
	FlagName TransactionFlagName `json:"flag_name,omitzero"`
	ID       string              `json:"id"`

	// ImportID If the transaction was imported, this field is a unique (by account) import identifier.  If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'.  For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'.  If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'.
	ImportID string `json:"import_id,omitzero"`

	// ImportPayeeName If the transaction was imported, the payee name that was used when importing and before applying any payee rename rules
	ImportPayeeName string `json:"import_payee_name,omitzero"`

	// ImportPayeeNameOriginal If the transaction was imported, the original payee name as it appeared on the statement
	ImportPayeeNameOriginal string `json:"import_payee_name_original,omitzero"`

	// MatchedTransactionID If transaction is matched, the id of the matched transaction
	MatchedTransactionID string             `json:"matched_transaction_id,omitzero"`
	Memo                 string             `json:"memo,omitzero"`
	PayeeID              openapi_types.UUID `json:"payee_id,omitzero"`
	PayeeName            string             `json:"payee_name,omitzero"`

	// Subtransactions If a split transaction, the subtransactions.
	Subtransactions []SubTransaction `json:"subtransactions"`

	// TransferAccountID If a transfer transaction, the account to which it transfers
	TransferAccountID openapi_types.UUID `json:"transfer_account_id,omitzero"`

	// TransferTransactionID If a transfer transaction, the id of transaction on the other side of the transfer
	TransferTransactionID string `json:"transfer_transaction_id,omitzero"`
}

TransactionDetail defines model for TransactionDetail.

type TransactionDetailDebtTransactionType

type TransactionDetailDebtTransactionType string

TransactionDetailDebtTransactionType If the transaction is a debt/loan account transaction, the type of transaction

const (
	TransactionDetailDebtTransactionTypeBalanceAdjustment TransactionDetailDebtTransactionType = "balanceAdjustment"
	TransactionDetailDebtTransactionTypeCharge            TransactionDetailDebtTransactionType = "charge"
	TransactionDetailDebtTransactionTypeCredit            TransactionDetailDebtTransactionType = "credit"
	TransactionDetailDebtTransactionTypeEscrow            TransactionDetailDebtTransactionType = "escrow"
	TransactionDetailDebtTransactionTypeFee               TransactionDetailDebtTransactionType = "fee"
	TransactionDetailDebtTransactionTypeInterest          TransactionDetailDebtTransactionType = "interest"
	TransactionDetailDebtTransactionTypeLessThanNil       TransactionDetailDebtTransactionType = "<nil>"
	TransactionDetailDebtTransactionTypePayment           TransactionDetailDebtTransactionType = "payment"
	TransactionDetailDebtTransactionTypeRefund            TransactionDetailDebtTransactionType = "refund"
)

Defines values for TransactionDetailDebtTransactionType.

type TransactionFlagColor

type TransactionFlagColor string

TransactionFlagColor The transaction flag

const (
	TransactionFlagColorBlue        TransactionFlagColor = "blue"
	TransactionFlagColorEmpty       TransactionFlagColor = ""
	TransactionFlagColorGreen       TransactionFlagColor = "green"
	TransactionFlagColorLessThanNil TransactionFlagColor = "<nil>"
	TransactionFlagColorOrange      TransactionFlagColor = "orange"
	TransactionFlagColorPurple      TransactionFlagColor = "purple"
	TransactionFlagColorRed         TransactionFlagColor = "red"
	TransactionFlagColorYellow      TransactionFlagColor = "yellow"
)

Defines values for TransactionFlagColor.

type TransactionFlagName

type TransactionFlagName = string

TransactionFlagName The customized name of a transaction flag

type TransactionResponse

type TransactionResponse struct {
	Data struct {
		// ServerKnowledge The knowledge of the server
		ServerKnowledge int64             `json:"server_knowledge"`
		Transaction     TransactionDetail `json:"transaction"`
	} `json:"data"`
}

TransactionResponse defines model for TransactionResponse.

type TransactionSummary

type TransactionSummary struct {
	AccountID openapi_types.UUID `json:"account_id"`

	// Amount The transaction amount in milliunits format
	Amount int64 `json:"amount"`

	// Approved Whether or not the transaction is approved
	Approved   bool               `json:"approved"`
	CategoryID openapi_types.UUID `json:"category_id,omitzero"`

	// Cleared The cleared status of the transaction
	Cleared TransactionClearedStatus `json:"cleared"`

	// Date The transaction date in ISO format (e.g. 2016-12-01)
	Date openapi_types.Date `json:"date"`

	// DebtTransactionType If the transaction is a debt/loan account transaction, the type of transaction
	DebtTransactionType TransactionSummaryDebtTransactionType `json:"debt_transaction_type,omitzero"`

	// Deleted Whether or not the transaction has been deleted.  Deleted transactions will only be included in delta requests.
	Deleted bool `json:"deleted"`

	// FlagColor The transaction flag
	FlagColor TransactionFlagColor `json:"flag_color,omitzero"`

	// FlagName The customized name of a transaction flag
	FlagName TransactionFlagName `json:"flag_name,omitzero"`
	ID       string              `json:"id"`

	// ImportID If the transaction was imported, this field is a unique (by account) import identifier.  If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'.  For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'.  If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'.
	ImportID string `json:"import_id,omitzero"`

	// ImportPayeeName If the transaction was imported, the payee name that was used when importing and before applying any payee rename rules
	ImportPayeeName string `json:"import_payee_name,omitzero"`

	// ImportPayeeNameOriginal If the transaction was imported, the original payee name as it appeared on the statement
	ImportPayeeNameOriginal string `json:"import_payee_name_original,omitzero"`

	// MatchedTransactionID If transaction is matched, the id of the matched transaction
	MatchedTransactionID string             `json:"matched_transaction_id,omitzero"`
	Memo                 string             `json:"memo,omitzero"`
	PayeeID              openapi_types.UUID `json:"payee_id,omitzero"`

	// TransferAccountID If a transfer transaction, the account to which it transfers
	TransferAccountID openapi_types.UUID `json:"transfer_account_id,omitzero"`

	// TransferTransactionID If a transfer transaction, the id of transaction on the other side of the transfer
	TransferTransactionID string `json:"transfer_transaction_id,omitzero"`
}

TransactionSummary defines model for TransactionSummary.

type TransactionSummaryDebtTransactionType

type TransactionSummaryDebtTransactionType string

TransactionSummaryDebtTransactionType If the transaction is a debt/loan account transaction, the type of transaction

Defines values for TransactionSummaryDebtTransactionType.

type TransactionsImportResponse

type TransactionsImportResponse struct {
	Data struct {
		// TransactionIDs The list of transaction ids that were imported.
		TransactionIDs []string `json:"transaction_ids"`
	} `json:"data"`
}

TransactionsImportResponse defines model for TransactionsImportResponse.

type TransactionsResponse

type TransactionsResponse struct {
	Data struct {
		// ServerKnowledge The knowledge of the server
		ServerKnowledge int64               `json:"server_knowledge"`
		Transactions    []TransactionDetail `json:"transactions"`
	} `json:"data"`
}

TransactionsResponse defines model for TransactionsResponse.

type UpdateCategoryJSONRequestBody

type UpdateCategoryJSONRequestBody = PatchCategoryWrapper

UpdateCategoryJSONRequestBody defines body for UpdateCategory for application/json ContentType.

type UpdateCategoryResponse

type UpdateCategoryResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SaveCategoryResponse
	JSON400      *ErrorResponse
}

func ParseUpdateCategoryResponse

func ParseUpdateCategoryResponse(rsp *http.Response) (*UpdateCategoryResponse, error)

ParseUpdateCategoryResponse parses an HTTP response from a UpdateCategoryWithResponse call

func (UpdateCategoryResponse) Status

func (r UpdateCategoryResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateCategoryResponse) StatusCode

func (r UpdateCategoryResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateMonthCategoryJSONRequestBody

type UpdateMonthCategoryJSONRequestBody = PatchMonthCategoryWrapper

UpdateMonthCategoryJSONRequestBody defines body for UpdateMonthCategory for application/json ContentType.

type UpdateMonthCategoryResponse

type UpdateMonthCategoryResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SaveCategoryResponse
	JSON400      *ErrorResponse
}

func ParseUpdateMonthCategoryResponse

func ParseUpdateMonthCategoryResponse(rsp *http.Response) (*UpdateMonthCategoryResponse, error)

ParseUpdateMonthCategoryResponse parses an HTTP response from a UpdateMonthCategoryWithResponse call

func (UpdateMonthCategoryResponse) Status

Status returns HTTPResponse.Status

func (UpdateMonthCategoryResponse) StatusCode

func (r UpdateMonthCategoryResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdatePayeeJSONRequestBody

type UpdatePayeeJSONRequestBody = PatchPayeeWrapper

UpdatePayeeJSONRequestBody defines body for UpdatePayee for application/json ContentType.

type UpdatePayeeResponse

type UpdatePayeeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SavePayeeResponse
	JSON400      *ErrorResponse
}

func ParseUpdatePayeeResponse

func ParseUpdatePayeeResponse(rsp *http.Response) (*UpdatePayeeResponse, error)

ParseUpdatePayeeResponse parses an HTTP response from a UpdatePayeeWithResponse call

func (UpdatePayeeResponse) Status

func (r UpdatePayeeResponse) Status() string

Status returns HTTPResponse.Status

func (UpdatePayeeResponse) StatusCode

func (r UpdatePayeeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateScheduledTransactionJSONRequestBody

type UpdateScheduledTransactionJSONRequestBody = PutScheduledTransactionWrapper

UpdateScheduledTransactionJSONRequestBody defines body for UpdateScheduledTransaction for application/json ContentType.

type UpdateScheduledTransactionResponse

type UpdateScheduledTransactionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ScheduledTransactionResponse
	JSON400      *ErrorResponse
}

func ParseUpdateScheduledTransactionResponse

func ParseUpdateScheduledTransactionResponse(rsp *http.Response) (*UpdateScheduledTransactionResponse, error)

ParseUpdateScheduledTransactionResponse parses an HTTP response from a UpdateScheduledTransactionWithResponse call

func (UpdateScheduledTransactionResponse) Status

Status returns HTTPResponse.Status

func (UpdateScheduledTransactionResponse) StatusCode

func (r UpdateScheduledTransactionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateTransactionJSONRequestBody

type UpdateTransactionJSONRequestBody = PutTransactionWrapper

UpdateTransactionJSONRequestBody defines body for UpdateTransaction for application/json ContentType.

type UpdateTransactionResponse

type UpdateTransactionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TransactionResponse
	JSON400      *ErrorResponse
}

func ParseUpdateTransactionResponse

func ParseUpdateTransactionResponse(rsp *http.Response) (*UpdateTransactionResponse, error)

ParseUpdateTransactionResponse parses an HTTP response from a UpdateTransactionWithResponse call

func (UpdateTransactionResponse) Status

func (r UpdateTransactionResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateTransactionResponse) StatusCode

func (r UpdateTransactionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateTransactionsJSONRequestBody

type UpdateTransactionsJSONRequestBody = PatchTransactionsWrapper

UpdateTransactionsJSONRequestBody defines body for UpdateTransactions for application/json ContentType.

type UpdateTransactionsResponse

type UpdateTransactionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON209      *SaveTransactionsResponse
	JSON400      *ErrorResponse
}

func ParseUpdateTransactionsResponse

func ParseUpdateTransactionsResponse(rsp *http.Response) (*UpdateTransactionsResponse, error)

ParseUpdateTransactionsResponse parses an HTTP response from a UpdateTransactionsWithResponse call

func (UpdateTransactionsResponse) Status

Status returns HTTPResponse.Status

func (UpdateTransactionsResponse) StatusCode

func (r UpdateTransactionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type User

type User struct {
	ID openapi_types.UUID `json:"id"`
}

User defines model for User.

type UserResponse

type UserResponse struct {
	Data struct {
		User User `json:"user"`
	} `json:"data"`
}

UserResponse defines model for UserResponse.

Jump to

Keyboard shortcuts

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