package bank

import "context"

type Agg interface {
	Accounts(context.Context) ([]Account, error)
	Transactions(context.Context, Account) ([]Transaction, error)
}

type Account struct {
	Institution struct {
		Name string `json:"name"`
	} `json:"institution"`
	Name    string `json:"last_four"`
	Account string `json:"id"`
	Token   string `json:"__token"`
}

type Transaction struct {
	Amount  float64 `json:"amount,string"`
	Details struct {
		ProcessingStatus string `json:"processing_status"`
		CounterParty     struct {
			Name string `json:"name"`
		} `json:"counterparty"`
	} `json:"details"`
	Description string `json:"description"`
	Date        string `json:"date"`
	Type        string `json:"type"`
	Status      string `json:"status"`
}
