~mendelmaleh/pfin

ref: 1f765a50357fc2cfe9e5fa635453c353e5738df9 pfin/parser/chase/interface.go -rw-r--r-- 732 bytes
1f765a50Mendel E Add chase parser 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package chase

import (
	"time"

	"git.sr.ht/~mendelmaleh/pfin"
	"git.sr.ht/~mendelmaleh/pfin/util"
)

var _ = pfin.Transaction(Transaction{})

func (tx Transaction) Date() time.Time {
	return tx.Raw.TransactionDate.Time
}

func (tx Transaction) Amount() float64 {
	return tx.Raw.Amount
}

func (tx Transaction) Name() string {
	return tx.Raw.Description
}

func (tx Transaction) Category() string {
	return tx.Raw.Category
}

// not implemented
func (tx Transaction) Card() string {
	return ""
}

func (tx Transaction) User() string {
	return tx.Fields.User
}

func (tx Transaction) Account() string {
	return tx.Fields.Account
}

// should be util.FormatTx
func (tx Transaction) String() string {
	return util.FormatTx(tx, " ")
}