~mendelmaleh/pfin

ref: 1f765a50357fc2cfe9e5fa635453c353e5738df9 pfin/parser/amex/interface.go -rw-r--r-- 629 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
package amex

import (
	"time"

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

func (tx Transaction) Date() time.Time {
	return tx.Raw.Date.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.String()
}

func (tx Transaction) Card() string {
	return tx.Raw.AccountNumber
}

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

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

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