/
structs.go
101 lines (95 loc) · 3.6 KB
/
structs.go
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package tr
type RawTimeline struct {
Data []TimeLineEvent `json:"data"`
Cursors struct {
Before string `json:"before,omitempty"`
After string `json:"after,omitempty"`
} `json:"cursors"`
}
type TimeLineEvent struct {
Type string `json:"type"`
Data struct {
ID string `json:"id"`
Timestamp int64 `json:"timestamp"`
Icon string `json:"icon"`
Title string `json:"title"`
Body string `json:"body"`
Action struct {
Type string `json:"type,omitempty"`
Payload interface{} `json:"payload,omitempty"`
} `json:"action,omitempty"`
ActionLabel string `json:"actionLabel,omitempty"`
Attributes []interface{} `json:"attributes"`
Month string `json:"month"`
CashChangeAmount float64 `json:"cashChangeAmount,omitempty"`
} `json:"data"`
}
type Action struct {
Type string `json:"type,omitempty"`
Payload interface{} `json:"payload,omitempty"`
}
type TimelineDetail struct {
ID string `json:"id"`
TitleText string `json:"titleText"`
SubtitleText string `json:"subtitleText"`
Sections []struct {
Data []interface{}
Type string `json:"type"`
Title string `json:"title"`
Documents []Doc `json:"documents"`
} `json:"sections"`
}
type Doc struct {
Title string `json:"title"`
Detail string `json:"detail"`
Action struct {
Type string `json:"type"`
Payload string `json:"payload"`
} `json:"action"`
ID string `json:"id"`
PostboxType string `json:"postboxType"`
}
type SavingsPlan struct {
ID string `json:"id"`
CreatedAt int64 `json:"createdAt"`
InstrumentID string `json:"instrumentId"`
Amount float64 `json:"amount"`
Interval string `json:"interval"`
StartDate struct {
Type string `json:"type"`
Value int `json:"value"`
NextExecutionDate string `json:"nextExecutionDate"`
} `json:"startDate"`
FirstExecutionDate interface{} `json:"firstExecutionDate"`
NextExecutionDate string `json:"nextExecutionDate"`
PreviousExecutionDate string `json:"previousExecutionDate"`
VirtualPreviousExecutionDate string `json:"virtualPreviousExecutionDate"`
FinalExecutionDate interface{} `json:"finalExecutionDate"`
PaymentMethodID interface{} `json:"paymentMethodId"`
PaymentMethodCode interface{} `json:"paymentMethodCode"`
LastPaymentExecutionDate interface{} `json:"lastPaymentExecutionDate"`
Paused bool `json:"paused"`
}
type RawSavingsPlans struct {
SavingsPlans []struct {
ID string `json:"id"`
CreatedAt int64 `json:"createdAt"`
InstrumentID string `json:"instrumentId"`
Amount float64 `json:"amount"`
Interval string `json:"interval"`
StartDate struct {
Type string `json:"type"`
Value int `json:"value"`
NextExecutionDate string `json:"nextExecutionDate"`
} `json:"startDate"`
FirstExecutionDate interface{} `json:"firstExecutionDate"`
NextExecutionDate string `json:"nextExecutionDate"`
PreviousExecutionDate string `json:"previousExecutionDate"`
VirtualPreviousExecutionDate string `json:"virtualPreviousExecutionDate"`
FinalExecutionDate interface{} `json:"finalExecutionDate"`
PaymentMethodID interface{} `json:"paymentMethodId"`
PaymentMethodCode interface{} `json:"paymentMethodCode"`
LastPaymentExecutionDate interface{} `json:"lastPaymentExecutionDate"`
Paused bool `json:"paused"`
} `json:"savingsPlans"`
}