client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2019 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LedgerAccountName

func LedgerAccountName(a Account) string

func New

func New(url string, config Config) (ofxgo.Client, error)

func Transactions

func Transactions(account Account, start, end time.Time) ([]ledger.Transaction, error)

Transactions downloads and returns transactions from a bank or credit card account for the given time period, ending today

Types

type Account

type Account interface {
	ID() string
	Description() string
	Institution() Institution

	Statement(start, end time.Time) (ofxgo.Request, error)
}

func AccountsFromOFXClientIni

func AccountsFromOFXClientIni(fileName string) ([]Account, error)

func NewCheckingAccount

func NewCheckingAccount(id, bankID string, institution Institution) Account

func NewCreditCard

func NewCreditCard(id string, institution Institution) Account

func NewSavingsAccount

func NewSavingsAccount(id, bankID string, institution Institution) Account

type Bank

type Bank interface {
	Account

	BankID() string
}

type Checking

type Checking struct {
	// contains filtered or unexported fields
}

func (Checking) BankID

func (b Checking) BankID() string

func (Checking) Statement

func (c Checking) Statement(start, end time.Time) (ofxgo.Request, error)

type Config

type Config struct {
	AppID      string
	AppVersion string
	ClientID   string
	OFXVersion string
	NoIndent   bool
}

type CreditCard

type CreditCard struct {
	// contains filtered or unexported fields
}

func (CreditCard) Description

func (b CreditCard) Description() string

func (CreditCard) ID

func (b CreditCard) ID() string

func (CreditCard) Institution

func (b CreditCard) Institution() Institution

func (CreditCard) Statement

func (cc CreditCard) Statement(start, end time.Time) (ofxgo.Request, error)

type Institution

type Institution interface {
	Description() string
	FID() string
	Org() string
	URL() string
	Username() string
	Password() string

	Config() Config
}

func NewInstitution

func NewInstitution(
	description,
	fid,
	org,
	url,
	username, password string,
	config Config,
) Institution

type Savings

type Savings struct {
	// contains filtered or unexported fields
}

func (Savings) BankID

func (b Savings) BankID() string

func (Savings) Statement

func (s Savings) Statement(start, end time.Time) (ofxgo.Request, error)

Jump to

Keyboard shortcuts

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