~evanj/cms

ref: 99a3bb7fc511e3f448a358691896ba1300f73a93 cms/vendor/github.com/stripe/stripe-go/v71/accountlink.go -rw-r--r-- 1.6 KiB
99a3bb7fEvan M Jones WIP(rbac): Decorator object complete. TODO: Specify role in invite. 1 year, 1 month 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
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"`
}