-
Notifications
You must be signed in to change notification settings - Fork 459
/
accountlink.go
56 lines (49 loc) · 2.61 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
49
50
51
52
53
54
55
56
//
//
// File generated from our OpenAPI spec
//
//
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"
)
// 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"
)
// Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
type AccountLinkParams struct {
Params `form:"*"`
// The identifier of the account to create an account link for.
Account *string `form:"account"`
// Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`.
Collect *string `form:"collect"`
// The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.
RefreshURL *string `form:"refresh_url"`
// The URL that the user will be redirected to upon leaving or completing the linked flow.
ReturnURL *string `form:"return_url"`
// The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`.
Type *string `form:"type"`
}
// Account Links are the means by which a Connect platform grants a connected account permission to access
// Stripe-hosted applications, such as Connect Onboarding.
//
// Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding).
type AccountLink struct {
APIResource
// Time at which the object was created. Measured in seconds since the Unix epoch.
Created int64 `json:"created"`
// The timestamp at which this account link will expire.
ExpiresAt int64 `json:"expires_at"`
// String representing the object's type. Objects of the same type share the same value.
Object string `json:"object"`
// The URL for the account link.
URL string `json:"url"`
}