plaid 13.0.0 → 14.0.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +74 -1
- data/CONTRIBUTING.md +2 -32
- data/Dockerfile +11 -0
- data/Gemfile.lock +45 -36
- data/LICENSE.txt +1 -1
- data/PUBLISH.md +0 -1
- data/README.md +99 -91
- data/Rakefile +8 -79
- data/UPGRADING.md +4 -0
- data/docs/ACHClass.md +15 -0
- data/docs/APR.md +24 -0
- data/docs/AccountAssets.md +40 -0
- data/docs/AccountAssetsAllOf.md +24 -0
- data/docs/AccountBalance.md +26 -0
- data/docs/AccountBase.md +32 -0
- data/docs/AccountFiltersResponse.md +24 -0
- data/docs/AccountIdentity.md +34 -0
- data/docs/AccountIdentityAllOf.md +18 -0
- data/docs/AccountSubtype.md +15 -0
- data/docs/AccountType.md +15 -0
- data/docs/AccountsBalanceGetRequest.md +24 -0
- data/docs/AccountsBalanceGetRequestOptions.md +18 -0
- data/docs/AccountsGetRequest.md +24 -0
- data/docs/AccountsGetRequestOptions.md +18 -0
- data/docs/AccountsGetResponse.md +22 -0
- data/docs/Address.md +20 -0
- data/docs/AddressData.md +26 -0
- data/docs/Amount.md +20 -0
- data/docs/AssetReport.md +28 -0
- data/docs/AssetReportAuditCopyCreateRequest.md +24 -0
- data/docs/AssetReportAuditCopyCreateResponse.md +20 -0
- data/docs/AssetReportAuditCopyGetRequest.md +22 -0
- data/docs/AssetReportAuditCopyRemoveRequest.md +22 -0
- data/docs/AssetReportAuditCopyRemoveResponse.md +20 -0
- data/docs/AssetReportCreateRequest.md +26 -0
- data/docs/AssetReportCreateRequestOptions.md +22 -0
- data/docs/AssetReportCreateResponse.md +22 -0
- data/docs/AssetReportFilterRequest.md +24 -0
- data/docs/AssetReportFilterResponse.md +22 -0
- data/docs/AssetReportGetRequest.md +24 -0
- data/docs/AssetReportGetResponse.md +22 -0
- data/docs/AssetReportItem.md +26 -0
- data/docs/AssetReportPDFGetRequest.md +22 -0
- data/docs/AssetReportRefreshRequest.md +26 -0
- data/docs/AssetReportRefreshRequestOptions.md +22 -0
- data/docs/AssetReportRefreshResponse.md +22 -0
- data/docs/AssetReportRemoveRequest.md +22 -0
- data/docs/AssetReportRemoveResponse.md +20 -0
- data/docs/AssetReportTransaction.md +58 -0
- data/docs/AssetReportTransactionAllOf.md +20 -0
- data/docs/AssetReportUser.md +30 -0
- data/docs/AssetsErrorWebhook.md +24 -0
- data/docs/AssetsProductReadyWebhook.md +22 -0
- data/docs/AuthGetNumbers.md +24 -0
- data/docs/AuthGetRequest.md +24 -0
- data/docs/AuthGetRequestOptions.md +18 -0
- data/docs/AuthGetResponse.md +24 -0
- data/docs/AutomaticallyVerifiedWebhook.md +24 -0
- data/docs/BankTransfer.md +50 -0
- data/docs/BankTransferBalance.md +20 -0
- data/docs/BankTransferBalanceGetRequest.md +22 -0
- data/docs/BankTransferBalanceGetResponse.md +22 -0
- data/docs/BankTransferCancelRequest.md +22 -0
- data/docs/BankTransferCancelResponse.md +18 -0
- data/docs/BankTransferCreateRequest.md +46 -0
- data/docs/BankTransferCreateResponse.md +20 -0
- data/docs/BankTransferDirection.md +15 -0
- data/docs/BankTransferEvent.md +40 -0
- data/docs/BankTransferEventListRequest.md +40 -0
- data/docs/BankTransferEventListResponse.md +20 -0
- data/docs/BankTransferEventSyncRequest.md +24 -0
- data/docs/BankTransferEventSyncResponse.md +20 -0
- data/docs/BankTransferEventType.md +15 -0
- data/docs/BankTransferFailure.md +20 -0
- data/docs/BankTransferGetRequest.md +22 -0
- data/docs/BankTransferGetResponse.md +20 -0
- data/docs/BankTransferListRequest.md +32 -0
- data/docs/BankTransferListResponse.md +20 -0
- data/docs/BankTransferMigrateAccountRequest.md +26 -0
- data/docs/BankTransferMigrateAccountResponse.md +22 -0
- data/docs/BankTransferNetwork.md +15 -0
- data/docs/BankTransferReceiverDetails.md +18 -0
- data/docs/BankTransferStatus.md +15 -0
- data/docs/BankTransferType.md +15 -0
- data/docs/BankTransferUser.md +22 -0
- data/docs/CategoriesGetResponse.md +20 -0
- data/docs/Category.md +22 -0
- data/docs/Cause.md +20 -0
- data/docs/CountryCode.md +15 -0
- data/docs/CreditCardLiability.md +34 -0
- data/docs/CreditFilter.md +18 -0
- data/docs/DefaultUpdateWebhook.md +26 -0
- data/docs/DepositSwitchAddressData.md +26 -0
- data/docs/DepositSwitchAltCreateRequest.md +24 -0
- data/docs/DepositSwitchAltCreateResponse.md +20 -0
- data/docs/DepositSwitchCreateRequest.md +24 -0
- data/docs/DepositSwitchCreateResponse.md +20 -0
- data/docs/DepositSwitchGetRequest.md +22 -0
- data/docs/DepositSwitchGetResponse.md +38 -0
- data/docs/DepositSwitchTargetAccount.md +24 -0
- data/docs/DepositSwitchTargetUser.md +28 -0
- data/docs/DepositSwitchTokenCreateRequest.md +22 -0
- data/docs/DepositSwitchTokenCreateResponse.md +22 -0
- data/docs/DepositoryFilter.md +18 -0
- data/docs/Email.md +22 -0
- data/docs/Employee.md +22 -0
- data/docs/EmployeeIncomeSummaryFieldString.md +20 -0
- data/docs/Employer.md +24 -0
- data/docs/EmployerIncomeSummaryFieldString.md +20 -0
- data/docs/EmployersSearchRequest.md +24 -0
- data/docs/EmployersSearchResponse.md +20 -0
- data/docs/Error.md +34 -0
- data/docs/ExternalPaymentSchedule.md +24 -0
- data/docs/HealthIncident.md +24 -0
- data/docs/HistoricalBalance.md +24 -0
- data/docs/HistoricalUpdateWebhook.md +26 -0
- data/docs/Holding.md +34 -0
- data/docs/HoldingsDefaultUpdateWebhook.md +28 -0
- data/docs/IdentityGetRequest.md +24 -0
- data/docs/IdentityGetRequestOptions.md +18 -0
- data/docs/IdentityGetResponse.md +22 -0
- data/docs/IncidentUpdate.md +22 -0
- data/docs/IncomeBreakdown.md +24 -0
- data/docs/IncomeSummary.md +30 -0
- data/docs/IncomeSummaryFieldNumber.md +20 -0
- data/docs/IncomeSummaryFieldString.md +20 -0
- data/docs/IncomeVerificationCreateRequest.md +22 -0
- data/docs/IncomeVerificationCreateResponse.md +20 -0
- data/docs/IncomeVerificationDocumentsDownloadRequest.md +22 -0
- data/docs/IncomeVerificationDocumentsDownloadResponse.md +18 -0
- data/docs/IncomeVerificationPaystubGetRequest.md +22 -0
- data/docs/IncomeVerificationPaystubGetResponse.md +20 -0
- data/docs/IncomeVerificationStatusWebhook.md +24 -0
- data/docs/IncomeVerificationSummaryGetRequest.md +22 -0
- data/docs/IncomeVerificationSummaryGetResponse.md +20 -0
- data/docs/IncomeVerificationWebhookStatus.md +18 -0
- data/docs/InflowModel.md +26 -0
- data/docs/InitialUpdateWebhook.md +26 -0
- data/docs/Institution.md +36 -0
- data/docs/InstitutionStatus.md +30 -0
- data/docs/InstitutionsGetByIdRequest.md +26 -0
- data/docs/InstitutionsGetByIdRequestOptions.md +20 -0
- data/docs/InstitutionsGetByIdResponse.md +20 -0
- data/docs/InstitutionsGetRequest.md +28 -0
- data/docs/InstitutionsGetRequestOptions.md +24 -0
- data/docs/InstitutionsGetResponse.md +22 -0
- data/docs/InstitutionsSearchAccountFilter.md +24 -0
- data/docs/InstitutionsSearchRequest.md +28 -0
- data/docs/InstitutionsSearchRequestOptions.md +22 -0
- data/docs/InstitutionsSearchResponse.md +20 -0
- data/docs/InvestmentFilter.md +18 -0
- data/docs/InvestmentHoldingsGetRequestOptions.md +18 -0
- data/docs/InvestmentTransaction.md +44 -0
- data/docs/InvestmentsDefaultUpdateWebhook.md +28 -0
- data/docs/InvestmentsHoldingsGetRequest.md +24 -0
- data/docs/InvestmentsHoldingsGetResponse.md +26 -0
- data/docs/InvestmentsTransactionsGetRequest.md +28 -0
- data/docs/InvestmentsTransactionsGetRequestOptions.md +22 -0
- data/docs/InvestmentsTransactionsGetResponse.md +28 -0
- data/docs/Item.md +32 -0
- data/docs/ItemAccessTokenInvalidateRequest.md +22 -0
- data/docs/ItemAccessTokenInvalidateResponse.md +20 -0
- data/docs/ItemErrorWebhook.md +24 -0
- data/docs/ItemGetRequest.md +22 -0
- data/docs/ItemGetResponse.md +24 -0
- data/docs/ItemImportRequest.md +26 -0
- data/docs/ItemImportRequestOptions.md +18 -0
- data/docs/ItemImportRequestUserAuth.md +20 -0
- data/docs/ItemImportResponse.md +20 -0
- data/docs/ItemProductReadyWebhook.md +24 -0
- data/docs/ItemPublicTokenCreateRequest.md +22 -0
- data/docs/ItemPublicTokenCreateResponse.md +22 -0
- data/docs/ItemPublicTokenExchangeRequest.md +22 -0
- data/docs/ItemPublicTokenExchangeResponse.md +22 -0
- data/docs/ItemRemoveRequest.md +22 -0
- data/docs/ItemRemoveResponse.md +18 -0
- data/docs/ItemStatus.md +22 -0
- data/docs/ItemStatusInvestments.md +20 -0
- data/docs/ItemStatusLastWebhook.md +20 -0
- data/docs/ItemStatusTransactions.md +20 -0
- data/docs/ItemWebhookUpdateRequest.md +24 -0
- data/docs/ItemWebhookUpdateResponse.md +20 -0
- data/docs/JWKPublicKey.md +34 -0
- data/docs/JWTHeader.md +18 -0
- data/docs/LiabilitiesGetRequest.md +24 -0
- data/docs/LiabilitiesGetRequestOptions.md +18 -0
- data/docs/LiabilitiesGetResponse.md +24 -0
- data/docs/LiabilitiesObject.md +22 -0
- data/docs/LiabilityOverride.md +66 -0
- data/docs/LinkTokenAccountFilters.md +24 -0
- data/docs/LinkTokenCreateRequest.md +48 -0
- data/docs/LinkTokenCreateRequestAccountSubtypes.md +24 -0
- data/docs/LinkTokenCreateRequestAccountSubtypesCredit.md +18 -0
- data/docs/LinkTokenCreateRequestAccountSubtypesDepository.md +18 -0
- data/docs/LinkTokenCreateRequestAccountSubtypesInvestment.md +18 -0
- data/docs/LinkTokenCreateRequestAccountSubtypesLoan.md +18 -0
- data/docs/LinkTokenCreateRequestDepositSwitch.md +18 -0
- data/docs/LinkTokenCreateRequestIncomeVerification.md +20 -0
- data/docs/LinkTokenCreateRequestPaymentInitiation.md +18 -0
- data/docs/LinkTokenCreateRequestUser.md +32 -0
- data/docs/LinkTokenCreateResponse.md +22 -0
- data/docs/LinkTokenGetMetadataResponse.md +30 -0
- data/docs/LinkTokenGetRequest.md +22 -0
- data/docs/LinkTokenGetResponse.md +26 -0
- data/docs/LoanFilter.md +18 -0
- data/docs/Location.md +32 -0
- data/docs/MFA.md +26 -0
- data/docs/Meta.md +22 -0
- data/docs/MortgageInterestRate.md +20 -0
- data/docs/MortgageLiability.md +56 -0
- data/docs/MortgagePropertyAddress.md +26 -0
- data/docs/NullableAccessToken.md +15 -0
- data/docs/NullableAddress.md +20 -0
- data/docs/NullableAddressData.md +26 -0
- data/docs/NullableItemStatus.md +22 -0
- data/docs/NullableNumbersACH.md +24 -0
- data/docs/NullableNumbersBACS.md +22 -0
- data/docs/NullableNumbersEFT.md +24 -0
- data/docs/NullableNumbersInternational.md +22 -0
- data/docs/NullableRecipientBACS.md +20 -0
- data/docs/Numbers.md +32 -0
- data/docs/NumbersACH.md +24 -0
- data/docs/NumbersBACS.md +22 -0
- data/docs/NumbersEFT.md +24 -0
- data/docs/NumbersInternational.md +22 -0
- data/docs/OverrideAccounts.md +38 -0
- data/docs/Owner.md +24 -0
- data/docs/OwnerOverride.md +24 -0
- data/docs/PSLFStatus.md +22 -0
- data/docs/PayFrequency.md +20 -0
- data/docs/PayPeriodDetails.md +26 -0
- data/docs/PaymentAmount.md +20 -0
- data/docs/PaymentInitiationAddress.md +24 -0
- data/docs/PaymentInitiationPaymentCreateRequest.md +28 -0
- data/docs/PaymentInitiationPaymentCreateResponse.md +22 -0
- data/docs/PaymentInitiationPaymentGetRequest.md +22 -0
- data/docs/PaymentInitiationPaymentGetResponse.md +32 -0
- data/docs/PaymentInitiationPaymentListRequest.md +24 -0
- data/docs/PaymentInitiationPaymentListResponse.md +22 -0
- data/docs/PaymentInitiationPaymentTokenCreateRequest.md +22 -0
- data/docs/PaymentInitiationPaymentTokenCreateResponse.md +22 -0
- data/docs/PaymentInitiationRecipient.md +26 -0
- data/docs/PaymentInitiationRecipientBacs.md +20 -0
- data/docs/PaymentInitiationRecipientCreateRequest.md +28 -0
- data/docs/PaymentInitiationRecipientCreateResponse.md +20 -0
- data/docs/PaymentInitiationRecipientGetRequest.md +22 -0
- data/docs/PaymentInitiationRecipientGetResponse.md +28 -0
- data/docs/PaymentInitiationRecipientListRequest.md +20 -0
- data/docs/PaymentInitiationRecipientListResponse.md +20 -0
- data/docs/PaymentMeta.md +32 -0
- data/docs/PaymentStatusUpdateWebhook.md +30 -0
- data/docs/Paystub.md +30 -0
- data/docs/PaystubDeduction.md +22 -0
- data/docs/PaystubYTDDetails.md +20 -0
- data/docs/PendingExpirationWebhook.md +24 -0
- data/docs/PhoneNumber.md +22 -0
- data/docs/PlaidApi.md +5580 -0
- data/docs/ProcessorApexProcessorTokenCreateRequest.md +24 -0
- data/docs/ProcessorAuthGetRequest.md +22 -0
- data/docs/ProcessorAuthGetResponse.md +22 -0
- data/docs/ProcessorBalanceGetRequest.md +22 -0
- data/docs/ProcessorBalanceGetResponse.md +20 -0
- data/docs/ProcessorIdentityGetRequest.md +22 -0
- data/docs/ProcessorIdentityGetResponse.md +20 -0
- data/docs/ProcessorNumber.md +24 -0
- data/docs/ProcessorStripeBankAccountTokenCreateRequest.md +24 -0
- data/docs/ProcessorStripeBankAccountTokenCreateResponse.md +20 -0
- data/docs/ProcessorTokenCreateRequest.md +26 -0
- data/docs/ProcessorTokenCreateResponse.md +20 -0
- data/docs/ProductStatus.md +22 -0
- data/docs/ProductStatusBreakdown.md +24 -0
- data/docs/Products.md +15 -0
- data/docs/ProjectedIncomeSummaryFieldNumber.md +20 -0
- data/docs/RecaptchaRequiredError.md +30 -0
- data/docs/RecipientBACS.md +20 -0
- data/docs/SandboxBankTransferSimulateRequest.md +26 -0
- data/docs/SandboxBankTransferSimulateResponse.md +18 -0
- data/docs/SandboxItemFireWebhookRequest.md +24 -0
- data/docs/SandboxItemFireWebhookResponse.md +20 -0
- data/docs/SandboxItemResetLoginRequest.md +22 -0
- data/docs/SandboxItemResetLoginResponse.md +20 -0
- data/docs/SandboxItemSetVerificationStatusRequest.md +26 -0
- data/docs/SandboxItemSetVerificationStatusResponse.md +18 -0
- data/docs/SandboxProcessorTokenCreateRequest.md +24 -0
- data/docs/SandboxProcessorTokenCreateRequestOptions.md +20 -0
- data/docs/SandboxProcessorTokenCreateResponse.md +20 -0
- data/docs/SandboxPublicTokenCreateRequest.md +26 -0
- data/docs/SandboxPublicTokenCreateRequestOptions.md +24 -0
- data/docs/SandboxPublicTokenCreateRequestOptionsTransactions.md +20 -0
- data/docs/SandboxPublicTokenCreateResponse.md +20 -0
- data/docs/Security.md +46 -0
- data/docs/ServicerAddressData.md +26 -0
- data/docs/StandaloneAccountType.md +26 -0
- data/docs/StandaloneCurrencyCodeList.md +20 -0
- data/docs/StandaloneInvestmentTransactionSubtype.md +104 -0
- data/docs/StandaloneInvestmentTransactionType.md +28 -0
- data/docs/StudentLoan.md +66 -0
- data/docs/StudentLoanRepaymentModel.md +22 -0
- data/docs/StudentLoanStatus.md +20 -0
- data/docs/StudentRepaymentPlan.md +20 -0
- data/docs/Transaction.md +54 -0
- data/docs/TransactionCode.md +15 -0
- data/docs/TransactionData.md +26 -0
- data/docs/TransactionOverride.md +26 -0
- data/docs/TransactionsGetRequest.md +28 -0
- data/docs/TransactionsGetRequestOptions.md +22 -0
- data/docs/TransactionsGetResponse.md +26 -0
- data/docs/TransactionsRefreshRequest.md +22 -0
- data/docs/TransactionsRefreshResponse.md +18 -0
- data/docs/TransactionsRemovedWebhook.md +26 -0
- data/docs/UserCustomPassword.md +28 -0
- data/docs/UserPermissionRevokedWebhook.md +24 -0
- data/docs/VerificationExpiredWebhook.md +24 -0
- data/docs/VerificationStatus.md +15 -0
- data/docs/Warning.md +22 -0
- data/docs/WebhookUpdateAcknowledgedWebhook.md +26 -0
- data/docs/WebhookVerificationKeyGetRequest.md +22 -0
- data/docs/WebhookVerificationKeyGetResponse.md +20 -0
- data/docs/YTDGrossIncomeSummaryFieldNumber.md +20 -0
- data/docs/YTDNetIncomeSummaryFieldNumber.md +20 -0
- data/lib/plaid.rb +343 -61
- data/lib/plaid/api/plaid_api.rb +4414 -0
- data/lib/plaid/api_client.rb +383 -0
- data/lib/plaid/api_error.rb +57 -0
- data/lib/plaid/configuration.rb +297 -0
- data/lib/plaid/models/account_assets.rb +406 -0
- data/lib/plaid/models/account_assets_all_of.rb +263 -0
- data/lib/plaid/models/account_balance.rb +269 -0
- data/lib/plaid/models/account_base.rb +345 -0
- data/lib/plaid/models/account_filters_response.rb +246 -0
- data/lib/plaid/models/account_identity.rb +369 -0
- data/lib/plaid/models/account_identity_all_of.rb +226 -0
- data/lib/plaid/models/account_subtype.rb +101 -0
- data/lib/plaid/models/account_type.rb +41 -0
- data/lib/plaid/models/accounts_balance_get_request.rb +254 -0
- data/lib/plaid/models/accounts_balance_get_request_options.rb +222 -0
- data/lib/plaid/models/accounts_get_request.rb +254 -0
- data/lib/plaid/models/accounts_get_request_options.rb +222 -0
- data/lib/plaid/models/accounts_get_response.rb +256 -0
- data/lib/plaid/models/ach_class.rb +50 -0
- data/lib/plaid/models/address.rb +235 -0
- data/lib/plaid/models/address_data.rb +277 -0
- data/lib/plaid/models/amount.rb +274 -0
- data/lib/plaid/models/apr.rb +296 -0
- data/lib/plaid/models/asset_report.rb +301 -0
- data/lib/plaid/models/asset_report_audit_copy_create_request.rb +260 -0
- data/lib/plaid/models/asset_report_audit_copy_create_response.rb +240 -0
- data/lib/plaid/models/asset_report_audit_copy_get_request.rb +245 -0
- data/lib/plaid/models/asset_report_audit_copy_remove_request.rb +245 -0
- data/lib/plaid/models/asset_report_audit_copy_remove_response.rb +240 -0
- data/lib/plaid/models/asset_report_create_request.rb +299 -0
- data/lib/plaid/models/asset_report_create_request_options.rb +239 -0
- data/lib/plaid/models/asset_report_create_response.rb +255 -0
- data/lib/plaid/models/asset_report_filter_request.rb +262 -0
- data/lib/plaid/models/asset_report_filter_response.rb +255 -0
- data/lib/plaid/models/asset_report_get_request.rb +255 -0
- data/lib/plaid/models/asset_report_get_response.rb +256 -0
- data/lib/plaid/models/asset_report_item.rb +287 -0
- data/lib/plaid/models/asset_report_pdf_get_request.rb +245 -0
- data/lib/plaid/models/asset_report_refresh_request.rb +288 -0
- data/lib/plaid/models/asset_report_refresh_request_options.rb +239 -0
- data/lib/plaid/models/asset_report_refresh_response.rb +255 -0
- data/lib/plaid/models/asset_report_remove_request.rb +245 -0
- data/lib/plaid/models/asset_report_remove_response.rb +240 -0
- data/lib/plaid/models/asset_report_transaction.rb +511 -0
- data/lib/plaid/models/asset_report_transaction_all_of.rb +235 -0
- data/lib/plaid/models/asset_report_user.rb +287 -0
- data/lib/plaid/models/assets_error_webhook.rb +265 -0
- data/lib/plaid/models/assets_product_ready_webhook.rb +255 -0
- data/lib/plaid/models/auth_get_numbers.rb +258 -0
- data/lib/plaid/models/auth_get_request.rb +254 -0
- data/lib/plaid/models/auth_get_request_options.rb +222 -0
- data/lib/plaid/models/auth_get_response.rb +270 -0
- data/lib/plaid/models/automatically_verified_webhook.rb +270 -0
- data/lib/plaid/models/bank_transfer.rb +444 -0
- data/lib/plaid/models/bank_transfer_balance.rb +239 -0
- data/lib/plaid/models/bank_transfer_balance_get_request.rb +241 -0
- data/lib/plaid/models/bank_transfer_balance_get_response.rb +250 -0
- data/lib/plaid/models/bank_transfer_cancel_request.rb +245 -0
- data/lib/plaid/models/bank_transfer_cancel_response.rb +225 -0
- data/lib/plaid/models/bank_transfer_create_request.rb +459 -0
- data/lib/plaid/models/bank_transfer_create_response.rb +239 -0
- data/lib/plaid/models/bank_transfer_direction.rb +37 -0
- data/lib/plaid/models/bank_transfer_event.rb +388 -0
- data/lib/plaid/models/bank_transfer_event_list_request.rb +418 -0
- data/lib/plaid/models/bank_transfer_event_list_response.rb +241 -0
- data/lib/plaid/models/bank_transfer_event_sync_request.rb +301 -0
- data/lib/plaid/models/bank_transfer_event_sync_response.rb +241 -0
- data/lib/plaid/models/bank_transfer_event_type.rb +42 -0
- data/lib/plaid/models/bank_transfer_failure.rb +231 -0
- data/lib/plaid/models/bank_transfer_get_request.rb +245 -0
- data/lib/plaid/models/bank_transfer_get_response.rb +239 -0
- data/lib/plaid/models/bank_transfer_list_request.rb +336 -0
- data/lib/plaid/models/bank_transfer_list_response.rb +241 -0
- data/lib/plaid/models/bank_transfer_migrate_account_request.rb +275 -0
- data/lib/plaid/models/bank_transfer_migrate_account_response.rb +255 -0
- data/lib/plaid/models/bank_transfer_network.rb +38 -0
- data/lib/plaid/models/bank_transfer_receiver_details.rb +255 -0
- data/lib/plaid/models/bank_transfer_status.rb +40 -0
- data/lib/plaid/models/bank_transfer_type.rb +37 -0
- data/lib/plaid/models/bank_transfer_user.rb +246 -0
- data/lib/plaid/models/categories_get_response.rb +242 -0
- data/lib/plaid/models/category.rb +257 -0
- data/lib/plaid/models/cause.rb +235 -0
- data/lib/plaid/models/country_code.rb +42 -0
- data/lib/plaid/models/credit_card_liability.rb +339 -0
- data/lib/plaid/models/credit_filter.rb +227 -0
- data/lib/plaid/models/default_update_webhook.rb +280 -0
- data/lib/plaid/models/deposit_switch_address_data.rb +285 -0
- data/lib/plaid/models/deposit_switch_alt_create_request.rb +258 -0
- data/lib/plaid/models/deposit_switch_alt_create_response.rb +240 -0
- data/lib/plaid/models/deposit_switch_create_request.rb +260 -0
- data/lib/plaid/models/deposit_switch_create_response.rb +240 -0
- data/lib/plaid/models/deposit_switch_get_request.rb +245 -0
- data/lib/plaid/models/deposit_switch_get_response.rb +381 -0
- data/lib/plaid/models/deposit_switch_target_account.rb +303 -0
- data/lib/plaid/models/deposit_switch_target_user.rb +288 -0
- data/lib/plaid/models/deposit_switch_token_create_request.rb +245 -0
- data/lib/plaid/models/deposit_switch_token_create_response.rb +255 -0
- data/lib/plaid/models/depository_filter.rb +227 -0
- data/lib/plaid/models/email.rb +289 -0
- data/lib/plaid/models/employee.rb +242 -0
- data/lib/plaid/models/employee_income_summary_field_string.rb +245 -0
- data/lib/plaid/models/employer.rb +261 -0
- data/lib/plaid/models/employer_income_summary_field_string.rb +245 -0
- data/lib/plaid/models/employers_search_request.rb +262 -0
- data/lib/plaid/models/employers_search_response.rb +242 -0
- data/lib/plaid/models/error.rb +360 -0
- data/lib/plaid/models/external_payment_schedule.rb +265 -0
- data/lib/plaid/models/health_incident.rb +253 -0
- data/lib/plaid/models/historical_balance.rb +262 -0
- data/lib/plaid/models/historical_update_webhook.rb +280 -0
- data/lib/plaid/models/holding.rb +329 -0
- data/lib/plaid/models/holdings_default_update_webhook.rb +295 -0
- data/lib/plaid/models/identity_get_request.rb +254 -0
- data/lib/plaid/models/identity_get_request_options.rb +222 -0
- data/lib/plaid/models/identity_get_response.rb +256 -0
- data/lib/plaid/models/incident_update.rb +273 -0
- data/lib/plaid/models/income_breakdown.rb +253 -0
- data/lib/plaid/models/income_summary.rb +275 -0
- data/lib/plaid/models/income_summary_field_number.rb +238 -0
- data/lib/plaid/models/income_summary_field_string.rb +238 -0
- data/lib/plaid/models/income_verification_create_request.rb +245 -0
- data/lib/plaid/models/income_verification_create_response.rb +240 -0
- data/lib/plaid/models/income_verification_documents_download_request.rb +245 -0
- data/lib/plaid/models/income_verification_documents_download_response.rb +224 -0
- data/lib/plaid/models/income_verification_paystub_get_request.rb +245 -0
- data/lib/plaid/models/income_verification_paystub_get_response.rb +229 -0
- data/lib/plaid/models/income_verification_status_webhook.rb +270 -0
- data/lib/plaid/models/income_verification_summary_get_request.rb +245 -0
- data/lib/plaid/models/income_verification_summary_get_response.rb +242 -0
- data/lib/plaid/models/income_verification_webhook_status.rb +223 -0
- data/lib/plaid/models/inflow_model.rb +285 -0
- data/lib/plaid/models/initial_update_webhook.rb +281 -0
- data/lib/plaid/models/institution.rb +344 -0
- data/lib/plaid/models/institution_status.rb +307 -0
- data/lib/plaid/models/institutions_get_by_id_request.rb +271 -0
- data/lib/plaid/models/institutions_get_by_id_request_options.rb +234 -0
- data/lib/plaid/models/institutions_get_by_id_response.rb +239 -0
- data/lib/plaid/models/institutions_get_request.rb +305 -0
- data/lib/plaid/models/institutions_get_request_options.rb +254 -0
- data/lib/plaid/models/institutions_get_response.rb +257 -0
- data/lib/plaid/models/institutions_search_account_filter.rb +253 -0
- data/lib/plaid/models/institutions_search_request.rb +288 -0
- data/lib/plaid/models/institutions_search_request_options.rb +239 -0
- data/lib/plaid/models/institutions_search_response.rb +242 -0
- data/lib/plaid/models/investment_filter.rb +227 -0
- data/lib/plaid/models/investment_holdings_get_request_options.rb +222 -0
- data/lib/plaid/models/investment_transaction.rb +445 -0
- data/lib/plaid/models/investments_default_update_webhook.rb +295 -0
- data/lib/plaid/models/investments_holdings_get_request.rb +254 -0
- data/lib/plaid/models/investments_holdings_get_response.rb +290 -0
- data/lib/plaid/models/investments_transactions_get_request.rb +284 -0
- data/lib/plaid/models/investments_transactions_get_request_options.rb +285 -0
- data/lib/plaid/models/investments_transactions_get_response.rb +305 -0
- data/lib/plaid/models/item.rb +311 -0
- data/lib/plaid/models/item_access_token_invalidate_request.rb +245 -0
- data/lib/plaid/models/item_access_token_invalidate_response.rb +240 -0
- data/lib/plaid/models/item_error_webhook.rb +265 -0
- data/lib/plaid/models/item_get_request.rb +245 -0
- data/lib/plaid/models/item_get_response.rb +259 -0
- data/lib/plaid/models/item_import_request.rb +270 -0
- data/lib/plaid/models/item_import_request_options.rb +220 -0
- data/lib/plaid/models/item_import_request_user_auth.rb +240 -0
- data/lib/plaid/models/item_import_response.rb +240 -0
- data/lib/plaid/models/item_product_ready_webhook.rb +265 -0
- data/lib/plaid/models/item_public_token_create_request.rb +245 -0
- data/lib/plaid/models/item_public_token_create_response.rb +249 -0
- data/lib/plaid/models/item_public_token_exchange_request.rb +245 -0
- data/lib/plaid/models/item_public_token_exchange_response.rb +255 -0
- data/lib/plaid/models/item_remove_request.rb +245 -0
- data/lib/plaid/models/item_remove_response.rb +225 -0
- data/lib/plaid/models/item_status.rb +240 -0
- data/lib/plaid/models/item_status_investments.rb +232 -0
- data/lib/plaid/models/item_status_last_webhook.rb +232 -0
- data/lib/plaid/models/item_status_transactions.rb +232 -0
- data/lib/plaid/models/item_webhook_update_request.rb +260 -0
- data/lib/plaid/models/item_webhook_update_response.rb +239 -0
- data/lib/plaid/models/jwk_public_key.rb +299 -0
- data/lib/plaid/models/jwt_header.rb +224 -0
- data/lib/plaid/models/liabilities_get_request.rb +254 -0
- data/lib/plaid/models/liabilities_get_request_options.rb +222 -0
- data/lib/plaid/models/liabilities_get_response.rb +270 -0
- data/lib/plaid/models/liabilities_object.rb +249 -0
- data/lib/plaid/models/liability_override.rb +583 -0
- data/lib/plaid/models/link_token_account_filters.rb +246 -0
- data/lib/plaid/models/link_token_create_request.rb +390 -0
- data/lib/plaid/models/link_token_create_request_account_subtypes.rb +246 -0
- data/lib/plaid/models/link_token_create_request_account_subtypes_credit.rb +222 -0
- data/lib/plaid/models/link_token_create_request_account_subtypes_depository.rb +222 -0
- data/lib/plaid/models/link_token_create_request_account_subtypes_investment.rb +222 -0
- data/lib/plaid/models/link_token_create_request_account_subtypes_loan.rb +222 -0
- data/lib/plaid/models/link_token_create_request_deposit_switch.rb +225 -0
- data/lib/plaid/models/link_token_create_request_income_verification.rb +236 -0
- data/lib/plaid/models/link_token_create_request_payment_initiation.rb +225 -0
- data/lib/plaid/models/link_token_create_request_user.rb +295 -0
- data/lib/plaid/models/link_token_create_response.rb +255 -0
- data/lib/plaid/models/link_token_get_metadata_response.rb +287 -0
- data/lib/plaid/models/link_token_get_request.rb +245 -0
- data/lib/plaid/models/link_token_get_response.rb +266 -0
- data/lib/plaid/models/loan_filter.rb +227 -0
- data/lib/plaid/models/location.rb +298 -0
- data/lib/plaid/models/meta.rb +255 -0
- data/lib/plaid/models/mfa.rb +285 -0
- data/lib/plaid/models/mortgage_interest_rate.rb +232 -0
- data/lib/plaid/models/mortgage_liability.rb +430 -0
- data/lib/plaid/models/mortgage_property_address.rb +265 -0
- data/lib/plaid/models/nullable_access_token.rb +209 -0
- data/lib/plaid/models/nullable_address.rb +241 -0
- data/lib/plaid/models/nullable_address_data.rb +283 -0
- data/lib/plaid/models/nullable_item_status.rb +246 -0
- data/lib/plaid/models/nullable_numbers_ach.rb +272 -0
- data/lib/plaid/models/nullable_numbers_bacs.rb +261 -0
- data/lib/plaid/models/nullable_numbers_eft.rb +276 -0
- data/lib/plaid/models/nullable_numbers_international.rb +261 -0
- data/lib/plaid/models/nullable_recipient_bacs.rb +236 -0
- data/lib/plaid/models/numbers.rb +330 -0
- data/lib/plaid/models/numbers_ach.rb +266 -0
- data/lib/plaid/models/numbers_bacs.rb +255 -0
- data/lib/plaid/models/numbers_eft.rb +270 -0
- data/lib/plaid/models/numbers_international.rb +255 -0
- data/lib/plaid/models/override_accounts.rb +366 -0
- data/lib/plaid/models/owner.rb +278 -0
- data/lib/plaid/models/owner_override.rb +278 -0
- data/lib/plaid/models/pay_frequency.rb +272 -0
- data/lib/plaid/models/pay_period_details.rb +265 -0
- data/lib/plaid/models/payment_amount.rb +240 -0
- data/lib/plaid/models/payment_initiation_address.rb +252 -0
- data/lib/plaid/models/payment_initiation_payment_create_request.rb +284 -0
- data/lib/plaid/models/payment_initiation_payment_create_response.rb +255 -0
- data/lib/plaid/models/payment_initiation_payment_get_request.rb +245 -0
- data/lib/plaid/models/payment_initiation_payment_get_response.rb +353 -0
- data/lib/plaid/models/payment_initiation_payment_list_request.rb +267 -0
- data/lib/plaid/models/payment_initiation_payment_list_response.rb +257 -0
- data/lib/plaid/models/payment_initiation_payment_token_create_request.rb +245 -0
- data/lib/plaid/models/payment_initiation_payment_token_create_response.rb +255 -0
- data/lib/plaid/models/payment_initiation_recipient.rb +271 -0
- data/lib/plaid/models/payment_initiation_recipient_bacs.rb +237 -0
- data/lib/plaid/models/payment_initiation_recipient_create_request.rb +275 -0
- data/lib/plaid/models/payment_initiation_recipient_create_response.rb +240 -0
- data/lib/plaid/models/payment_initiation_recipient_get_request.rb +245 -0
- data/lib/plaid/models/payment_initiation_recipient_get_response.rb +286 -0
- data/lib/plaid/models/payment_initiation_recipient_list_request.rb +230 -0
- data/lib/plaid/models/payment_initiation_recipient_list_response.rb +242 -0
- data/lib/plaid/models/payment_meta.rb +298 -0
- data/lib/plaid/models/payment_status_update_webhook.rb +356 -0
- data/lib/plaid/models/paystub.rb +306 -0
- data/lib/plaid/models/paystub_deduction.rb +242 -0
- data/lib/plaid/models/paystub_ytd_details.rb +239 -0
- data/lib/plaid/models/pending_expiration_webhook.rb +270 -0
- data/lib/plaid/models/phone_number.rb +281 -0
- data/lib/plaid/models/processor_apex_processor_token_create_request.rb +260 -0
- data/lib/plaid/models/processor_auth_get_request.rb +245 -0
- data/lib/plaid/models/processor_auth_get_response.rb +253 -0
- data/lib/plaid/models/processor_balance_get_request.rb +245 -0
- data/lib/plaid/models/processor_balance_get_response.rb +239 -0
- data/lib/plaid/models/processor_identity_get_request.rb +245 -0
- data/lib/plaid/models/processor_identity_get_response.rb +239 -0
- data/lib/plaid/models/processor_number.rb +250 -0
- data/lib/plaid/models/processor_stripe_bank_account_token_create_request.rb +260 -0
- data/lib/plaid/models/processor_stripe_bank_account_token_create_response.rb +240 -0
- data/lib/plaid/models/processor_token_create_request.rb +275 -0
- data/lib/plaid/models/processor_token_create_response.rb +240 -0
- data/lib/plaid/models/product_status.rb +288 -0
- data/lib/plaid/models/product_status_breakdown.rb +300 -0
- data/lib/plaid/models/products.rb +45 -0
- data/lib/plaid/models/projected_income_summary_field_number.rb +245 -0
- data/lib/plaid/models/pslf_status.rb +243 -0
- data/lib/plaid/models/recaptcha_required_error.rb +314 -0
- data/lib/plaid/models/recipient_bacs.rb +230 -0
- data/lib/plaid/models/sandbox_bank_transfer_simulate_request.rb +270 -0
- data/lib/plaid/models/sandbox_bank_transfer_simulate_response.rb +225 -0
- data/lib/plaid/models/sandbox_item_fire_webhook_request.rb +289 -0
- data/lib/plaid/models/sandbox_item_fire_webhook_response.rb +240 -0
- data/lib/plaid/models/sandbox_item_reset_login_request.rb +245 -0
- data/lib/plaid/models/sandbox_item_reset_login_response.rb +240 -0
- data/lib/plaid/models/sandbox_item_set_verification_status_request.rb +309 -0
- data/lib/plaid/models/sandbox_item_set_verification_status_response.rb +225 -0
- data/lib/plaid/models/sandbox_processor_token_create_request.rb +253 -0
- data/lib/plaid/models/sandbox_processor_token_create_request_options.rb +236 -0
- data/lib/plaid/models/sandbox_processor_token_create_response.rb +239 -0
- data/lib/plaid/models/sandbox_public_token_create_request.rb +271 -0
- data/lib/plaid/models/sandbox_public_token_create_request_options.rb +255 -0
- data/lib/plaid/models/sandbox_public_token_create_request_options_transactions.rb +230 -0
- data/lib/plaid/models/sandbox_public_token_create_response.rb +240 -0
- data/lib/plaid/models/security.rb +382 -0
- data/lib/plaid/models/servicer_address_data.rb +265 -0
- data/lib/plaid/models/standalone_account_type.rb +285 -0
- data/lib/plaid/models/standalone_currency_code_list.rb +240 -0
- data/lib/plaid/models/standalone_investment_transaction_subtype.rb +650 -0
- data/lib/plaid/models/standalone_investment_transaction_type.rb +300 -0
- data/lib/plaid/models/student_loan.rb +483 -0
- data/lib/plaid/models/student_loan_repayment_model.rb +255 -0
- data/lib/plaid/models/student_loan_status.rb +266 -0
- data/lib/plaid/models/student_repayment_plan.rb +266 -0
- data/lib/plaid/models/transaction.rb +478 -0
- data/lib/plaid/models/transaction_code.rb +48 -0
- data/lib/plaid/models/transaction_data.rb +285 -0
- data/lib/plaid/models/transaction_override.rb +280 -0
- data/lib/plaid/models/transactions_get_request.rb +284 -0
- data/lib/plaid/models/transactions_get_request_options.rb +285 -0
- data/lib/plaid/models/transactions_get_response.rb +288 -0
- data/lib/plaid/models/transactions_refresh_request.rb +240 -0
- data/lib/plaid/models/transactions_refresh_response.rb +225 -0
- data/lib/plaid/models/transactions_removed_webhook.rb +282 -0
- data/lib/plaid/models/user_custom_password.rb +297 -0
- data/lib/plaid/models/user_permission_revoked_webhook.rb +265 -0
- data/lib/plaid/models/verification_expired_webhook.rb +270 -0
- data/lib/plaid/models/verification_status.rb +40 -0
- data/lib/plaid/models/warning.rb +254 -0
- data/lib/plaid/models/webhook_update_acknowledged_webhook.rb +280 -0
- data/lib/plaid/models/webhook_verification_key_get_request.rb +245 -0
- data/lib/plaid/models/webhook_verification_key_get_response.rb +239 -0
- data/lib/plaid/models/ytd_gross_income_summary_field_number.rb +245 -0
- data/lib/plaid/models/ytd_net_income_summary_field_number.rb +245 -0
- data/lib/plaid/version.rb +13 -2
- data/plaid.gemspec +44 -49
- data/templates/ruby/api_client.mustache +266 -0
- data/templates/ruby/api_client_faraday_partial.mustache +120 -0
- data/templates/ruby/configuration.mustache +353 -0
- data/templates/ruby/gemspec.mustache +41 -0
- data/test/test_accounts.rb +103 -0
- data/test/test_asset_report.rb +147 -0
- data/test/test_auth.rb +61 -0
- data/test/test_bank_transfers.rb +219 -0
- data/test/test_categories.rb +10 -0
- data/test/test_configuration.rb +26 -0
- data/test/test_deposit_switch.rb +73 -0
- data/test/test_helper.rb +109 -0
- data/test/test_identity.rb +38 -0
- data/test/test_institutions.rb +159 -0
- data/test/test_investments.rb +205 -0
- data/test/test_item.rb +285 -0
- data/test/test_liabilities.rb +45 -0
- data/test/test_link_token.rb +97 -0
- data/test/test_payment_initiation.rb +95 -0
- data/test/test_processor.rb +67 -0
- data/test/test_transactions.rb +165 -0
- data/test/test_webhooks.rb +22 -0
- metadata +687 -99
- data/.circleci/config.yml +0 -21
- data/.env.sample +0 -3
- data/.github/workflows/add_to_project.yml +0 -21
- data/.rubocop.yml +0 -18
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/lib/plaid/client.rb +0 -190
- data/lib/plaid/errors.rb +0 -89
- data/lib/plaid/middleware.rb +0 -31
- data/lib/plaid/models.rb +0 -2144
- data/lib/plaid/products/accounts.rb +0 -63
- data/lib/plaid/products/asset_report.rb +0 -199
- data/lib/plaid/products/auth.rb +0 -42
- data/lib/plaid/products/base_product.rb +0 -64
- data/lib/plaid/products/categories.rb +0 -21
- data/lib/plaid/products/credit_details.rb +0 -40
- data/lib/plaid/products/deposit_switch.rb +0 -99
- data/lib/plaid/products/identity.rb +0 -31
- data/lib/plaid/products/income.rb +0 -31
- data/lib/plaid/products/institutions.rb +0 -91
- data/lib/plaid/products/investments.rb +0 -127
- data/lib/plaid/products/item.rb +0 -209
- data/lib/plaid/products/liabilities.rb +0 -39
- data/lib/plaid/products/link_token.rb +0 -74
- data/lib/plaid/products/payment_initiation.rb +0 -237
- data/lib/plaid/products/processor.rb +0 -190
- data/lib/plaid/products/sandbox.rb +0 -148
- data/lib/plaid/products/transactions.rb +0 -81
- data/lib/plaid/products/webhooks.rb +0 -23
@@ -0,0 +1,41 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
{{> api_info}}
|
5
|
+
=end
|
6
|
+
|
7
|
+
$:.push File.expand_path("../lib", __FILE__)
|
8
|
+
require "{{gemName}}/version"
|
9
|
+
|
10
|
+
Gem::Specification.new do |s|
|
11
|
+
s.name = "{{gemName}}{{^gemName}}{{{appName}}}{{/gemName}}"
|
12
|
+
s.version = {{moduleName}}::VERSION
|
13
|
+
s.platform = Gem::Platform::RUBY
|
14
|
+
s.authors = ["Plaid"]
|
15
|
+
s.email = ["{{gemAuthorEmail}}{{^gemAuthorEmail}}{{infoEmail}}{{/gemAuthorEmail}}"]
|
16
|
+
s.homepage = "https://plaid.com"
|
17
|
+
s.summary = "{{gemSummary}}{{^gemSummary}}{{{appName}}} Ruby Gem{{/gemSummary}}"
|
18
|
+
s.description = "Ruby gem wrapper for the Plaid API. Read more at the homepage, the wiki, or in the Plaid documentation."
|
19
|
+
s.license = "{{{gemLicense}}}{{^gemLicense}}MIT{{/gemLicense}}"
|
20
|
+
s.required_ruby_version = "{{{gemRequiredRubyVersion}}}{{^gemRequiredRubyVersion}}>= 2.4{{/gemRequiredRubyVersion}}"
|
21
|
+
|
22
|
+
{{#isFaraday}}
|
23
|
+
s.add_runtime_dependency 'faraday', '~> 1.0', '>= 1.0.1'
|
24
|
+
{{/isFaraday}}
|
25
|
+
{{^isFaraday}}
|
26
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
27
|
+
{{/isFaraday}}
|
28
|
+
|
29
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
30
|
+
s.add_development_dependency 'bundler', '~> 2.2.9'
|
31
|
+
s.add_development_dependency 'dotenv'
|
32
|
+
s.add_development_dependency 'minitest', '~> 5.14'
|
33
|
+
s.add_development_dependency 'minitest-around', '~> 0.5.0'
|
34
|
+
s.add_development_dependency 'rake', '>= 13.0'
|
35
|
+
s.add_development_dependency 'rubocop', '~> 0.91.0'
|
36
|
+
|
37
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
38
|
+
s.test_files = `find spec/*`.split("\n")
|
39
|
+
s.executables = []
|
40
|
+
s.require_paths = ["lib"]
|
41
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
require_relative "test_helper"
|
2
|
+
|
3
|
+
# Internal: The test for Plaid::AccountsGetRequest.
|
4
|
+
class PlaidAccountsTest < PlaidTest
|
5
|
+
def setup
|
6
|
+
create_item initial_products: [:transactions]
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_get
|
10
|
+
accounts_get_request = Plaid::AccountsGetRequest.new
|
11
|
+
accounts_get_request.access_token = access_token
|
12
|
+
|
13
|
+
response = client.accounts_get(accounts_get_request)
|
14
|
+
refute_empty(response.to_hash)
|
15
|
+
assert_kind_of(Plaid::AccountsGetResponse, response)
|
16
|
+
|
17
|
+
account_id = response.accounts[0].account_id
|
18
|
+
|
19
|
+
options_payload = {}
|
20
|
+
options_payload[:account_ids] = [account_id]
|
21
|
+
accounts_get_request.options = options_payload
|
22
|
+
|
23
|
+
response_w_id = client.accounts_get(accounts_get_request)
|
24
|
+
assert_equal(1, response_w_id.accounts.size)
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_get_invalid_access_token
|
28
|
+
accounts_get_request = Plaid::AccountsGetRequest.new
|
29
|
+
accounts_get_request.access_token = BAD_STRING
|
30
|
+
|
31
|
+
begin
|
32
|
+
client.accounts_get(accounts_get_request)
|
33
|
+
rescue Plaid::ApiError => e
|
34
|
+
json_response = JSON.parse(e.response_body)
|
35
|
+
assert_equal(json_response["error_code"], "INVALID_ACCESS_TOKEN")
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_get_invalid_options
|
40
|
+
accounts_get_request = Plaid::AccountsGetRequest.new
|
41
|
+
accounts_get_request.access_token = access_token
|
42
|
+
|
43
|
+
options_payload = {}
|
44
|
+
options_payload[:account_ids] = [BAD_STRING]
|
45
|
+
accounts_get_request.options = options_payload
|
46
|
+
|
47
|
+
begin
|
48
|
+
client.accounts_get(accounts_get_request)
|
49
|
+
rescue Plaid::ApiError => e
|
50
|
+
json_response = JSON.parse(e.response_body)
|
51
|
+
assert_equal(json_response["error_code"], "INVALID_FIELD")
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_balance_get
|
56
|
+
balance_get_request = Plaid::AccountsBalanceGetRequest.new
|
57
|
+
balance_get_request.access_token = access_token
|
58
|
+
|
59
|
+
response = client.accounts_balance_get(balance_get_request)
|
60
|
+
refute_empty(response.accounts)
|
61
|
+
assert_kind_of(Plaid::AccountsGetResponse, response)
|
62
|
+
|
63
|
+
account_id = response.accounts[0].account_id
|
64
|
+
|
65
|
+
options_payload = {}
|
66
|
+
options_payload[:account_ids] = [account_id]
|
67
|
+
|
68
|
+
accounts_balance_get_request = Plaid::AccountsBalanceGetRequest.new
|
69
|
+
accounts_balance_get_request.access_token = access_token
|
70
|
+
accounts_balance_get_request.options = options_payload
|
71
|
+
|
72
|
+
response_w_id = client.accounts_balance_get(accounts_balance_get_request)
|
73
|
+
assert_equal 1, response_w_id.accounts.size
|
74
|
+
end
|
75
|
+
|
76
|
+
def test_balance_get_invalid_access_token
|
77
|
+
accounts_balance_get_request = Plaid::AccountsBalanceGetRequest.new
|
78
|
+
accounts_balance_get_request.access_token = BAD_STRING
|
79
|
+
|
80
|
+
begin
|
81
|
+
client.accounts_balance_get(accounts_balance_get_request)
|
82
|
+
rescue Plaid::ApiError => e
|
83
|
+
json_response = JSON.parse(e.response_body)
|
84
|
+
assert_equal(json_response["error_code"], "INVALID_ACCESS_TOKEN")
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def test_balance_get_invalid_options
|
89
|
+
options_payload = {}
|
90
|
+
options_payload[:account_ids] = [BAD_STRING]
|
91
|
+
|
92
|
+
accounts_balance_get_request = Plaid::AccountsBalanceGetRequest.new
|
93
|
+
accounts_balance_get_request.access_token = access_token
|
94
|
+
accounts_balance_get_request.options = options_payload
|
95
|
+
|
96
|
+
begin
|
97
|
+
client.accounts_balance_get(accounts_balance_get_request)
|
98
|
+
rescue Plaid::ApiError => e
|
99
|
+
json_response = JSON.parse(e.response_body)
|
100
|
+
assert_equal(json_response["error_code"], "INVALID_FIELD")
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,147 @@
|
|
1
|
+
require_relative "test_helper"
|
2
|
+
|
3
|
+
# Internal: The test for Plaid::AssetReport.
|
4
|
+
class PlaidAssetReportTest < PlaidTest
|
5
|
+
def test_full_flow # rubocop:disable Metrics/MethodLength
|
6
|
+
# Create an item with the "assets" product.
|
7
|
+
create_item initial_products: [:assets]
|
8
|
+
|
9
|
+
# Create an asset report.
|
10
|
+
days_requested = 60
|
11
|
+
options = {
|
12
|
+
client_report_id: "123",
|
13
|
+
webhook: "https://www.example.com",
|
14
|
+
user: {
|
15
|
+
client_user_id: "789",
|
16
|
+
first_name: "Jane",
|
17
|
+
middle_name: "Leah",
|
18
|
+
last_name: "Doe",
|
19
|
+
ssn: "123-45-6789",
|
20
|
+
phone_number: "(555) 123-4567",
|
21
|
+
email: "jane.doe@example.com",
|
22
|
+
},
|
23
|
+
}
|
24
|
+
asset_report_create_request = Plaid::AssetReportCreateRequest.new
|
25
|
+
asset_report_create_request.access_tokens = [access_token]
|
26
|
+
asset_report_create_request.days_requested = days_requested
|
27
|
+
asset_report_create_request.options = options
|
28
|
+
|
29
|
+
response = client.asset_report_create(asset_report_create_request)
|
30
|
+
|
31
|
+
refute_empty(response.asset_report_id)
|
32
|
+
refute_empty(response.asset_report_token)
|
33
|
+
asset_report_token = response.asset_report_token
|
34
|
+
assert_kind_of(Plaid::AssetReportCreateResponse, response)
|
35
|
+
|
36
|
+
# Poll until report generation has finished.
|
37
|
+
response = poll_for_asset_report(asset_report_token)
|
38
|
+
refute_empty(response.report.to_hash)
|
39
|
+
assert_kind_of(Plaid::AssetReportGetResponse, response)
|
40
|
+
|
41
|
+
# Retrieve the report as an Asset Report with Insights.
|
42
|
+
asset_report_get_request = Plaid::AssetReportGetRequest.new
|
43
|
+
asset_report_get_request.asset_report_token = asset_report_token
|
44
|
+
asset_report_get_request.include_insights = true
|
45
|
+
|
46
|
+
response = client.asset_report_get(asset_report_get_request)
|
47
|
+
|
48
|
+
refute_empty(response.report.to_hash)
|
49
|
+
assert_kind_of(Plaid::AssetReportGetResponse, response)
|
50
|
+
|
51
|
+
# Get the asset report as a PDF in a tempfile.
|
52
|
+
asset_report_pdf_get_request = Plaid::AssetReportPDFGetRequest.new
|
53
|
+
asset_report_pdf_get_request.asset_report_token = asset_report_token
|
54
|
+
|
55
|
+
pdf = client.asset_report_pdf_get(asset_report_pdf_get_request)
|
56
|
+
refute_empty(pdf.path)
|
57
|
+
assert_kind_of(Tempfile, pdf)
|
58
|
+
|
59
|
+
# Test opening pdf contents
|
60
|
+
# require 'fileutils'
|
61
|
+
# FileUtils.mv(pdf.path, "test.pdf")
|
62
|
+
|
63
|
+
# # Create a filtered copy of the report.
|
64
|
+
account_ids_to_exclude = [response.report.items[0].accounts[0].account_id]
|
65
|
+
asset_report_filter_request = Plaid::AssetReportFilterRequest.new
|
66
|
+
asset_report_filter_request.asset_report_token = asset_report_token
|
67
|
+
asset_report_filter_request.account_ids_to_exclude = account_ids_to_exclude
|
68
|
+
|
69
|
+
response = client.asset_report_filter(
|
70
|
+
asset_report_filter_request
|
71
|
+
)
|
72
|
+
refute_empty(response.asset_report_token)
|
73
|
+
assert_kind_of(Plaid::AssetReportFilterResponse, response)
|
74
|
+
|
75
|
+
response = poll_for_asset_report(asset_report_token)
|
76
|
+
refute_empty(response.report.to_hash)
|
77
|
+
assert_kind_of(Plaid::AssetReportGetResponse, response)
|
78
|
+
|
79
|
+
# Create refreshed copy of the report.
|
80
|
+
asset_report_refresh_request = Plaid::AssetReportRefreshRequest.new
|
81
|
+
asset_report_refresh_request.asset_report_token = asset_report_token
|
82
|
+
asset_report_refresh_request.days_requested = 10
|
83
|
+
|
84
|
+
response = client.asset_report_refresh(asset_report_refresh_request)
|
85
|
+
refute_empty(response.asset_report_token)
|
86
|
+
assert_kind_of(Plaid::AssetReportRefreshResponse, response)
|
87
|
+
|
88
|
+
response = poll_for_asset_report(response.asset_report_token)
|
89
|
+
refute_empty(response.report.to_hash)
|
90
|
+
assert_kind_of(Plaid::AssetReportGetResponse, response)
|
91
|
+
|
92
|
+
# Create an audit copy token.
|
93
|
+
asset_report_audit_copy_create_request = Plaid::AssetReportAuditCopyCreateRequest.new
|
94
|
+
asset_report_audit_copy_create_request.asset_report_token = asset_report_token
|
95
|
+
asset_report_audit_copy_create_request.auditor_id = @client_id
|
96
|
+
|
97
|
+
response = client.asset_report_audit_copy_create(
|
98
|
+
asset_report_audit_copy_create_request
|
99
|
+
)
|
100
|
+
audit_copy_token = response.audit_copy_token
|
101
|
+
refute_empty(audit_copy_token)
|
102
|
+
assert_kind_of(Plaid::AssetReportAuditCopyCreateResponse, response)
|
103
|
+
|
104
|
+
# Get the audit copy.
|
105
|
+
asset_report_audit_copy_get_request = Plaid:: AssetReportAuditCopyGetRequest.new
|
106
|
+
asset_report_audit_copy_get_request.audit_copy_token = audit_copy_token
|
107
|
+
|
108
|
+
response = @client.asset_report_audit_copy_get(asset_report_audit_copy_get_request)
|
109
|
+
refute_empty(response.report.to_hash)
|
110
|
+
assert_kind_of(Plaid::AssetReportGetResponse, response)
|
111
|
+
|
112
|
+
# Remove the audit copy.
|
113
|
+
asset_report_audit_copy_remove_request = Plaid::AssetReportAuditCopyRemoveRequest.new
|
114
|
+
asset_report_audit_copy_remove_request.audit_copy_token = audit_copy_token
|
115
|
+
|
116
|
+
response = @client.asset_report_audit_copy_remove(asset_report_audit_copy_remove_request)
|
117
|
+
assert_equal(response.removed, true)
|
118
|
+
assert_kind_of(Plaid::AssetReportAuditCopyRemoveResponse, response)
|
119
|
+
|
120
|
+
# Remove the asset report.
|
121
|
+
asset_report_remove_request = Plaid::AssetReportRemoveRequest.new
|
122
|
+
asset_report_remove_request.asset_report_token = asset_report_token
|
123
|
+
|
124
|
+
response = @client.asset_report_remove(asset_report_remove_request)
|
125
|
+
assert_equal(response.removed, true)
|
126
|
+
assert_kind_of(Plaid::AssetReportRemoveResponse, response)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
def poll_for_asset_report(asset_report_token)
|
131
|
+
response = nil
|
132
|
+
50.times do
|
133
|
+
begin
|
134
|
+
asset_report_get_request = Plaid::AssetReportGetRequest.new
|
135
|
+
asset_report_get_request.asset_report_token = asset_report_token
|
136
|
+
|
137
|
+
response = @client.asset_report_get(asset_report_get_request)
|
138
|
+
break
|
139
|
+
rescue Plaid::ApiError => e
|
140
|
+
json_response = JSON.parse(e.response_body)
|
141
|
+
raise e if json_response["error_code"] != "PRODUCT_NOT_READY"
|
142
|
+
sleep 1
|
143
|
+
end
|
144
|
+
end
|
145
|
+
assert response, "Timed out while waiting for asset report generation"
|
146
|
+
response
|
147
|
+
end
|
data/test/test_auth.rb
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
require_relative 'test_helper'
|
2
|
+
|
3
|
+
# Internal: The test for Plaid::Auth.
|
4
|
+
class PlaidAuthTest < PlaidTest
|
5
|
+
def setup
|
6
|
+
create_item initial_products: [:auth]
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_get
|
10
|
+
auth_get_request = Plaid::AuthGetRequest.new
|
11
|
+
auth_get_request.access_token = access_token
|
12
|
+
|
13
|
+
response = client.auth_get(auth_get_request)
|
14
|
+
assert_kind_of(Plaid::AuthGetResponse, response)
|
15
|
+
|
16
|
+
refute_empty(response.accounts)
|
17
|
+
refute_nil(response.numbers)
|
18
|
+
assert_kind_of(Plaid::AuthGetNumbers, response.numbers)
|
19
|
+
|
20
|
+
account_id = response.accounts[0].account_id
|
21
|
+
auth_get_request = Plaid::AuthGetRequest.new
|
22
|
+
|
23
|
+
options_payload = {}
|
24
|
+
options_payload[:account_ids] = [account_id]
|
25
|
+
|
26
|
+
auth_get_request.access_token = access_token
|
27
|
+
auth_get_request.options = options_payload
|
28
|
+
|
29
|
+
response = client.auth_get(auth_get_request)
|
30
|
+
assert_equal 1, response.numbers.ach.size
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_get_invalid_access_token
|
34
|
+
auth_get_request = Plaid::AuthGetRequest.new
|
35
|
+
auth_get_request.access_token = BAD_STRING
|
36
|
+
|
37
|
+
begin
|
38
|
+
client.auth_get(auth_get_request)
|
39
|
+
rescue Plaid::ApiError => e
|
40
|
+
json_response = JSON.parse(e.response_body)
|
41
|
+
assert_equal(json_response["error_code"], "INVALID_ACCESS_TOKEN")
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_get_invalid_options
|
46
|
+
auth_get_request = Plaid::AuthGetRequest.new
|
47
|
+
|
48
|
+
options_payload = {}
|
49
|
+
options_payload[:account_ids] = [BAD_STRING]
|
50
|
+
|
51
|
+
auth_get_request.access_token = access_token
|
52
|
+
auth_get_request.options = options_payload
|
53
|
+
|
54
|
+
begin
|
55
|
+
client.auth_get(auth_get_request)
|
56
|
+
rescue Plaid::ApiError => e
|
57
|
+
json_response = JSON.parse(e.response_body)
|
58
|
+
assert_equal(json_response["error_code"], "INVALID_FIELD")
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,219 @@
|
|
1
|
+
require_relative "test_helper"
|
2
|
+
|
3
|
+
# Internal: The test for Plaid::BankTransfers.
|
4
|
+
class PlaidBankTransfersTest < PlaidTest
|
5
|
+
attr_reader :account
|
6
|
+
|
7
|
+
def setup
|
8
|
+
create_item initial_products: [:auth]
|
9
|
+
|
10
|
+
accounts_get_request = Plaid::AccountsGetRequest.new({
|
11
|
+
:access_token => access_token,
|
12
|
+
})
|
13
|
+
|
14
|
+
account_resp = client.accounts_get(accounts_get_request)
|
15
|
+
@account = account_resp.accounts[0]
|
16
|
+
end
|
17
|
+
|
18
|
+
# Helper method to create a bank transfer
|
19
|
+
def create_bank_transfer
|
20
|
+
bank_transfer_create_request = Plaid::BankTransferCreateRequest.new(
|
21
|
+
{
|
22
|
+
:idempotency_key => Random.rand(0..1_000_000_000).to_s,
|
23
|
+
:access_token => access_token,
|
24
|
+
:account_id => account.account_id,
|
25
|
+
:type => Plaid::BankTransferType::CREDIT,
|
26
|
+
:network => Plaid::BankTransferNetwork::ACH,
|
27
|
+
:amount => "1.00",
|
28
|
+
:iso_currency_code => "USD",
|
29
|
+
:description => "plaid",
|
30
|
+
:ach_class => "ppd",
|
31
|
+
:user => {
|
32
|
+
legal_name: "Firstname Lastname",
|
33
|
+
},
|
34
|
+
}
|
35
|
+
)
|
36
|
+
|
37
|
+
create_response = client.bank_transfer_create(bank_transfer_create_request)
|
38
|
+
refute_nil(create_response)
|
39
|
+
assert_kind_of(Plaid::BankTransfer, create_response.bank_transfer)
|
40
|
+
refute_nil(create_response.bank_transfer.id)
|
41
|
+
assert_equal(account.account_id, create_response.bank_transfer.account_id)
|
42
|
+
create_response.bank_transfer
|
43
|
+
end
|
44
|
+
|
45
|
+
# Used in case data is slow to propagate to read replica DB
|
46
|
+
def request_and_retry(func, bt)
|
47
|
+
num_retries = 3
|
48
|
+
retries = 0
|
49
|
+
while retries < num_retries
|
50
|
+
retries += 1
|
51
|
+
begin
|
52
|
+
res = func.call(bt)
|
53
|
+
rescue Exception => e
|
54
|
+
if retries < num_retries
|
55
|
+
puts "retrying failed test after sleeping for 1 second"
|
56
|
+
sleep(1)
|
57
|
+
next
|
58
|
+
else
|
59
|
+
puts "failed after retries"
|
60
|
+
raise e
|
61
|
+
end
|
62
|
+
end
|
63
|
+
return
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def create_and_post_bank_transfer
|
68
|
+
bank_transfer = create_bank_transfer
|
69
|
+
checks = lambda do |bank_transfer|
|
70
|
+
sandbox_bank_transfer_simulate_request = Plaid::SandboxBankTransferSimulateRequest.new(
|
71
|
+
{
|
72
|
+
:bank_transfer_id => bank_transfer.id,
|
73
|
+
:event_type => Plaid::BankTransferEventType::POSTED,
|
74
|
+
}
|
75
|
+
)
|
76
|
+
|
77
|
+
simulate_response = client.sandbox_bank_transfer_simulate(sandbox_bank_transfer_simulate_request)
|
78
|
+
refute_nil(simulate_response)
|
79
|
+
assert_kind_of(Plaid::SandboxBankTransferSimulateResponse, simulate_response)
|
80
|
+
end
|
81
|
+
request_and_retry(checks, bank_transfer)
|
82
|
+
bank_transfer
|
83
|
+
end
|
84
|
+
|
85
|
+
def test_create_success
|
86
|
+
create_bank_transfer
|
87
|
+
end
|
88
|
+
|
89
|
+
def test_create_invalid_field
|
90
|
+
begin
|
91
|
+
client.bank_transfer_create({})
|
92
|
+
rescue Plaid::ApiError => e
|
93
|
+
json_response = JSON.parse(e.response_body)
|
94
|
+
assert_equal(json_response["error_code"], "MISSING_FIELDS")
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
def test_sandbox_bank_transfer_simulate_success
|
99
|
+
create_and_post_bank_transfer
|
100
|
+
end
|
101
|
+
|
102
|
+
def test_cancel_success
|
103
|
+
bank_transfer = create_bank_transfer
|
104
|
+
checks = lambda do |bank_transfer|
|
105
|
+
bank_transfer_cancel_request = Plaid::BankTransferCancelRequest.new({
|
106
|
+
:bank_transfer_id => bank_transfer.id,
|
107
|
+
})
|
108
|
+
|
109
|
+
cancel_response = client.bank_transfer_cancel(bank_transfer_cancel_request)
|
110
|
+
refute_nil(cancel_response)
|
111
|
+
assert_kind_of(Plaid::BankTransferCancelResponse, cancel_response)
|
112
|
+
end
|
113
|
+
request_and_retry(checks, bank_transfer)
|
114
|
+
end
|
115
|
+
|
116
|
+
def test_cancel_not_cancelable
|
117
|
+
bank_transfer = create_and_post_bank_transfer
|
118
|
+
|
119
|
+
bank_transfer_cancel_request = Plaid::BankTransferCancelRequest.new({
|
120
|
+
:bank_transfer_id => bank_transfer.id,
|
121
|
+
})
|
122
|
+
|
123
|
+
begin
|
124
|
+
client.bank_transfer_cancel(bank_transfer_cancel_request)
|
125
|
+
rescue Plaid::ApiError => e
|
126
|
+
json_response = JSON.parse(e.response_body)
|
127
|
+
assert_equal(json_response["error_code"], "BANK_TRANSFER_NOT_CANCELLABLE")
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
def test_migrate_account_success
|
132
|
+
migrate_account_request = Plaid::BankTransferMigrateAccountRequest.new({
|
133
|
+
:account_number => "100000000",
|
134
|
+
:routing_number => "121122676",
|
135
|
+
:account_type => "checking",
|
136
|
+
})
|
137
|
+
|
138
|
+
migrate_account_response = client.bank_transfer_migrate_account(migrate_account_request)
|
139
|
+
refute_nil(migrate_account_response)
|
140
|
+
assert_kind_of(Plaid::BankTransferMigrateAccountResponse, migrate_account_response)
|
141
|
+
refute_nil(migrate_account_response.access_token)
|
142
|
+
refute_nil(migrate_account_response.account_id)
|
143
|
+
end
|
144
|
+
|
145
|
+
def test_origination_balance_get_success
|
146
|
+
bank_transfer_balance_get_request = Plaid::BankTransferBalanceGetRequest.new()
|
147
|
+
|
148
|
+
balance_get_response = client.bank_transfer_balance_get(bank_transfer_balance_get_request)
|
149
|
+
refute_nil(balance_get_response)
|
150
|
+
refute_nil(balance_get_response.balance)
|
151
|
+
end
|
152
|
+
|
153
|
+
def test_get_success
|
154
|
+
bank_transfer = create_bank_transfer
|
155
|
+
checks = lambda do |bank_transfer|
|
156
|
+
bank_transfer_get_request = Plaid::BankTransferGetRequest.new({
|
157
|
+
:bank_transfer_id => bank_transfer.id,
|
158
|
+
})
|
159
|
+
|
160
|
+
get_response = client.bank_transfer_get(bank_transfer_get_request)
|
161
|
+
refute_nil(get_response)
|
162
|
+
assert_kind_of(Plaid::BankTransferGetResponse, get_response)
|
163
|
+
assert_equal(get_response.bank_transfer, bank_transfer)
|
164
|
+
end
|
165
|
+
request_and_retry(checks, bank_transfer)
|
166
|
+
end
|
167
|
+
|
168
|
+
def test_list_success
|
169
|
+
bank_transfer = create_bank_transfer
|
170
|
+
checks = lambda do |bank_transfer|
|
171
|
+
bank_transfer_list_request = Plaid::BankTransferListRequest.new({
|
172
|
+
:count => 1,
|
173
|
+
})
|
174
|
+
|
175
|
+
list_response = client.bank_transfer_list(bank_transfer_list_request)
|
176
|
+
refute_nil(list_response)
|
177
|
+
assert_kind_of(Plaid::BankTransferListResponse, list_response)
|
178
|
+
refute_nil(list_response.bank_transfers)
|
179
|
+
assert_equal(1, list_response.bank_transfers.length)
|
180
|
+
assert_equal(bank_transfer, list_response.bank_transfers[0])
|
181
|
+
end
|
182
|
+
request_and_retry(checks, bank_transfer)
|
183
|
+
end
|
184
|
+
|
185
|
+
def test_event_sync_success
|
186
|
+
bank_transfer = create_and_post_bank_transfer
|
187
|
+
checks = lambda do |bank_transfer|
|
188
|
+
bank_transfer_event_sync_request = Plaid::BankTransferEventSyncRequest.new({
|
189
|
+
:after_id => 0,
|
190
|
+
})
|
191
|
+
|
192
|
+
event_sync_response = client.bank_transfer_event_sync(bank_transfer_event_sync_request)
|
193
|
+
refute_nil(event_sync_response)
|
194
|
+
assert_kind_of(Plaid::BankTransferEventSyncResponse, event_sync_response)
|
195
|
+
refute_nil(event_sync_response.bank_transfer_events)
|
196
|
+
assert(event_sync_response.bank_transfer_events.length >= 2)
|
197
|
+
end
|
198
|
+
request_and_retry(checks, bank_transfer)
|
199
|
+
end
|
200
|
+
|
201
|
+
def test_event_list_success
|
202
|
+
bank_transfer = create_and_post_bank_transfer
|
203
|
+
checks = lambda do |bank_transfer|
|
204
|
+
bank_transfer_list_request = Plaid::BankTransferEventListRequest.new({
|
205
|
+
bank_transfer_id: bank_transfer.id,
|
206
|
+
})
|
207
|
+
|
208
|
+
event_list_response = client.bank_transfer_event_list(bank_transfer_list_request)
|
209
|
+
refute_nil(event_list_response)
|
210
|
+
assert_kind_of(Plaid::BankTransferEventListResponse, event_list_response)
|
211
|
+
refute_nil(event_list_response.bank_transfer_events)
|
212
|
+
assert_equal(2, event_list_response.bank_transfer_events.length)
|
213
|
+
event_list_response.bank_transfer_events.each do |event|
|
214
|
+
assert_equal(bank_transfer.id, event.bank_transfer_id)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
request_and_retry(checks, bank_transfer)
|
218
|
+
end
|
219
|
+
end
|