├── .dockerignore ├── .openapi-generator └── VERSION ├── plaid ├── README.md ├── response.go ├── model_numbers_iban_nullable.go ├── model_report_type.go ├── model_phone_type.go ├── model_risk_level.go ├── model_source.go ├── model_iso_currency_code.go ├── model_prism_product.go ├── model_gse_report_type.go ├── model_form1099_type.go ├── model_selfie_status.go ├── model_transfer_type.go ├── model_auth_update_types.go ├── model_fraud_check_outcome.go ├── model_prism_detect_version.go ├── model_prism_extend_version.go ├── model_action_state.go ├── model_cra_pdf_add_ons.go ├── model_rule_result.go ├── model_po_box_status.go ├── model_scopes_context.go ├── model_image_quality_outcome.go ├── model_network_insights_version.go ├── model_asset_report_type.go ├── model_asset_transaction_type.go ├── model_wallet_status.go ├── model_consent_event_type.go ├── model_loan_identifier_type.go ├── model_asset_report_add_ons.go ├── model_selfie_check_status.go ├── model_fdx_party_registry.go ├── model_bank_transfer_type.go ├── model_employment_source_type.go ├── model_fdx_update_reason.go ├── model_asset_type.go ├── model_document_status.go ├── model_issuing_country.go ├── model_payment_channel.go ├── model_party_role_type.go ├── model_fdx_event_status.go ├── model_wallet_iso_currency_code.go ├── model_dashboard_user_status.go ├── model_transactions_rule_field.go ├── model_expiration_date.go ├── model_fdx_party_type.go ├── model_prism_insights_version.go ├── model_plaid_lend_score_version.go ├── model_other_account_subtype.go ├── model_bank_transfer_network.go ├── model_webhook_type.go ├── model_payment_schedule_interval.go ├── model_issues_status.go ├── model_transactions_rule_type.go ├── model_prism_first_detect_version.go ├── model_transfer_document_purpose.go ├── model_recommendation_string.go ├── model_risk_level_with_no_data.go ├── model_plaid_check_score_version.go ├── model_identity_update_types.go ├── model_monitoring_insights_status.go ├── model_transfer_balance_type.go ├── model_fdx_notification_priority.go ├── model_webhook_environment_values.go └── model_aamva_match_result.go ├── .openapi-generator-ignore ├── Makefile ├── Dockerfile ├── .gitignore ├── go.mod ├── .circleci └── config.yml ├── tests ├── categories_test.go ├── enums_test.go ├── identity_test.go ├── investments_auth_test.go ├── investment_transactions_test.go ├── liabilities_test.go ├── webhooks_test.go ├── accounts_test.go ├── accounts_balance_test.go ├── auth_test.go ├── holdings_test.go ├── income_verification_test.go ├── utils_test.go ├── sandbox_test.go ├── processor_test.go ├── CODEOWNERS.yml ├── enrich_test.go ├── identity_verification_test.go └── transactions_test.go ├── LICENSE └── CONTRIBUTING.md /.dockerignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 5.2.0 -------------------------------------------------------------------------------- /plaid/README.md: -------------------------------------------------------------------------------- 1 | Placeholder file -------------------------------------------------------------------------------- /.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | .gitignore 2 | .travis.yml 3 | README.md 4 | go.mod 5 | go.sum 6 | git_push.sh 7 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Go embeds the package version in the generator. 2 | GO_PACKAGE_VERSION=41.0.0 3 | 4 | .PHONY: test 5 | test: 6 | go test -v ./... 7 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Note: This image is also built in CircleCI, so limit references to internal repositories. 2 | FROM golang:1.16 3 | 4 | # Create app directory 5 | WORKDIR /usr/src/app 6 | 7 | # Copy app to directory 8 | COPY . /usr/src/app 9 | 10 | CMD ["make", "test"] 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | .idea 10 | 11 | # Architecture specific extensions/prefixes 12 | *.[568vq] 13 | [568vq].out 14 | 15 | *.cgo1.go 16 | *.cgo2.c 17 | _cgo_defun.c 18 | _cgo_gotypes.go 19 | _cgo_export.* 20 | 21 | _testmain.go 22 | 23 | *.exe 24 | *.test 25 | *.prof 26 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/plaid/plaid-go/v41 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/stretchr/testify v1.8.0 7 | golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 8 | ) 9 | 10 | require ( 11 | golang.org/x/net v0.17.0 // indirect 12 | google.golang.org/protobuf v1.28.1 // indirect 13 | ) 14 | 15 | replace golang.org/x/crypto => golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect 16 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | jobs: 4 | build: 5 | machine: 6 | image: ubuntu-2204:edge 7 | steps: 8 | - checkout 9 | - run: 10 | name: Build Docker image for running go tests 11 | command: docker build -t plaid-go . 12 | - run: 13 | name: Run go tests in Docker 14 | command: docker run --rm -e CLIENT_ID=$CLIENT_ID -e SECRET=$SECRET plaid-go 15 | -------------------------------------------------------------------------------- /tests/categories_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestCategoriesGet(t *testing.T) { 11 | testClient := NewTestClient() 12 | ctx := context.Background() 13 | 14 | categoriesGetResp, _, err := testClient.PlaidApi.CategoriesGet(ctx).Body(nil).Execute() 15 | 16 | assert.NoError(t, err) 17 | assert.NotEmpty(t, categoriesGetResp.GetCategories()) 18 | 19 | category := categoriesGetResp.GetCategories()[0] 20 | assert.NotEmpty(t, category.GetCategoryId()) 21 | assert.NotEmpty(t, category.GetGroup()) 22 | } 23 | -------------------------------------------------------------------------------- /tests/enums_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/plaid/plaid-go/v41/plaid" 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | // We want to be able to accept new enum values as they're added to the API 11 | // without needing clients to update their client library versions. The API 12 | // will error if it doesn't recognize the enum so we still have validation. 13 | func TestUnknownEnums(t *testing.T) { 14 | val, err := plaid.NewAccountSelectionCardinalityFromValue("UNKNOWN_VALUE") 15 | 16 | assert.NoError(t, err) 17 | assert.Equal(t, *val, plaid.AccountSelectionCardinality("UNKNOWN_VALUE")) 18 | } 19 | -------------------------------------------------------------------------------- /tests/identity_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "github.com/plaid/plaid-go/v41/plaid" 8 | "github.com/stretchr/testify/assert" 9 | ) 10 | 11 | func TestIdentityGet(t *testing.T) { 12 | testClient := NewTestClient() 13 | ctx := context.Background() 14 | 15 | accessToken := createSandboxItem( 16 | t, 17 | ctx, 18 | testClient, 19 | FIRST_PLATYPUS_BANK, 20 | []plaid.Products{plaid.PRODUCTS_IDENTITY}, 21 | ) 22 | 23 | identityGetResp, _, err := testClient.PlaidApi.IdentityGet(ctx).IdentityGetRequest( 24 | *plaid.NewIdentityGetRequest(accessToken), 25 | ).Execute() 26 | 27 | assert.NoError(t, err) 28 | assert.NotEmpty(t, identityGetResp.GetAccounts()) 29 | 30 | for _, acc := range identityGetResp.GetAccounts() { 31 | assert.NotEmpty(t, acc.GetOwners()) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/investments_auth_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "github.com/plaid/plaid-go/v41/plaid" 6 | "github.com/stretchr/testify/assert" 7 | "github.com/stretchr/testify/require" 8 | "testing" 9 | ) 10 | 11 | func TestInvestmentsAuthGet(t *testing.T) { 12 | testClient := NewTestClient() 13 | ctx := context.Background() 14 | accessToken := createSandboxItem(t, ctx, testClient, FIRST_PLATYPUS_BANK, []plaid.Products{plaid.PRODUCTS_INVESTMENTS_AUTH}) 15 | request := plaid.NewInvestmentsAuthGetRequest(accessToken) 16 | response, _, err := testClient.PlaidApi.InvestmentsAuthGet(ctx).InvestmentsAuthGetRequest(*request).Execute() 17 | require.NoError(t, err) 18 | assert.NotEmpty(t, response.GetAccounts()) 19 | assert.NotEmpty(t, response.GetSecurities()) 20 | assert.NotEmpty(t, response.GetHoldings()) 21 | assert.NotEmpty(t, response.GetOwners()) 22 | assert.NotEmpty(t, response.GetNumbers()) 23 | } 24 | -------------------------------------------------------------------------------- /tests/investment_transactions_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | "time" 7 | 8 | "github.com/plaid/plaid-go/v41/plaid" 9 | "github.com/stretchr/testify/assert" 10 | ) 11 | 12 | func TestInvestmentsTransactionsGet(t *testing.T) { 13 | testClient := NewTestClient() 14 | ctx := context.Background() 15 | 16 | accessToken := createSandboxItem(t, ctx, testClient, FIRST_PLATYPUS_BANK, []plaid.Products{plaid.PRODUCTS_INVESTMENTS}) 17 | startDateString := time.Now().Add(-365 * 24 * time.Hour).Format(iso8601TimeFormat) 18 | endDateString := time.Now().Format(iso8601TimeFormat) 19 | request := plaid.NewInvestmentsTransactionsGetRequest(accessToken, startDateString, endDateString) 20 | response, _, err := testClient.PlaidApi.InvestmentsTransactionsGet(ctx).InvestmentsTransactionsGetRequest(*request).Execute() 21 | assert.NoError(t, err) 22 | 23 | assert.NotEmpty(t, response.GetAccounts()) 24 | assert.NotEmpty(t, response.GetInvestmentTransactions()) 25 | for _, transaction := range response.InvestmentTransactions { 26 | assert.NotEmpty(t, transaction.Subtype) 27 | } 28 | assert.NotEmpty(t, response.GetSecurities()) 29 | } 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2014-2021 Plaid Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /tests/liabilities_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "github.com/plaid/plaid-go/v41/plaid" 8 | "github.com/stretchr/testify/assert" 9 | ) 10 | 11 | func TestLiabilitiesGet(t *testing.T) { 12 | testClient := NewTestClient() 13 | ctx := context.Background() 14 | 15 | accessToken := createSandboxItem(t, ctx, testClient, FIRST_PLATYPUS_BANK, []plaid.Products{plaid.PRODUCTS_LIABILITIES}) 16 | 17 | request := plaid.NewLiabilitiesGetRequest(accessToken) 18 | resp, _, err := testClient.PlaidApi.LiabilitiesGet(ctx).LiabilitiesGetRequest(*request).Execute() 19 | 20 | assert.NoError(t, err) 21 | assert.NotEmpty(t, resp.Accounts) 22 | assert.Len(t, resp.Liabilities.Student, 1) 23 | assert.Len(t, resp.Liabilities.Credit, 1) 24 | assert.Len(t, resp.Liabilities.Mortgage, 1) 25 | 26 | accountID := resp.GetAccounts()[7].AccountId 27 | request.SetOptions(plaid.LiabilitiesGetRequestOptions{ 28 | AccountIds: &[]string{accountID}, 29 | }) 30 | resp, _, err = testClient.PlaidApi.LiabilitiesGet(ctx).LiabilitiesGetRequest(*request).Execute() 31 | 32 | assert.NoError(t, err) 33 | assert.Len(t, resp.Accounts, 1) 34 | assert.Len(t, resp.Liabilities.Student, 1) 35 | assert.Len(t, resp.Liabilities.Mortgage, 0) 36 | } 37 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Instructions for contributing to [plaid-go][1]. A go client library for the [Plaid API][2]. This library is fully generated from the [Plaid OpenAPI spec](3). 4 | 5 | This library cannot directly accept PRs from the public as it is generated from internal Plaid sources on the internal Plaid GitHub instance and any changes made directly to this repo will be overwritten. If you submit a PR and it is accepted, a member of Plaid engineering will copy and paste your change into the upstream, internal version of this repo rather than merging your PR. Plaid employees should make any changes on the internal Plaid GitHub and not on the public repo. 6 | 7 | ## Running Tests 8 | 9 | 1. To build the docker image for the client tests, run `docker build -t plaid-go .`. 10 | 2. Go to the [Plaid Dashboard](https://dashboard.plaid.com/) and copy and paste your `client_id` and sandbox `secret` into the following command. 11 | 3. Run `docker run --rm -e CLIENT_ID=$CLIENT_ID -e SECRET=$SECRET plaid-go`. 12 | 13 | If you wish to run a single test, do something like this: 14 | 15 | ```sh 16 | CLIENT_ID="" SECRET="" go test -v ./... -run TESTNAME 17 | ``` 18 | 19 | [1]: https://github.com/plaid/plaid-go 20 | [2]: https://plaid.com 21 | [3]: https://github.com/plaid/plaid-openapi 22 | -------------------------------------------------------------------------------- /tests/webhooks_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "os" 6 | "testing" 7 | 8 | "github.com/plaid/plaid-go/v41/plaid" 9 | "github.com/stretchr/testify/assert" 10 | ) 11 | 12 | // WebhookVerificationKeyId provides a valid key ID for testing webhook verification. It defaults 13 | // to the key corresponding to the sandbox environment. 14 | func WebhookVerificationKeyId() string { 15 | if keyId, ok := os.LookupEnv("WEBHOOK_VERIFICATION_KEY_ID"); ok { 16 | return keyId 17 | } else { 18 | return "6c5516e1-92dc-479e-a8ff-5a51992e0001" 19 | } 20 | } 21 | 22 | func TestWebhookVerificationKeyGet(t *testing.T) { 23 | testClient := NewTestClient() 24 | ctx := context.Background() 25 | 26 | webhookResp, _, err := testClient.PlaidApi.WebhookVerificationKeyGet(ctx).WebhookVerificationKeyGetRequest(*plaid.NewWebhookVerificationKeyGetRequest(WebhookVerificationKeyId())).Execute() 27 | 28 | assert.Nil(t, err) 29 | assert.NotEmpty(t, webhookResp.Key.Alg) 30 | assert.NotZero(t, webhookResp.Key.CreatedAt) 31 | assert.NotEmpty(t, webhookResp.Key.Crv) 32 | assert.NotEmpty(t, webhookResp.Key.Kid) 33 | assert.NotEmpty(t, webhookResp.Key.Kty) 34 | assert.NotEmpty(t, webhookResp.Key.Use) 35 | assert.NotEmpty(t, webhookResp.Key.X) 36 | assert.NotEmpty(t, webhookResp.Key.Y) 37 | } 38 | -------------------------------------------------------------------------------- /tests/accounts_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "github.com/plaid/plaid-go/v41/plaid" 8 | "github.com/stretchr/testify/assert" 9 | ) 10 | 11 | func TestAccountsGet(t *testing.T) { 12 | testClient := NewTestClient() 13 | ctx := context.Background() 14 | 15 | accessToken := createSandboxItem( 16 | t, 17 | ctx, 18 | testClient, 19 | FIRST_PLATYPUS_BANK, 20 | []plaid.Products{plaid.PRODUCTS_TRANSACTIONS}, 21 | ) 22 | 23 | // Get all accounts 24 | accountsGetResp, _, err := testClient.PlaidApi.AccountsGet(ctx).AccountsGetRequest( 25 | *plaid.NewAccountsGetRequest(accessToken), 26 | ).Execute() 27 | 28 | item, _ := accountsGetResp.GetItemOk() 29 | assert.NoError(t, err) 30 | assert.NotNil(t, item) 31 | assert.Greater(t, len(accountsGetResp.GetAccounts()), 1) 32 | 33 | // Get single account 34 | accountsGetRequest := plaid.NewAccountsGetRequest(accessToken) 35 | accountsGetRequest.SetOptions(plaid.AccountsGetRequestOptions{ 36 | AccountIds: &[]string{accountsGetResp.GetAccounts()[0].GetAccountId()}, 37 | }) 38 | 39 | accountsGetResp, _, err = testClient.PlaidApi.AccountsGet(ctx).AccountsGetRequest( 40 | *accountsGetRequest, 41 | ).Execute() 42 | 43 | item, _ = accountsGetResp.GetItemOk() 44 | assert.NoError(t, err) 45 | assert.NotNil(t, item) 46 | assert.Equal(t, len(accountsGetResp.GetAccounts()), 1) 47 | } 48 | -------------------------------------------------------------------------------- /tests/accounts_balance_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "github.com/plaid/plaid-go/v41/plaid" 8 | "github.com/stretchr/testify/assert" 9 | ) 10 | 11 | func TestBalancesGet(t *testing.T) { 12 | testClient := NewTestClient() 13 | ctx := context.Background() 14 | 15 | accessToken := createSandboxItem( 16 | t, 17 | ctx, 18 | testClient, 19 | FIRST_PLATYPUS_BANK, 20 | []plaid.Products{plaid.PRODUCTS_TRANSACTIONS}, 21 | ) 22 | 23 | // Get all balances 24 | balancesGetResp, _, err := testClient.PlaidApi.AccountsBalanceGet(ctx).AccountsBalanceGetRequest( 25 | *plaid.NewAccountsBalanceGetRequest(accessToken), 26 | ).Execute() 27 | 28 | item, _ := balancesGetResp.GetItemOk() 29 | assert.NoError(t, err) 30 | assert.NotNil(t, item) 31 | assert.Greater(t, len(balancesGetResp.GetAccounts()), 1) 32 | 33 | // Get single account 34 | balancesGetRequest := plaid.NewAccountsBalanceGetRequest(accessToken) 35 | balancesGetRequest.SetOptions(plaid.AccountsBalanceGetRequestOptions{ 36 | AccountIds: &[]string{balancesGetResp.GetAccounts()[0].GetAccountId()}, 37 | }) 38 | 39 | balancesGetResp, _, err = testClient.PlaidApi.AccountsBalanceGet(ctx).AccountsBalanceGetRequest( 40 | *balancesGetRequest, 41 | ).Execute() 42 | 43 | item, _ = balancesGetResp.GetItemOk() 44 | assert.NoError(t, err) 45 | assert.NotNil(t, item) 46 | assert.Equal(t, len(balancesGetResp.GetAccounts()), 1) 47 | } 48 | -------------------------------------------------------------------------------- /tests/auth_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "github.com/plaid/plaid-go/v41/plaid" 8 | "github.com/stretchr/testify/assert" 9 | ) 10 | 11 | func TestAuthGet(t *testing.T) { 12 | testClient := NewTestClient() 13 | ctx := context.Background() 14 | 15 | accessToken := createSandboxItem( 16 | t, 17 | ctx, 18 | testClient, 19 | FIRST_PLATYPUS_BANK, 20 | []plaid.Products{plaid.PRODUCTS_AUTH}, 21 | ) 22 | 23 | // Get auth for all accounts 24 | authGetResp, _, err := testClient.PlaidApi.AuthGet(ctx).AuthGetRequest( 25 | *plaid.NewAuthGetRequest(accessToken), 26 | ).Execute() 27 | 28 | assert.NoError(t, err) 29 | assert.NotEmpty(t, authGetResp.GetAccounts()) 30 | assert.NotEqual(t, authGetResp.GetNumbers(), plaid.AuthGetNumbers{}) 31 | assert.NotEqual(t, authGetResp.GetItem(), plaid.Item{}) 32 | 33 | // Get auth for single account 34 | authGetRequest := plaid.NewAuthGetRequest(accessToken) 35 | authGetRequestOptions := plaid.NewAuthGetRequestOptions() 36 | authGetRequestOptions.SetAccountIds([]string{ 37 | authGetResp.GetAccounts()[1].GetAccountId(), 38 | }) 39 | authGetRequest.SetOptions(*authGetRequestOptions) 40 | authGetResp, _, err = testClient.PlaidApi.AuthGet(ctx).AuthGetRequest( 41 | *authGetRequest, 42 | ).Execute() 43 | 44 | assert.NoError(t, err) 45 | assert.Equal(t, len(authGetResp.GetAccounts()), 1) 46 | assert.NotEqual(t, authGetResp.GetItem(), plaid.Item{}) 47 | } 48 | -------------------------------------------------------------------------------- /tests/holdings_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "github.com/plaid/plaid-go/v41/plaid" 8 | "github.com/stretchr/testify/assert" 9 | ) 10 | 11 | func TestHoldingsGet(t *testing.T) { 12 | testClient := NewTestClient() 13 | ctx := context.Background() 14 | 15 | accessToken := createSandboxItem( 16 | t, 17 | ctx, 18 | testClient, 19 | FIRST_PLATYPUS_BANK, 20 | []plaid.Products{plaid.PRODUCTS_INVESTMENTS}, 21 | ) 22 | 23 | // Get holdings for all accounts 24 | holdingsGetResp, _, err := testClient.PlaidApi.InvestmentsHoldingsGet(ctx).InvestmentsHoldingsGetRequest( 25 | *plaid.NewInvestmentsHoldingsGetRequest(accessToken), 26 | ).Execute() 27 | 28 | assert.NoError(t, err) 29 | assert.NotEmpty(t, holdingsGetResp.GetAccounts()) 30 | assert.NotEmpty(t, holdingsGetResp.GetHoldings()) 31 | assert.NotEmpty(t, holdingsGetResp.GetSecurities()) 32 | 33 | // Get holdings for single account 34 | holdingsGetReq := plaid.NewInvestmentsHoldingsGetRequest(accessToken) 35 | holdingsGetReqOptions := plaid.NewInvestmentHoldingsGetRequestOptions() 36 | holdingsGetReqOptions.SetAccountIds([]string{holdingsGetResp.GetAccounts()[0].GetAccountId()}) 37 | holdingsGetReq.SetOptions(*holdingsGetReqOptions) 38 | 39 | holdingsGetResp, _, err = testClient.PlaidApi.InvestmentsHoldingsGet(ctx).InvestmentsHoldingsGetRequest( 40 | *holdingsGetReq, 41 | ).Execute() 42 | 43 | assert.NoError(t, err) 44 | assert.Len(t, holdingsGetResp.GetAccounts(), 1) 45 | } 46 | -------------------------------------------------------------------------------- /tests/income_verification_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/assert" 8 | 9 | "github.com/plaid/plaid-go/v41/plaid" 10 | ) 11 | 12 | func TestPayStubsGet(t *testing.T) { 13 | testClient := NewTestClient() 14 | ctx := context.Background() 15 | accessToken := createSandboxItem( 16 | t, 17 | ctx, 18 | testClient, 19 | "ins_135842", 20 | []plaid.Products{plaid.PRODUCTS_INCOME_VERIFICATION}, 21 | ) 22 | 23 | request := plaid.NewIncomeVerificationPaystubsGetRequest() 24 | request.SetAccessToken(accessToken) 25 | 26 | resp, _, err := testClient.PlaidApi.IncomeVerificationPaystubsGet(ctx).IncomeVerificationPaystubsGetRequest(*request).Execute() 27 | 28 | assert.NoError(t, err) 29 | assert.Equal(t, 2, len(resp.GetPaystubs())) 30 | } 31 | 32 | func TestPreCheck(t *testing.T) { 33 | testClient := NewTestClient() 34 | ctx := context.Background() 35 | 36 | precheckEmployer := plaid.IncomeVerificationPrecheckEmployer{} 37 | precheckEmployer.SetName("Plaid") 38 | 39 | precheckUser := plaid.IncomeVerificationPrecheckUser{} 40 | precheckUser.SetFirstName("Jane") 41 | precheckUser.SetLastName("Doe") 42 | 43 | request := plaid.NewIncomeVerificationPrecheckRequest() 44 | request.SetEmployer(precheckEmployer) 45 | request.SetUser(precheckUser) 46 | 47 | resp, _, err := testClient.PlaidApi.IncomeVerificationPrecheck(ctx).IncomeVerificationPrecheckRequest(*request).Execute() 48 | assert.NoError(t, err) 49 | assert.NotNil(t, resp) 50 | assert.Equal(t, plaid.IncomeVerificationPrecheckConfidence("HIGH"), resp.GetConfidence()) 51 | } 52 | -------------------------------------------------------------------------------- /plaid/response.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "net/http" 15 | ) 16 | 17 | // APIResponse stores the API response returned by the server. 18 | type APIResponse struct { 19 | *http.Response `json:"-"` 20 | Message string `json:"message,omitempty"` 21 | // Operation is the name of the OpenAPI operation. 22 | Operation string `json:"operation,omitempty"` 23 | // RequestURL is the request URL. This value is always available, even if the 24 | // embedded *http.Response is nil. 25 | RequestURL string `json:"url,omitempty"` 26 | // Method is the HTTP method used for the request. This value is always 27 | // available, even if the embedded *http.Response is nil. 28 | Method string `json:"method,omitempty"` 29 | // Payload holds the contents of the response body (which may be nil or empty). 30 | // This is provided here as the raw response.Body() reader will have already 31 | // been drained. 32 | Payload []byte `json:"-"` 33 | } 34 | 35 | // NewAPIResponse returns a new APIResponse object. 36 | func NewAPIResponse(r *http.Response) *APIResponse { 37 | 38 | response := &APIResponse{Response: r} 39 | return response 40 | } 41 | 42 | // NewAPIResponseWithError returns a new APIResponse object with the provided error message. 43 | func NewAPIResponseWithError(errorMessage string) *APIResponse { 44 | 45 | response := &APIResponse{Message: errorMessage} 46 | return response 47 | } 48 | -------------------------------------------------------------------------------- /tests/utils_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "encoding/json" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/assert" 8 | 9 | "github.com/plaid/plaid-go/v41/plaid" 10 | ) 11 | 12 | // TestJsonUnmarshal tests the case where a null response unmarshalled to a Nullable type 13 | // sets the isSet property to true. 14 | func TestJsonUnmarshal(t *testing.T) { 15 | var testValue plaid.Location 16 | testJson := `{ 17 | "address": null, 18 | "city": "hello", 19 | "country": null, 20 | "lat": null, 21 | "lon": null, 22 | "postal_code": null, 23 | "store_number": null 24 | }` 25 | 26 | json.Unmarshal([]byte(testJson), &testValue) 27 | 28 | // String should unmarshal and set isSet to true 29 | assert.True(t, testValue.City.IsSet()) 30 | assert.NotEmpty(t, testValue.City.Get()) 31 | // Null should not be set and contain an empty value 32 | assert.False(t, testValue.Address.IsSet()) 33 | assert.Empty(t, testValue.Address.Get()) 34 | // This should also work for non-String types 35 | assert.False(t, testValue.Lat.IsSet()) 36 | assert.Empty(t, testValue.Lat.Get()) 37 | // Field not present should not be set and contain an empty value 38 | assert.False(t, testValue.Region.IsSet()) 39 | assert.Empty(t, testValue.Region.Get()) 40 | } 41 | 42 | func TestMakeGenericOpenAPIError(t *testing.T) { 43 | plaidError := *plaid.NewPlaidError(plaid.PLAIDERRORTYPE_ITEM_ERROR, "PRODUCT_NOT_READY", "", plaid.NullableString{}) 44 | genericOpenAPIError := plaid.MakeGenericOpenAPIError([]byte{}, "400 Bad Request", plaidError) 45 | 46 | derivedPlaidError, err := plaid.ToPlaidError(genericOpenAPIError) 47 | assert.Nil(t, err) 48 | assert.Equal(t, plaidError, derivedPlaidError) 49 | } 50 | -------------------------------------------------------------------------------- /tests/sandbox_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "github.com/plaid/plaid-go/v41/plaid" 8 | assert "github.com/stretchr/testify/require" 9 | ) 10 | 11 | func TestSandboxItemResetLogin(t *testing.T) { 12 | testClient := NewTestClient() 13 | ctx := context.Background() 14 | 15 | accessToken := createSandboxItem(t, ctx, testClient, FIRST_PLATYPUS_BANK, testProducts) 16 | 17 | resetResp, _, err := testClient.PlaidApi.SandboxItemResetLogin(ctx).SandboxItemResetLoginRequest(*plaid.NewSandboxItemResetLoginRequest(accessToken)).Execute() 18 | assert.NoError(t, err) 19 | assert.True(t, resetResp.ResetLogin) 20 | } 21 | 22 | func TestSandboxIncomeVerificationItem(t *testing.T) { 23 | // TODO (czhou): Unskip when test is fixed. 24 | t.Skip() 25 | testClient := NewTestClient() 26 | ctx := context.Background() 27 | 28 | daysRequested := int32(180) 29 | sandboxPublicTokenResp, _, err := testClient.PlaidApi.SandboxPublicTokenCreate(ctx).SandboxPublicTokenCreateRequest( 30 | plaid.SandboxPublicTokenCreateRequest{ 31 | InstitutionId: FIRST_PLATYPUS_BANK, 32 | InitialProducts: []plaid.Products{plaid.PRODUCTS_INCOME_VERIFICATION}, 33 | Options: &plaid.SandboxPublicTokenCreateRequestOptions{ 34 | IncomeVerification: &plaid.SandboxPublicTokenCreateRequestOptionsIncomeVerification{ 35 | BankIncome: &plaid.SandboxPublicTokenCreateRequestIncomeVerificationBankIncome{ 36 | DaysRequested: &daysRequested, 37 | }, 38 | IncomeSourceTypes: &[]plaid.IncomeVerificationSourceType{ 39 | "bank", 40 | }, 41 | }, 42 | }, 43 | }, 44 | ).Execute() 45 | assert.NoError(t, err) 46 | assert.NotNil(t, sandboxPublicTokenResp) 47 | assert.NotEmpty(t, sandboxPublicTokenResp.GetPublicToken()) 48 | } 49 | -------------------------------------------------------------------------------- /tests/processor_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | "strings" 7 | "testing" 8 | 9 | "github.com/plaid/plaid-go/v41/plaid" 10 | assert "github.com/stretchr/testify/require" 11 | ) 12 | 13 | type processorTokenPrepValues struct { 14 | accessToken string 15 | accountID string 16 | } 17 | 18 | func processorTokenTestPrep(t *testing.T, ctx context.Context, testClient *plaid.APIClient) processorTokenPrepValues { 19 | accessToken := createSandboxItem(t, ctx, testClient, FIRST_PLATYPUS_BANK, testProducts) 20 | 21 | accountsResp, _, err := testClient.PlaidApi.AccountsGet(ctx).AccountsGetRequest(plaid.AccountsGetRequest{ 22 | AccessToken: accessToken, 23 | }).Execute() 24 | assert.NoError(t, err) 25 | accountID := accountsResp.Accounts[0].AccountId 26 | return processorTokenPrepValues{ 27 | accessToken: accessToken, 28 | accountID: accountID, 29 | } 30 | } 31 | 32 | func TestProcessorCreateApexToken(t *testing.T) { 33 | testClient := NewTestClient() 34 | ctx := context.Background() 35 | 36 | prepValues := processorTokenTestPrep(t, ctx, testClient) 37 | apexTokenResp, _, err := testClient.PlaidApi.ProcessorApexProcessorTokenCreate(ctx).ProcessorApexProcessorTokenCreateRequest(*plaid.NewProcessorApexProcessorTokenCreateRequest(prepValues.accessToken, prepValues.accountID)).Execute() 38 | assert.NoError(t, err) 39 | assert.True(t, strings.HasPrefix(apexTokenResp.ProcessorToken, fmt.Sprintf("processor-%s", PlaidEnv()))) 40 | } 41 | 42 | func TestProcessorCreateDwollaToken(t *testing.T) { 43 | testClient := NewTestClient() 44 | ctx := context.Background() 45 | 46 | prepValues := processorTokenTestPrep(t, ctx, testClient) 47 | dwollaTokenResp, _, err := testClient.PlaidApi.ProcessorTokenCreate(ctx).ProcessorTokenCreateRequest(*plaid.NewProcessorTokenCreateRequest(prepValues.accessToken, prepValues.accountID, "dwolla")).Execute() 48 | assert.NoError(t, err) 49 | assert.True(t, strings.HasPrefix(dwollaTokenResp.ProcessorToken, fmt.Sprintf("processor-%s", PlaidEnv()))) 50 | } 51 | -------------------------------------------------------------------------------- /tests/CODEOWNERS.yml: -------------------------------------------------------------------------------- 1 | directory_owner: "TEAM_OPENAPI" 2 | file_owners: 3 | - match: "accounts_balance_test.go" 4 | owner: "TEAM_ACCOUNT_VERIFICATION_PRODUCT" 5 | - match: "accounts_test.go" 6 | owner: "TEAM_ACCOUNT_VERIFICATION_PRODUCT" 7 | - match: "assets_test.go" 8 | owner: "TEAM_ASSETS" 9 | - match: "auth_test.go" 10 | owner: "TEAM_ACCOUNT_VERIFICATION_PRODUCT" 11 | - match: "bank_transfer_test.go" 12 | owner: "TEAM_TRANSFERS_AND_PAYMENTS" 13 | - match: "categories_test.go" 14 | owner: "TEAM_TRANSACTIONS" 15 | - match: "deposit_switch_test.go" 16 | owner: "TEAM_FINANCIAL_IDENTITY" 17 | - match: "enrich_test.go" 18 | owner: "TEAM_TRANSACTIONS" 19 | - match: "enums_test.go" 20 | owner: "TEAM_DASHBOARD_PLATFORM" 21 | - match: "holdings_test.go" 22 | owner: "TEAM_INVESTMENTS" 23 | - match: "identity_test.go" 24 | owner: "TEAM_ACCOUNT_VERIFICATION_PRODUCT" 25 | - match: "identity_verification_test.go" 26 | owner: "TEAM_IDENTITY" 27 | - match: "income_verification_test.go" 28 | owner: "TEAM_CREDIT_DECISIONING" 29 | - match: "institutions_test.go" 30 | owner: "TEAM_LINK_FOUNDATIONS" 31 | - match: "investment_transactions_test.go" 32 | owner: "TEAM_INVESTMENTS" 33 | - match: "investments_auth_test.go" 34 | owner: "TEAM_INVESTMENTS" 35 | - match: "item_test.go" 36 | owner: "TEAM_LINK_FOUNDATIONS" 37 | - match: "liabilities_test.go" 38 | owner: "TEAM_TRANSACTIONS" 39 | - match: "link_token_test.go" 40 | owner: "TEAM_LINK_FOUNDATIONS" 41 | - match: "monitor_test.go" 42 | owner: "TEAM_IDENTITY" 43 | - match: "payment_test.go" 44 | owner: "TEAM_INTERNATIONAL" 45 | - match: "processor_test.go" 46 | owner: "TEAM_DASHBOARD_PLATFORM" 47 | - match: "sandbox_test.go" 48 | owner: "TEAM_DASHBOARD_PLATFORM" 49 | - match: "transactions_test.go" 50 | owner: "TEAM_TRANSACTIONS" 51 | - match: "utils_test.go" 52 | owner: "TEAM_DASHBOARD_PLATFORM" 53 | - match: "webhooks_test.go" 54 | owner: "TEAM_LINK_FOUNDATIONS" 55 | - match: "statements_test.go" 56 | owner: "TEAM_ASSETS" 57 | -------------------------------------------------------------------------------- /tests/enrich_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "github.com/plaid/plaid-go/v41/plaid" 8 | "github.com/stretchr/testify/assert" 9 | ) 10 | 11 | func TestEnrichGet(t *testing.T) { 12 | testClient := NewTestClient() 13 | ctx := context.Background() 14 | 15 | outflowDirection, _ := plaid.NewEnrichTransactionDirectionFromValue("OUTFLOW") 16 | inflowDirection, _ := plaid.NewEnrichTransactionDirectionFromValue("INFLOW") 17 | 18 | sampleTransactionsToEnrich := []plaid.ClientProvidedTransaction{ 19 | { 20 | Id: "1", 21 | Description: "TST *JETTIES BAGELS", 22 | Amount: 10.00, 23 | IsoCurrencyCode: "USD", 24 | Location: &plaid.ClientProvidedTransactionLocation{ 25 | City: plaid.PtrString("Ipswich"), 26 | Region: plaid.PtrString("MA"), 27 | }, 28 | Direction: *outflowDirection, 29 | }, 30 | { 31 | Id: "2", 32 | Description: "AMAZON.COM*MJ3LO9AN2", 33 | Amount: 10.00, 34 | IsoCurrencyCode: "USD", 35 | Direction: *outflowDirection, 36 | }, 37 | { 38 | Id: "3", 39 | Description: "GOOGLE *FRESHBOOKS", 40 | Amount: 10.00, 41 | IsoCurrencyCode: "USD", 42 | Direction: *outflowDirection, 43 | }, 44 | { 45 | Id: "4", 46 | Description: "EARNIN TRANSFER", 47 | Amount: 100.00, 48 | IsoCurrencyCode: "USD", 49 | Direction: *inflowDirection, 50 | }, 51 | } 52 | 53 | enrichGetResp, _, err := testClient.PlaidApi.TransactionsEnrich(ctx).TransactionsEnrichRequest( 54 | *plaid.NewTransactionsEnrichRequest( 55 | "depository", 56 | sampleTransactionsToEnrich, 57 | ), 58 | ).Execute() 59 | 60 | assert.NoError(t, err) 61 | 62 | enrichedTransactions, enrichedTransactionsOk := enrichGetResp.GetEnrichedTransactionsOk() 63 | assert.True(t, enrichedTransactionsOk) 64 | 65 | assert.Equal(t, len(*enrichedTransactions), len(sampleTransactionsToEnrich)) 66 | 67 | for _, item := range *enrichedTransactions { 68 | assert.NotEmpty(t, item.GetAmount()) 69 | assert.NotEmpty(t, item.GetDescription()) 70 | assert.NotEmpty(t, item.GetDirection()) 71 | assert.NotEmpty(t, item.GetEnrichments()) 72 | assert.NotEmpty(t, item.GetId()) 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /plaid/model_numbers_iban_nullable.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | ) 16 | 17 | // NumbersIBANNullable International Bank Account Number (IBAN). 18 | type NumbersIBANNullable struct { 19 | } 20 | 21 | // NewNumbersIBANNullable instantiates a new NumbersIBANNullable object 22 | // This constructor will assign default values to properties that have it defined, 23 | // and makes sure properties required by API are set, but the set of arguments 24 | // will change when the set of required properties is changed 25 | func NewNumbersIBANNullable() *NumbersIBANNullable { 26 | this := NumbersIBANNullable{} 27 | return &this 28 | } 29 | 30 | // NewNumbersIBANNullableWithDefaults instantiates a new NumbersIBANNullable object 31 | // This constructor will only assign default values to properties that have it defined, 32 | // but it doesn't guarantee that properties required by API are set 33 | func NewNumbersIBANNullableWithDefaults() *NumbersIBANNullable { 34 | this := NumbersIBANNullable{} 35 | return &this 36 | } 37 | 38 | func (o NumbersIBANNullable) MarshalJSON() ([]byte, error) { 39 | toSerialize := map[string]interface{}{} 40 | return json.Marshal(toSerialize) 41 | } 42 | 43 | type NullableNumbersIBANNullable struct { 44 | value *NumbersIBANNullable 45 | isSet bool 46 | } 47 | 48 | func (v NullableNumbersIBANNullable) Get() *NumbersIBANNullable { 49 | return v.value 50 | } 51 | 52 | func (v *NullableNumbersIBANNullable) Set(val *NumbersIBANNullable) { 53 | v.value = val 54 | v.isSet = true 55 | } 56 | 57 | func (v NullableNumbersIBANNullable) IsSet() bool { 58 | return v.isSet 59 | } 60 | 61 | func (v *NullableNumbersIBANNullable) Unset() { 62 | v.value = nil 63 | v.isSet = false 64 | } 65 | 66 | func NewNullableNumbersIBANNullable(val *NumbersIBANNullable) *NullableNumbersIBANNullable { 67 | return &NullableNumbersIBANNullable{value: val, isSet: true} 68 | } 69 | 70 | func (v NullableNumbersIBANNullable) MarshalJSON() ([]byte, error) { 71 | return json.Marshal(v.value) 72 | } 73 | 74 | func (v *NullableNumbersIBANNullable) UnmarshalJSON(src []byte) error { 75 | v.isSet = true 76 | return json.Unmarshal(src, &v.value) 77 | } 78 | 79 | 80 | -------------------------------------------------------------------------------- /plaid/model_report_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // ReportType The report type. It can be `asset`. Income report types are not yet supported. 19 | type ReportType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of ReportType 24 | const ( 25 | REPORTTYPE_ASSET ReportType = "asset" 26 | ) 27 | 28 | var allowedReportTypeEnumValues = []ReportType{ 29 | "asset", 30 | } 31 | 32 | func (v *ReportType) UnmarshalJSON(src []byte) error { 33 | var value string 34 | err := json.Unmarshal(src, &value) 35 | if err != nil { 36 | return err 37 | } 38 | 39 | enumTypeValue := ReportType(value) 40 | 41 | 42 | *v = enumTypeValue 43 | return nil 44 | } 45 | 46 | // NewReportTypeFromValue returns a pointer to a valid ReportType 47 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 48 | func NewReportTypeFromValue(v string) (*ReportType, error) { 49 | ev := ReportType(v) 50 | 51 | 52 | return &ev, nil 53 | } 54 | 55 | // IsValid return true if the value is valid for the enum, false otherwise 56 | func (v ReportType) IsValid() bool { 57 | for _, existing := range allowedReportTypeEnumValues { 58 | if existing == v { 59 | return true 60 | } 61 | } 62 | return false 63 | } 64 | 65 | // Ptr returns reference to ReportType value 66 | func (v ReportType) Ptr() *ReportType { 67 | return &v 68 | } 69 | 70 | type NullableReportType struct { 71 | value *ReportType 72 | isSet bool 73 | } 74 | 75 | func (v NullableReportType) Get() *ReportType { 76 | return v.value 77 | } 78 | 79 | func (v *NullableReportType) Set(val *ReportType) { 80 | v.value = val 81 | v.isSet = true 82 | } 83 | 84 | func (v NullableReportType) IsSet() bool { 85 | return v.isSet 86 | } 87 | 88 | func (v *NullableReportType) Unset() { 89 | v.value = nil 90 | v.isSet = false 91 | } 92 | 93 | func NewNullableReportType(val *ReportType) *NullableReportType { 94 | return &NullableReportType{value: val, isSet: true} 95 | } 96 | 97 | func (v NullableReportType) MarshalJSON() ([]byte, error) { 98 | return json.Marshal(v.value) 99 | } 100 | 101 | func (v *NullableReportType) UnmarshalJSON(src []byte) error { 102 | v.isSet = true 103 | return json.Unmarshal(src, &v.value) 104 | } 105 | 106 | -------------------------------------------------------------------------------- /plaid/model_phone_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // PhoneType An enum indicating whether a phone number is a phone line or a fax line. 19 | type PhoneType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of PhoneType 24 | const ( 25 | PHONETYPE_PHONE PhoneType = "phone" 26 | PHONETYPE_FAX PhoneType = "fax" 27 | ) 28 | 29 | var allowedPhoneTypeEnumValues = []PhoneType{ 30 | "phone", 31 | "fax", 32 | } 33 | 34 | func (v *PhoneType) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := PhoneType(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewPhoneTypeFromValue returns a pointer to a valid PhoneType 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewPhoneTypeFromValue(v string) (*PhoneType, error) { 51 | ev := PhoneType(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v PhoneType) IsValid() bool { 59 | for _, existing := range allowedPhoneTypeEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to PhoneType value 68 | func (v PhoneType) Ptr() *PhoneType { 69 | return &v 70 | } 71 | 72 | type NullablePhoneType struct { 73 | value *PhoneType 74 | isSet bool 75 | } 76 | 77 | func (v NullablePhoneType) Get() *PhoneType { 78 | return v.value 79 | } 80 | 81 | func (v *NullablePhoneType) Set(val *PhoneType) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullablePhoneType) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullablePhoneType) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullablePhoneType(val *PhoneType) *NullablePhoneType { 96 | return &NullablePhoneType{value: val, isSet: true} 97 | } 98 | 99 | func (v NullablePhoneType) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullablePhoneType) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_risk_level.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // RiskLevel Risk level for the given risk check type. 19 | type RiskLevel string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of RiskLevel 24 | const ( 25 | RISKLEVEL_LOW RiskLevel = "low" 26 | RISKLEVEL_MEDIUM RiskLevel = "medium" 27 | RISKLEVEL_HIGH RiskLevel = "high" 28 | ) 29 | 30 | var allowedRiskLevelEnumValues = []RiskLevel{ 31 | "low", 32 | "medium", 33 | "high", 34 | } 35 | 36 | func (v *RiskLevel) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := RiskLevel(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewRiskLevelFromValue returns a pointer to a valid RiskLevel 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewRiskLevelFromValue(v string) (*RiskLevel, error) { 53 | ev := RiskLevel(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v RiskLevel) IsValid() bool { 61 | for _, existing := range allowedRiskLevelEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to RiskLevel value 70 | func (v RiskLevel) Ptr() *RiskLevel { 71 | return &v 72 | } 73 | 74 | type NullableRiskLevel struct { 75 | value *RiskLevel 76 | isSet bool 77 | } 78 | 79 | func (v NullableRiskLevel) Get() *RiskLevel { 80 | return v.value 81 | } 82 | 83 | func (v *NullableRiskLevel) Set(val *RiskLevel) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullableRiskLevel) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullableRiskLevel) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullableRiskLevel(val *RiskLevel) *NullableRiskLevel { 98 | return &NullableRiskLevel{value: val, isSet: true} 99 | } 100 | 101 | func (v NullableRiskLevel) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullableRiskLevel) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | -------------------------------------------------------------------------------- /plaid/model_source.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // Source A type indicating whether a dashboard user, an API-based user, or Plaid last touched this object. 19 | type Source string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of Source 24 | const ( 25 | SOURCE_DASHBOARD Source = "dashboard" 26 | SOURCE_LINK Source = "link" 27 | SOURCE_API Source = "api" 28 | SOURCE_SYSTEM Source = "system" 29 | ) 30 | 31 | var allowedSourceEnumValues = []Source{ 32 | "dashboard", 33 | "link", 34 | "api", 35 | "system", 36 | } 37 | 38 | func (v *Source) UnmarshalJSON(src []byte) error { 39 | var value string 40 | err := json.Unmarshal(src, &value) 41 | if err != nil { 42 | return err 43 | } 44 | 45 | enumTypeValue := Source(value) 46 | 47 | 48 | *v = enumTypeValue 49 | return nil 50 | } 51 | 52 | // NewSourceFromValue returns a pointer to a valid Source 53 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 54 | func NewSourceFromValue(v string) (*Source, error) { 55 | ev := Source(v) 56 | 57 | 58 | return &ev, nil 59 | } 60 | 61 | // IsValid return true if the value is valid for the enum, false otherwise 62 | func (v Source) IsValid() bool { 63 | for _, existing := range allowedSourceEnumValues { 64 | if existing == v { 65 | return true 66 | } 67 | } 68 | return false 69 | } 70 | 71 | // Ptr returns reference to Source value 72 | func (v Source) Ptr() *Source { 73 | return &v 74 | } 75 | 76 | type NullableSource struct { 77 | value *Source 78 | isSet bool 79 | } 80 | 81 | func (v NullableSource) Get() *Source { 82 | return v.value 83 | } 84 | 85 | func (v *NullableSource) Set(val *Source) { 86 | v.value = val 87 | v.isSet = true 88 | } 89 | 90 | func (v NullableSource) IsSet() bool { 91 | return v.isSet 92 | } 93 | 94 | func (v *NullableSource) Unset() { 95 | v.value = nil 96 | v.isSet = false 97 | } 98 | 99 | func NewNullableSource(val *Source) *NullableSource { 100 | return &NullableSource{value: val, isSet: true} 101 | } 102 | 103 | func (v NullableSource) MarshalJSON() ([]byte, error) { 104 | return json.Marshal(v.value) 105 | } 106 | 107 | func (v *NullableSource) UnmarshalJSON(src []byte) error { 108 | v.isSet = true 109 | return json.Unmarshal(src, &v.value) 110 | } 111 | 112 | -------------------------------------------------------------------------------- /plaid/model_iso_currency_code.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // ISOCurrencyCode An ISO-4217 currency code. 19 | type ISOCurrencyCode string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of ISOCurrencyCode 24 | const ( 25 | ISOCURRENCYCODE_USD ISOCurrencyCode = "USD" 26 | ) 27 | 28 | var allowedISOCurrencyCodeEnumValues = []ISOCurrencyCode{ 29 | "USD", 30 | } 31 | 32 | func (v *ISOCurrencyCode) UnmarshalJSON(src []byte) error { 33 | var value string 34 | err := json.Unmarshal(src, &value) 35 | if err != nil { 36 | return err 37 | } 38 | 39 | enumTypeValue := ISOCurrencyCode(value) 40 | 41 | 42 | *v = enumTypeValue 43 | return nil 44 | } 45 | 46 | // NewISOCurrencyCodeFromValue returns a pointer to a valid ISOCurrencyCode 47 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 48 | func NewISOCurrencyCodeFromValue(v string) (*ISOCurrencyCode, error) { 49 | ev := ISOCurrencyCode(v) 50 | 51 | 52 | return &ev, nil 53 | } 54 | 55 | // IsValid return true if the value is valid for the enum, false otherwise 56 | func (v ISOCurrencyCode) IsValid() bool { 57 | for _, existing := range allowedISOCurrencyCodeEnumValues { 58 | if existing == v { 59 | return true 60 | } 61 | } 62 | return false 63 | } 64 | 65 | // Ptr returns reference to ISOCurrencyCode value 66 | func (v ISOCurrencyCode) Ptr() *ISOCurrencyCode { 67 | return &v 68 | } 69 | 70 | type NullableISOCurrencyCode struct { 71 | value *ISOCurrencyCode 72 | isSet bool 73 | } 74 | 75 | func (v NullableISOCurrencyCode) Get() *ISOCurrencyCode { 76 | return v.value 77 | } 78 | 79 | func (v *NullableISOCurrencyCode) Set(val *ISOCurrencyCode) { 80 | v.value = val 81 | v.isSet = true 82 | } 83 | 84 | func (v NullableISOCurrencyCode) IsSet() bool { 85 | return v.isSet 86 | } 87 | 88 | func (v *NullableISOCurrencyCode) Unset() { 89 | v.value = nil 90 | v.isSet = false 91 | } 92 | 93 | func NewNullableISOCurrencyCode(val *ISOCurrencyCode) *NullableISOCurrencyCode { 94 | return &NullableISOCurrencyCode{value: val, isSet: true} 95 | } 96 | 97 | func (v NullableISOCurrencyCode) MarshalJSON() ([]byte, error) { 98 | return json.Marshal(v.value) 99 | } 100 | 101 | func (v *NullableISOCurrencyCode) UnmarshalJSON(src []byte) error { 102 | v.isSet = true 103 | return json.Unmarshal(src, &v.value) 104 | } 105 | 106 | -------------------------------------------------------------------------------- /plaid/model_prism_product.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // PrismProduct The Prism products that can be returned by the Plaid API 19 | type PrismProduct string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of PrismProduct 24 | const ( 25 | PRISMPRODUCT_INSIGHTS PrismProduct = "insights" 26 | PRISMPRODUCT_SCORES PrismProduct = "scores" 27 | ) 28 | 29 | var allowedPrismProductEnumValues = []PrismProduct{ 30 | "insights", 31 | "scores", 32 | } 33 | 34 | func (v *PrismProduct) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := PrismProduct(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewPrismProductFromValue returns a pointer to a valid PrismProduct 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewPrismProductFromValue(v string) (*PrismProduct, error) { 51 | ev := PrismProduct(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v PrismProduct) IsValid() bool { 59 | for _, existing := range allowedPrismProductEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to PrismProduct value 68 | func (v PrismProduct) Ptr() *PrismProduct { 69 | return &v 70 | } 71 | 72 | type NullablePrismProduct struct { 73 | value *PrismProduct 74 | isSet bool 75 | } 76 | 77 | func (v NullablePrismProduct) Get() *PrismProduct { 78 | return v.value 79 | } 80 | 81 | func (v *NullablePrismProduct) Set(val *PrismProduct) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullablePrismProduct) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullablePrismProduct) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullablePrismProduct(val *PrismProduct) *NullablePrismProduct { 96 | return &NullablePrismProduct{value: val, isSet: true} 97 | } 98 | 99 | func (v NullablePrismProduct) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullablePrismProduct) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_gse_report_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // GSEReportType The types of GSE Reports supported by the Plaid API 19 | type GSEReportType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of GSEReportType 24 | const ( 25 | GSEREPORTTYPE_VOA GSEReportType = "VOA" 26 | GSEREPORTTYPE_EMPLOYMENT_REFRESH GSEReportType = "EMPLOYMENT_REFRESH" 27 | ) 28 | 29 | var allowedGSEReportTypeEnumValues = []GSEReportType{ 30 | "VOA", 31 | "EMPLOYMENT_REFRESH", 32 | } 33 | 34 | func (v *GSEReportType) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := GSEReportType(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewGSEReportTypeFromValue returns a pointer to a valid GSEReportType 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewGSEReportTypeFromValue(v string) (*GSEReportType, error) { 51 | ev := GSEReportType(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v GSEReportType) IsValid() bool { 59 | for _, existing := range allowedGSEReportTypeEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to GSEReportType value 68 | func (v GSEReportType) Ptr() *GSEReportType { 69 | return &v 70 | } 71 | 72 | type NullableGSEReportType struct { 73 | value *GSEReportType 74 | isSet bool 75 | } 76 | 77 | func (v NullableGSEReportType) Get() *GSEReportType { 78 | return v.value 79 | } 80 | 81 | func (v *NullableGSEReportType) Set(val *GSEReportType) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableGSEReportType) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableGSEReportType) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableGSEReportType(val *GSEReportType) *NullableGSEReportType { 96 | return &NullableGSEReportType{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableGSEReportType) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableGSEReportType) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_form1099_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // Form1099Type Form 1099 Type 19 | type Form1099Type string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of Form1099Type 24 | const ( 25 | FORM1099TYPE_UNKNOWN Form1099Type = "FORM_1099_TYPE_UNKNOWN" 26 | FORM1099TYPE_MISC Form1099Type = "FORM_1099_TYPE_MISC" 27 | FORM1099TYPE_K Form1099Type = "FORM_1099_TYPE_K" 28 | ) 29 | 30 | var allowedForm1099TypeEnumValues = []Form1099Type{ 31 | "FORM_1099_TYPE_UNKNOWN", 32 | "FORM_1099_TYPE_MISC", 33 | "FORM_1099_TYPE_K", 34 | } 35 | 36 | func (v *Form1099Type) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := Form1099Type(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewForm1099TypeFromValue returns a pointer to a valid Form1099Type 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewForm1099TypeFromValue(v string) (*Form1099Type, error) { 53 | ev := Form1099Type(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v Form1099Type) IsValid() bool { 61 | for _, existing := range allowedForm1099TypeEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to Form1099Type value 70 | func (v Form1099Type) Ptr() *Form1099Type { 71 | return &v 72 | } 73 | 74 | type NullableForm1099Type struct { 75 | value *Form1099Type 76 | isSet bool 77 | } 78 | 79 | func (v NullableForm1099Type) Get() *Form1099Type { 80 | return v.value 81 | } 82 | 83 | func (v *NullableForm1099Type) Set(val *Form1099Type) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullableForm1099Type) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullableForm1099Type) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullableForm1099Type(val *Form1099Type) *NullableForm1099Type { 98 | return &NullableForm1099Type{value: val, isSet: true} 99 | } 100 | 101 | func (v NullableForm1099Type) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullableForm1099Type) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | -------------------------------------------------------------------------------- /plaid/model_selfie_status.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // SelfieStatus An outcome status for this specific selfie. Distinct from the overall `selfie_check.status` that summarizes the verification outcome from one or more selfies. 19 | type SelfieStatus string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of SelfieStatus 24 | const ( 25 | SELFIESTATUS_SUCCESS SelfieStatus = "success" 26 | SELFIESTATUS_FAILED SelfieStatus = "failed" 27 | ) 28 | 29 | var allowedSelfieStatusEnumValues = []SelfieStatus{ 30 | "success", 31 | "failed", 32 | } 33 | 34 | func (v *SelfieStatus) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := SelfieStatus(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewSelfieStatusFromValue returns a pointer to a valid SelfieStatus 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewSelfieStatusFromValue(v string) (*SelfieStatus, error) { 51 | ev := SelfieStatus(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v SelfieStatus) IsValid() bool { 59 | for _, existing := range allowedSelfieStatusEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to SelfieStatus value 68 | func (v SelfieStatus) Ptr() *SelfieStatus { 69 | return &v 70 | } 71 | 72 | type NullableSelfieStatus struct { 73 | value *SelfieStatus 74 | isSet bool 75 | } 76 | 77 | func (v NullableSelfieStatus) Get() *SelfieStatus { 78 | return v.value 79 | } 80 | 81 | func (v *NullableSelfieStatus) Set(val *SelfieStatus) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableSelfieStatus) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableSelfieStatus) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableSelfieStatus(val *SelfieStatus) *NullableSelfieStatus { 96 | return &NullableSelfieStatus{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableSelfieStatus) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableSelfieStatus) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_transfer_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // TransferType The type of transfer. This will be either `debit` or `credit`. A `debit` indicates a transfer of money into the origination account; a `credit` indicates a transfer of money out of the origination account. 19 | type TransferType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of TransferType 24 | const ( 25 | TRANSFERTYPE_DEBIT TransferType = "debit" 26 | TRANSFERTYPE_CREDIT TransferType = "credit" 27 | ) 28 | 29 | var allowedTransferTypeEnumValues = []TransferType{ 30 | "debit", 31 | "credit", 32 | } 33 | 34 | func (v *TransferType) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := TransferType(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewTransferTypeFromValue returns a pointer to a valid TransferType 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewTransferTypeFromValue(v string) (*TransferType, error) { 51 | ev := TransferType(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v TransferType) IsValid() bool { 59 | for _, existing := range allowedTransferTypeEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to TransferType value 68 | func (v TransferType) Ptr() *TransferType { 69 | return &v 70 | } 71 | 72 | type NullableTransferType struct { 73 | value *TransferType 74 | isSet bool 75 | } 76 | 77 | func (v NullableTransferType) Get() *TransferType { 78 | return v.value 79 | } 80 | 81 | func (v *NullableTransferType) Set(val *TransferType) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableTransferType) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableTransferType) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableTransferType(val *TransferType) *NullableTransferType { 96 | return &NullableTransferType{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableTransferType) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableTransferType) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /tests/identity_verification_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "github.com/stretchr/testify/require" 6 | "strconv" 7 | "testing" 8 | "time" 9 | 10 | "github.com/plaid/plaid-go/v41/plaid" 11 | "github.com/stretchr/testify/assert" 12 | ) 13 | 14 | const TEMPLATE_ID = "flwtmp_aWogUuKsL6NEHU" 15 | 16 | var CLIENT_USER_ID = "idv-user-" + strconv.FormatInt(time.Now().Unix(), 10) 17 | var EMAIL = CLIENT_USER_ID + "@example.com" 18 | 19 | func TestIdentityVerification(t *testing.T) { 20 | testClient := NewTestClient() 21 | ctx := context.Background() 22 | 23 | user := plaid.NewIdentityVerificationCreateRequestUser() 24 | user.SetEmailAddress(EMAIL) 25 | 26 | // POST /identity_verification/create 27 | createRequest := plaid.NewIdentityVerificationCreateRequest(true, TEMPLATE_ID, true) 28 | createRequest.SetClientUserId(CLIENT_USER_ID) 29 | createRequest.SetUser(*user) 30 | createResponse, _, err := testClient.PlaidApi.IdentityVerificationCreate(ctx).IdentityVerificationCreateRequest( 31 | *createRequest, 32 | ).Execute() 33 | require.NoError(t, err) 34 | assert.NotNil(t, createResponse.ShareableUrl) 35 | assert.Equal(t, plaid.IdentityVerificationStatus("active"), createResponse.Status, "Response status should be active") 36 | 37 | // POST /identity_verification/retry 38 | retryUser := plaid.NewIdentityVerificationRequestUser() 39 | retryUser.SetEmailAddress(EMAIL) 40 | retryRequest := plaid.NewIdentityVerificationRetryRequest(CLIENT_USER_ID, TEMPLATE_ID, plaid.Strategy("reset")) 41 | retryRequest.SetUser(*retryUser) 42 | retryResponse, _, err := testClient.PlaidApi.IdentityVerificationRetry(ctx).IdentityVerificationRetryRequest( 43 | *retryRequest, 44 | ).Execute() 45 | require.NoError(t, err) 46 | assert.NotNil(t, retryResponse.ShareableUrl) 47 | assert.Equal(t, retryResponse.Status, plaid.IdentityVerificationStatus("active"), "Response status should be active") 48 | 49 | // POST /identity_verification/list 50 | listRequest := plaid.NewIdentityVerificationListRequest(TEMPLATE_ID) 51 | listRequest.SetClientUserId(CLIENT_USER_ID) 52 | listResponse, _, err := testClient.PlaidApi.IdentityVerificationList(ctx).IdentityVerificationListRequest( 53 | *listRequest, 54 | ).Execute() 55 | require.NoError(t, err) 56 | assert.NotNil(t, listResponse.IdentityVerifications[0]) 57 | assert.Equal(t, CLIENT_USER_ID, listResponse.IdentityVerifications[0].ClientUserId, "Client User ID should match create request") 58 | 59 | // POST /identity_verification/get 60 | getRequest := plaid.NewIdentityVerificationGetRequest(listResponse.IdentityVerifications[0].Id) 61 | getResponse, _, err := testClient.PlaidApi.IdentityVerificationGet(ctx).IdentityVerificationGetRequest( 62 | *getRequest, 63 | ).Execute() 64 | require.NoError(t, err) 65 | assert.Equal(t, listResponse.IdentityVerifications[0].Id, getResponse.Id, "Requested id should match with response") 66 | } 67 | -------------------------------------------------------------------------------- /plaid/model_auth_update_types.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // AuthUpdateTypes The possible types of auth data that may have changed. 19 | type AuthUpdateTypes string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of AuthUpdateTypes 24 | const ( 25 | AUTHUPDATETYPES_ACCOUNT_NUMBER AuthUpdateTypes = "ACCOUNT_NUMBER" 26 | AUTHUPDATETYPES_ROUTING_NUMBER AuthUpdateTypes = "ROUTING_NUMBER" 27 | ) 28 | 29 | var allowedAuthUpdateTypesEnumValues = []AuthUpdateTypes{ 30 | "ACCOUNT_NUMBER", 31 | "ROUTING_NUMBER", 32 | } 33 | 34 | func (v *AuthUpdateTypes) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := AuthUpdateTypes(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewAuthUpdateTypesFromValue returns a pointer to a valid AuthUpdateTypes 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewAuthUpdateTypesFromValue(v string) (*AuthUpdateTypes, error) { 51 | ev := AuthUpdateTypes(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v AuthUpdateTypes) IsValid() bool { 59 | for _, existing := range allowedAuthUpdateTypesEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to AuthUpdateTypes value 68 | func (v AuthUpdateTypes) Ptr() *AuthUpdateTypes { 69 | return &v 70 | } 71 | 72 | type NullableAuthUpdateTypes struct { 73 | value *AuthUpdateTypes 74 | isSet bool 75 | } 76 | 77 | func (v NullableAuthUpdateTypes) Get() *AuthUpdateTypes { 78 | return v.value 79 | } 80 | 81 | func (v *NullableAuthUpdateTypes) Set(val *AuthUpdateTypes) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableAuthUpdateTypes) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableAuthUpdateTypes) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableAuthUpdateTypes(val *AuthUpdateTypes) *NullableAuthUpdateTypes { 96 | return &NullableAuthUpdateTypes{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableAuthUpdateTypes) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableAuthUpdateTypes) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_fraud_check_outcome.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // FraudCheckOutcome The outcome of the fraud check. 19 | type FraudCheckOutcome string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of FraudCheckOutcome 24 | const ( 25 | FRAUDCHECKOUTCOME_SUCCESS FraudCheckOutcome = "success" 26 | FRAUDCHECKOUTCOME_FAILED FraudCheckOutcome = "failed" 27 | ) 28 | 29 | var allowedFraudCheckOutcomeEnumValues = []FraudCheckOutcome{ 30 | "success", 31 | "failed", 32 | } 33 | 34 | func (v *FraudCheckOutcome) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := FraudCheckOutcome(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewFraudCheckOutcomeFromValue returns a pointer to a valid FraudCheckOutcome 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewFraudCheckOutcomeFromValue(v string) (*FraudCheckOutcome, error) { 51 | ev := FraudCheckOutcome(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v FraudCheckOutcome) IsValid() bool { 59 | for _, existing := range allowedFraudCheckOutcomeEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to FraudCheckOutcome value 68 | func (v FraudCheckOutcome) Ptr() *FraudCheckOutcome { 69 | return &v 70 | } 71 | 72 | type NullableFraudCheckOutcome struct { 73 | value *FraudCheckOutcome 74 | isSet bool 75 | } 76 | 77 | func (v NullableFraudCheckOutcome) Get() *FraudCheckOutcome { 78 | return v.value 79 | } 80 | 81 | func (v *NullableFraudCheckOutcome) Set(val *FraudCheckOutcome) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableFraudCheckOutcome) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableFraudCheckOutcome) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableFraudCheckOutcome(val *FraudCheckOutcome) *NullableFraudCheckOutcome { 96 | return &NullableFraudCheckOutcome{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableFraudCheckOutcome) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableFraudCheckOutcome) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_prism_detect_version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // PrismDetectVersion The version of Prism Detect 19 | type PrismDetectVersion string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of PrismDetectVersion 24 | const ( 25 | PRISMDETECTVERSION__4 PrismDetectVersion = "4" 26 | PRISMDETECTVERSION_NULL PrismDetectVersion = "null" 27 | ) 28 | 29 | var allowedPrismDetectVersionEnumValues = []PrismDetectVersion{ 30 | "4", 31 | "null", 32 | } 33 | 34 | func (v *PrismDetectVersion) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := PrismDetectVersion(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewPrismDetectVersionFromValue returns a pointer to a valid PrismDetectVersion 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewPrismDetectVersionFromValue(v string) (*PrismDetectVersion, error) { 51 | ev := PrismDetectVersion(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v PrismDetectVersion) IsValid() bool { 59 | for _, existing := range allowedPrismDetectVersionEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to PrismDetectVersion value 68 | func (v PrismDetectVersion) Ptr() *PrismDetectVersion { 69 | return &v 70 | } 71 | 72 | type NullablePrismDetectVersion struct { 73 | value *PrismDetectVersion 74 | isSet bool 75 | } 76 | 77 | func (v NullablePrismDetectVersion) Get() *PrismDetectVersion { 78 | return v.value 79 | } 80 | 81 | func (v *NullablePrismDetectVersion) Set(val *PrismDetectVersion) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullablePrismDetectVersion) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullablePrismDetectVersion) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullablePrismDetectVersion(val *PrismDetectVersion) *NullablePrismDetectVersion { 96 | return &NullablePrismDetectVersion{value: val, isSet: true} 97 | } 98 | 99 | func (v NullablePrismDetectVersion) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullablePrismDetectVersion) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_prism_extend_version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // PrismExtendVersion The version of Prism Extend 19 | type PrismExtendVersion string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of PrismExtendVersion 24 | const ( 25 | PRISMEXTENDVERSION__4 PrismExtendVersion = "4" 26 | PRISMEXTENDVERSION_NULL PrismExtendVersion = "null" 27 | ) 28 | 29 | var allowedPrismExtendVersionEnumValues = []PrismExtendVersion{ 30 | "4", 31 | "null", 32 | } 33 | 34 | func (v *PrismExtendVersion) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := PrismExtendVersion(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewPrismExtendVersionFromValue returns a pointer to a valid PrismExtendVersion 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewPrismExtendVersionFromValue(v string) (*PrismExtendVersion, error) { 51 | ev := PrismExtendVersion(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v PrismExtendVersion) IsValid() bool { 59 | for _, existing := range allowedPrismExtendVersionEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to PrismExtendVersion value 68 | func (v PrismExtendVersion) Ptr() *PrismExtendVersion { 69 | return &v 70 | } 71 | 72 | type NullablePrismExtendVersion struct { 73 | value *PrismExtendVersion 74 | isSet bool 75 | } 76 | 77 | func (v NullablePrismExtendVersion) Get() *PrismExtendVersion { 78 | return v.value 79 | } 80 | 81 | func (v *NullablePrismExtendVersion) Set(val *PrismExtendVersion) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullablePrismExtendVersion) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullablePrismExtendVersion) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullablePrismExtendVersion(val *PrismExtendVersion) *NullablePrismExtendVersion { 96 | return &NullablePrismExtendVersion{value: val, isSet: true} 97 | } 98 | 99 | func (v NullablePrismExtendVersion) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullablePrismExtendVersion) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_action_state.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // ActionState Enum representing the state of the action/activity. 19 | type ActionState string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of ActionState 24 | const ( 25 | ACTIONSTATE_UNKNOWN ActionState = "UNKNOWN" 26 | ACTIONSTATE_ATTEMPT ActionState = "ATTEMPT" 27 | ACTIONSTATE_SUCCESS ActionState = "SUCCESS" 28 | ACTIONSTATE_FAILURE ActionState = "FAILURE" 29 | ACTIONSTATE_SKIPPED ActionState = "SKIPPED" 30 | ) 31 | 32 | var allowedActionStateEnumValues = []ActionState{ 33 | "UNKNOWN", 34 | "ATTEMPT", 35 | "SUCCESS", 36 | "FAILURE", 37 | "SKIPPED", 38 | } 39 | 40 | func (v *ActionState) UnmarshalJSON(src []byte) error { 41 | var value string 42 | err := json.Unmarshal(src, &value) 43 | if err != nil { 44 | return err 45 | } 46 | 47 | enumTypeValue := ActionState(value) 48 | 49 | 50 | *v = enumTypeValue 51 | return nil 52 | } 53 | 54 | // NewActionStateFromValue returns a pointer to a valid ActionState 55 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 56 | func NewActionStateFromValue(v string) (*ActionState, error) { 57 | ev := ActionState(v) 58 | 59 | 60 | return &ev, nil 61 | } 62 | 63 | // IsValid return true if the value is valid for the enum, false otherwise 64 | func (v ActionState) IsValid() bool { 65 | for _, existing := range allowedActionStateEnumValues { 66 | if existing == v { 67 | return true 68 | } 69 | } 70 | return false 71 | } 72 | 73 | // Ptr returns reference to ActionState value 74 | func (v ActionState) Ptr() *ActionState { 75 | return &v 76 | } 77 | 78 | type NullableActionState struct { 79 | value *ActionState 80 | isSet bool 81 | } 82 | 83 | func (v NullableActionState) Get() *ActionState { 84 | return v.value 85 | } 86 | 87 | func (v *NullableActionState) Set(val *ActionState) { 88 | v.value = val 89 | v.isSet = true 90 | } 91 | 92 | func (v NullableActionState) IsSet() bool { 93 | return v.isSet 94 | } 95 | 96 | func (v *NullableActionState) Unset() { 97 | v.value = nil 98 | v.isSet = false 99 | } 100 | 101 | func NewNullableActionState(val *ActionState) *NullableActionState { 102 | return &NullableActionState{value: val, isSet: true} 103 | } 104 | 105 | func (v NullableActionState) MarshalJSON() ([]byte, error) { 106 | return json.Marshal(v.value) 107 | } 108 | 109 | func (v *NullableActionState) UnmarshalJSON(src []byte) error { 110 | v.isSet = true 111 | return json.Unmarshal(src, &v.value) 112 | } 113 | 114 | -------------------------------------------------------------------------------- /plaid/model_cra_pdf_add_ons.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // CraPDFAddOns A list of add-ons that can be included in the PDF. `cra_income_insights`: Include Income Insights report in the PDF. `cra_partner_insights`: Include Partner Insights report in the PDF. 19 | type CraPDFAddOns string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of CraPDFAddOns 24 | const ( 25 | CRAPDFADDONS_INCOME_INSIGHTS CraPDFAddOns = "cra_income_insights" 26 | CRAPDFADDONS_PARTNER_INSIGHTS CraPDFAddOns = "cra_partner_insights" 27 | ) 28 | 29 | var allowedCraPDFAddOnsEnumValues = []CraPDFAddOns{ 30 | "cra_income_insights", 31 | "cra_partner_insights", 32 | } 33 | 34 | func (v *CraPDFAddOns) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := CraPDFAddOns(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewCraPDFAddOnsFromValue returns a pointer to a valid CraPDFAddOns 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewCraPDFAddOnsFromValue(v string) (*CraPDFAddOns, error) { 51 | ev := CraPDFAddOns(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v CraPDFAddOns) IsValid() bool { 59 | for _, existing := range allowedCraPDFAddOnsEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to CraPDFAddOns value 68 | func (v CraPDFAddOns) Ptr() *CraPDFAddOns { 69 | return &v 70 | } 71 | 72 | type NullableCraPDFAddOns struct { 73 | value *CraPDFAddOns 74 | isSet bool 75 | } 76 | 77 | func (v NullableCraPDFAddOns) Get() *CraPDFAddOns { 78 | return v.value 79 | } 80 | 81 | func (v *NullableCraPDFAddOns) Set(val *CraPDFAddOns) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableCraPDFAddOns) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableCraPDFAddOns) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableCraPDFAddOns(val *CraPDFAddOns) *NullableCraPDFAddOns { 96 | return &NullableCraPDFAddOns{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableCraPDFAddOns) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableCraPDFAddOns) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_rule_result.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // RuleResult The result of the rule that was triggered for this transaction. `ACCEPT`: Accept the transaction for processing. `REROUTE`: Reroute the transaction to a different payment method, as this transaction is too risky. `REVIEW`: Review the transaction before proceeding. 19 | type RuleResult string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of RuleResult 24 | const ( 25 | RULERESULT_ACCEPT RuleResult = "ACCEPT" 26 | RULERESULT_REROUTE RuleResult = "REROUTE" 27 | RULERESULT_REVIEW RuleResult = "REVIEW" 28 | ) 29 | 30 | var allowedRuleResultEnumValues = []RuleResult{ 31 | "ACCEPT", 32 | "REROUTE", 33 | "REVIEW", 34 | } 35 | 36 | func (v *RuleResult) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := RuleResult(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewRuleResultFromValue returns a pointer to a valid RuleResult 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewRuleResultFromValue(v string) (*RuleResult, error) { 53 | ev := RuleResult(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v RuleResult) IsValid() bool { 61 | for _, existing := range allowedRuleResultEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to RuleResult value 70 | func (v RuleResult) Ptr() *RuleResult { 71 | return &v 72 | } 73 | 74 | type NullableRuleResult struct { 75 | value *RuleResult 76 | isSet bool 77 | } 78 | 79 | func (v NullableRuleResult) Get() *RuleResult { 80 | return v.value 81 | } 82 | 83 | func (v *NullableRuleResult) Set(val *RuleResult) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullableRuleResult) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullableRuleResult) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullableRuleResult(val *RuleResult) *NullableRuleResult { 98 | return &NullableRuleResult{value: val, isSet: true} 99 | } 100 | 101 | func (v NullableRuleResult) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullableRuleResult) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | -------------------------------------------------------------------------------- /tests/transactions_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "context" 5 | "errors" 6 | "testing" 7 | "time" 8 | 9 | "github.com/plaid/plaid-go/v41/plaid" 10 | "github.com/stretchr/testify/assert" 11 | "github.com/stretchr/testify/require" 12 | ) 13 | 14 | func TestTransactionsGet(t *testing.T) { 15 | testClient := NewTestClient() 16 | ctx := context.Background() 17 | 18 | accessToken := createSandboxItem(t, ctx, testClient, FIRST_PLATYPUS_BANK, testProducts) 19 | 20 | startDate := time.Now().Add(-365 * 24 * time.Hour).Format(iso8601TimeFormat) 21 | endDate := time.Now().Format(iso8601TimeFormat) 22 | request := plaid.NewTransactionsGetRequest( 23 | accessToken, 24 | startDate, 25 | endDate, 26 | ) 27 | 28 | transactionsResp, err := pollForTransactionsGet(t, ctx, testClient, request) 29 | 30 | require.NoError(t, err) 31 | assert.NotNil(t, transactionsResp.Accounts) 32 | assert.NotNil(t, transactionsResp.Transactions) 33 | } 34 | 35 | func TestTransactionsGetWithOptions(t *testing.T) { 36 | testClient := NewTestClient() 37 | ctx := context.Background() 38 | 39 | accessToken := createSandboxItem(t, ctx, testClient, FIRST_PLATYPUS_BANK, testProducts) 40 | 41 | startDate := time.Now().Add(-365 * 24 * time.Hour).Format(iso8601TimeFormat) 42 | endDate := time.Now().Format(iso8601TimeFormat) 43 | options := plaid.TransactionsGetRequestOptions{ 44 | Count: plaid.PtrInt32(2), 45 | Offset: plaid.PtrInt32(1), 46 | } 47 | request := plaid.NewTransactionsGetRequest( 48 | accessToken, 49 | startDate, 50 | endDate, 51 | ) 52 | request.SetOptions(options) 53 | 54 | transactionsResp, err := pollForTransactionsGet(t, ctx, testClient, request) 55 | 56 | require.NoError(t, err) 57 | assert.NotNil(t, transactionsResp.Accounts) 58 | assert.NotNil(t, transactionsResp.Transactions) 59 | 60 | } 61 | 62 | func TestTransactionsRefresh(t *testing.T) { 63 | testClient := NewTestClient() 64 | ctx := context.Background() 65 | 66 | accessToken := createSandboxItem(t, ctx, testClient, FIRST_PLATYPUS_BANK, testProducts) 67 | _, _, err := testClient.PlaidApi.TransactionsRefresh(ctx).TransactionsRefreshRequest(*plaid.NewTransactionsRefreshRequest(accessToken)).Execute() 68 | 69 | assert.NoError(t, err) 70 | } 71 | 72 | func pollForTransactionsGet(t *testing.T, ctx context.Context, testClient *plaid.APIClient, request *plaid.TransactionsGetRequest) (*plaid.TransactionsGetResponse, error) { 73 | 74 | for i := 0; i < 10; i++ { 75 | response, _, err := testClient.PlaidApi.TransactionsGet(ctx).TransactionsGetRequest(*request).Execute() 76 | 77 | if err == nil { 78 | return &response, nil 79 | } 80 | 81 | plaidErr, conversionErr := plaid.ToPlaidError(err) 82 | assert.NoError(t, conversionErr) 83 | if plaidErr.ErrorCode == "PRODUCT_NOT_READY" { 84 | time.Sleep(2 * time.Second) 85 | continue 86 | } 87 | 88 | return &response, err 89 | } 90 | 91 | return nil, errors.New("failed to get transactions") 92 | } 93 | -------------------------------------------------------------------------------- /plaid/model_po_box_status.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // POBoxStatus Field describing whether the associated address is a post office box. Will be `yes` when a P.O. box is detected, `no` when Plaid confirmed the address is not a P.O. box, and `no_data` when Plaid was not able to determine if the address is a P.O. box. 19 | type POBoxStatus string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of POBoxStatus 24 | const ( 25 | POBOXSTATUS_YES POBoxStatus = "yes" 26 | POBOXSTATUS_NO POBoxStatus = "no" 27 | POBOXSTATUS_NO_DATA POBoxStatus = "no_data" 28 | ) 29 | 30 | var allowedPOBoxStatusEnumValues = []POBoxStatus{ 31 | "yes", 32 | "no", 33 | "no_data", 34 | } 35 | 36 | func (v *POBoxStatus) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := POBoxStatus(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewPOBoxStatusFromValue returns a pointer to a valid POBoxStatus 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewPOBoxStatusFromValue(v string) (*POBoxStatus, error) { 53 | ev := POBoxStatus(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v POBoxStatus) IsValid() bool { 61 | for _, existing := range allowedPOBoxStatusEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to POBoxStatus value 70 | func (v POBoxStatus) Ptr() *POBoxStatus { 71 | return &v 72 | } 73 | 74 | type NullablePOBoxStatus struct { 75 | value *POBoxStatus 76 | isSet bool 77 | } 78 | 79 | func (v NullablePOBoxStatus) Get() *POBoxStatus { 80 | return v.value 81 | } 82 | 83 | func (v *NullablePOBoxStatus) Set(val *POBoxStatus) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullablePOBoxStatus) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullablePOBoxStatus) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullablePOBoxStatus(val *POBoxStatus) *NullablePOBoxStatus { 98 | return &NullablePOBoxStatus{value: val, isSet: true} 99 | } 100 | 101 | func (v NullablePOBoxStatus) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullablePOBoxStatus) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | -------------------------------------------------------------------------------- /plaid/model_scopes_context.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // ScopesContext An indicator for when scopes are being updated. When scopes are updated via enrollment (i.e. OAuth), the partner must send `ENROLLMENT`. When scopes are updated in a post-enrollment view, the partner must send `PORTAL`. 19 | type ScopesContext string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of ScopesContext 24 | const ( 25 | SCOPESCONTEXT_ENROLLMENT ScopesContext = "ENROLLMENT" 26 | SCOPESCONTEXT_PORTAL ScopesContext = "PORTAL" 27 | ) 28 | 29 | var allowedScopesContextEnumValues = []ScopesContext{ 30 | "ENROLLMENT", 31 | "PORTAL", 32 | } 33 | 34 | func (v *ScopesContext) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := ScopesContext(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewScopesContextFromValue returns a pointer to a valid ScopesContext 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewScopesContextFromValue(v string) (*ScopesContext, error) { 51 | ev := ScopesContext(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v ScopesContext) IsValid() bool { 59 | for _, existing := range allowedScopesContextEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to ScopesContext value 68 | func (v ScopesContext) Ptr() *ScopesContext { 69 | return &v 70 | } 71 | 72 | type NullableScopesContext struct { 73 | value *ScopesContext 74 | isSet bool 75 | } 76 | 77 | func (v NullableScopesContext) Get() *ScopesContext { 78 | return v.value 79 | } 80 | 81 | func (v *NullableScopesContext) Set(val *ScopesContext) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableScopesContext) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableScopesContext) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableScopesContext(val *ScopesContext) *NullableScopesContext { 96 | return &NullableScopesContext{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableScopesContext) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableScopesContext) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_image_quality_outcome.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // ImageQualityOutcome The outcome of the image quality check. 19 | type ImageQualityOutcome string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of ImageQualityOutcome 24 | const ( 25 | IMAGEQUALITYOUTCOME_SUCCESS ImageQualityOutcome = "success" 26 | IMAGEQUALITYOUTCOME_FAILED ImageQualityOutcome = "failed" 27 | ) 28 | 29 | var allowedImageQualityOutcomeEnumValues = []ImageQualityOutcome{ 30 | "success", 31 | "failed", 32 | } 33 | 34 | func (v *ImageQualityOutcome) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := ImageQualityOutcome(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewImageQualityOutcomeFromValue returns a pointer to a valid ImageQualityOutcome 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewImageQualityOutcomeFromValue(v string) (*ImageQualityOutcome, error) { 51 | ev := ImageQualityOutcome(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v ImageQualityOutcome) IsValid() bool { 59 | for _, existing := range allowedImageQualityOutcomeEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to ImageQualityOutcome value 68 | func (v ImageQualityOutcome) Ptr() *ImageQualityOutcome { 69 | return &v 70 | } 71 | 72 | type NullableImageQualityOutcome struct { 73 | value *ImageQualityOutcome 74 | isSet bool 75 | } 76 | 77 | func (v NullableImageQualityOutcome) Get() *ImageQualityOutcome { 78 | return v.value 79 | } 80 | 81 | func (v *NullableImageQualityOutcome) Set(val *ImageQualityOutcome) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableImageQualityOutcome) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableImageQualityOutcome) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableImageQualityOutcome(val *ImageQualityOutcome) *NullableImageQualityOutcome { 96 | return &NullableImageQualityOutcome{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableImageQualityOutcome) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableImageQualityOutcome) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_network_insights_version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // NetworkInsightsVersion The version of network insights 19 | type NetworkInsightsVersion string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of NetworkInsightsVersion 24 | const ( 25 | NETWORKINSIGHTSVERSION_NI1 NetworkInsightsVersion = "NI1" 26 | ) 27 | 28 | var allowedNetworkInsightsVersionEnumValues = []NetworkInsightsVersion{ 29 | "NI1", 30 | } 31 | 32 | func (v *NetworkInsightsVersion) UnmarshalJSON(src []byte) error { 33 | var value string 34 | err := json.Unmarshal(src, &value) 35 | if err != nil { 36 | return err 37 | } 38 | 39 | enumTypeValue := NetworkInsightsVersion(value) 40 | 41 | 42 | *v = enumTypeValue 43 | return nil 44 | } 45 | 46 | // NewNetworkInsightsVersionFromValue returns a pointer to a valid NetworkInsightsVersion 47 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 48 | func NewNetworkInsightsVersionFromValue(v string) (*NetworkInsightsVersion, error) { 49 | ev := NetworkInsightsVersion(v) 50 | 51 | 52 | return &ev, nil 53 | } 54 | 55 | // IsValid return true if the value is valid for the enum, false otherwise 56 | func (v NetworkInsightsVersion) IsValid() bool { 57 | for _, existing := range allowedNetworkInsightsVersionEnumValues { 58 | if existing == v { 59 | return true 60 | } 61 | } 62 | return false 63 | } 64 | 65 | // Ptr returns reference to NetworkInsightsVersion value 66 | func (v NetworkInsightsVersion) Ptr() *NetworkInsightsVersion { 67 | return &v 68 | } 69 | 70 | type NullableNetworkInsightsVersion struct { 71 | value *NetworkInsightsVersion 72 | isSet bool 73 | } 74 | 75 | func (v NullableNetworkInsightsVersion) Get() *NetworkInsightsVersion { 76 | return v.value 77 | } 78 | 79 | func (v *NullableNetworkInsightsVersion) Set(val *NetworkInsightsVersion) { 80 | v.value = val 81 | v.isSet = true 82 | } 83 | 84 | func (v NullableNetworkInsightsVersion) IsSet() bool { 85 | return v.isSet 86 | } 87 | 88 | func (v *NullableNetworkInsightsVersion) Unset() { 89 | v.value = nil 90 | v.isSet = false 91 | } 92 | 93 | func NewNullableNetworkInsightsVersion(val *NetworkInsightsVersion) *NullableNetworkInsightsVersion { 94 | return &NullableNetworkInsightsVersion{value: val, isSet: true} 95 | } 96 | 97 | func (v NullableNetworkInsightsVersion) MarshalJSON() ([]byte, error) { 98 | return json.Marshal(v.value) 99 | } 100 | 101 | func (v *NullableNetworkInsightsVersion) UnmarshalJSON(src []byte) error { 102 | v.isSet = true 103 | return json.Unmarshal(src, &v.value) 104 | } 105 | 106 | -------------------------------------------------------------------------------- /plaid/model_asset_report_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // AssetReportType Indicates either a Fast Asset Report, which will contain only current identity and balance information, or a Full Asset Report, which will also contain historical balance information and transaction data. 19 | type AssetReportType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of AssetReportType 24 | const ( 25 | ASSETREPORTTYPE_FULL AssetReportType = "FULL" 26 | ASSETREPORTTYPE_FAST AssetReportType = "FAST" 27 | ) 28 | 29 | var allowedAssetReportTypeEnumValues = []AssetReportType{ 30 | "FULL", 31 | "FAST", 32 | } 33 | 34 | func (v *AssetReportType) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := AssetReportType(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewAssetReportTypeFromValue returns a pointer to a valid AssetReportType 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewAssetReportTypeFromValue(v string) (*AssetReportType, error) { 51 | ev := AssetReportType(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v AssetReportType) IsValid() bool { 59 | for _, existing := range allowedAssetReportTypeEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to AssetReportType value 68 | func (v AssetReportType) Ptr() *AssetReportType { 69 | return &v 70 | } 71 | 72 | type NullableAssetReportType struct { 73 | value *AssetReportType 74 | isSet bool 75 | } 76 | 77 | func (v NullableAssetReportType) Get() *AssetReportType { 78 | return v.value 79 | } 80 | 81 | func (v *NullableAssetReportType) Set(val *AssetReportType) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableAssetReportType) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableAssetReportType) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableAssetReportType(val *AssetReportType) *NullableAssetReportType { 96 | return &NullableAssetReportType{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableAssetReportType) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableAssetReportType) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_asset_transaction_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // AssetTransactionType Asset Transaction Type. 19 | type AssetTransactionType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of AssetTransactionType 24 | const ( 25 | ASSETTRANSACTIONTYPE_CREDIT AssetTransactionType = "Credit" 26 | ASSETTRANSACTIONTYPE_DEBIT AssetTransactionType = "Debit" 27 | ) 28 | 29 | var allowedAssetTransactionTypeEnumValues = []AssetTransactionType{ 30 | "Credit", 31 | "Debit", 32 | } 33 | 34 | func (v *AssetTransactionType) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := AssetTransactionType(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewAssetTransactionTypeFromValue returns a pointer to a valid AssetTransactionType 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewAssetTransactionTypeFromValue(v string) (*AssetTransactionType, error) { 51 | ev := AssetTransactionType(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v AssetTransactionType) IsValid() bool { 59 | for _, existing := range allowedAssetTransactionTypeEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to AssetTransactionType value 68 | func (v AssetTransactionType) Ptr() *AssetTransactionType { 69 | return &v 70 | } 71 | 72 | type NullableAssetTransactionType struct { 73 | value *AssetTransactionType 74 | isSet bool 75 | } 76 | 77 | func (v NullableAssetTransactionType) Get() *AssetTransactionType { 78 | return v.value 79 | } 80 | 81 | func (v *NullableAssetTransactionType) Set(val *AssetTransactionType) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableAssetTransactionType) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableAssetTransactionType) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableAssetTransactionType(val *AssetTransactionType) *NullableAssetTransactionType { 96 | return &NullableAssetTransactionType{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableAssetTransactionType) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableAssetTransactionType) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_wallet_status.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // WalletStatus The status of the wallet. `UNKNOWN`: The wallet status is unknown. `ACTIVE`: The wallet is active and ready to send money to and receive money from. `CLOSED`: The wallet is closed. Any transactions made to or from this wallet will error. 19 | type WalletStatus string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of WalletStatus 24 | const ( 25 | WALLETSTATUS_UNKNOWN WalletStatus = "UNKNOWN" 26 | WALLETSTATUS_ACTIVE WalletStatus = "ACTIVE" 27 | WALLETSTATUS_CLOSED WalletStatus = "CLOSED" 28 | ) 29 | 30 | var allowedWalletStatusEnumValues = []WalletStatus{ 31 | "UNKNOWN", 32 | "ACTIVE", 33 | "CLOSED", 34 | } 35 | 36 | func (v *WalletStatus) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := WalletStatus(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewWalletStatusFromValue returns a pointer to a valid WalletStatus 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewWalletStatusFromValue(v string) (*WalletStatus, error) { 53 | ev := WalletStatus(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v WalletStatus) IsValid() bool { 61 | for _, existing := range allowedWalletStatusEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to WalletStatus value 70 | func (v WalletStatus) Ptr() *WalletStatus { 71 | return &v 72 | } 73 | 74 | type NullableWalletStatus struct { 75 | value *WalletStatus 76 | isSet bool 77 | } 78 | 79 | func (v NullableWalletStatus) Get() *WalletStatus { 80 | return v.value 81 | } 82 | 83 | func (v *NullableWalletStatus) Set(val *WalletStatus) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullableWalletStatus) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullableWalletStatus) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullableWalletStatus(val *WalletStatus) *NullableWalletStatus { 98 | return &NullableWalletStatus{value: val, isSet: true} 99 | } 100 | 101 | func (v NullableWalletStatus) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullableWalletStatus) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | -------------------------------------------------------------------------------- /plaid/model_consent_event_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // ConsentEventType A broad categorization of the consent event. 19 | type ConsentEventType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of ConsentEventType 24 | const ( 25 | CONSENTEVENTTYPE_GRANTED ConsentEventType = "CONSENT_GRANTED" 26 | CONSENTEVENTTYPE_REVOKED ConsentEventType = "CONSENT_REVOKED" 27 | CONSENTEVENTTYPE_UPDATED ConsentEventType = "CONSENT_UPDATED" 28 | ) 29 | 30 | var allowedConsentEventTypeEnumValues = []ConsentEventType{ 31 | "CONSENT_GRANTED", 32 | "CONSENT_REVOKED", 33 | "CONSENT_UPDATED", 34 | } 35 | 36 | func (v *ConsentEventType) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := ConsentEventType(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewConsentEventTypeFromValue returns a pointer to a valid ConsentEventType 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewConsentEventTypeFromValue(v string) (*ConsentEventType, error) { 53 | ev := ConsentEventType(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v ConsentEventType) IsValid() bool { 61 | for _, existing := range allowedConsentEventTypeEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to ConsentEventType value 70 | func (v ConsentEventType) Ptr() *ConsentEventType { 71 | return &v 72 | } 73 | 74 | type NullableConsentEventType struct { 75 | value *ConsentEventType 76 | isSet bool 77 | } 78 | 79 | func (v NullableConsentEventType) Get() *ConsentEventType { 80 | return v.value 81 | } 82 | 83 | func (v *NullableConsentEventType) Set(val *ConsentEventType) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullableConsentEventType) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullableConsentEventType) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullableConsentEventType(val *ConsentEventType) *NullableConsentEventType { 98 | return &NullableConsentEventType{value: val, isSet: true} 99 | } 100 | 101 | func (v NullableConsentEventType) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullableConsentEventType) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | -------------------------------------------------------------------------------- /plaid/model_loan_identifier_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // LoanIdentifierType A value from a MISMO prescribed list that specifies the type of loan identifier. 19 | type LoanIdentifierType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of LoanIdentifierType 24 | const ( 25 | LOANIDENTIFIERTYPE_LENDER_LOAN LoanIdentifierType = "LenderLoan" 26 | LOANIDENTIFIERTYPE_UNIVERSAL_LOAN LoanIdentifierType = "UniversalLoan" 27 | ) 28 | 29 | var allowedLoanIdentifierTypeEnumValues = []LoanIdentifierType{ 30 | "LenderLoan", 31 | "UniversalLoan", 32 | } 33 | 34 | func (v *LoanIdentifierType) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := LoanIdentifierType(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewLoanIdentifierTypeFromValue returns a pointer to a valid LoanIdentifierType 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewLoanIdentifierTypeFromValue(v string) (*LoanIdentifierType, error) { 51 | ev := LoanIdentifierType(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v LoanIdentifierType) IsValid() bool { 59 | for _, existing := range allowedLoanIdentifierTypeEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to LoanIdentifierType value 68 | func (v LoanIdentifierType) Ptr() *LoanIdentifierType { 69 | return &v 70 | } 71 | 72 | type NullableLoanIdentifierType struct { 73 | value *LoanIdentifierType 74 | isSet bool 75 | } 76 | 77 | func (v NullableLoanIdentifierType) Get() *LoanIdentifierType { 78 | return v.value 79 | } 80 | 81 | func (v *NullableLoanIdentifierType) Set(val *LoanIdentifierType) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableLoanIdentifierType) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableLoanIdentifierType) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableLoanIdentifierType(val *LoanIdentifierType) *NullableLoanIdentifierType { 96 | return &NullableLoanIdentifierType{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableLoanIdentifierType) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableLoanIdentifierType) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_asset_report_add_ons.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // AssetReportAddOns Add-ons that should be included in the Asset Report. `investments`: The Investments add-on `fast_assets`: The Fast Assets add-on 19 | type AssetReportAddOns string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of AssetReportAddOns 24 | const ( 25 | ASSETREPORTADDONS_INVESTMENTS AssetReportAddOns = "investments" 26 | ASSETREPORTADDONS_FAST_ASSETS AssetReportAddOns = "fast_assets" 27 | ) 28 | 29 | var allowedAssetReportAddOnsEnumValues = []AssetReportAddOns{ 30 | "investments", 31 | "fast_assets", 32 | } 33 | 34 | func (v *AssetReportAddOns) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := AssetReportAddOns(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewAssetReportAddOnsFromValue returns a pointer to a valid AssetReportAddOns 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewAssetReportAddOnsFromValue(v string) (*AssetReportAddOns, error) { 51 | ev := AssetReportAddOns(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v AssetReportAddOns) IsValid() bool { 59 | for _, existing := range allowedAssetReportAddOnsEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to AssetReportAddOns value 68 | func (v AssetReportAddOns) Ptr() *AssetReportAddOns { 69 | return &v 70 | } 71 | 72 | type NullableAssetReportAddOns struct { 73 | value *AssetReportAddOns 74 | isSet bool 75 | } 76 | 77 | func (v NullableAssetReportAddOns) Get() *AssetReportAddOns { 78 | return v.value 79 | } 80 | 81 | func (v *NullableAssetReportAddOns) Set(val *AssetReportAddOns) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableAssetReportAddOns) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableAssetReportAddOns) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableAssetReportAddOns(val *AssetReportAddOns) *NullableAssetReportAddOns { 96 | return &NullableAssetReportAddOns{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableAssetReportAddOns) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableAssetReportAddOns) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_selfie_check_status.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // SelfieCheckStatus The outcome status for the associated Identity Verification attempt's `selfie_check` step. This field will always have the same value as `steps.selfie_check`. 19 | type SelfieCheckStatus string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of SelfieCheckStatus 24 | const ( 25 | SELFIECHECKSTATUS_SUCCESS SelfieCheckStatus = "success" 26 | SELFIECHECKSTATUS_FAILED SelfieCheckStatus = "failed" 27 | ) 28 | 29 | var allowedSelfieCheckStatusEnumValues = []SelfieCheckStatus{ 30 | "success", 31 | "failed", 32 | } 33 | 34 | func (v *SelfieCheckStatus) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := SelfieCheckStatus(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewSelfieCheckStatusFromValue returns a pointer to a valid SelfieCheckStatus 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewSelfieCheckStatusFromValue(v string) (*SelfieCheckStatus, error) { 51 | ev := SelfieCheckStatus(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v SelfieCheckStatus) IsValid() bool { 59 | for _, existing := range allowedSelfieCheckStatusEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to SelfieCheckStatus value 68 | func (v SelfieCheckStatus) Ptr() *SelfieCheckStatus { 69 | return &v 70 | } 71 | 72 | type NullableSelfieCheckStatus struct { 73 | value *SelfieCheckStatus 74 | isSet bool 75 | } 76 | 77 | func (v NullableSelfieCheckStatus) Get() *SelfieCheckStatus { 78 | return v.value 79 | } 80 | 81 | func (v *NullableSelfieCheckStatus) Set(val *SelfieCheckStatus) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableSelfieCheckStatus) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableSelfieCheckStatus) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableSelfieCheckStatus(val *SelfieCheckStatus) *NullableSelfieCheckStatus { 96 | return &NullableSelfieCheckStatus{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableSelfieCheckStatus) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableSelfieCheckStatus) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_fdx_party_registry.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // FDXPartyRegistry The registry containing the party’s registration with name and id 19 | type FDXPartyRegistry string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of FDXPartyRegistry 24 | const ( 25 | FDXPARTYREGISTRY_FDX FDXPartyRegistry = "FDX" 26 | FDXPARTYREGISTRY_GLEIF FDXPartyRegistry = "GLEIF" 27 | FDXPARTYREGISTRY_ICANN FDXPartyRegistry = "ICANN" 28 | FDXPARTYREGISTRY_PRIVATE FDXPartyRegistry = "PRIVATE" 29 | ) 30 | 31 | var allowedFDXPartyRegistryEnumValues = []FDXPartyRegistry{ 32 | "FDX", 33 | "GLEIF", 34 | "ICANN", 35 | "PRIVATE", 36 | } 37 | 38 | func (v *FDXPartyRegistry) UnmarshalJSON(src []byte) error { 39 | var value string 40 | err := json.Unmarshal(src, &value) 41 | if err != nil { 42 | return err 43 | } 44 | 45 | enumTypeValue := FDXPartyRegistry(value) 46 | 47 | 48 | *v = enumTypeValue 49 | return nil 50 | } 51 | 52 | // NewFDXPartyRegistryFromValue returns a pointer to a valid FDXPartyRegistry 53 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 54 | func NewFDXPartyRegistryFromValue(v string) (*FDXPartyRegistry, error) { 55 | ev := FDXPartyRegistry(v) 56 | 57 | 58 | return &ev, nil 59 | } 60 | 61 | // IsValid return true if the value is valid for the enum, false otherwise 62 | func (v FDXPartyRegistry) IsValid() bool { 63 | for _, existing := range allowedFDXPartyRegistryEnumValues { 64 | if existing == v { 65 | return true 66 | } 67 | } 68 | return false 69 | } 70 | 71 | // Ptr returns reference to FDXPartyRegistry value 72 | func (v FDXPartyRegistry) Ptr() *FDXPartyRegistry { 73 | return &v 74 | } 75 | 76 | type NullableFDXPartyRegistry struct { 77 | value *FDXPartyRegistry 78 | isSet bool 79 | } 80 | 81 | func (v NullableFDXPartyRegistry) Get() *FDXPartyRegistry { 82 | return v.value 83 | } 84 | 85 | func (v *NullableFDXPartyRegistry) Set(val *FDXPartyRegistry) { 86 | v.value = val 87 | v.isSet = true 88 | } 89 | 90 | func (v NullableFDXPartyRegistry) IsSet() bool { 91 | return v.isSet 92 | } 93 | 94 | func (v *NullableFDXPartyRegistry) Unset() { 95 | v.value = nil 96 | v.isSet = false 97 | } 98 | 99 | func NewNullableFDXPartyRegistry(val *FDXPartyRegistry) *NullableFDXPartyRegistry { 100 | return &NullableFDXPartyRegistry{value: val, isSet: true} 101 | } 102 | 103 | func (v NullableFDXPartyRegistry) MarshalJSON() ([]byte, error) { 104 | return json.Marshal(v.value) 105 | } 106 | 107 | func (v *NullableFDXPartyRegistry) UnmarshalJSON(src []byte) error { 108 | v.isSet = true 109 | return json.Unmarshal(src, &v.value) 110 | } 111 | 112 | -------------------------------------------------------------------------------- /plaid/model_bank_transfer_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // BankTransferType The type of bank transfer. This will be either `debit` or `credit`. A `debit` indicates a transfer of money into the origination account; a `credit` indicates a transfer of money out of the origination account. 19 | type BankTransferType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of BankTransferType 24 | const ( 25 | BANKTRANSFERTYPE_DEBIT BankTransferType = "debit" 26 | BANKTRANSFERTYPE_CREDIT BankTransferType = "credit" 27 | ) 28 | 29 | var allowedBankTransferTypeEnumValues = []BankTransferType{ 30 | "debit", 31 | "credit", 32 | } 33 | 34 | func (v *BankTransferType) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := BankTransferType(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewBankTransferTypeFromValue returns a pointer to a valid BankTransferType 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewBankTransferTypeFromValue(v string) (*BankTransferType, error) { 51 | ev := BankTransferType(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v BankTransferType) IsValid() bool { 59 | for _, existing := range allowedBankTransferTypeEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to BankTransferType value 68 | func (v BankTransferType) Ptr() *BankTransferType { 69 | return &v 70 | } 71 | 72 | type NullableBankTransferType struct { 73 | value *BankTransferType 74 | isSet bool 75 | } 76 | 77 | func (v NullableBankTransferType) Get() *BankTransferType { 78 | return v.value 79 | } 80 | 81 | func (v *NullableBankTransferType) Set(val *BankTransferType) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableBankTransferType) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableBankTransferType) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableBankTransferType(val *BankTransferType) *NullableBankTransferType { 96 | return &NullableBankTransferType{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableBankTransferType) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableBankTransferType) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_employment_source_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // EmploymentSourceType The types of source employment data that users should be able to share 19 | type EmploymentSourceType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of EmploymentSourceType 24 | const ( 25 | EMPLOYMENTSOURCETYPE_BANK EmploymentSourceType = "bank" 26 | EMPLOYMENTSOURCETYPE_PAYROLL EmploymentSourceType = "payroll" 27 | ) 28 | 29 | var allowedEmploymentSourceTypeEnumValues = []EmploymentSourceType{ 30 | "bank", 31 | "payroll", 32 | } 33 | 34 | func (v *EmploymentSourceType) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := EmploymentSourceType(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewEmploymentSourceTypeFromValue returns a pointer to a valid EmploymentSourceType 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewEmploymentSourceTypeFromValue(v string) (*EmploymentSourceType, error) { 51 | ev := EmploymentSourceType(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v EmploymentSourceType) IsValid() bool { 59 | for _, existing := range allowedEmploymentSourceTypeEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to EmploymentSourceType value 68 | func (v EmploymentSourceType) Ptr() *EmploymentSourceType { 69 | return &v 70 | } 71 | 72 | type NullableEmploymentSourceType struct { 73 | value *EmploymentSourceType 74 | isSet bool 75 | } 76 | 77 | func (v NullableEmploymentSourceType) Get() *EmploymentSourceType { 78 | return v.value 79 | } 80 | 81 | func (v *NullableEmploymentSourceType) Set(val *EmploymentSourceType) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableEmploymentSourceType) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableEmploymentSourceType) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableEmploymentSourceType(val *EmploymentSourceType) *NullableEmploymentSourceType { 96 | return &NullableEmploymentSourceType{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableEmploymentSourceType) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableEmploymentSourceType) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_fdx_update_reason.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // FDXUpdateReason Reason for lifecycle event status change 19 | type FDXUpdateReason string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of FDXUpdateReason 24 | const ( 25 | FDXUPDATEREASON_BUSINESS_RULE FDXUpdateReason = "BUSINESS_RULE" 26 | FDXUPDATEREASON_SECURITY_EVENT FDXUpdateReason = "SECURITY_EVENT" 27 | FDXUPDATEREASON_USER_ACTION FDXUpdateReason = "USER_ACTION" 28 | FDXUPDATEREASON_OTHER FDXUpdateReason = "OTHER" 29 | ) 30 | 31 | var allowedFDXUpdateReasonEnumValues = []FDXUpdateReason{ 32 | "BUSINESS_RULE", 33 | "SECURITY_EVENT", 34 | "USER_ACTION", 35 | "OTHER", 36 | } 37 | 38 | func (v *FDXUpdateReason) UnmarshalJSON(src []byte) error { 39 | var value string 40 | err := json.Unmarshal(src, &value) 41 | if err != nil { 42 | return err 43 | } 44 | 45 | enumTypeValue := FDXUpdateReason(value) 46 | 47 | 48 | *v = enumTypeValue 49 | return nil 50 | } 51 | 52 | // NewFDXUpdateReasonFromValue returns a pointer to a valid FDXUpdateReason 53 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 54 | func NewFDXUpdateReasonFromValue(v string) (*FDXUpdateReason, error) { 55 | ev := FDXUpdateReason(v) 56 | 57 | 58 | return &ev, nil 59 | } 60 | 61 | // IsValid return true if the value is valid for the enum, false otherwise 62 | func (v FDXUpdateReason) IsValid() bool { 63 | for _, existing := range allowedFDXUpdateReasonEnumValues { 64 | if existing == v { 65 | return true 66 | } 67 | } 68 | return false 69 | } 70 | 71 | // Ptr returns reference to FDXUpdateReason value 72 | func (v FDXUpdateReason) Ptr() *FDXUpdateReason { 73 | return &v 74 | } 75 | 76 | type NullableFDXUpdateReason struct { 77 | value *FDXUpdateReason 78 | isSet bool 79 | } 80 | 81 | func (v NullableFDXUpdateReason) Get() *FDXUpdateReason { 82 | return v.value 83 | } 84 | 85 | func (v *NullableFDXUpdateReason) Set(val *FDXUpdateReason) { 86 | v.value = val 87 | v.isSet = true 88 | } 89 | 90 | func (v NullableFDXUpdateReason) IsSet() bool { 91 | return v.isSet 92 | } 93 | 94 | func (v *NullableFDXUpdateReason) Unset() { 95 | v.value = nil 96 | v.isSet = false 97 | } 98 | 99 | func NewNullableFDXUpdateReason(val *FDXUpdateReason) *NullableFDXUpdateReason { 100 | return &NullableFDXUpdateReason{value: val, isSet: true} 101 | } 102 | 103 | func (v NullableFDXUpdateReason) MarshalJSON() ([]byte, error) { 104 | return json.Marshal(v.value) 105 | } 106 | 107 | func (v *NullableFDXUpdateReason) UnmarshalJSON(src []byte) error { 108 | v.isSet = true 109 | return json.Unmarshal(src, &v.value) 110 | } 111 | 112 | -------------------------------------------------------------------------------- /plaid/model_asset_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // AssetType A value from a MISMO prescribed list that specifies financial assets in a mortgage loan transaction. Assets may be either liquid or fixed and are associated with a corresponding asset amount. 19 | type AssetType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of AssetType 24 | const ( 25 | ASSETTYPE_CHECKING_ACCOUNT AssetType = "CheckingAccount" 26 | ASSETTYPE_SAVINGS_ACCOUNT AssetType = "SavingsAccount" 27 | ASSETTYPE_INVESTMENT AssetType = "Investment" 28 | ASSETTYPE_MONEY_MARKET_FUND AssetType = "MoneyMarketFund" 29 | ASSETTYPE_OTHER AssetType = "Other" 30 | ) 31 | 32 | var allowedAssetTypeEnumValues = []AssetType{ 33 | "CheckingAccount", 34 | "SavingsAccount", 35 | "Investment", 36 | "MoneyMarketFund", 37 | "Other", 38 | } 39 | 40 | func (v *AssetType) UnmarshalJSON(src []byte) error { 41 | var value string 42 | err := json.Unmarshal(src, &value) 43 | if err != nil { 44 | return err 45 | } 46 | 47 | enumTypeValue := AssetType(value) 48 | 49 | 50 | *v = enumTypeValue 51 | return nil 52 | } 53 | 54 | // NewAssetTypeFromValue returns a pointer to a valid AssetType 55 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 56 | func NewAssetTypeFromValue(v string) (*AssetType, error) { 57 | ev := AssetType(v) 58 | 59 | 60 | return &ev, nil 61 | } 62 | 63 | // IsValid return true if the value is valid for the enum, false otherwise 64 | func (v AssetType) IsValid() bool { 65 | for _, existing := range allowedAssetTypeEnumValues { 66 | if existing == v { 67 | return true 68 | } 69 | } 70 | return false 71 | } 72 | 73 | // Ptr returns reference to AssetType value 74 | func (v AssetType) Ptr() *AssetType { 75 | return &v 76 | } 77 | 78 | type NullableAssetType struct { 79 | value *AssetType 80 | isSet bool 81 | } 82 | 83 | func (v NullableAssetType) Get() *AssetType { 84 | return v.value 85 | } 86 | 87 | func (v *NullableAssetType) Set(val *AssetType) { 88 | v.value = val 89 | v.isSet = true 90 | } 91 | 92 | func (v NullableAssetType) IsSet() bool { 93 | return v.isSet 94 | } 95 | 96 | func (v *NullableAssetType) Unset() { 97 | v.value = nil 98 | v.isSet = false 99 | } 100 | 101 | func NewNullableAssetType(val *AssetType) *NullableAssetType { 102 | return &NullableAssetType{value: val, isSet: true} 103 | } 104 | 105 | func (v NullableAssetType) MarshalJSON() ([]byte, error) { 106 | return json.Marshal(v.value) 107 | } 108 | 109 | func (v *NullableAssetType) UnmarshalJSON(src []byte) error { 110 | v.isSet = true 111 | return json.Unmarshal(src, &v.value) 112 | } 113 | 114 | -------------------------------------------------------------------------------- /plaid/model_document_status.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // DocumentStatus An outcome status for this specific document submission. Distinct from the overall `documentary_verification.status` that summarizes the verification outcome from one or more documents. 19 | type DocumentStatus string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of DocumentStatus 24 | const ( 25 | DOCUMENTSTATUS_SUCCESS DocumentStatus = "success" 26 | DOCUMENTSTATUS_FAILED DocumentStatus = "failed" 27 | DOCUMENTSTATUS_MANUALLY_APPROVED DocumentStatus = "manually_approved" 28 | ) 29 | 30 | var allowedDocumentStatusEnumValues = []DocumentStatus{ 31 | "success", 32 | "failed", 33 | "manually_approved", 34 | } 35 | 36 | func (v *DocumentStatus) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := DocumentStatus(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewDocumentStatusFromValue returns a pointer to a valid DocumentStatus 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewDocumentStatusFromValue(v string) (*DocumentStatus, error) { 53 | ev := DocumentStatus(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v DocumentStatus) IsValid() bool { 61 | for _, existing := range allowedDocumentStatusEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to DocumentStatus value 70 | func (v DocumentStatus) Ptr() *DocumentStatus { 71 | return &v 72 | } 73 | 74 | type NullableDocumentStatus struct { 75 | value *DocumentStatus 76 | isSet bool 77 | } 78 | 79 | func (v NullableDocumentStatus) Get() *DocumentStatus { 80 | return v.value 81 | } 82 | 83 | func (v *NullableDocumentStatus) Set(val *DocumentStatus) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullableDocumentStatus) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullableDocumentStatus) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullableDocumentStatus(val *DocumentStatus) *NullableDocumentStatus { 98 | return &NullableDocumentStatus{value: val, isSet: true} 99 | } 100 | 101 | func (v NullableDocumentStatus) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullableDocumentStatus) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | -------------------------------------------------------------------------------- /plaid/model_issuing_country.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // IssuingCountry A binary match indicator specifying whether the country that issued the provided document matches the country that the user separately provided to Plaid. Note: You can configure whether a `no_match` on `issuing_country` fails the `documentary_verification` by editing your Plaid Template. 19 | type IssuingCountry string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of IssuingCountry 24 | const ( 25 | ISSUINGCOUNTRY_MATCH IssuingCountry = "match" 26 | ISSUINGCOUNTRY_NO_MATCH IssuingCountry = "no_match" 27 | ) 28 | 29 | var allowedIssuingCountryEnumValues = []IssuingCountry{ 30 | "match", 31 | "no_match", 32 | } 33 | 34 | func (v *IssuingCountry) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := IssuingCountry(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewIssuingCountryFromValue returns a pointer to a valid IssuingCountry 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewIssuingCountryFromValue(v string) (*IssuingCountry, error) { 51 | ev := IssuingCountry(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v IssuingCountry) IsValid() bool { 59 | for _, existing := range allowedIssuingCountryEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to IssuingCountry value 68 | func (v IssuingCountry) Ptr() *IssuingCountry { 69 | return &v 70 | } 71 | 72 | type NullableIssuingCountry struct { 73 | value *IssuingCountry 74 | isSet bool 75 | } 76 | 77 | func (v NullableIssuingCountry) Get() *IssuingCountry { 78 | return v.value 79 | } 80 | 81 | func (v *NullableIssuingCountry) Set(val *IssuingCountry) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableIssuingCountry) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableIssuingCountry) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableIssuingCountry(val *IssuingCountry) *NullableIssuingCountry { 96 | return &NullableIssuingCountry{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableIssuingCountry) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableIssuingCountry) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_payment_channel.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // PaymentChannel The channel used to make a payment. `online:` transactions that took place online. `in store:` transactions that were made at a physical location. `other:` transactions that relate to banks, e.g. fees or deposits. 19 | type PaymentChannel string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of PaymentChannel 24 | const ( 25 | PAYMENTCHANNEL_ONLINE PaymentChannel = "online" 26 | PAYMENTCHANNEL_IN_STORE PaymentChannel = "in store" 27 | PAYMENTCHANNEL_OTHER PaymentChannel = "other" 28 | ) 29 | 30 | var allowedPaymentChannelEnumValues = []PaymentChannel{ 31 | "online", 32 | "in store", 33 | "other", 34 | } 35 | 36 | func (v *PaymentChannel) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := PaymentChannel(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewPaymentChannelFromValue returns a pointer to a valid PaymentChannel 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewPaymentChannelFromValue(v string) (*PaymentChannel, error) { 53 | ev := PaymentChannel(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v PaymentChannel) IsValid() bool { 61 | for _, existing := range allowedPaymentChannelEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to PaymentChannel value 70 | func (v PaymentChannel) Ptr() *PaymentChannel { 71 | return &v 72 | } 73 | 74 | type NullablePaymentChannel struct { 75 | value *PaymentChannel 76 | isSet bool 77 | } 78 | 79 | func (v NullablePaymentChannel) Get() *PaymentChannel { 80 | return v.value 81 | } 82 | 83 | func (v *NullablePaymentChannel) Set(val *PaymentChannel) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullablePaymentChannel) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullablePaymentChannel) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullablePaymentChannel(val *PaymentChannel) *NullablePaymentChannel { 98 | return &NullablePaymentChannel{value: val, isSet: true} 99 | } 100 | 101 | func (v NullablePaymentChannel) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullablePaymentChannel) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | -------------------------------------------------------------------------------- /plaid/model_party_role_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // PartyRoleType A value from a MISMO defined list that identifies the role that the party plays in the transaction. Parties may be either a person or legal entity. A party may play multiple roles in a transaction.A value from a MISMO defined list that identifies the role that the party plays in the transaction. Parties may be either a person or legal entity. A party may play multiple roles in a transaction. 19 | type PartyRoleType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of PartyRoleType 24 | const ( 25 | PARTYROLETYPE_BORROWER PartyRoleType = "Borrower" 26 | ) 27 | 28 | var allowedPartyRoleTypeEnumValues = []PartyRoleType{ 29 | "Borrower", 30 | } 31 | 32 | func (v *PartyRoleType) UnmarshalJSON(src []byte) error { 33 | var value string 34 | err := json.Unmarshal(src, &value) 35 | if err != nil { 36 | return err 37 | } 38 | 39 | enumTypeValue := PartyRoleType(value) 40 | 41 | 42 | *v = enumTypeValue 43 | return nil 44 | } 45 | 46 | // NewPartyRoleTypeFromValue returns a pointer to a valid PartyRoleType 47 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 48 | func NewPartyRoleTypeFromValue(v string) (*PartyRoleType, error) { 49 | ev := PartyRoleType(v) 50 | 51 | 52 | return &ev, nil 53 | } 54 | 55 | // IsValid return true if the value is valid for the enum, false otherwise 56 | func (v PartyRoleType) IsValid() bool { 57 | for _, existing := range allowedPartyRoleTypeEnumValues { 58 | if existing == v { 59 | return true 60 | } 61 | } 62 | return false 63 | } 64 | 65 | // Ptr returns reference to PartyRoleType value 66 | func (v PartyRoleType) Ptr() *PartyRoleType { 67 | return &v 68 | } 69 | 70 | type NullablePartyRoleType struct { 71 | value *PartyRoleType 72 | isSet bool 73 | } 74 | 75 | func (v NullablePartyRoleType) Get() *PartyRoleType { 76 | return v.value 77 | } 78 | 79 | func (v *NullablePartyRoleType) Set(val *PartyRoleType) { 80 | v.value = val 81 | v.isSet = true 82 | } 83 | 84 | func (v NullablePartyRoleType) IsSet() bool { 85 | return v.isSet 86 | } 87 | 88 | func (v *NullablePartyRoleType) Unset() { 89 | v.value = nil 90 | v.isSet = false 91 | } 92 | 93 | func NewNullablePartyRoleType(val *PartyRoleType) *NullablePartyRoleType { 94 | return &NullablePartyRoleType{value: val, isSet: true} 95 | } 96 | 97 | func (v NullablePartyRoleType) MarshalJSON() ([]byte, error) { 98 | return json.Marshal(v.value) 99 | } 100 | 101 | func (v *NullablePartyRoleType) UnmarshalJSON(src []byte) error { 102 | v.isSet = true 103 | return json.Unmarshal(src, &v.value) 104 | } 105 | 106 | -------------------------------------------------------------------------------- /plaid/model_fdx_event_status.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // FDXEventStatus Current status of indicated entity after reported event change. Not all statuses will be supported on all entity types by all data providers 19 | type FDXEventStatus string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of FDXEventStatus 24 | const ( 25 | FDXEVENTSTATUS_ACTIVE FDXEventStatus = "ACTIVE" 26 | FDXEVENTSTATUS_EXPIRED FDXEventStatus = "EXPIRED" 27 | FDXEVENTSTATUS_REVOKED FDXEventStatus = "REVOKED" 28 | FDXEVENTSTATUS_SUSPENDED FDXEventStatus = "SUSPENDED" 29 | ) 30 | 31 | var allowedFDXEventStatusEnumValues = []FDXEventStatus{ 32 | "ACTIVE", 33 | "EXPIRED", 34 | "REVOKED", 35 | "SUSPENDED", 36 | } 37 | 38 | func (v *FDXEventStatus) UnmarshalJSON(src []byte) error { 39 | var value string 40 | err := json.Unmarshal(src, &value) 41 | if err != nil { 42 | return err 43 | } 44 | 45 | enumTypeValue := FDXEventStatus(value) 46 | 47 | 48 | *v = enumTypeValue 49 | return nil 50 | } 51 | 52 | // NewFDXEventStatusFromValue returns a pointer to a valid FDXEventStatus 53 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 54 | func NewFDXEventStatusFromValue(v string) (*FDXEventStatus, error) { 55 | ev := FDXEventStatus(v) 56 | 57 | 58 | return &ev, nil 59 | } 60 | 61 | // IsValid return true if the value is valid for the enum, false otherwise 62 | func (v FDXEventStatus) IsValid() bool { 63 | for _, existing := range allowedFDXEventStatusEnumValues { 64 | if existing == v { 65 | return true 66 | } 67 | } 68 | return false 69 | } 70 | 71 | // Ptr returns reference to FDXEventStatus value 72 | func (v FDXEventStatus) Ptr() *FDXEventStatus { 73 | return &v 74 | } 75 | 76 | type NullableFDXEventStatus struct { 77 | value *FDXEventStatus 78 | isSet bool 79 | } 80 | 81 | func (v NullableFDXEventStatus) Get() *FDXEventStatus { 82 | return v.value 83 | } 84 | 85 | func (v *NullableFDXEventStatus) Set(val *FDXEventStatus) { 86 | v.value = val 87 | v.isSet = true 88 | } 89 | 90 | func (v NullableFDXEventStatus) IsSet() bool { 91 | return v.isSet 92 | } 93 | 94 | func (v *NullableFDXEventStatus) Unset() { 95 | v.value = nil 96 | v.isSet = false 97 | } 98 | 99 | func NewNullableFDXEventStatus(val *FDXEventStatus) *NullableFDXEventStatus { 100 | return &NullableFDXEventStatus{value: val, isSet: true} 101 | } 102 | 103 | func (v NullableFDXEventStatus) MarshalJSON() ([]byte, error) { 104 | return json.Marshal(v.value) 105 | } 106 | 107 | func (v *NullableFDXEventStatus) UnmarshalJSON(src []byte) error { 108 | v.isSet = true 109 | return json.Unmarshal(src, &v.value) 110 | } 111 | 112 | -------------------------------------------------------------------------------- /plaid/model_wallet_iso_currency_code.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // WalletISOCurrencyCode An ISO-4217 currency code, used with e-wallets and transactions. 19 | type WalletISOCurrencyCode string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of WalletISOCurrencyCode 24 | const ( 25 | WALLETISOCURRENCYCODE_GBP WalletISOCurrencyCode = "GBP" 26 | WALLETISOCURRENCYCODE_EUR WalletISOCurrencyCode = "EUR" 27 | ) 28 | 29 | var allowedWalletISOCurrencyCodeEnumValues = []WalletISOCurrencyCode{ 30 | "GBP", 31 | "EUR", 32 | } 33 | 34 | func (v *WalletISOCurrencyCode) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := WalletISOCurrencyCode(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewWalletISOCurrencyCodeFromValue returns a pointer to a valid WalletISOCurrencyCode 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewWalletISOCurrencyCodeFromValue(v string) (*WalletISOCurrencyCode, error) { 51 | ev := WalletISOCurrencyCode(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v WalletISOCurrencyCode) IsValid() bool { 59 | for _, existing := range allowedWalletISOCurrencyCodeEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to WalletISOCurrencyCode value 68 | func (v WalletISOCurrencyCode) Ptr() *WalletISOCurrencyCode { 69 | return &v 70 | } 71 | 72 | type NullableWalletISOCurrencyCode struct { 73 | value *WalletISOCurrencyCode 74 | isSet bool 75 | } 76 | 77 | func (v NullableWalletISOCurrencyCode) Get() *WalletISOCurrencyCode { 78 | return v.value 79 | } 80 | 81 | func (v *NullableWalletISOCurrencyCode) Set(val *WalletISOCurrencyCode) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableWalletISOCurrencyCode) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableWalletISOCurrencyCode) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableWalletISOCurrencyCode(val *WalletISOCurrencyCode) *NullableWalletISOCurrencyCode { 96 | return &NullableWalletISOCurrencyCode{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableWalletISOCurrencyCode) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableWalletISOCurrencyCode) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_dashboard_user_status.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // DashboardUserStatus The current status of the user. 19 | type DashboardUserStatus string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of DashboardUserStatus 24 | const ( 25 | DASHBOARDUSERSTATUS_INVITED DashboardUserStatus = "invited" 26 | DASHBOARDUSERSTATUS_ACTIVE DashboardUserStatus = "active" 27 | DASHBOARDUSERSTATUS_DEACTIVATED DashboardUserStatus = "deactivated" 28 | ) 29 | 30 | var allowedDashboardUserStatusEnumValues = []DashboardUserStatus{ 31 | "invited", 32 | "active", 33 | "deactivated", 34 | } 35 | 36 | func (v *DashboardUserStatus) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := DashboardUserStatus(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewDashboardUserStatusFromValue returns a pointer to a valid DashboardUserStatus 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewDashboardUserStatusFromValue(v string) (*DashboardUserStatus, error) { 53 | ev := DashboardUserStatus(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v DashboardUserStatus) IsValid() bool { 61 | for _, existing := range allowedDashboardUserStatusEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to DashboardUserStatus value 70 | func (v DashboardUserStatus) Ptr() *DashboardUserStatus { 71 | return &v 72 | } 73 | 74 | type NullableDashboardUserStatus struct { 75 | value *DashboardUserStatus 76 | isSet bool 77 | } 78 | 79 | func (v NullableDashboardUserStatus) Get() *DashboardUserStatus { 80 | return v.value 81 | } 82 | 83 | func (v *NullableDashboardUserStatus) Set(val *DashboardUserStatus) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullableDashboardUserStatus) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullableDashboardUserStatus) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullableDashboardUserStatus(val *DashboardUserStatus) *NullableDashboardUserStatus { 98 | return &NullableDashboardUserStatus{value: val, isSet: true} 99 | } 100 | 101 | func (v NullableDashboardUserStatus) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullableDashboardUserStatus) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | -------------------------------------------------------------------------------- /plaid/model_transactions_rule_field.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // TransactionsRuleField Transaction field for which the rule is defined. 19 | type TransactionsRuleField string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of TransactionsRuleField 24 | const ( 25 | TRANSACTIONSRULEFIELD_TRANSACTION_ID TransactionsRuleField = "TRANSACTION_ID" 26 | TRANSACTIONSRULEFIELD_NAME TransactionsRuleField = "NAME" 27 | ) 28 | 29 | var allowedTransactionsRuleFieldEnumValues = []TransactionsRuleField{ 30 | "TRANSACTION_ID", 31 | "NAME", 32 | } 33 | 34 | func (v *TransactionsRuleField) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := TransactionsRuleField(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewTransactionsRuleFieldFromValue returns a pointer to a valid TransactionsRuleField 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewTransactionsRuleFieldFromValue(v string) (*TransactionsRuleField, error) { 51 | ev := TransactionsRuleField(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v TransactionsRuleField) IsValid() bool { 59 | for _, existing := range allowedTransactionsRuleFieldEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to TransactionsRuleField value 68 | func (v TransactionsRuleField) Ptr() *TransactionsRuleField { 69 | return &v 70 | } 71 | 72 | type NullableTransactionsRuleField struct { 73 | value *TransactionsRuleField 74 | isSet bool 75 | } 76 | 77 | func (v NullableTransactionsRuleField) Get() *TransactionsRuleField { 78 | return v.value 79 | } 80 | 81 | func (v *NullableTransactionsRuleField) Set(val *TransactionsRuleField) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableTransactionsRuleField) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableTransactionsRuleField) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableTransactionsRuleField(val *TransactionsRuleField) *NullableTransactionsRuleField { 96 | return &NullableTransactionsRuleField{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableTransactionsRuleField) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableTransactionsRuleField) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_expiration_date.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // ExpirationDate A description of whether the associated document was expired when the verification was performed. Note: In the case where an expiration date is not present on the document or failed to be extracted, this value will be `no_data`. 19 | type ExpirationDate string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of ExpirationDate 24 | const ( 25 | EXPIRATIONDATE_NOT_EXPIRED ExpirationDate = "not_expired" 26 | EXPIRATIONDATE_EXPIRED ExpirationDate = "expired" 27 | EXPIRATIONDATE_NO_DATA ExpirationDate = "no_data" 28 | ) 29 | 30 | var allowedExpirationDateEnumValues = []ExpirationDate{ 31 | "not_expired", 32 | "expired", 33 | "no_data", 34 | } 35 | 36 | func (v *ExpirationDate) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := ExpirationDate(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewExpirationDateFromValue returns a pointer to a valid ExpirationDate 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewExpirationDateFromValue(v string) (*ExpirationDate, error) { 53 | ev := ExpirationDate(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v ExpirationDate) IsValid() bool { 61 | for _, existing := range allowedExpirationDateEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to ExpirationDate value 70 | func (v ExpirationDate) Ptr() *ExpirationDate { 71 | return &v 72 | } 73 | 74 | type NullableExpirationDate struct { 75 | value *ExpirationDate 76 | isSet bool 77 | } 78 | 79 | func (v NullableExpirationDate) Get() *ExpirationDate { 80 | return v.value 81 | } 82 | 83 | func (v *NullableExpirationDate) Set(val *ExpirationDate) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullableExpirationDate) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullableExpirationDate) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullableExpirationDate(val *ExpirationDate) *NullableExpirationDate { 98 | return &NullableExpirationDate{value: val, isSet: true} 99 | } 100 | 101 | func (v NullableExpirationDate) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullableExpirationDate) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | -------------------------------------------------------------------------------- /plaid/model_fdx_party_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // FDXPartyType Identifies the type of a party 19 | type FDXPartyType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of FDXPartyType 24 | const ( 25 | FDXPARTYTYPE_DATA_ACCESS_PLATFORM FDXPartyType = "DATA_ACCESS_PLATFORM" 26 | FDXPARTYTYPE_DATA_PROVIDER FDXPartyType = "DATA_PROVIDER" 27 | FDXPARTYTYPE_DATA_RECIPIENT FDXPartyType = "DATA_RECIPIENT" 28 | FDXPARTYTYPE_INDIVIDUAL FDXPartyType = "INDIVIDUAL" 29 | FDXPARTYTYPE_MERCHANT FDXPartyType = "MERCHANT" 30 | FDXPARTYTYPE_VENDOR FDXPartyType = "VENDOR" 31 | ) 32 | 33 | var allowedFDXPartyTypeEnumValues = []FDXPartyType{ 34 | "DATA_ACCESS_PLATFORM", 35 | "DATA_PROVIDER", 36 | "DATA_RECIPIENT", 37 | "INDIVIDUAL", 38 | "MERCHANT", 39 | "VENDOR", 40 | } 41 | 42 | func (v *FDXPartyType) UnmarshalJSON(src []byte) error { 43 | var value string 44 | err := json.Unmarshal(src, &value) 45 | if err != nil { 46 | return err 47 | } 48 | 49 | enumTypeValue := FDXPartyType(value) 50 | 51 | 52 | *v = enumTypeValue 53 | return nil 54 | } 55 | 56 | // NewFDXPartyTypeFromValue returns a pointer to a valid FDXPartyType 57 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 58 | func NewFDXPartyTypeFromValue(v string) (*FDXPartyType, error) { 59 | ev := FDXPartyType(v) 60 | 61 | 62 | return &ev, nil 63 | } 64 | 65 | // IsValid return true if the value is valid for the enum, false otherwise 66 | func (v FDXPartyType) IsValid() bool { 67 | for _, existing := range allowedFDXPartyTypeEnumValues { 68 | if existing == v { 69 | return true 70 | } 71 | } 72 | return false 73 | } 74 | 75 | // Ptr returns reference to FDXPartyType value 76 | func (v FDXPartyType) Ptr() *FDXPartyType { 77 | return &v 78 | } 79 | 80 | type NullableFDXPartyType struct { 81 | value *FDXPartyType 82 | isSet bool 83 | } 84 | 85 | func (v NullableFDXPartyType) Get() *FDXPartyType { 86 | return v.value 87 | } 88 | 89 | func (v *NullableFDXPartyType) Set(val *FDXPartyType) { 90 | v.value = val 91 | v.isSet = true 92 | } 93 | 94 | func (v NullableFDXPartyType) IsSet() bool { 95 | return v.isSet 96 | } 97 | 98 | func (v *NullableFDXPartyType) Unset() { 99 | v.value = nil 100 | v.isSet = false 101 | } 102 | 103 | func NewNullableFDXPartyType(val *FDXPartyType) *NullableFDXPartyType { 104 | return &NullableFDXPartyType{value: val, isSet: true} 105 | } 106 | 107 | func (v NullableFDXPartyType) MarshalJSON() ([]byte, error) { 108 | return json.Marshal(v.value) 109 | } 110 | 111 | func (v *NullableFDXPartyType) UnmarshalJSON(src []byte) error { 112 | v.isSet = true 113 | return json.Unmarshal(src, &v.value) 114 | } 115 | 116 | -------------------------------------------------------------------------------- /plaid/model_prism_insights_version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // PrismInsightsVersion The version of Prism Insights. If not specified, will default to v3. 19 | type PrismInsightsVersion string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of PrismInsightsVersion 24 | const ( 25 | PRISMINSIGHTSVERSION__4 PrismInsightsVersion = "4" 26 | PRISMINSIGHTSVERSION__3 PrismInsightsVersion = "3" 27 | PRISMINSIGHTSVERSION_NULL PrismInsightsVersion = "null" 28 | ) 29 | 30 | var allowedPrismInsightsVersionEnumValues = []PrismInsightsVersion{ 31 | "4", 32 | "3", 33 | "null", 34 | } 35 | 36 | func (v *PrismInsightsVersion) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := PrismInsightsVersion(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewPrismInsightsVersionFromValue returns a pointer to a valid PrismInsightsVersion 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewPrismInsightsVersionFromValue(v string) (*PrismInsightsVersion, error) { 53 | ev := PrismInsightsVersion(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v PrismInsightsVersion) IsValid() bool { 61 | for _, existing := range allowedPrismInsightsVersionEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to PrismInsightsVersion value 70 | func (v PrismInsightsVersion) Ptr() *PrismInsightsVersion { 71 | return &v 72 | } 73 | 74 | type NullablePrismInsightsVersion struct { 75 | value *PrismInsightsVersion 76 | isSet bool 77 | } 78 | 79 | func (v NullablePrismInsightsVersion) Get() *PrismInsightsVersion { 80 | return v.value 81 | } 82 | 83 | func (v *NullablePrismInsightsVersion) Set(val *PrismInsightsVersion) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullablePrismInsightsVersion) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullablePrismInsightsVersion) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullablePrismInsightsVersion(val *PrismInsightsVersion) *NullablePrismInsightsVersion { 98 | return &NullablePrismInsightsVersion{value: val, isSet: true} 99 | } 100 | 101 | func (v NullablePrismInsightsVersion) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullablePrismInsightsVersion) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | -------------------------------------------------------------------------------- /plaid/model_plaid_lend_score_version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // PlaidLendScoreVersion The version of the LendScore 19 | type PlaidLendScoreVersion string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of PlaidLendScoreVersion 24 | const ( 25 | PLAIDLENDSCOREVERSION_V1_0 PlaidLendScoreVersion = "v1.0" 26 | PLAIDLENDSCOREVERSION_V2_0 PlaidLendScoreVersion = "v2.0" 27 | PLAIDLENDSCOREVERSION_LS1 PlaidLendScoreVersion = "LS1" 28 | ) 29 | 30 | var allowedPlaidLendScoreVersionEnumValues = []PlaidLendScoreVersion{ 31 | "v1.0", 32 | "v2.0", 33 | "LS1", 34 | } 35 | 36 | func (v *PlaidLendScoreVersion) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := PlaidLendScoreVersion(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewPlaidLendScoreVersionFromValue returns a pointer to a valid PlaidLendScoreVersion 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewPlaidLendScoreVersionFromValue(v string) (*PlaidLendScoreVersion, error) { 53 | ev := PlaidLendScoreVersion(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v PlaidLendScoreVersion) IsValid() bool { 61 | for _, existing := range allowedPlaidLendScoreVersionEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to PlaidLendScoreVersion value 70 | func (v PlaidLendScoreVersion) Ptr() *PlaidLendScoreVersion { 71 | return &v 72 | } 73 | 74 | type NullablePlaidLendScoreVersion struct { 75 | value *PlaidLendScoreVersion 76 | isSet bool 77 | } 78 | 79 | func (v NullablePlaidLendScoreVersion) Get() *PlaidLendScoreVersion { 80 | return v.value 81 | } 82 | 83 | func (v *NullablePlaidLendScoreVersion) Set(val *PlaidLendScoreVersion) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullablePlaidLendScoreVersion) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullablePlaidLendScoreVersion) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullablePlaidLendScoreVersion(val *PlaidLendScoreVersion) *NullablePlaidLendScoreVersion { 98 | return &NullablePlaidLendScoreVersion{value: val, isSet: true} 99 | } 100 | 101 | func (v NullablePlaidLendScoreVersion) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullablePlaidLendScoreVersion) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | -------------------------------------------------------------------------------- /plaid/model_other_account_subtype.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // OtherAccountSubtype Valid account subtypes for other accounts. For a list containing descriptions of each subtype, see [Account schemas](https://plaid.com/docs/api/accounts/#StandaloneAccountType-other). 19 | type OtherAccountSubtype string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of OtherAccountSubtype 24 | const ( 25 | OTHERACCOUNTSUBTYPE_OTHER OtherAccountSubtype = "other" 26 | OTHERACCOUNTSUBTYPE_ALL OtherAccountSubtype = "all" 27 | ) 28 | 29 | var allowedOtherAccountSubtypeEnumValues = []OtherAccountSubtype{ 30 | "other", 31 | "all", 32 | } 33 | 34 | func (v *OtherAccountSubtype) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := OtherAccountSubtype(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewOtherAccountSubtypeFromValue returns a pointer to a valid OtherAccountSubtype 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewOtherAccountSubtypeFromValue(v string) (*OtherAccountSubtype, error) { 51 | ev := OtherAccountSubtype(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v OtherAccountSubtype) IsValid() bool { 59 | for _, existing := range allowedOtherAccountSubtypeEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to OtherAccountSubtype value 68 | func (v OtherAccountSubtype) Ptr() *OtherAccountSubtype { 69 | return &v 70 | } 71 | 72 | type NullableOtherAccountSubtype struct { 73 | value *OtherAccountSubtype 74 | isSet bool 75 | } 76 | 77 | func (v NullableOtherAccountSubtype) Get() *OtherAccountSubtype { 78 | return v.value 79 | } 80 | 81 | func (v *NullableOtherAccountSubtype) Set(val *OtherAccountSubtype) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableOtherAccountSubtype) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableOtherAccountSubtype) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableOtherAccountSubtype(val *OtherAccountSubtype) *NullableOtherAccountSubtype { 96 | return &NullableOtherAccountSubtype{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableOtherAccountSubtype) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableOtherAccountSubtype) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_bank_transfer_network.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // BankTransferNetwork The network or rails used for the transfer. Valid options are `ach`, `same-day-ach`, or `wire`. 19 | type BankTransferNetwork string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of BankTransferNetwork 24 | const ( 25 | BANKTRANSFERNETWORK_ACH BankTransferNetwork = "ach" 26 | BANKTRANSFERNETWORK_SAME_DAY_ACH BankTransferNetwork = "same-day-ach" 27 | BANKTRANSFERNETWORK_WIRE BankTransferNetwork = "wire" 28 | ) 29 | 30 | var allowedBankTransferNetworkEnumValues = []BankTransferNetwork{ 31 | "ach", 32 | "same-day-ach", 33 | "wire", 34 | } 35 | 36 | func (v *BankTransferNetwork) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := BankTransferNetwork(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewBankTransferNetworkFromValue returns a pointer to a valid BankTransferNetwork 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewBankTransferNetworkFromValue(v string) (*BankTransferNetwork, error) { 53 | ev := BankTransferNetwork(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v BankTransferNetwork) IsValid() bool { 61 | for _, existing := range allowedBankTransferNetworkEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to BankTransferNetwork value 70 | func (v BankTransferNetwork) Ptr() *BankTransferNetwork { 71 | return &v 72 | } 73 | 74 | type NullableBankTransferNetwork struct { 75 | value *BankTransferNetwork 76 | isSet bool 77 | } 78 | 79 | func (v NullableBankTransferNetwork) Get() *BankTransferNetwork { 80 | return v.value 81 | } 82 | 83 | func (v *NullableBankTransferNetwork) Set(val *BankTransferNetwork) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullableBankTransferNetwork) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullableBankTransferNetwork) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullableBankTransferNetwork(val *BankTransferNetwork) *NullableBankTransferNetwork { 98 | return &NullableBankTransferNetwork{value: val, isSet: true} 99 | } 100 | 101 | func (v NullableBankTransferNetwork) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullableBankTransferNetwork) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | -------------------------------------------------------------------------------- /plaid/model_webhook_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // WebhookType The webhook types that can be fired by this test endpoint. 19 | type WebhookType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of WebhookType 24 | const ( 25 | WEBHOOKTYPE_AUTH WebhookType = "AUTH" 26 | WEBHOOKTYPE_HOLDINGS WebhookType = "HOLDINGS" 27 | WEBHOOKTYPE_INVESTMENTS_TRANSACTIONS WebhookType = "INVESTMENTS_TRANSACTIONS" 28 | WEBHOOKTYPE_ITEM WebhookType = "ITEM" 29 | WEBHOOKTYPE_LIABILITIES WebhookType = "LIABILITIES" 30 | WEBHOOKTYPE_TRANSACTIONS WebhookType = "TRANSACTIONS" 31 | WEBHOOKTYPE_ASSETS WebhookType = "ASSETS" 32 | ) 33 | 34 | var allowedWebhookTypeEnumValues = []WebhookType{ 35 | "AUTH", 36 | "HOLDINGS", 37 | "INVESTMENTS_TRANSACTIONS", 38 | "ITEM", 39 | "LIABILITIES", 40 | "TRANSACTIONS", 41 | "ASSETS", 42 | } 43 | 44 | func (v *WebhookType) UnmarshalJSON(src []byte) error { 45 | var value string 46 | err := json.Unmarshal(src, &value) 47 | if err != nil { 48 | return err 49 | } 50 | 51 | enumTypeValue := WebhookType(value) 52 | 53 | 54 | *v = enumTypeValue 55 | return nil 56 | } 57 | 58 | // NewWebhookTypeFromValue returns a pointer to a valid WebhookType 59 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 60 | func NewWebhookTypeFromValue(v string) (*WebhookType, error) { 61 | ev := WebhookType(v) 62 | 63 | 64 | return &ev, nil 65 | } 66 | 67 | // IsValid return true if the value is valid for the enum, false otherwise 68 | func (v WebhookType) IsValid() bool { 69 | for _, existing := range allowedWebhookTypeEnumValues { 70 | if existing == v { 71 | return true 72 | } 73 | } 74 | return false 75 | } 76 | 77 | // Ptr returns reference to WebhookType value 78 | func (v WebhookType) Ptr() *WebhookType { 79 | return &v 80 | } 81 | 82 | type NullableWebhookType struct { 83 | value *WebhookType 84 | isSet bool 85 | } 86 | 87 | func (v NullableWebhookType) Get() *WebhookType { 88 | return v.value 89 | } 90 | 91 | func (v *NullableWebhookType) Set(val *WebhookType) { 92 | v.value = val 93 | v.isSet = true 94 | } 95 | 96 | func (v NullableWebhookType) IsSet() bool { 97 | return v.isSet 98 | } 99 | 100 | func (v *NullableWebhookType) Unset() { 101 | v.value = nil 102 | v.isSet = false 103 | } 104 | 105 | func NewNullableWebhookType(val *WebhookType) *NullableWebhookType { 106 | return &NullableWebhookType{value: val, isSet: true} 107 | } 108 | 109 | func (v NullableWebhookType) MarshalJSON() ([]byte, error) { 110 | return json.Marshal(v.value) 111 | } 112 | 113 | func (v *NullableWebhookType) UnmarshalJSON(src []byte) error { 114 | v.isSet = true 115 | return json.Unmarshal(src, &v.value) 116 | } 117 | 118 | -------------------------------------------------------------------------------- /plaid/model_payment_schedule_interval.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // PaymentScheduleInterval The frequency interval of the payment. 19 | type PaymentScheduleInterval string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of PaymentScheduleInterval 24 | const ( 25 | PAYMENTSCHEDULEINTERVAL_WEEKLY PaymentScheduleInterval = "WEEKLY" 26 | PAYMENTSCHEDULEINTERVAL_MONTHLY PaymentScheduleInterval = "MONTHLY" 27 | ) 28 | 29 | var allowedPaymentScheduleIntervalEnumValues = []PaymentScheduleInterval{ 30 | "WEEKLY", 31 | "MONTHLY", 32 | } 33 | 34 | func (v *PaymentScheduleInterval) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := PaymentScheduleInterval(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewPaymentScheduleIntervalFromValue returns a pointer to a valid PaymentScheduleInterval 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewPaymentScheduleIntervalFromValue(v string) (*PaymentScheduleInterval, error) { 51 | ev := PaymentScheduleInterval(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v PaymentScheduleInterval) IsValid() bool { 59 | for _, existing := range allowedPaymentScheduleIntervalEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to PaymentScheduleInterval value 68 | func (v PaymentScheduleInterval) Ptr() *PaymentScheduleInterval { 69 | return &v 70 | } 71 | 72 | type NullablePaymentScheduleInterval struct { 73 | value *PaymentScheduleInterval 74 | isSet bool 75 | } 76 | 77 | func (v NullablePaymentScheduleInterval) Get() *PaymentScheduleInterval { 78 | return v.value 79 | } 80 | 81 | func (v *NullablePaymentScheduleInterval) Set(val *PaymentScheduleInterval) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullablePaymentScheduleInterval) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullablePaymentScheduleInterval) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullablePaymentScheduleInterval(val *PaymentScheduleInterval) *NullablePaymentScheduleInterval { 96 | return &NullablePaymentScheduleInterval{value: val, isSet: true} 97 | } 98 | 99 | func (v NullablePaymentScheduleInterval) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullablePaymentScheduleInterval) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_issues_status.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // IssuesStatus The current status of the issue. 19 | type IssuesStatus string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of IssuesStatus 24 | const ( 25 | ISSUESSTATUS_REPORTED IssuesStatus = "REPORTED" 26 | ISSUESSTATUS_AWAITING_RESOLUTION IssuesStatus = "AWAITING_RESOLUTION" 27 | ISSUESSTATUS_FIX_IN_PROGRESS IssuesStatus = "FIX_IN_PROGRESS" 28 | ISSUESSTATUS_FIX_PENDING_VALIDATION IssuesStatus = "FIX_PENDING_VALIDATION" 29 | ISSUESSTATUS_CANNOT_FIX IssuesStatus = "CANNOT_FIX" 30 | ISSUESSTATUS_RESOLVED IssuesStatus = "RESOLVED" 31 | ) 32 | 33 | var allowedIssuesStatusEnumValues = []IssuesStatus{ 34 | "REPORTED", 35 | "AWAITING_RESOLUTION", 36 | "FIX_IN_PROGRESS", 37 | "FIX_PENDING_VALIDATION", 38 | "CANNOT_FIX", 39 | "RESOLVED", 40 | } 41 | 42 | func (v *IssuesStatus) UnmarshalJSON(src []byte) error { 43 | var value string 44 | err := json.Unmarshal(src, &value) 45 | if err != nil { 46 | return err 47 | } 48 | 49 | enumTypeValue := IssuesStatus(value) 50 | 51 | 52 | *v = enumTypeValue 53 | return nil 54 | } 55 | 56 | // NewIssuesStatusFromValue returns a pointer to a valid IssuesStatus 57 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 58 | func NewIssuesStatusFromValue(v string) (*IssuesStatus, error) { 59 | ev := IssuesStatus(v) 60 | 61 | 62 | return &ev, nil 63 | } 64 | 65 | // IsValid return true if the value is valid for the enum, false otherwise 66 | func (v IssuesStatus) IsValid() bool { 67 | for _, existing := range allowedIssuesStatusEnumValues { 68 | if existing == v { 69 | return true 70 | } 71 | } 72 | return false 73 | } 74 | 75 | // Ptr returns reference to IssuesStatus value 76 | func (v IssuesStatus) Ptr() *IssuesStatus { 77 | return &v 78 | } 79 | 80 | type NullableIssuesStatus struct { 81 | value *IssuesStatus 82 | isSet bool 83 | } 84 | 85 | func (v NullableIssuesStatus) Get() *IssuesStatus { 86 | return v.value 87 | } 88 | 89 | func (v *NullableIssuesStatus) Set(val *IssuesStatus) { 90 | v.value = val 91 | v.isSet = true 92 | } 93 | 94 | func (v NullableIssuesStatus) IsSet() bool { 95 | return v.isSet 96 | } 97 | 98 | func (v *NullableIssuesStatus) Unset() { 99 | v.value = nil 100 | v.isSet = false 101 | } 102 | 103 | func NewNullableIssuesStatus(val *IssuesStatus) *NullableIssuesStatus { 104 | return &NullableIssuesStatus{value: val, isSet: true} 105 | } 106 | 107 | func (v NullableIssuesStatus) MarshalJSON() ([]byte, error) { 108 | return json.Marshal(v.value) 109 | } 110 | 111 | func (v *NullableIssuesStatus) UnmarshalJSON(src []byte) error { 112 | v.isSet = true 113 | return json.Unmarshal(src, &v.value) 114 | } 115 | 116 | -------------------------------------------------------------------------------- /plaid/model_transactions_rule_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // TransactionsRuleType Transaction rule's match type. For `TRANSACTION_ID` field, `EXACT_MATCH` is available. Matches are case sensitive. 19 | type TransactionsRuleType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of TransactionsRuleType 24 | const ( 25 | TRANSACTIONSRULETYPE_EXACT_MATCH TransactionsRuleType = "EXACT_MATCH" 26 | TRANSACTIONSRULETYPE_SUBSTRING_MATCH TransactionsRuleType = "SUBSTRING_MATCH" 27 | ) 28 | 29 | var allowedTransactionsRuleTypeEnumValues = []TransactionsRuleType{ 30 | "EXACT_MATCH", 31 | "SUBSTRING_MATCH", 32 | } 33 | 34 | func (v *TransactionsRuleType) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := TransactionsRuleType(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewTransactionsRuleTypeFromValue returns a pointer to a valid TransactionsRuleType 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewTransactionsRuleTypeFromValue(v string) (*TransactionsRuleType, error) { 51 | ev := TransactionsRuleType(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v TransactionsRuleType) IsValid() bool { 59 | for _, existing := range allowedTransactionsRuleTypeEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to TransactionsRuleType value 68 | func (v TransactionsRuleType) Ptr() *TransactionsRuleType { 69 | return &v 70 | } 71 | 72 | type NullableTransactionsRuleType struct { 73 | value *TransactionsRuleType 74 | isSet bool 75 | } 76 | 77 | func (v NullableTransactionsRuleType) Get() *TransactionsRuleType { 78 | return v.value 79 | } 80 | 81 | func (v *NullableTransactionsRuleType) Set(val *TransactionsRuleType) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableTransactionsRuleType) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableTransactionsRuleType) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableTransactionsRuleType(val *TransactionsRuleType) *NullableTransactionsRuleType { 96 | return &NullableTransactionsRuleType{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableTransactionsRuleType) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableTransactionsRuleType) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_prism_first_detect_version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // PrismFirstDetectVersion The version of Prism FirstDetect. If not specified, will default to v3. 19 | type PrismFirstDetectVersion string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of PrismFirstDetectVersion 24 | const ( 25 | PRISMFIRSTDETECTVERSION__3 PrismFirstDetectVersion = "3" 26 | PRISMFIRSTDETECTVERSION_NULL PrismFirstDetectVersion = "null" 27 | ) 28 | 29 | var allowedPrismFirstDetectVersionEnumValues = []PrismFirstDetectVersion{ 30 | "3", 31 | "null", 32 | } 33 | 34 | func (v *PrismFirstDetectVersion) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := PrismFirstDetectVersion(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewPrismFirstDetectVersionFromValue returns a pointer to a valid PrismFirstDetectVersion 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewPrismFirstDetectVersionFromValue(v string) (*PrismFirstDetectVersion, error) { 51 | ev := PrismFirstDetectVersion(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v PrismFirstDetectVersion) IsValid() bool { 59 | for _, existing := range allowedPrismFirstDetectVersionEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to PrismFirstDetectVersion value 68 | func (v PrismFirstDetectVersion) Ptr() *PrismFirstDetectVersion { 69 | return &v 70 | } 71 | 72 | type NullablePrismFirstDetectVersion struct { 73 | value *PrismFirstDetectVersion 74 | isSet bool 75 | } 76 | 77 | func (v NullablePrismFirstDetectVersion) Get() *PrismFirstDetectVersion { 78 | return v.value 79 | } 80 | 81 | func (v *NullablePrismFirstDetectVersion) Set(val *PrismFirstDetectVersion) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullablePrismFirstDetectVersion) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullablePrismFirstDetectVersion) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullablePrismFirstDetectVersion(val *PrismFirstDetectVersion) *NullablePrismFirstDetectVersion { 96 | return &NullablePrismFirstDetectVersion{value: val, isSet: true} 97 | } 98 | 99 | func (v NullablePrismFirstDetectVersion) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullablePrismFirstDetectVersion) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_transfer_document_purpose.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // TransferDocumentPurpose Specifies the purpose of the uploaded file. `\"DUE_DILIGENCE\"` - The transfer due diligence document of the originator. 19 | type TransferDocumentPurpose string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of TransferDocumentPurpose 24 | const ( 25 | TRANSFERDOCUMENTPURPOSE_DUE_DILIGENCE TransferDocumentPurpose = "DUE_DILIGENCE" 26 | ) 27 | 28 | var allowedTransferDocumentPurposeEnumValues = []TransferDocumentPurpose{ 29 | "DUE_DILIGENCE", 30 | } 31 | 32 | func (v *TransferDocumentPurpose) UnmarshalJSON(src []byte) error { 33 | var value string 34 | err := json.Unmarshal(src, &value) 35 | if err != nil { 36 | return err 37 | } 38 | 39 | enumTypeValue := TransferDocumentPurpose(value) 40 | 41 | 42 | *v = enumTypeValue 43 | return nil 44 | } 45 | 46 | // NewTransferDocumentPurposeFromValue returns a pointer to a valid TransferDocumentPurpose 47 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 48 | func NewTransferDocumentPurposeFromValue(v string) (*TransferDocumentPurpose, error) { 49 | ev := TransferDocumentPurpose(v) 50 | 51 | 52 | return &ev, nil 53 | } 54 | 55 | // IsValid return true if the value is valid for the enum, false otherwise 56 | func (v TransferDocumentPurpose) IsValid() bool { 57 | for _, existing := range allowedTransferDocumentPurposeEnumValues { 58 | if existing == v { 59 | return true 60 | } 61 | } 62 | return false 63 | } 64 | 65 | // Ptr returns reference to TransferDocumentPurpose value 66 | func (v TransferDocumentPurpose) Ptr() *TransferDocumentPurpose { 67 | return &v 68 | } 69 | 70 | type NullableTransferDocumentPurpose struct { 71 | value *TransferDocumentPurpose 72 | isSet bool 73 | } 74 | 75 | func (v NullableTransferDocumentPurpose) Get() *TransferDocumentPurpose { 76 | return v.value 77 | } 78 | 79 | func (v *NullableTransferDocumentPurpose) Set(val *TransferDocumentPurpose) { 80 | v.value = val 81 | v.isSet = true 82 | } 83 | 84 | func (v NullableTransferDocumentPurpose) IsSet() bool { 85 | return v.isSet 86 | } 87 | 88 | func (v *NullableTransferDocumentPurpose) Unset() { 89 | v.value = nil 90 | v.isSet = false 91 | } 92 | 93 | func NewNullableTransferDocumentPurpose(val *TransferDocumentPurpose) *NullableTransferDocumentPurpose { 94 | return &NullableTransferDocumentPurpose{value: val, isSet: true} 95 | } 96 | 97 | func (v NullableTransferDocumentPurpose) MarshalJSON() ([]byte, error) { 98 | return json.Marshal(v.value) 99 | } 100 | 101 | func (v *NullableTransferDocumentPurpose) UnmarshalJSON(src []byte) error { 102 | v.isSet = true 103 | return json.Unmarshal(src, &v.value) 104 | } 105 | 106 | -------------------------------------------------------------------------------- /plaid/model_recommendation_string.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // RecommendationString The recommendation result for that date. 19 | type RecommendationString string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of RecommendationString 24 | const ( 25 | RECOMMENDATIONSTRING_RECOMMENDED RecommendationString = "RECOMMENDED" 26 | RECOMMENDATIONSTRING_NOT_RECOMMENDED RecommendationString = "NOT_RECOMMENDED" 27 | RECOMMENDATIONSTRING_UNKNOWN RecommendationString = "UNKNOWN" 28 | ) 29 | 30 | var allowedRecommendationStringEnumValues = []RecommendationString{ 31 | "RECOMMENDED", 32 | "NOT_RECOMMENDED", 33 | "UNKNOWN", 34 | } 35 | 36 | func (v *RecommendationString) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := RecommendationString(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewRecommendationStringFromValue returns a pointer to a valid RecommendationString 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewRecommendationStringFromValue(v string) (*RecommendationString, error) { 53 | ev := RecommendationString(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v RecommendationString) IsValid() bool { 61 | for _, existing := range allowedRecommendationStringEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to RecommendationString value 70 | func (v RecommendationString) Ptr() *RecommendationString { 71 | return &v 72 | } 73 | 74 | type NullableRecommendationString struct { 75 | value *RecommendationString 76 | isSet bool 77 | } 78 | 79 | func (v NullableRecommendationString) Get() *RecommendationString { 80 | return v.value 81 | } 82 | 83 | func (v *NullableRecommendationString) Set(val *RecommendationString) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullableRecommendationString) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullableRecommendationString) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullableRecommendationString(val *RecommendationString) *NullableRecommendationString { 98 | return &NullableRecommendationString{value: val, isSet: true} 99 | } 100 | 101 | func (v NullableRecommendationString) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullableRecommendationString) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | -------------------------------------------------------------------------------- /plaid/model_risk_level_with_no_data.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // RiskLevelWithNoData Risk level for the given risk check type, when available. 19 | type RiskLevelWithNoData string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of RiskLevelWithNoData 24 | const ( 25 | RISKLEVELWITHNODATA_LOW RiskLevelWithNoData = "low" 26 | RISKLEVELWITHNODATA_MEDIUM RiskLevelWithNoData = "medium" 27 | RISKLEVELWITHNODATA_HIGH RiskLevelWithNoData = "high" 28 | RISKLEVELWITHNODATA_NO_DATA RiskLevelWithNoData = "no_data" 29 | ) 30 | 31 | var allowedRiskLevelWithNoDataEnumValues = []RiskLevelWithNoData{ 32 | "low", 33 | "medium", 34 | "high", 35 | "no_data", 36 | } 37 | 38 | func (v *RiskLevelWithNoData) UnmarshalJSON(src []byte) error { 39 | var value string 40 | err := json.Unmarshal(src, &value) 41 | if err != nil { 42 | return err 43 | } 44 | 45 | enumTypeValue := RiskLevelWithNoData(value) 46 | 47 | 48 | *v = enumTypeValue 49 | return nil 50 | } 51 | 52 | // NewRiskLevelWithNoDataFromValue returns a pointer to a valid RiskLevelWithNoData 53 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 54 | func NewRiskLevelWithNoDataFromValue(v string) (*RiskLevelWithNoData, error) { 55 | ev := RiskLevelWithNoData(v) 56 | 57 | 58 | return &ev, nil 59 | } 60 | 61 | // IsValid return true if the value is valid for the enum, false otherwise 62 | func (v RiskLevelWithNoData) IsValid() bool { 63 | for _, existing := range allowedRiskLevelWithNoDataEnumValues { 64 | if existing == v { 65 | return true 66 | } 67 | } 68 | return false 69 | } 70 | 71 | // Ptr returns reference to RiskLevelWithNoData value 72 | func (v RiskLevelWithNoData) Ptr() *RiskLevelWithNoData { 73 | return &v 74 | } 75 | 76 | type NullableRiskLevelWithNoData struct { 77 | value *RiskLevelWithNoData 78 | isSet bool 79 | } 80 | 81 | func (v NullableRiskLevelWithNoData) Get() *RiskLevelWithNoData { 82 | return v.value 83 | } 84 | 85 | func (v *NullableRiskLevelWithNoData) Set(val *RiskLevelWithNoData) { 86 | v.value = val 87 | v.isSet = true 88 | } 89 | 90 | func (v NullableRiskLevelWithNoData) IsSet() bool { 91 | return v.isSet 92 | } 93 | 94 | func (v *NullableRiskLevelWithNoData) Unset() { 95 | v.value = nil 96 | v.isSet = false 97 | } 98 | 99 | func NewNullableRiskLevelWithNoData(val *RiskLevelWithNoData) *NullableRiskLevelWithNoData { 100 | return &NullableRiskLevelWithNoData{value: val, isSet: true} 101 | } 102 | 103 | func (v NullableRiskLevelWithNoData) MarshalJSON() ([]byte, error) { 104 | return json.Marshal(v.value) 105 | } 106 | 107 | func (v *NullableRiskLevelWithNoData) UnmarshalJSON(src []byte) error { 108 | v.isSet = true 109 | return json.Unmarshal(src, &v.value) 110 | } 111 | 112 | -------------------------------------------------------------------------------- /plaid/model_plaid_check_score_version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // PlaidCheckScoreVersion The version of the Check Score. New integrations should use `/cra/check_report/lend_score/get` and the LendScore instead. 19 | type PlaidCheckScoreVersion string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of PlaidCheckScoreVersion 24 | const ( 25 | PLAIDCHECKSCOREVERSION_V1_0 PlaidCheckScoreVersion = "v1.0" 26 | PLAIDCHECKSCOREVERSION_V2_0 PlaidCheckScoreVersion = "v2.0" 27 | ) 28 | 29 | var allowedPlaidCheckScoreVersionEnumValues = []PlaidCheckScoreVersion{ 30 | "v1.0", 31 | "v2.0", 32 | } 33 | 34 | func (v *PlaidCheckScoreVersion) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := PlaidCheckScoreVersion(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewPlaidCheckScoreVersionFromValue returns a pointer to a valid PlaidCheckScoreVersion 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewPlaidCheckScoreVersionFromValue(v string) (*PlaidCheckScoreVersion, error) { 51 | ev := PlaidCheckScoreVersion(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v PlaidCheckScoreVersion) IsValid() bool { 59 | for _, existing := range allowedPlaidCheckScoreVersionEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to PlaidCheckScoreVersion value 68 | func (v PlaidCheckScoreVersion) Ptr() *PlaidCheckScoreVersion { 69 | return &v 70 | } 71 | 72 | type NullablePlaidCheckScoreVersion struct { 73 | value *PlaidCheckScoreVersion 74 | isSet bool 75 | } 76 | 77 | func (v NullablePlaidCheckScoreVersion) Get() *PlaidCheckScoreVersion { 78 | return v.value 79 | } 80 | 81 | func (v *NullablePlaidCheckScoreVersion) Set(val *PlaidCheckScoreVersion) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullablePlaidCheckScoreVersion) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullablePlaidCheckScoreVersion) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullablePlaidCheckScoreVersion(val *PlaidCheckScoreVersion) *NullablePlaidCheckScoreVersion { 96 | return &NullablePlaidCheckScoreVersion{value: val, isSet: true} 97 | } 98 | 99 | func (v NullablePlaidCheckScoreVersion) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullablePlaidCheckScoreVersion) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_identity_update_types.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // IdentityUpdateTypes The possible types of identity data that may have changed. 19 | type IdentityUpdateTypes string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of IdentityUpdateTypes 24 | const ( 25 | IDENTITYUPDATETYPES_PHONES IdentityUpdateTypes = "PHONES" 26 | IDENTITYUPDATETYPES_ADDRESSES IdentityUpdateTypes = "ADDRESSES" 27 | IDENTITYUPDATETYPES_EMAILS IdentityUpdateTypes = "EMAILS" 28 | IDENTITYUPDATETYPES_NAMES IdentityUpdateTypes = "NAMES" 29 | ) 30 | 31 | var allowedIdentityUpdateTypesEnumValues = []IdentityUpdateTypes{ 32 | "PHONES", 33 | "ADDRESSES", 34 | "EMAILS", 35 | "NAMES", 36 | } 37 | 38 | func (v *IdentityUpdateTypes) UnmarshalJSON(src []byte) error { 39 | var value string 40 | err := json.Unmarshal(src, &value) 41 | if err != nil { 42 | return err 43 | } 44 | 45 | enumTypeValue := IdentityUpdateTypes(value) 46 | 47 | 48 | *v = enumTypeValue 49 | return nil 50 | } 51 | 52 | // NewIdentityUpdateTypesFromValue returns a pointer to a valid IdentityUpdateTypes 53 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 54 | func NewIdentityUpdateTypesFromValue(v string) (*IdentityUpdateTypes, error) { 55 | ev := IdentityUpdateTypes(v) 56 | 57 | 58 | return &ev, nil 59 | } 60 | 61 | // IsValid return true if the value is valid for the enum, false otherwise 62 | func (v IdentityUpdateTypes) IsValid() bool { 63 | for _, existing := range allowedIdentityUpdateTypesEnumValues { 64 | if existing == v { 65 | return true 66 | } 67 | } 68 | return false 69 | } 70 | 71 | // Ptr returns reference to IdentityUpdateTypes value 72 | func (v IdentityUpdateTypes) Ptr() *IdentityUpdateTypes { 73 | return &v 74 | } 75 | 76 | type NullableIdentityUpdateTypes struct { 77 | value *IdentityUpdateTypes 78 | isSet bool 79 | } 80 | 81 | func (v NullableIdentityUpdateTypes) Get() *IdentityUpdateTypes { 82 | return v.value 83 | } 84 | 85 | func (v *NullableIdentityUpdateTypes) Set(val *IdentityUpdateTypes) { 86 | v.value = val 87 | v.isSet = true 88 | } 89 | 90 | func (v NullableIdentityUpdateTypes) IsSet() bool { 91 | return v.isSet 92 | } 93 | 94 | func (v *NullableIdentityUpdateTypes) Unset() { 95 | v.value = nil 96 | v.isSet = false 97 | } 98 | 99 | func NewNullableIdentityUpdateTypes(val *IdentityUpdateTypes) *NullableIdentityUpdateTypes { 100 | return &NullableIdentityUpdateTypes{value: val, isSet: true} 101 | } 102 | 103 | func (v NullableIdentityUpdateTypes) MarshalJSON() ([]byte, error) { 104 | return json.Marshal(v.value) 105 | } 106 | 107 | func (v *NullableIdentityUpdateTypes) UnmarshalJSON(src []byte) error { 108 | v.isSet = true 109 | return json.Unmarshal(src, &v.value) 110 | } 111 | 112 | -------------------------------------------------------------------------------- /plaid/model_monitoring_insights_status.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // MonitoringInsightsStatus Enum for the status of the insights 19 | type MonitoringInsightsStatus string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of MonitoringInsightsStatus 24 | const ( 25 | MONITORINGINSIGHTSSTATUS_AVAILABLE MonitoringInsightsStatus = "AVAILABLE" 26 | MONITORINGINSIGHTSSTATUS_FAILED MonitoringInsightsStatus = "FAILED" 27 | ) 28 | 29 | var allowedMonitoringInsightsStatusEnumValues = []MonitoringInsightsStatus{ 30 | "AVAILABLE", 31 | "FAILED", 32 | } 33 | 34 | func (v *MonitoringInsightsStatus) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := MonitoringInsightsStatus(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewMonitoringInsightsStatusFromValue returns a pointer to a valid MonitoringInsightsStatus 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewMonitoringInsightsStatusFromValue(v string) (*MonitoringInsightsStatus, error) { 51 | ev := MonitoringInsightsStatus(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v MonitoringInsightsStatus) IsValid() bool { 59 | for _, existing := range allowedMonitoringInsightsStatusEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to MonitoringInsightsStatus value 68 | func (v MonitoringInsightsStatus) Ptr() *MonitoringInsightsStatus { 69 | return &v 70 | } 71 | 72 | type NullableMonitoringInsightsStatus struct { 73 | value *MonitoringInsightsStatus 74 | isSet bool 75 | } 76 | 77 | func (v NullableMonitoringInsightsStatus) Get() *MonitoringInsightsStatus { 78 | return v.value 79 | } 80 | 81 | func (v *NullableMonitoringInsightsStatus) Set(val *MonitoringInsightsStatus) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableMonitoringInsightsStatus) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableMonitoringInsightsStatus) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableMonitoringInsightsStatus(val *MonitoringInsightsStatus) *NullableMonitoringInsightsStatus { 96 | return &NullableMonitoringInsightsStatus{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableMonitoringInsightsStatus) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableMonitoringInsightsStatus) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_transfer_balance_type.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // TransferBalanceType The type of balance. `prefunded_rtp_credits` - Your prefunded RTP credit balance with Plaid `prefunded_ach_credits` - Your prefunded ACH credit balance with Plaid 19 | type TransferBalanceType string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of TransferBalanceType 24 | const ( 25 | TRANSFERBALANCETYPE_RTP_CREDITS TransferBalanceType = "prefunded_rtp_credits" 26 | TRANSFERBALANCETYPE_ACH_CREDITS TransferBalanceType = "prefunded_ach_credits" 27 | ) 28 | 29 | var allowedTransferBalanceTypeEnumValues = []TransferBalanceType{ 30 | "prefunded_rtp_credits", 31 | "prefunded_ach_credits", 32 | } 33 | 34 | func (v *TransferBalanceType) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := TransferBalanceType(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewTransferBalanceTypeFromValue returns a pointer to a valid TransferBalanceType 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewTransferBalanceTypeFromValue(v string) (*TransferBalanceType, error) { 51 | ev := TransferBalanceType(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v TransferBalanceType) IsValid() bool { 59 | for _, existing := range allowedTransferBalanceTypeEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to TransferBalanceType value 68 | func (v TransferBalanceType) Ptr() *TransferBalanceType { 69 | return &v 70 | } 71 | 72 | type NullableTransferBalanceType struct { 73 | value *TransferBalanceType 74 | isSet bool 75 | } 76 | 77 | func (v NullableTransferBalanceType) Get() *TransferBalanceType { 78 | return v.value 79 | } 80 | 81 | func (v *NullableTransferBalanceType) Set(val *TransferBalanceType) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableTransferBalanceType) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableTransferBalanceType) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableTransferBalanceType(val *TransferBalanceType) *NullableTransferBalanceType { 96 | return &NullableTransferBalanceType{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableTransferBalanceType) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableTransferBalanceType) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_fdx_notification_priority.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // FDXNotificationPriority Priority of notification 19 | type FDXNotificationPriority string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of FDXNotificationPriority 24 | const ( 25 | FDXNOTIFICATIONPRIORITY_HIGH FDXNotificationPriority = "HIGH" 26 | FDXNOTIFICATIONPRIORITY_MEDIUM FDXNotificationPriority = "MEDIUM" 27 | FDXNOTIFICATIONPRIORITY_LOW FDXNotificationPriority = "LOW" 28 | ) 29 | 30 | var allowedFDXNotificationPriorityEnumValues = []FDXNotificationPriority{ 31 | "HIGH", 32 | "MEDIUM", 33 | "LOW", 34 | } 35 | 36 | func (v *FDXNotificationPriority) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := FDXNotificationPriority(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewFDXNotificationPriorityFromValue returns a pointer to a valid FDXNotificationPriority 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewFDXNotificationPriorityFromValue(v string) (*FDXNotificationPriority, error) { 53 | ev := FDXNotificationPriority(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v FDXNotificationPriority) IsValid() bool { 61 | for _, existing := range allowedFDXNotificationPriorityEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to FDXNotificationPriority value 70 | func (v FDXNotificationPriority) Ptr() *FDXNotificationPriority { 71 | return &v 72 | } 73 | 74 | type NullableFDXNotificationPriority struct { 75 | value *FDXNotificationPriority 76 | isSet bool 77 | } 78 | 79 | func (v NullableFDXNotificationPriority) Get() *FDXNotificationPriority { 80 | return v.value 81 | } 82 | 83 | func (v *NullableFDXNotificationPriority) Set(val *FDXNotificationPriority) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullableFDXNotificationPriority) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullableFDXNotificationPriority) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullableFDXNotificationPriority(val *FDXNotificationPriority) *NullableFDXNotificationPriority { 98 | return &NullableFDXNotificationPriority{value: val, isSet: true} 99 | } 100 | 101 | func (v NullableFDXNotificationPriority) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullableFDXNotificationPriority) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | -------------------------------------------------------------------------------- /plaid/model_webhook_environment_values.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // WebhookEnvironmentValues The Plaid environment the webhook was sent from 19 | type WebhookEnvironmentValues string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of WebhookEnvironmentValues 24 | const ( 25 | WEBHOOKENVIRONMENTVALUES_SANDBOX WebhookEnvironmentValues = "sandbox" 26 | WEBHOOKENVIRONMENTVALUES_PRODUCTION WebhookEnvironmentValues = "production" 27 | ) 28 | 29 | var allowedWebhookEnvironmentValuesEnumValues = []WebhookEnvironmentValues{ 30 | "sandbox", 31 | "production", 32 | } 33 | 34 | func (v *WebhookEnvironmentValues) UnmarshalJSON(src []byte) error { 35 | var value string 36 | err := json.Unmarshal(src, &value) 37 | if err != nil { 38 | return err 39 | } 40 | 41 | enumTypeValue := WebhookEnvironmentValues(value) 42 | 43 | 44 | *v = enumTypeValue 45 | return nil 46 | } 47 | 48 | // NewWebhookEnvironmentValuesFromValue returns a pointer to a valid WebhookEnvironmentValues 49 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 50 | func NewWebhookEnvironmentValuesFromValue(v string) (*WebhookEnvironmentValues, error) { 51 | ev := WebhookEnvironmentValues(v) 52 | 53 | 54 | return &ev, nil 55 | } 56 | 57 | // IsValid return true if the value is valid for the enum, false otherwise 58 | func (v WebhookEnvironmentValues) IsValid() bool { 59 | for _, existing := range allowedWebhookEnvironmentValuesEnumValues { 60 | if existing == v { 61 | return true 62 | } 63 | } 64 | return false 65 | } 66 | 67 | // Ptr returns reference to WebhookEnvironmentValues value 68 | func (v WebhookEnvironmentValues) Ptr() *WebhookEnvironmentValues { 69 | return &v 70 | } 71 | 72 | type NullableWebhookEnvironmentValues struct { 73 | value *WebhookEnvironmentValues 74 | isSet bool 75 | } 76 | 77 | func (v NullableWebhookEnvironmentValues) Get() *WebhookEnvironmentValues { 78 | return v.value 79 | } 80 | 81 | func (v *NullableWebhookEnvironmentValues) Set(val *WebhookEnvironmentValues) { 82 | v.value = val 83 | v.isSet = true 84 | } 85 | 86 | func (v NullableWebhookEnvironmentValues) IsSet() bool { 87 | return v.isSet 88 | } 89 | 90 | func (v *NullableWebhookEnvironmentValues) Unset() { 91 | v.value = nil 92 | v.isSet = false 93 | } 94 | 95 | func NewNullableWebhookEnvironmentValues(val *WebhookEnvironmentValues) *NullableWebhookEnvironmentValues { 96 | return &NullableWebhookEnvironmentValues{value: val, isSet: true} 97 | } 98 | 99 | func (v NullableWebhookEnvironmentValues) MarshalJSON() ([]byte, error) { 100 | return json.Marshal(v.value) 101 | } 102 | 103 | func (v *NullableWebhookEnvironmentValues) UnmarshalJSON(src []byte) error { 104 | v.isSet = true 105 | return json.Unmarshal(src, &v.value) 106 | } 107 | 108 | -------------------------------------------------------------------------------- /plaid/model_aamva_match_result.go: -------------------------------------------------------------------------------- 1 | /* 2 | * The Plaid API 3 | * 4 | * The Plaid REST API. Please see https://plaid.com/docs/api for more details. 5 | * 6 | * API version: 2020-09-14_1.680.0 7 | */ 8 | 9 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 | 11 | package plaid 12 | 13 | import ( 14 | "encoding/json" 15 | "fmt" 16 | ) 17 | 18 | // AAMVAMatchResult The outcome of checking the particular field against state databases. `match` - The field is an exact match with the state database. `no_match` - The field is not an exact match with the state database. `no_data` - The field was unable to be checked against state databases. 19 | type AAMVAMatchResult string 20 | 21 | var _ = fmt.Printf 22 | 23 | // List of AAMVAMatchResult 24 | const ( 25 | AAMVAMATCHRESULT_MATCH AAMVAMatchResult = "match" 26 | AAMVAMATCHRESULT_NO_MATCH AAMVAMatchResult = "no_match" 27 | AAMVAMATCHRESULT_NO_DATA AAMVAMatchResult = "no_data" 28 | ) 29 | 30 | var allowedAAMVAMatchResultEnumValues = []AAMVAMatchResult{ 31 | "match", 32 | "no_match", 33 | "no_data", 34 | } 35 | 36 | func (v *AAMVAMatchResult) UnmarshalJSON(src []byte) error { 37 | var value string 38 | err := json.Unmarshal(src, &value) 39 | if err != nil { 40 | return err 41 | } 42 | 43 | enumTypeValue := AAMVAMatchResult(value) 44 | 45 | 46 | *v = enumTypeValue 47 | return nil 48 | } 49 | 50 | // NewAAMVAMatchResultFromValue returns a pointer to a valid AAMVAMatchResult 51 | // for the value passed as argument, or an error if the value passed is not allowed by the enum 52 | func NewAAMVAMatchResultFromValue(v string) (*AAMVAMatchResult, error) { 53 | ev := AAMVAMatchResult(v) 54 | 55 | 56 | return &ev, nil 57 | } 58 | 59 | // IsValid return true if the value is valid for the enum, false otherwise 60 | func (v AAMVAMatchResult) IsValid() bool { 61 | for _, existing := range allowedAAMVAMatchResultEnumValues { 62 | if existing == v { 63 | return true 64 | } 65 | } 66 | return false 67 | } 68 | 69 | // Ptr returns reference to AAMVAMatchResult value 70 | func (v AAMVAMatchResult) Ptr() *AAMVAMatchResult { 71 | return &v 72 | } 73 | 74 | type NullableAAMVAMatchResult struct { 75 | value *AAMVAMatchResult 76 | isSet bool 77 | } 78 | 79 | func (v NullableAAMVAMatchResult) Get() *AAMVAMatchResult { 80 | return v.value 81 | } 82 | 83 | func (v *NullableAAMVAMatchResult) Set(val *AAMVAMatchResult) { 84 | v.value = val 85 | v.isSet = true 86 | } 87 | 88 | func (v NullableAAMVAMatchResult) IsSet() bool { 89 | return v.isSet 90 | } 91 | 92 | func (v *NullableAAMVAMatchResult) Unset() { 93 | v.value = nil 94 | v.isSet = false 95 | } 96 | 97 | func NewNullableAAMVAMatchResult(val *AAMVAMatchResult) *NullableAAMVAMatchResult { 98 | return &NullableAAMVAMatchResult{value: val, isSet: true} 99 | } 100 | 101 | func (v NullableAAMVAMatchResult) MarshalJSON() ([]byte, error) { 102 | return json.Marshal(v.value) 103 | } 104 | 105 | func (v *NullableAAMVAMatchResult) UnmarshalJSON(src []byte) error { 106 | v.isSet = true 107 | return json.Unmarshal(src, &v.value) 108 | } 109 | 110 | --------------------------------------------------------------------------------