forked from stripe/stripe-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
accountlink.go
48 lines (40 loc) · 1.62 KB
/
accountlink.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
package stripe
// AccountLinkType is the type of an account link.
type AccountLinkType string
// List of values that AccountLinkType can take.
const (
AccountLinkTypeAccountOnboarding AccountLinkType = "account_onboarding"
AccountLinkTypeAccountUpdate AccountLinkType = "account_update"
// TODO: The following constants are deprecated
AccountLinkTypeCustomAccountUpdate AccountLinkType = "custom_account_update"
AccountLinkTypeCustomAccountVerification AccountLinkType = "custom_account_verification"
)
// AccountLinkCollect describes what information the platform wants to collect with the account link.
type AccountLinkCollect string
// List of values that AccountLinkCollect can take.
const (
AccountLinkCollectCurrentlyDue AccountLinkCollect = "currently_due"
AccountLinkCollectEventuallyDue AccountLinkCollect = "eventually_due"
)
// AccountLinkParams are the parameters allowed during an account link creation.
type AccountLinkParams struct {
Params `form:"*"`
Account *string `form:"account"`
Collect *string `form:"collect"`
RefreshURL *string `form:"refresh_url"`
ReturnURL *string `form:"return_url"`
Type *string `form:"type"`
// TODO remove in the next major version
// Those parameters are deprecated.
FailureURL *string `form:"failure_url"`
SuccessURL *string `form:"success_url"`
}
// AccountLink is the resource representing an account link.
// For more details see https://stripe.com/docs/api/#account_links.
type AccountLink struct {
APIResource
Created int64 `json:"created"`
ExpiresAt int64 `json:"expires_at"`
Object string `json:"object"`
URL string `json:"url"`
}