-
Notifications
You must be signed in to change notification settings - Fork 88
/
model_account_identity.go
469 lines (400 loc) · 16.8 KB
/
model_account_identity.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
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
/*
* The Plaid API
*
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* API version: 2020-09-14_1.508.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package plaid
import (
"encoding/json"
)
// AccountIdentity Identity information about an account
type AccountIdentity struct {
// Plaid’s unique identifier for the account. This value will not change unless Plaid can't reconcile the account with the data returned by the financial institution. This may occur, for example, when the name of the account changes. If this happens a new `account_id` will be assigned to the account. The `account_id` can also change if the `access_token` is deleted and the same credentials that were used to generate that `access_token` are used to generate a new `access_token` on a later date. In that case, the new `account_id` will be different from the old `account_id`. If an account with a specific `account_id` disappears instead of changing, the account is likely closed. Closed accounts are not returned by the Plaid API. Like all Plaid identifiers, the `account_id` is case sensitive.
AccountId string `json:"account_id"`
Balances AccountBalance `json:"balances"`
// The last 2-4 alphanumeric characters of an account's official account number. Note that the mask may be non-unique between an Item's accounts, and it may also not match the mask that the bank displays to the user.
Mask NullableString `json:"mask"`
// The name of the account, either assigned by the user or by the financial institution itself
Name string `json:"name"`
// The official name of the account as given by the financial institution
OfficialName NullableString `json:"official_name"`
Type AccountType `json:"type"`
Subtype NullableAccountSubtype `json:"subtype"`
// The current verification status of an Auth Item initiated through Automated or Manual micro-deposits. Returned for Auth Items only. `pending_automatic_verification`: The Item is pending automatic verification `pending_manual_verification`: The Item is pending manual micro-deposit verification. Items remain in this state until the user successfully verifies the micro-deposit. `automatically_verified`: The Item has successfully been automatically verified `manually_verified`: The Item has successfully been manually verified `verification_expired`: Plaid was unable to automatically verify the deposit within 7 calendar days and will no longer attempt to validate the Item. Users may retry by submitting their information again through Link. `verification_failed`: The Item failed manual micro-deposit verification because the user exhausted all 3 verification attempts. Users may retry by submitting their information again through Link. `database_matched`: The Item has successfully been verified using Plaid's data sources. Note: Database Match is currently a beta feature, please contact your account manager for more information. `database_insights_pass`: The Item's ACH numbers have been verified using Plaid's data sources and have strong signal for being valid. Note: Database Insights is currently a beta feature, please contact your account manager for more information. `database_insights_pass_with_caution`: The Item's ACH numbers have been verified using Plaid's data sources and have some signal for being valid. Note: Database Insights is currently a beta feature, please contact your account manager for more information. `database_insights_fail`: The Item's ACH numbers have been verified using Plaid's data sources and have signal for being invalid and/or have no signal for being valid. Note: Database Insights is currently a beta feature, please contact your account manager for more information.
VerificationStatus *string `json:"verification_status,omitempty"`
VerificationInsights *AccountVerificationInsights `json:"verification_insights,omitempty"`
// A unique and persistent identifier for accounts that can be used to trace multiple instances of the same account across different Items for depository accounts. This is currently only supported for Chase Items. Because Chase accounts have a different account number each time they are linked, this field may be used instead of the account number to uniquely identify a Chase account across multiple Items for payments use cases, helping to reduce duplicate Items or attempted fraud. In Sandbox, this field may be populated for any account; in Production and Development, it will only be populated for Chase accounts.
PersistentAccountId *string `json:"persistent_account_id,omitempty"`
// Data returned by the financial institution about the account owner or owners. Only returned by Identity or Assets endpoints. For business accounts, the name reported may be either the name of the individual or the name of the business, depending on the institution; detecting whether the linked account is a business account is not currently supported. Multiple owners on a single account will be represented in the same `owner` object, not in multiple owner objects within the array. In API versions 2018-05-22 and earlier, the `owners` object is not returned, and instead identity information is returned in the top level `identity` object. For more details, see [Plaid API versioning](https://plaid.com/docs/api/versioning/#version-2019-05-29)
Owners []Owner `json:"owners"`
// Array of documents that identity data is dervied from. This array will be empty if none of the account identity is from a document.
Documents *[]IdentityDocument `json:"documents,omitempty"`
}
// NewAccountIdentity instantiates a new AccountIdentity object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAccountIdentity(accountId string, balances AccountBalance, mask NullableString, name string, officialName NullableString, type_ AccountType, subtype NullableAccountSubtype, owners []Owner) *AccountIdentity {
this := AccountIdentity{}
this.AccountId = accountId
this.Balances = balances
this.Mask = mask
this.Name = name
this.OfficialName = officialName
this.Type = type_
this.Subtype = subtype
this.Owners = owners
return &this
}
// NewAccountIdentityWithDefaults instantiates a new AccountIdentity object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAccountIdentityWithDefaults() *AccountIdentity {
this := AccountIdentity{}
return &this
}
// GetAccountId returns the AccountId field value
func (o *AccountIdentity) GetAccountId() string {
if o == nil {
var ret string
return ret
}
return o.AccountId
}
// GetAccountIdOk returns a tuple with the AccountId field value
// and a boolean to check if the value has been set.
func (o *AccountIdentity) GetAccountIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AccountId, true
}
// SetAccountId sets field value
func (o *AccountIdentity) SetAccountId(v string) {
o.AccountId = v
}
// GetBalances returns the Balances field value
func (o *AccountIdentity) GetBalances() AccountBalance {
if o == nil {
var ret AccountBalance
return ret
}
return o.Balances
}
// GetBalancesOk returns a tuple with the Balances field value
// and a boolean to check if the value has been set.
func (o *AccountIdentity) GetBalancesOk() (*AccountBalance, bool) {
if o == nil {
return nil, false
}
return &o.Balances, true
}
// SetBalances sets field value
func (o *AccountIdentity) SetBalances(v AccountBalance) {
o.Balances = v
}
// GetMask returns the Mask field value
// If the value is explicit nil, the zero value for string will be returned
func (o *AccountIdentity) GetMask() string {
if o == nil || o.Mask.Get() == nil {
var ret string
return ret
}
return *o.Mask.Get()
}
// GetMaskOk returns a tuple with the Mask field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AccountIdentity) GetMaskOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Mask.Get(), o.Mask.IsSet()
}
// SetMask sets field value
func (o *AccountIdentity) SetMask(v string) {
o.Mask.Set(&v)
}
// GetName returns the Name field value
func (o *AccountIdentity) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *AccountIdentity) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *AccountIdentity) SetName(v string) {
o.Name = v
}
// GetOfficialName returns the OfficialName field value
// If the value is explicit nil, the zero value for string will be returned
func (o *AccountIdentity) GetOfficialName() string {
if o == nil || o.OfficialName.Get() == nil {
var ret string
return ret
}
return *o.OfficialName.Get()
}
// GetOfficialNameOk returns a tuple with the OfficialName field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AccountIdentity) GetOfficialNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.OfficialName.Get(), o.OfficialName.IsSet()
}
// SetOfficialName sets field value
func (o *AccountIdentity) SetOfficialName(v string) {
o.OfficialName.Set(&v)
}
// GetType returns the Type field value
func (o *AccountIdentity) GetType() AccountType {
if o == nil {
var ret AccountType
return ret
}
return o.Type
}
// GetTypeOk returns a tuple with the Type field value
// and a boolean to check if the value has been set.
func (o *AccountIdentity) GetTypeOk() (*AccountType, bool) {
if o == nil {
return nil, false
}
return &o.Type, true
}
// SetType sets field value
func (o *AccountIdentity) SetType(v AccountType) {
o.Type = v
}
// GetSubtype returns the Subtype field value
// If the value is explicit nil, the zero value for AccountSubtype will be returned
func (o *AccountIdentity) GetSubtype() AccountSubtype {
if o == nil || o.Subtype.Get() == nil {
var ret AccountSubtype
return ret
}
return *o.Subtype.Get()
}
// GetSubtypeOk returns a tuple with the Subtype field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AccountIdentity) GetSubtypeOk() (*AccountSubtype, bool) {
if o == nil {
return nil, false
}
return o.Subtype.Get(), o.Subtype.IsSet()
}
// SetSubtype sets field value
func (o *AccountIdentity) SetSubtype(v AccountSubtype) {
o.Subtype.Set(&v)
}
// GetVerificationStatus returns the VerificationStatus field value if set, zero value otherwise.
func (o *AccountIdentity) GetVerificationStatus() string {
if o == nil || o.VerificationStatus == nil {
var ret string
return ret
}
return *o.VerificationStatus
}
// GetVerificationStatusOk returns a tuple with the VerificationStatus field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountIdentity) GetVerificationStatusOk() (*string, bool) {
if o == nil || o.VerificationStatus == nil {
return nil, false
}
return o.VerificationStatus, true
}
// HasVerificationStatus returns a boolean if a field has been set.
func (o *AccountIdentity) HasVerificationStatus() bool {
if o != nil && o.VerificationStatus != nil {
return true
}
return false
}
// SetVerificationStatus gets a reference to the given string and assigns it to the VerificationStatus field.
func (o *AccountIdentity) SetVerificationStatus(v string) {
o.VerificationStatus = &v
}
// GetVerificationInsights returns the VerificationInsights field value if set, zero value otherwise.
func (o *AccountIdentity) GetVerificationInsights() AccountVerificationInsights {
if o == nil || o.VerificationInsights == nil {
var ret AccountVerificationInsights
return ret
}
return *o.VerificationInsights
}
// GetVerificationInsightsOk returns a tuple with the VerificationInsights field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountIdentity) GetVerificationInsightsOk() (*AccountVerificationInsights, bool) {
if o == nil || o.VerificationInsights == nil {
return nil, false
}
return o.VerificationInsights, true
}
// HasVerificationInsights returns a boolean if a field has been set.
func (o *AccountIdentity) HasVerificationInsights() bool {
if o != nil && o.VerificationInsights != nil {
return true
}
return false
}
// SetVerificationInsights gets a reference to the given AccountVerificationInsights and assigns it to the VerificationInsights field.
func (o *AccountIdentity) SetVerificationInsights(v AccountVerificationInsights) {
o.VerificationInsights = &v
}
// GetPersistentAccountId returns the PersistentAccountId field value if set, zero value otherwise.
func (o *AccountIdentity) GetPersistentAccountId() string {
if o == nil || o.PersistentAccountId == nil {
var ret string
return ret
}
return *o.PersistentAccountId
}
// GetPersistentAccountIdOk returns a tuple with the PersistentAccountId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountIdentity) GetPersistentAccountIdOk() (*string, bool) {
if o == nil || o.PersistentAccountId == nil {
return nil, false
}
return o.PersistentAccountId, true
}
// HasPersistentAccountId returns a boolean if a field has been set.
func (o *AccountIdentity) HasPersistentAccountId() bool {
if o != nil && o.PersistentAccountId != nil {
return true
}
return false
}
// SetPersistentAccountId gets a reference to the given string and assigns it to the PersistentAccountId field.
func (o *AccountIdentity) SetPersistentAccountId(v string) {
o.PersistentAccountId = &v
}
// GetOwners returns the Owners field value
func (o *AccountIdentity) GetOwners() []Owner {
if o == nil {
var ret []Owner
return ret
}
return o.Owners
}
// GetOwnersOk returns a tuple with the Owners field value
// and a boolean to check if the value has been set.
func (o *AccountIdentity) GetOwnersOk() (*[]Owner, bool) {
if o == nil {
return nil, false
}
return &o.Owners, true
}
// SetOwners sets field value
func (o *AccountIdentity) SetOwners(v []Owner) {
o.Owners = v
}
// GetDocuments returns the Documents field value if set, zero value otherwise.
func (o *AccountIdentity) GetDocuments() []IdentityDocument {
if o == nil || o.Documents == nil {
var ret []IdentityDocument
return ret
}
return *o.Documents
}
// GetDocumentsOk returns a tuple with the Documents field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountIdentity) GetDocumentsOk() (*[]IdentityDocument, bool) {
if o == nil || o.Documents == nil {
return nil, false
}
return o.Documents, true
}
// HasDocuments returns a boolean if a field has been set.
func (o *AccountIdentity) HasDocuments() bool {
if o != nil && o.Documents != nil {
return true
}
return false
}
// SetDocuments gets a reference to the given []IdentityDocument and assigns it to the Documents field.
func (o *AccountIdentity) SetDocuments(v []IdentityDocument) {
o.Documents = &v
}
func (o AccountIdentity) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["account_id"] = o.AccountId
}
if true {
toSerialize["balances"] = o.Balances
}
if true {
toSerialize["mask"] = o.Mask.Get()
}
if true {
toSerialize["name"] = o.Name
}
if true {
toSerialize["official_name"] = o.OfficialName.Get()
}
if true {
toSerialize["type"] = o.Type
}
if true {
toSerialize["subtype"] = o.Subtype.Get()
}
if o.VerificationStatus != nil {
toSerialize["verification_status"] = o.VerificationStatus
}
if o.VerificationInsights != nil {
toSerialize["verification_insights"] = o.VerificationInsights
}
if o.PersistentAccountId != nil {
toSerialize["persistent_account_id"] = o.PersistentAccountId
}
if true {
toSerialize["owners"] = o.Owners
}
if o.Documents != nil {
toSerialize["documents"] = o.Documents
}
return json.Marshal(toSerialize)
}
type NullableAccountIdentity struct {
value *AccountIdentity
isSet bool
}
func (v NullableAccountIdentity) Get() *AccountIdentity {
return v.value
}
func (v *NullableAccountIdentity) Set(val *AccountIdentity) {
v.value = val
v.isSet = true
}
func (v NullableAccountIdentity) IsSet() bool {
return v.isSet
}
func (v *NullableAccountIdentity) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAccountIdentity(val *AccountIdentity) *NullableAccountIdentity {
return &NullableAccountIdentity{value: val, isSet: true}
}
func (v NullableAccountIdentity) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAccountIdentity) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}