simplefin

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Org              Org           `json:"org"`
	ID               string        `json:"id"`
	Name             string        `json:"name"`
	Currency         string        `json:"currency"`
	Balance          string        `json:"balance"`
	AvailableBalance string        `json:"available-balance"`
	BalanceDate      int           `json:"balance-date"`
	Transactions     []Transaction `json:"transactions"`
}

func (*Account) NameSlug

func (o *Account) NameSlug() string

func (*Account) OrgSlug

func (o *Account) OrgSlug() string

type Accounts

type Accounts struct{}

func (*Accounts) AfterApply

func (o *Accounts) AfterApply() error

func (*Accounts) Run

func (o *Accounts) Run(simplefin Client, table *tablewriter.Table) error

type Client

type Client struct{ AccessURL string }

func (*Client) Get

func (o *Client) Get(path string, dates ...string) (*Response, error)

type Org

type Org struct {
	Domain  string `json:"domain"`
	Name    string `json:"name"`
	SfinURL string `json:"sfin-url"`
	URL     string `json:"url"`
}

type Response

type Response struct {
	Errors   []string  `json:"errors"`
	Accounts []Account `json:"accounts"`
}

type Transaction

type Transaction struct {
	ID          string `json:"id"`
	Posted      int    `json:"posted"`
	Amount      string `json:"amount"`
	Description string `json:"description"`
	Payee       string `json:"payee"`
	Memo        string `json:"memo"`
}

type Transactions

type Transactions struct {
	Start string `help:"If given, transactions will be restricted to those on or after this Unix epoch timestamp. Default is 7d ago."`
	End   string `help:"If given, transactions will be restricted to those before (but not on) this Unix epoch timestamp."`
}

func (*Transactions) AfterApply

func (o *Transactions) AfterApply() error

func (*Transactions) Run

func (o *Transactions) Run(simplefin Client, table *tablewriter.Table) error

Jump to

Keyboard shortcuts

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