-
Notifications
You must be signed in to change notification settings - Fork 88
/
model_institution.go
614 lines (524 loc) · 18.4 KB
/
model_institution.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
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
/*
* 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"
)
// Institution Details relating to a specific financial institution
type Institution struct {
// Unique identifier for the institution. Note that the same institution may have multiple records, each with different institution IDs; for example, if the institution has migrated to OAuth, there may be separate `institution_id`s for the OAuth and non-OAuth versions of the institution. Institutions that operate in different countries or with multiple login portals may also have separate `institution_id`s for each country or portal.
InstitutionId string `json:"institution_id"`
// The official name of the institution.
Name string `json:"name"`
// A list of the Plaid products supported by the institution. Note that only institutions that support Instant Auth will return `auth` in the product array; institutions that do not list `auth` may still support other Auth methods such as Instant Match or Automated Micro-deposit Verification. To identify institutions that support those methods, use the `auth_metadata` object. For more details, see [Full Auth coverage](https://plaid.com/docs/auth/coverage/). The `income_verification` product here indicates support for Bank Income.
Products []Products `json:"products"`
// A list of the country codes supported by the institution.
CountryCodes []CountryCode `json:"country_codes"`
// The URL for the institution's website
Url NullableString `json:"url,omitempty"`
// Hexadecimal representation of the primary color used by the institution
PrimaryColor NullableString `json:"primary_color,omitempty"`
// Base64 encoded representation of the institution's logo, returned as a base64 encoded 152x152 PNG. Not all institutions' logos are available.
Logo NullableString `json:"logo,omitempty"`
// A partial list of routing numbers associated with the institution. This list is provided for the purpose of looking up institutions by routing number. It is not comprehensive and should never be used as a complete list of routing numbers for an institution.
RoutingNumbers []string `json:"routing_numbers"`
// A partial list of DTC numbers associated with the institution.
DtcNumbers *[]string `json:"dtc_numbers,omitempty"`
// Indicates that the institution has an OAuth login flow. This will be `true` if OAuth is supported for any Items associated with the institution, even if the institution also supports non-OAuth connections.
Oauth bool `json:"oauth"`
Status NullableInstitutionStatus `json:"status,omitempty"`
PaymentInitiationMetadata NullablePaymentInitiationMetadata `json:"payment_initiation_metadata,omitempty"`
AuthMetadata NullableAuthMetadata `json:"auth_metadata,omitempty"`
AdditionalProperties map[string]interface{}
}
type _Institution Institution
// NewInstitution instantiates a new Institution 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 NewInstitution(institutionId string, name string, products []Products, countryCodes []CountryCode, routingNumbers []string, oauth bool) *Institution {
this := Institution{}
this.InstitutionId = institutionId
this.Name = name
this.Products = products
this.CountryCodes = countryCodes
this.RoutingNumbers = routingNumbers
this.Oauth = oauth
return &this
}
// NewInstitutionWithDefaults instantiates a new Institution 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 NewInstitutionWithDefaults() *Institution {
this := Institution{}
return &this
}
// GetInstitutionId returns the InstitutionId field value
func (o *Institution) GetInstitutionId() string {
if o == nil {
var ret string
return ret
}
return o.InstitutionId
}
// GetInstitutionIdOk returns a tuple with the InstitutionId field value
// and a boolean to check if the value has been set.
func (o *Institution) GetInstitutionIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.InstitutionId, true
}
// SetInstitutionId sets field value
func (o *Institution) SetInstitutionId(v string) {
o.InstitutionId = v
}
// GetName returns the Name field value
func (o *Institution) 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 *Institution) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *Institution) SetName(v string) {
o.Name = v
}
// GetProducts returns the Products field value
func (o *Institution) GetProducts() []Products {
if o == nil {
var ret []Products
return ret
}
return o.Products
}
// GetProductsOk returns a tuple with the Products field value
// and a boolean to check if the value has been set.
func (o *Institution) GetProductsOk() (*[]Products, bool) {
if o == nil {
return nil, false
}
return &o.Products, true
}
// SetProducts sets field value
func (o *Institution) SetProducts(v []Products) {
o.Products = v
}
// GetCountryCodes returns the CountryCodes field value
func (o *Institution) GetCountryCodes() []CountryCode {
if o == nil {
var ret []CountryCode
return ret
}
return o.CountryCodes
}
// GetCountryCodesOk returns a tuple with the CountryCodes field value
// and a boolean to check if the value has been set.
func (o *Institution) GetCountryCodesOk() (*[]CountryCode, bool) {
if o == nil {
return nil, false
}
return &o.CountryCodes, true
}
// SetCountryCodes sets field value
func (o *Institution) SetCountryCodes(v []CountryCode) {
o.CountryCodes = v
}
// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Institution) GetUrl() string {
if o == nil || o.Url.Get() == nil {
var ret string
return ret
}
return *o.Url.Get()
}
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
// 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 *Institution) GetUrlOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Url.Get(), o.Url.IsSet()
}
// HasUrl returns a boolean if a field has been set.
func (o *Institution) HasUrl() bool {
if o != nil && o.Url.IsSet() {
return true
}
return false
}
// SetUrl gets a reference to the given NullableString and assigns it to the Url field.
func (o *Institution) SetUrl(v string) {
o.Url.Set(&v)
}
// SetUrlNil sets the value for Url to be an explicit nil
func (o *Institution) SetUrlNil() {
o.Url.Set(nil)
}
// UnsetUrl ensures that no value is present for Url, not even an explicit nil
func (o *Institution) UnsetUrl() {
o.Url.Unset()
}
// GetPrimaryColor returns the PrimaryColor field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Institution) GetPrimaryColor() string {
if o == nil || o.PrimaryColor.Get() == nil {
var ret string
return ret
}
return *o.PrimaryColor.Get()
}
// GetPrimaryColorOk returns a tuple with the PrimaryColor field value if set, nil otherwise
// 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 *Institution) GetPrimaryColorOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.PrimaryColor.Get(), o.PrimaryColor.IsSet()
}
// HasPrimaryColor returns a boolean if a field has been set.
func (o *Institution) HasPrimaryColor() bool {
if o != nil && o.PrimaryColor.IsSet() {
return true
}
return false
}
// SetPrimaryColor gets a reference to the given NullableString and assigns it to the PrimaryColor field.
func (o *Institution) SetPrimaryColor(v string) {
o.PrimaryColor.Set(&v)
}
// SetPrimaryColorNil sets the value for PrimaryColor to be an explicit nil
func (o *Institution) SetPrimaryColorNil() {
o.PrimaryColor.Set(nil)
}
// UnsetPrimaryColor ensures that no value is present for PrimaryColor, not even an explicit nil
func (o *Institution) UnsetPrimaryColor() {
o.PrimaryColor.Unset()
}
// GetLogo returns the Logo field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Institution) GetLogo() string {
if o == nil || o.Logo.Get() == nil {
var ret string
return ret
}
return *o.Logo.Get()
}
// GetLogoOk returns a tuple with the Logo field value if set, nil otherwise
// 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 *Institution) GetLogoOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Logo.Get(), o.Logo.IsSet()
}
// HasLogo returns a boolean if a field has been set.
func (o *Institution) HasLogo() bool {
if o != nil && o.Logo.IsSet() {
return true
}
return false
}
// SetLogo gets a reference to the given NullableString and assigns it to the Logo field.
func (o *Institution) SetLogo(v string) {
o.Logo.Set(&v)
}
// SetLogoNil sets the value for Logo to be an explicit nil
func (o *Institution) SetLogoNil() {
o.Logo.Set(nil)
}
// UnsetLogo ensures that no value is present for Logo, not even an explicit nil
func (o *Institution) UnsetLogo() {
o.Logo.Unset()
}
// GetRoutingNumbers returns the RoutingNumbers field value
func (o *Institution) GetRoutingNumbers() []string {
if o == nil {
var ret []string
return ret
}
return o.RoutingNumbers
}
// GetRoutingNumbersOk returns a tuple with the RoutingNumbers field value
// and a boolean to check if the value has been set.
func (o *Institution) GetRoutingNumbersOk() (*[]string, bool) {
if o == nil {
return nil, false
}
return &o.RoutingNumbers, true
}
// SetRoutingNumbers sets field value
func (o *Institution) SetRoutingNumbers(v []string) {
o.RoutingNumbers = v
}
// GetDtcNumbers returns the DtcNumbers field value if set, zero value otherwise.
func (o *Institution) GetDtcNumbers() []string {
if o == nil || o.DtcNumbers == nil {
var ret []string
return ret
}
return *o.DtcNumbers
}
// GetDtcNumbersOk returns a tuple with the DtcNumbers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Institution) GetDtcNumbersOk() (*[]string, bool) {
if o == nil || o.DtcNumbers == nil {
return nil, false
}
return o.DtcNumbers, true
}
// HasDtcNumbers returns a boolean if a field has been set.
func (o *Institution) HasDtcNumbers() bool {
if o != nil && o.DtcNumbers != nil {
return true
}
return false
}
// SetDtcNumbers gets a reference to the given []string and assigns it to the DtcNumbers field.
func (o *Institution) SetDtcNumbers(v []string) {
o.DtcNumbers = &v
}
// GetOauth returns the Oauth field value
func (o *Institution) GetOauth() bool {
if o == nil {
var ret bool
return ret
}
return o.Oauth
}
// GetOauthOk returns a tuple with the Oauth field value
// and a boolean to check if the value has been set.
func (o *Institution) GetOauthOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Oauth, true
}
// SetOauth sets field value
func (o *Institution) SetOauth(v bool) {
o.Oauth = v
}
// GetStatus returns the Status field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Institution) GetStatus() InstitutionStatus {
if o == nil || o.Status.Get() == nil {
var ret InstitutionStatus
return ret
}
return *o.Status.Get()
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// 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 *Institution) GetStatusOk() (*InstitutionStatus, bool) {
if o == nil {
return nil, false
}
return o.Status.Get(), o.Status.IsSet()
}
// HasStatus returns a boolean if a field has been set.
func (o *Institution) HasStatus() bool {
if o != nil && o.Status.IsSet() {
return true
}
return false
}
// SetStatus gets a reference to the given NullableInstitutionStatus and assigns it to the Status field.
func (o *Institution) SetStatus(v InstitutionStatus) {
o.Status.Set(&v)
}
// SetStatusNil sets the value for Status to be an explicit nil
func (o *Institution) SetStatusNil() {
o.Status.Set(nil)
}
// UnsetStatus ensures that no value is present for Status, not even an explicit nil
func (o *Institution) UnsetStatus() {
o.Status.Unset()
}
// GetPaymentInitiationMetadata returns the PaymentInitiationMetadata field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Institution) GetPaymentInitiationMetadata() PaymentInitiationMetadata {
if o == nil || o.PaymentInitiationMetadata.Get() == nil {
var ret PaymentInitiationMetadata
return ret
}
return *o.PaymentInitiationMetadata.Get()
}
// GetPaymentInitiationMetadataOk returns a tuple with the PaymentInitiationMetadata field value if set, nil otherwise
// 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 *Institution) GetPaymentInitiationMetadataOk() (*PaymentInitiationMetadata, bool) {
if o == nil {
return nil, false
}
return o.PaymentInitiationMetadata.Get(), o.PaymentInitiationMetadata.IsSet()
}
// HasPaymentInitiationMetadata returns a boolean if a field has been set.
func (o *Institution) HasPaymentInitiationMetadata() bool {
if o != nil && o.PaymentInitiationMetadata.IsSet() {
return true
}
return false
}
// SetPaymentInitiationMetadata gets a reference to the given NullablePaymentInitiationMetadata and assigns it to the PaymentInitiationMetadata field.
func (o *Institution) SetPaymentInitiationMetadata(v PaymentInitiationMetadata) {
o.PaymentInitiationMetadata.Set(&v)
}
// SetPaymentInitiationMetadataNil sets the value for PaymentInitiationMetadata to be an explicit nil
func (o *Institution) SetPaymentInitiationMetadataNil() {
o.PaymentInitiationMetadata.Set(nil)
}
// UnsetPaymentInitiationMetadata ensures that no value is present for PaymentInitiationMetadata, not even an explicit nil
func (o *Institution) UnsetPaymentInitiationMetadata() {
o.PaymentInitiationMetadata.Unset()
}
// GetAuthMetadata returns the AuthMetadata field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Institution) GetAuthMetadata() AuthMetadata {
if o == nil || o.AuthMetadata.Get() == nil {
var ret AuthMetadata
return ret
}
return *o.AuthMetadata.Get()
}
// GetAuthMetadataOk returns a tuple with the AuthMetadata field value if set, nil otherwise
// 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 *Institution) GetAuthMetadataOk() (*AuthMetadata, bool) {
if o == nil {
return nil, false
}
return o.AuthMetadata.Get(), o.AuthMetadata.IsSet()
}
// HasAuthMetadata returns a boolean if a field has been set.
func (o *Institution) HasAuthMetadata() bool {
if o != nil && o.AuthMetadata.IsSet() {
return true
}
return false
}
// SetAuthMetadata gets a reference to the given NullableAuthMetadata and assigns it to the AuthMetadata field.
func (o *Institution) SetAuthMetadata(v AuthMetadata) {
o.AuthMetadata.Set(&v)
}
// SetAuthMetadataNil sets the value for AuthMetadata to be an explicit nil
func (o *Institution) SetAuthMetadataNil() {
o.AuthMetadata.Set(nil)
}
// UnsetAuthMetadata ensures that no value is present for AuthMetadata, not even an explicit nil
func (o *Institution) UnsetAuthMetadata() {
o.AuthMetadata.Unset()
}
func (o Institution) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["institution_id"] = o.InstitutionId
}
if true {
toSerialize["name"] = o.Name
}
if true {
toSerialize["products"] = o.Products
}
if true {
toSerialize["country_codes"] = o.CountryCodes
}
if o.Url.IsSet() {
toSerialize["url"] = o.Url.Get()
}
if o.PrimaryColor.IsSet() {
toSerialize["primary_color"] = o.PrimaryColor.Get()
}
if o.Logo.IsSet() {
toSerialize["logo"] = o.Logo.Get()
}
if true {
toSerialize["routing_numbers"] = o.RoutingNumbers
}
if o.DtcNumbers != nil {
toSerialize["dtc_numbers"] = o.DtcNumbers
}
if true {
toSerialize["oauth"] = o.Oauth
}
if o.Status.IsSet() {
toSerialize["status"] = o.Status.Get()
}
if o.PaymentInitiationMetadata.IsSet() {
toSerialize["payment_initiation_metadata"] = o.PaymentInitiationMetadata.Get()
}
if o.AuthMetadata.IsSet() {
toSerialize["auth_metadata"] = o.AuthMetadata.Get()
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *Institution) UnmarshalJSON(bytes []byte) (err error) {
varInstitution := _Institution{}
if err = json.Unmarshal(bytes, &varInstitution); err == nil {
*o = Institution(varInstitution)
} else {
return err
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "institution_id")
delete(additionalProperties, "name")
delete(additionalProperties, "products")
delete(additionalProperties, "country_codes")
delete(additionalProperties, "url")
delete(additionalProperties, "primary_color")
delete(additionalProperties, "logo")
delete(additionalProperties, "routing_numbers")
delete(additionalProperties, "dtc_numbers")
delete(additionalProperties, "oauth")
delete(additionalProperties, "status")
delete(additionalProperties, "payment_initiation_metadata")
delete(additionalProperties, "auth_metadata")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableInstitution struct {
value *Institution
isSet bool
}
func (v NullableInstitution) Get() *Institution {
return v.value
}
func (v *NullableInstitution) Set(val *Institution) {
v.value = val
v.isSet = true
}
func (v NullableInstitution) IsSet() bool {
return v.isSet
}
func (v *NullableInstitution) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInstitution(val *Institution) *NullableInstitution {
return &NullableInstitution{value: val, isSet: true}
}
func (v NullableInstitution) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInstitution) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}