Documentation
¶
Index ¶
- Constants
- type Account
- type AccountListResponse
- type AccountListWrapper
- type Budget
- type BudgetListResponse
- type BudgetListWrapper
- type BudgetService
- func (b *BudgetService) Accounts(ctx context.Context, data url.Values) (*AccountListResponse, error)
- func (b *BudgetService) Categories(ctx context.Context, data url.Values) (*CategoryListResponse, error)
- func (b *BudgetService) CreateTransaction(ctx context.Context, req *CreateTransactionRequest) (*CreateTransactionResponse, error)
- func (b *BudgetService) ScheduledTransactions(ctx context.Context, data url.Values) (*ScheduledTransactionListResponse, error)
- func (b *BudgetService) Transactions(ctx context.Context, data url.Values) (*TransactionListResponse, error)
- func (b *BudgetService) UpdateTransaction(ctx context.Context, transactionID string, req *UpdateTransactionRequest) (*TransactionResponse, error)
- type Category
- type CategoryGroup
- type CategoryListResponse
- type CategoryListWrapper
- type ClearedStatus
- type Client
- func (c *Client) GetBudgets(ctx context.Context, data url.Values) (*BudgetListResponse, error)
- func (c *Client) MakeRequest(ctx context.Context, method string, pathPart string, data url.Values, ...) error
- func (c *Client) NewRequestWithContext(ctx context.Context, method, path string, body io.Reader) (*http.Request, error)
- func (c *Client) PutResource(ctx context.Context, pathPart string, sid string, req interface{}, ...) error
- type CreateTransactionData
- type CreateTransactionRequest
- type CreateTransactionResponse
- type Date
- type FlagColor
- type NewSubTransaction
- type NewTransaction
- type NullDate
- type ScheduledTransaction
- type ScheduledTransactionListResponse
- type ScheduledTransactionListWrapper
- type SubTransaction
- type Transaction
- type TransactionListResponse
- type TransactionListWrapper
- type TransactionResponse
- type TransactionWrapper
- type UpdateTransaction
- type UpdateTransactionRequest
Constants ¶
View Source
const Version = "1.2.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ID string Name string Type string OnBudget bool `json:"on_budget"` Closed bool Note string Balance int64 StartingBalance int64 `json:"starting_balance"` Deleted bool }
func (Account) CashBacked ¶
type AccountListResponse ¶
type AccountListResponse struct {
Data AccountListWrapper `json:"data"`
}
type AccountListWrapper ¶
type AccountListWrapper struct {
Accounts []*Account `json:"accounts"`
}
type BudgetListResponse ¶
type BudgetListResponse struct {
Data BudgetListWrapper `json:"data"`
}
type BudgetListWrapper ¶
type BudgetListWrapper struct {
Budgets []*Budget `json:"budgets"`
}
type BudgetService ¶
type BudgetService struct {
// contains filtered or unexported fields
}
func (*BudgetService) Accounts ¶ added in v1.0.0
func (b *BudgetService) Accounts(ctx context.Context, data url.Values) (*AccountListResponse, error)
func (*BudgetService) Categories ¶ added in v1.0.0
func (b *BudgetService) Categories(ctx context.Context, data url.Values) (*CategoryListResponse, error)
func (*BudgetService) CreateTransaction ¶ added in v1.1.0
func (b *BudgetService) CreateTransaction(ctx context.Context, req *CreateTransactionRequest) (*CreateTransactionResponse, error)
func (*BudgetService) ScheduledTransactions ¶ added in v1.0.0
func (b *BudgetService) ScheduledTransactions(ctx context.Context, data url.Values) (*ScheduledTransactionListResponse, error)
func (*BudgetService) Transactions ¶ added in v1.0.0
func (b *BudgetService) Transactions(ctx context.Context, data url.Values) (*TransactionListResponse, error)
func (*BudgetService) UpdateTransaction ¶ added in v1.0.0
func (b *BudgetService) UpdateTransaction(ctx context.Context, transactionID string, req *UpdateTransactionRequest) (*TransactionResponse, error)
type CategoryGroup ¶
type CategoryListResponse ¶
type CategoryListResponse struct {
Data CategoryListWrapper `json:"data"`
}
type CategoryListWrapper ¶
type CategoryListWrapper struct {
CategoryGroups []*CategoryGroup `json:"category_groups"`
}
type ClearedStatus ¶ added in v1.1.0
type ClearedStatus string
ClearedStatus represents the cleared status of a transaction
const ( ClearedStatusCleared ClearedStatus = "cleared" ClearedStatusUncleared ClearedStatus = "uncleared" ClearedStatusReconciled ClearedStatus = "reconciled" )
type Client ¶
type Client struct { *restclient.Client Budgets func(budgetID string) *BudgetService }
func (*Client) GetBudgets ¶ added in v1.0.0
func (*Client) MakeRequest ¶ added in v0.6.0
func (*Client) NewRequestWithContext ¶
type CreateTransactionData ¶ added in v1.1.0
type CreateTransactionData struct { TransactionIDs []string `json:"transaction_ids"` Transaction *Transaction `json:"transaction,omitempty"` ServerKnowledge int64 `json:"server_knowledge"` }
type CreateTransactionRequest ¶ added in v1.1.0
type CreateTransactionRequest struct {
Transaction *NewTransaction `json:"transaction"`
}
type CreateTransactionResponse ¶ added in v1.1.0
type CreateTransactionResponse struct {
Data CreateTransactionData `json:"data"`
}
type FlagColor ¶ added in v0.7.0
type FlagColor string
FlagColor represents the available flag colors for transactions
func (FlagColor) MarshalJSON ¶ added in v0.7.0
func (*FlagColor) UnmarshalJSON ¶ added in v0.7.0
type NewSubTransaction ¶ added in v1.1.0
type NewSubTransaction struct { Amount int64 `json:"amount"` PayeeID types.NullString `json:"payee_id,omitempty"` PayeeName types.NullString `json:"payee_name,omitempty"` CategoryID types.NullString `json:"category_id,omitempty"` Memo types.NullString `json:"memo,omitempty"` }
type NewTransaction ¶ added in v1.1.0
type NewTransaction struct { AccountID string `json:"account_id"` Date Date `json:"date"` Amount int64 `json:"amount"` PayeeID types.NullString `json:"payee_id,omitempty"` PayeeName types.NullString `json:"payee_name,omitempty"` CategoryID types.NullString `json:"category_id,omitempty"` Memo types.NullString `json:"memo,omitempty"` Cleared ClearedStatus `json:"cleared,omitempty"` Approved bool `json:"approved"` // Defaults to false if not specified FlagColor FlagColor `json:"flag_color,omitempty"` Subtransactions []*NewSubTransaction `json:"subtransactions,omitempty"` ImportID types.NullString `json:"import_id,omitempty"` }
type NullDate ¶ added in v0.7.0
A NullDate is a Date that may be null.
func (NullDate) MarshalJSON ¶ added in v0.7.0
func (*NullDate) UnmarshalJSON ¶ added in v0.7.0
type ScheduledTransaction ¶
type ScheduledTransaction struct { AccountID string `json:"account_id"` AccountName string `json:"account_name"` Amount int64 Approved bool CategoryName types.NullString `json:"category_name"` Cleared string DateFirst Date `json:"date_first"` DateNext Date `json:"date_next"` Deleted bool FlagColor FlagColor `json:"flag_color"` Frequency string ID string `json:"id"` Memo string PayeeName string `json:"payee_name"` TransferAccountID types.NullString `json:"transfer_account_id"` Subtransactions []Transaction `json:"subtransactions"` }
type ScheduledTransactionListResponse ¶
type ScheduledTransactionListResponse struct {
Data ScheduledTransactionListWrapper `json:"data"`
}
type ScheduledTransactionListWrapper ¶
type ScheduledTransactionListWrapper struct {
ScheduledTransactions []*ScheduledTransaction `json:"scheduled_transactions"`
}
type SubTransaction ¶ added in v0.6.0
type SubTransaction struct { Amount int64 `json:"amount"` PayeeID types.NullString `json:"payee_id,omitempty"` PayeeName types.NullString `json:"payee_name,omitempty"` CategoryID types.NullString `json:"category_id,omitempty"` Memo types.NullString `json:"memo,omitempty"` }
type Transaction ¶
type Transaction struct { AccountID string `json:"account_id"` AccountName string `json:"account_name"` Amount int64 Approved bool CategoryID types.NullString `json:"category_id"` CategoryName types.NullString `json:"category_name"` Cleared string Date Date Deleted bool FlagColor FlagColor `json:"flag_color"` ID string `json:"id"` Memo string PayeeName string `json:"payee_name"` TransferAccountID types.NullString `json:"transfer_account_id"` TransferTransactionID types.NullString `json:"transfer_transaction_id"` MatchedTransactionID types.NullString `json:"matched_transaction_id"` Subtransactions []Transaction `json:"subtransactions"` }
type TransactionListResponse ¶
type TransactionListResponse struct {
Data TransactionListWrapper `json:"data"`
}
type TransactionListWrapper ¶
type TransactionListWrapper struct {
Transactions []*Transaction `json:"transactions"`
}
type TransactionResponse ¶ added in v0.6.0
type TransactionResponse struct {
Data TransactionWrapper `json:"data"`
}
type TransactionWrapper ¶ added in v0.6.0
type TransactionWrapper struct {
Transaction *Transaction `json:"transaction"`
}
type UpdateTransaction ¶ added in v0.6.0
type UpdateTransaction struct { AccountID *string `json:"account_id,omitempty"` Date Date `json:"date"` Amount *int64 `json:"amount,omitempty"` PayeeID types.NullString `json:"payee_id,omitempty"` PayeeName types.NullString `json:"payee_name,omitempty"` CategoryID types.NullString `json:"category_id,omitempty"` Memo types.NullString `json:"memo,omitempty"` Cleared types.NullString `json:"cleared,omitempty"` Approved *bool `json:"approved,omitempty"` FlagColor types.NullString `json:"flag_color,omitempty"` Subtransactions []*SubTransaction `json:"subtransactions,omitempty"` }
type UpdateTransactionRequest ¶ added in v0.6.0
type UpdateTransactionRequest struct {
Transaction *UpdateTransaction `json:"transaction"`
}
Directories
¶
Path | Synopsis |
---|---|
The ynab-export-transactions command retrieves transactions and prints them to stdout in CSV format.
|
The ynab-export-transactions command retrieves transactions and prints them to stdout in CSV format. |
The ynab-largest-inputs-outputs function finds the largest inputs and outputs to your Net Worth, optionally filtered by a month argument.
|
The ynab-largest-inputs-outputs function finds the largest inputs and outputs to your Net Worth, optionally filtered by a month argument. |
Click to show internal directories.
Click to hide internal directories.