-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi_info.go
140 lines (128 loc) · 3.59 KB
/
api_info.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
package gocardless
const (
BaseURL = "https://bankaccountdata.gocardless.com/api"
APIVersion = "v2"
TestBaseURL = "https://localhost:8000/api"
)
const (
AccountsPath = "/accounts/"
)
const (
AgreementsEndusersPath = "/agreements/enduser/"
)
const (
InstitutionsPath = "/institutions/"
)
const (
RequisitionsPath = "/requisitions/"
)
const (
TokenNewPath = "/token/new/"
TokenRefreshPath = "/token/refresh/"
)
const (
AustriaCountryID = "AT"
BelgiumCountryID = "BE"
BulgariaCountryID = "BG"
CroatiaCountryID = "HR"
CyprusCountryID = "CY"
CzechiaCountryID = "CZ"
DenmarkCountryID = "DK"
EstoniaCountryID = "EE"
FinlandCountryID = "FI"
FranceCountryID = "FR"
GermanyCountryID = "DE"
GreeceCountryID = "GR"
HungaryCountryID = "HU"
IrelandCountryID = "IE"
IcelandCountryID = "IS"
ItalyCountryID = "IT"
LatviaCountryID = "LV"
LiechtensteinID = "LI"
LithuaniaCountryID = "LT"
LuxembourgCountryID = "LU"
MaltaCountryID = "MT"
NetherlandsCountry = "NL"
NorwayCountryID = "NO"
PolandCountryID = "PL"
PortugalCountryID = "PT"
RomaniaCountryID = "RO"
SlovakiaCountryID = "SK"
SloveniaCountryID = "SI"
SpainCountryID = "ES"
SwedenCountryID = "SE"
UKCountryID = "GB"
USACountryID = "US"
SandboxCountryID = "XX"
)
const (
LangEN = "EN"
)
const (
TestInstitutionID = "SANDBOXFINANCE_SFIN0000"
TestInstitutionMaxHistoricalDays = 90
)
type RequisitionStatus struct {
Short string
Long string
Description string
Stage int
}
const RequisitionStatusCreated = "CR"
const RequisitionStatusConsentGiven = "GC"
const RequisitionStatusUndergoingAuthentication = "UA"
const RequisitionStatusRejected = "RJ"
const RequisitionStatusSelectAccounts = "SA"
const RequisitionStatusGrantingAccess = "GA"
const RequisitionStatusLinked = "LN"
const RequisitionStatusExpired = "EX"
var RequisitionStatuses = map[string]RequisitionStatus{
RequisitionStatusCreated: {
Short: RequisitionStatusCreated,
Long: "CREATED",
Description: "Requisition has been successfully created",
Stage: 1,
},
RequisitionStatusConsentGiven: {
Short: RequisitionStatusConsentGiven,
Long: "GIVING_CONSENT",
Description: "End-user is giving consent at GoCardless's consent screen",
Stage: 2,
},
RequisitionStatusUndergoingAuthentication: {
Short: RequisitionStatusUndergoingAuthentication,
Long: "UNDERGOING_AUTHENTICATION",
Description: "End-user is redirected to the financial institution for authentication",
Stage: 3,
},
RequisitionStatusRejected: {
Short: RequisitionStatusRejected,
Long: "REJECTED",
Description: "Either SSN verification has failed or end-user has entered incorrect credentials",
Stage: 4,
},
RequisitionStatusSelectAccounts: {
Short: RequisitionStatusSelectAccounts,
Long: "SELECTING_ACCOUNTS",
Description: "End-user is selecting accounts",
Stage: 5,
},
RequisitionStatusGrantingAccess: {
Short: RequisitionStatusGrantingAccess,
Long: "GRANTING_ACCESS",
Description: "End-user is granting access to their account information",
Stage: 6,
},
RequisitionStatusLinked: {
Short: RequisitionStatusLinked,
Long: "LINKED",
Description: "Account has been successfully linked to requisition",
Stage: 7,
},
RequisitionStatusExpired: {
Short: RequisitionStatusExpired,
Long: "EXPIRED",
Description: "Access to accounts has expired as set in End User Agreement",
Stage: 8,
},
}