-
Notifications
You must be signed in to change notification settings - Fork 463
/
Copy pathtreasury_financialaccount.go
441 lines (383 loc) · 25.3 KB
/
treasury_financialaccount.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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
//
//
// File generated from our OpenAPI spec
//
//
package stripe
// The array of paths to active Features in the Features hash.
type TreasuryFinancialAccountActiveFeature string
// List of values that TreasuryFinancialAccountActiveFeature can take
const (
TreasuryFinancialAccountActiveFeatureCardIssuing TreasuryFinancialAccountActiveFeature = "card_issuing"
TreasuryFinancialAccountActiveFeatureDepositInsurance TreasuryFinancialAccountActiveFeature = "deposit_insurance"
TreasuryFinancialAccountActiveFeatureFinancialAddressesAba TreasuryFinancialAccountActiveFeature = "financial_addresses.aba"
TreasuryFinancialAccountActiveFeatureInboundTransfersAch TreasuryFinancialAccountActiveFeature = "inbound_transfers.ach"
TreasuryFinancialAccountActiveFeatureIntraStripeFlows TreasuryFinancialAccountActiveFeature = "intra_stripe_flows"
TreasuryFinancialAccountActiveFeatureOutboundPaymentsAch TreasuryFinancialAccountActiveFeature = "outbound_payments.ach"
TreasuryFinancialAccountActiveFeatureOutboundPaymentsUSDomesticWire TreasuryFinancialAccountActiveFeature = "outbound_payments.us_domestic_wire"
TreasuryFinancialAccountActiveFeatureOutboundTransfersAch TreasuryFinancialAccountActiveFeature = "outbound_transfers.ach"
TreasuryFinancialAccountActiveFeatureOutboundTransfersUSDomesticWire TreasuryFinancialAccountActiveFeature = "outbound_transfers.us_domestic_wire"
TreasuryFinancialAccountActiveFeatureRemoteDepositCapture TreasuryFinancialAccountActiveFeature = "remote_deposit_capture"
)
// The list of networks that the address supports
type TreasuryFinancialAccountFinancialAddressSupportedNetwork string
// List of values that TreasuryFinancialAccountFinancialAddressSupportedNetwork can take
const (
TreasuryFinancialAccountFinancialAddressSupportedNetworkAch TreasuryFinancialAccountFinancialAddressSupportedNetwork = "ach"
TreasuryFinancialAccountFinancialAddressSupportedNetworkUSDomesticWire TreasuryFinancialAccountFinancialAddressSupportedNetwork = "us_domestic_wire"
)
// The type of financial address
type TreasuryFinancialAccountFinancialAddressType string
// List of values that TreasuryFinancialAccountFinancialAddressType can take
const (
TreasuryFinancialAccountFinancialAddressTypeAba TreasuryFinancialAccountFinancialAddressType = "aba"
)
// The array of paths to pending Features in the Features hash.
type TreasuryFinancialAccountPendingFeature string
// List of values that TreasuryFinancialAccountPendingFeature can take
const (
TreasuryFinancialAccountPendingFeatureCardIssuing TreasuryFinancialAccountPendingFeature = "card_issuing"
TreasuryFinancialAccountPendingFeatureDepositInsurance TreasuryFinancialAccountPendingFeature = "deposit_insurance"
TreasuryFinancialAccountPendingFeatureFinancialAddressesAba TreasuryFinancialAccountPendingFeature = "financial_addresses.aba"
TreasuryFinancialAccountPendingFeatureInboundTransfersAch TreasuryFinancialAccountPendingFeature = "inbound_transfers.ach"
TreasuryFinancialAccountPendingFeatureIntraStripeFlows TreasuryFinancialAccountPendingFeature = "intra_stripe_flows"
TreasuryFinancialAccountPendingFeatureOutboundPaymentsAch TreasuryFinancialAccountPendingFeature = "outbound_payments.ach"
TreasuryFinancialAccountPendingFeatureOutboundPaymentsUSDomesticWire TreasuryFinancialAccountPendingFeature = "outbound_payments.us_domestic_wire"
TreasuryFinancialAccountPendingFeatureOutboundTransfersAch TreasuryFinancialAccountPendingFeature = "outbound_transfers.ach"
TreasuryFinancialAccountPendingFeatureOutboundTransfersUSDomesticWire TreasuryFinancialAccountPendingFeature = "outbound_transfers.us_domestic_wire"
TreasuryFinancialAccountPendingFeatureRemoteDepositCapture TreasuryFinancialAccountPendingFeature = "remote_deposit_capture"
)
// Restricts all inbound money movement.
type TreasuryFinancialAccountPlatformRestrictionsInboundFlows string
// List of values that TreasuryFinancialAccountPlatformRestrictionsInboundFlows can take
const (
TreasuryFinancialAccountPlatformRestrictionsInboundFlowsRestricted TreasuryFinancialAccountPlatformRestrictionsInboundFlows = "restricted"
TreasuryFinancialAccountPlatformRestrictionsInboundFlowsUnrestricted TreasuryFinancialAccountPlatformRestrictionsInboundFlows = "unrestricted"
)
// Restricts all outbound money movement.
type TreasuryFinancialAccountPlatformRestrictionsOutboundFlows string
// List of values that TreasuryFinancialAccountPlatformRestrictionsOutboundFlows can take
const (
TreasuryFinancialAccountPlatformRestrictionsOutboundFlowsRestricted TreasuryFinancialAccountPlatformRestrictionsOutboundFlows = "restricted"
TreasuryFinancialAccountPlatformRestrictionsOutboundFlowsUnrestricted TreasuryFinancialAccountPlatformRestrictionsOutboundFlows = "unrestricted"
)
// The array of paths to restricted Features in the Features hash.
type TreasuryFinancialAccountRestrictedFeature string
// List of values that TreasuryFinancialAccountRestrictedFeature can take
const (
TreasuryFinancialAccountRestrictedFeatureCardIssuing TreasuryFinancialAccountRestrictedFeature = "card_issuing"
TreasuryFinancialAccountRestrictedFeatureDepositInsurance TreasuryFinancialAccountRestrictedFeature = "deposit_insurance"
TreasuryFinancialAccountRestrictedFeatureFinancialAddressesAba TreasuryFinancialAccountRestrictedFeature = "financial_addresses.aba"
TreasuryFinancialAccountRestrictedFeatureInboundTransfersAch TreasuryFinancialAccountRestrictedFeature = "inbound_transfers.ach"
TreasuryFinancialAccountRestrictedFeatureIntraStripeFlows TreasuryFinancialAccountRestrictedFeature = "intra_stripe_flows"
TreasuryFinancialAccountRestrictedFeatureOutboundPaymentsAch TreasuryFinancialAccountRestrictedFeature = "outbound_payments.ach"
TreasuryFinancialAccountRestrictedFeatureOutboundPaymentsUSDomesticWire TreasuryFinancialAccountRestrictedFeature = "outbound_payments.us_domestic_wire"
TreasuryFinancialAccountRestrictedFeatureOutboundTransfersAch TreasuryFinancialAccountRestrictedFeature = "outbound_transfers.ach"
TreasuryFinancialAccountRestrictedFeatureOutboundTransfersUSDomesticWire TreasuryFinancialAccountRestrictedFeature = "outbound_transfers.us_domestic_wire"
TreasuryFinancialAccountRestrictedFeatureRemoteDepositCapture TreasuryFinancialAccountRestrictedFeature = "remote_deposit_capture"
)
// The enum specifying what state the account is in.
type TreasuryFinancialAccountStatus string
// List of values that TreasuryFinancialAccountStatus can take
const (
TreasuryFinancialAccountStatusClosed TreasuryFinancialAccountStatus = "closed"
TreasuryFinancialAccountStatusOpen TreasuryFinancialAccountStatus = "open"
)
// The array that contains reasons for a FinancialAccount closure.
type TreasuryFinancialAccountStatusDetailsClosedReason string
// List of values that TreasuryFinancialAccountStatusDetailsClosedReason can take
const (
TreasuryFinancialAccountStatusDetailsClosedReasonAccountRejected TreasuryFinancialAccountStatusDetailsClosedReason = "account_rejected"
TreasuryFinancialAccountStatusDetailsClosedReasonClosedByPlatform TreasuryFinancialAccountStatusDetailsClosedReason = "closed_by_platform"
TreasuryFinancialAccountStatusDetailsClosedReasonOther TreasuryFinancialAccountStatusDetailsClosedReason = "other"
)
// Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
type TreasuryFinancialAccountFeaturesCardIssuingParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
type TreasuryFinancialAccountFeaturesDepositInsuranceParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Adds an ABA FinancialAddress to the FinancialAccount.
type TreasuryFinancialAccountFeaturesFinancialAddressesAbaParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Contains Features that add FinancialAddresses to the FinancialAccount.
type TreasuryFinancialAccountFeaturesFinancialAddressesParams struct {
// Adds an ABA FinancialAddress to the FinancialAccount.
Aba *TreasuryFinancialAccountFeaturesFinancialAddressesAbaParams `form:"aba"`
}
// Enables ACH Debits via the InboundTransfers API.
type TreasuryFinancialAccountFeaturesInboundTransfersAchParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
type TreasuryFinancialAccountFeaturesInboundTransfersParams struct {
// Enables ACH Debits via the InboundTransfers API.
Ach *TreasuryFinancialAccountFeaturesInboundTransfersAchParams `form:"ach"`
}
// Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
type TreasuryFinancialAccountFeaturesIntraStripeFlowsParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Enables ACH transfers via the OutboundPayments API.
type TreasuryFinancialAccountFeaturesOutboundPaymentsAchParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Enables US domestic wire tranfers via the OutboundPayments API.
type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
type TreasuryFinancialAccountFeaturesOutboundPaymentsParams struct {
// Enables ACH transfers via the OutboundPayments API.
Ach *TreasuryFinancialAccountFeaturesOutboundPaymentsAchParams `form:"ach"`
// Enables US domestic wire tranfers via the OutboundPayments API.
USDomesticWire *TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireParams `form:"us_domestic_wire"`
}
// Enables ACH transfers via the OutboundTransfers API.
type TreasuryFinancialAccountFeaturesOutboundTransfersAchParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Enables US domestic wire tranfers via the OutboundTransfers API.
type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
type TreasuryFinancialAccountFeaturesOutboundTransfersParams struct {
// Enables ACH transfers via the OutboundTransfers API.
Ach *TreasuryFinancialAccountFeaturesOutboundTransfersAchParams `form:"ach"`
// Enables US domestic wire tranfers via the OutboundTransfers API.
USDomesticWire *TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireParams `form:"us_domestic_wire"`
}
// Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field.
type TreasuryFinancialAccountFeaturesParams struct {
// Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
CardIssuing *TreasuryFinancialAccountFeaturesCardIssuingParams `form:"card_issuing"`
// Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
DepositInsurance *TreasuryFinancialAccountFeaturesDepositInsuranceParams `form:"deposit_insurance"`
// Contains Features that add FinancialAddresses to the FinancialAccount.
FinancialAddresses *TreasuryFinancialAccountFeaturesFinancialAddressesParams `form:"financial_addresses"`
// Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
InboundTransfers *TreasuryFinancialAccountFeaturesInboundTransfersParams `form:"inbound_transfers"`
// Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
IntraStripeFlows *TreasuryFinancialAccountFeaturesIntraStripeFlowsParams `form:"intra_stripe_flows"`
// Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
OutboundPayments *TreasuryFinancialAccountFeaturesOutboundPaymentsParams `form:"outbound_payments"`
// Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
OutboundTransfers *TreasuryFinancialAccountFeaturesOutboundTransfersParams `form:"outbound_transfers"`
}
// The set of functionalities that the platform can restrict on the FinancialAccount.
type TreasuryFinancialAccountPlatformRestrictionsParams struct {
// Restricts all inbound money movement.
InboundFlows *string `form:"inbound_flows"`
// Restricts all outbound money movement.
OutboundFlows *string `form:"outbound_flows"`
}
// Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.
type TreasuryFinancialAccountParams struct {
Params `form:"*"`
// Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field.
Features *TreasuryFinancialAccountFeaturesParams `form:"features"`
// The set of functionalities that the platform can restrict on the FinancialAccount.
PlatformRestrictions *TreasuryFinancialAccountPlatformRestrictionsParams `form:"platform_restrictions"`
// The currencies the FinancialAccount can hold a balance in.
SupportedCurrencies []*string `form:"supported_currencies"`
}
// Returns a list of FinancialAccounts.
type TreasuryFinancialAccountListParams struct {
ListParams `form:"*"`
Created *int64 `form:"created"`
CreatedRange *RangeQueryParams `form:"created"`
}
// Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
type TreasuryFinancialAccountUpdateFeaturesCardIssuingParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
type TreasuryFinancialAccountUpdateFeaturesDepositInsuranceParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Adds an ABA FinancialAddress to the FinancialAccount.
type TreasuryFinancialAccountUpdateFeaturesFinancialAddressesAbaParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Contains Features that add FinancialAddresses to the FinancialAccount.
type TreasuryFinancialAccountUpdateFeaturesFinancialAddressesParams struct {
// Adds an ABA FinancialAddress to the FinancialAccount.
Aba *TreasuryFinancialAccountUpdateFeaturesFinancialAddressesAbaParams `form:"aba"`
}
// Enables ACH Debits via the InboundTransfers API.
type TreasuryFinancialAccountUpdateFeaturesInboundTransfersAchParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
type TreasuryFinancialAccountUpdateFeaturesInboundTransfersParams struct {
// Enables ACH Debits via the InboundTransfers API.
Ach *TreasuryFinancialAccountUpdateFeaturesInboundTransfersAchParams `form:"ach"`
}
// Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
type TreasuryFinancialAccountUpdateFeaturesIntraStripeFlowsParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Enables ACH transfers via the OutboundPayments API.
type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsAchParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Enables US domestic wire tranfers via the OutboundPayments API.
type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsUSDomesticWireParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsParams struct {
// Enables ACH transfers via the OutboundPayments API.
Ach *TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsAchParams `form:"ach"`
// Enables US domestic wire tranfers via the OutboundPayments API.
USDomesticWire *TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsUSDomesticWireParams `form:"us_domestic_wire"`
}
// Enables ACH transfers via the OutboundTransfers API.
type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersAchParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Enables US domestic wire tranfers via the OutboundTransfers API.
type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersUSDomesticWireParams struct {
// Whether the FinancialAccount should have the Feature.
Requested *bool `form:"requested"`
}
// Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersParams struct {
// Enables ACH transfers via the OutboundTransfers API.
Ach *TreasuryFinancialAccountUpdateFeaturesOutboundTransfersAchParams `form:"ach"`
// Enables US domestic wire tranfers via the OutboundTransfers API.
USDomesticWire *TreasuryFinancialAccountUpdateFeaturesOutboundTransfersUSDomesticWireParams `form:"us_domestic_wire"`
}
// Updates the Features associated with a FinancialAccount.
type TreasuryFinancialAccountUpdateFeaturesParams struct {
Params `form:"*"`
// Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
CardIssuing *TreasuryFinancialAccountUpdateFeaturesCardIssuingParams `form:"card_issuing"`
// Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
DepositInsurance *TreasuryFinancialAccountUpdateFeaturesDepositInsuranceParams `form:"deposit_insurance"`
// Contains Features that add FinancialAddresses to the FinancialAccount.
FinancialAddresses *TreasuryFinancialAccountUpdateFeaturesFinancialAddressesParams `form:"financial_addresses"`
// Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
InboundTransfers *TreasuryFinancialAccountUpdateFeaturesInboundTransfersParams `form:"inbound_transfers"`
// Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
IntraStripeFlows *TreasuryFinancialAccountUpdateFeaturesIntraStripeFlowsParams `form:"intra_stripe_flows"`
// Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
OutboundPayments *TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsParams `form:"outbound_payments"`
// Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
OutboundTransfers *TreasuryFinancialAccountUpdateFeaturesOutboundTransfersParams `form:"outbound_transfers"`
}
// Retrieves Features information associated with the FinancialAccount.
type TreasuryFinancialAccountRetrieveFeaturesParams struct {
Params `form:"*"`
}
// Balance information for the FinancialAccount
type TreasuryFinancialAccountBalance struct {
// Funds the user can spend right now.
Cash map[string]int64 `json:"cash"`
// Funds not spendable yet, but will become available at a later time.
InboundPending map[string]int64 `json:"inbound_pending"`
// Funds in the account, but not spendable because they are being held for pending outbound flows.
OutboundPending map[string]int64 `json:"outbound_pending"`
}
// ABA Records contain U.S. bank account details per the ABA format.
type TreasuryFinancialAccountFinancialAddressAba struct {
// The name of the person or business that owns the bank account.
AccountHolderName string `json:"account_holder_name"`
// The account number.
AccountNumber string `json:"account_number"`
// The last four characters of the account number.
AccountNumberLast4 string `json:"account_number_last4"`
// Name of the bank.
BankName string `json:"bank_name"`
// Routing number for the account.
RoutingNumber string `json:"routing_number"`
}
// The set of credentials that resolve to a FinancialAccount.
type TreasuryFinancialAccountFinancialAddress struct {
// ABA Records contain U.S. bank account details per the ABA format.
Aba *TreasuryFinancialAccountFinancialAddressAba `json:"aba"`
// The list of networks that the address supports
SupportedNetworks []TreasuryFinancialAccountFinancialAddressSupportedNetwork `json:"supported_networks"`
// The type of financial address
Type TreasuryFinancialAccountFinancialAddressType `json:"type"`
}
// The set of functionalities that the platform can restrict on the FinancialAccount.
type TreasuryFinancialAccountPlatformRestrictions struct {
// Restricts all inbound money movement.
InboundFlows TreasuryFinancialAccountPlatformRestrictionsInboundFlows `json:"inbound_flows"`
// Restricts all outbound money movement.
OutboundFlows TreasuryFinancialAccountPlatformRestrictionsOutboundFlows `json:"outbound_flows"`
}
// Details related to the closure of this FinancialAccount
type TreasuryFinancialAccountStatusDetailsClosed struct {
// The array that contains reasons for a FinancialAccount closure.
Reasons []TreasuryFinancialAccountStatusDetailsClosedReason `json:"reasons"`
}
type TreasuryFinancialAccountStatusDetails struct {
// Details related to the closure of this FinancialAccount
Closed *TreasuryFinancialAccountStatusDetailsClosed `json:"closed"`
}
// Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance.
// FinancialAccounts serve as the source and destination of Treasury's money movement APIs.
type TreasuryFinancialAccount struct {
APIResource
// The array of paths to active Features in the Features hash.
ActiveFeatures []TreasuryFinancialAccountActiveFeature `json:"active_features"`
// Balance information for the FinancialAccount
Balance *TreasuryFinancialAccountBalance `json:"balance"`
// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
Country string `json:"country"`
// Time at which the object was created. Measured in seconds since the Unix epoch.
Created int64 `json:"created"`
// Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`.
// Stripe or the platform can control Features via the requested field.
Features *TreasuryFinancialAccountFeatures `json:"features"`
// The set of credentials that resolve to a FinancialAccount.
FinancialAddresses []*TreasuryFinancialAccountFinancialAddress `json:"financial_addresses"`
// Unique identifier for the object.
ID string `json:"id"`
// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
Livemode bool `json:"livemode"`
// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Metadata map[string]string `json:"metadata"`
// String representing the object's type. Objects of the same type share the same value.
Object string `json:"object"`
// The array of paths to pending Features in the Features hash.
PendingFeatures []TreasuryFinancialAccountPendingFeature `json:"pending_features"`
// The set of functionalities that the platform can restrict on the FinancialAccount.
PlatformRestrictions *TreasuryFinancialAccountPlatformRestrictions `json:"platform_restrictions"`
// The array of paths to restricted Features in the Features hash.
RestrictedFeatures []TreasuryFinancialAccountRestrictedFeature `json:"restricted_features"`
// The enum specifying what state the account is in.
Status TreasuryFinancialAccountStatus `json:"status"`
StatusDetails *TreasuryFinancialAccountStatusDetails `json:"status_details"`
// The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
SupportedCurrencies []Currency `json:"supported_currencies"`
}
// TreasuryFinancialAccountList is a list of FinancialAccounts as retrieved from a list endpoint.
type TreasuryFinancialAccountList struct {
APIResource
ListMeta
Data []*TreasuryFinancialAccount `json:"data"`
}