plaid 13.2.0 → 14.0.0.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +73 -9
- data/CONTRIBUTING.md +2 -32
- data/Dockerfile +11 -0
- data/Gemfile.lock +45 -40
- data/LICENSE.txt +1 -1
- data/PUBLISH.md +0 -1
- data/README.md +99 -93
- 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 -2221
- 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 -251
- 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,266 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#The Plaid API
|
|
3
|
+
|
|
4
|
+
#The Plaid REST API. Please see https://plaid.com/docs/api for more details.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2020-09-14_1.5.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.0.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Plaid
|
|
17
|
+
# An object representing the repayment plan for the student loan
|
|
18
|
+
class StudentRepaymentPlan
|
|
19
|
+
# The description of the repayment plan as provided by the servicer.
|
|
20
|
+
attr_accessor :description
|
|
21
|
+
|
|
22
|
+
# The type of the repayment plan.
|
|
23
|
+
attr_accessor :type
|
|
24
|
+
|
|
25
|
+
class EnumAttributeValidator
|
|
26
|
+
attr_reader :datatype
|
|
27
|
+
attr_reader :allowable_values
|
|
28
|
+
|
|
29
|
+
def initialize(datatype, allowable_values)
|
|
30
|
+
@allowable_values = allowable_values.map do |value|
|
|
31
|
+
case datatype.to_s
|
|
32
|
+
when /Integer/i
|
|
33
|
+
value.to_i
|
|
34
|
+
when /Float/i
|
|
35
|
+
value.to_f
|
|
36
|
+
else
|
|
37
|
+
value
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def valid?(value)
|
|
43
|
+
!value || allowable_values.include?(value)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
48
|
+
def self.attribute_map
|
|
49
|
+
{
|
|
50
|
+
:'description' => :'description',
|
|
51
|
+
:'type' => :'type'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns all the JSON keys this model knows about
|
|
56
|
+
def self.acceptable_attributes
|
|
57
|
+
attribute_map.values
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Attribute type mapping.
|
|
61
|
+
def self.openapi_types
|
|
62
|
+
{
|
|
63
|
+
:'description' => :'String',
|
|
64
|
+
:'type' => :'String'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# List of attributes with nullable: true
|
|
69
|
+
def self.openapi_nullable
|
|
70
|
+
Set.new([
|
|
71
|
+
:'description',
|
|
72
|
+
:'type'
|
|
73
|
+
])
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Initializes the object
|
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
78
|
+
def initialize(attributes = {})
|
|
79
|
+
if (!attributes.is_a?(Hash))
|
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::StudentRepaymentPlan` initialize method"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
85
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::StudentRepaymentPlan`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
87
|
+
end
|
|
88
|
+
h[k.to_sym] = v
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'description')
|
|
92
|
+
self.description = attributes[:'description']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'type')
|
|
96
|
+
self.type = attributes[:'type']
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
101
|
+
# @return Array for valid properties with the reasons
|
|
102
|
+
def list_invalid_properties
|
|
103
|
+
invalid_properties = Array.new
|
|
104
|
+
invalid_properties
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Check to see if the all the properties in the model are valid
|
|
108
|
+
# @return true if the model is valid
|
|
109
|
+
def valid?
|
|
110
|
+
type_validator = EnumAttributeValidator.new('String', ["extended graduated", "extended standard", "graduated", "income-contingent repayment", "income-based repayment", "interest-only", "other", "pay as you earn", "revised pay as you earn", "standard"])
|
|
111
|
+
return false unless type_validator.valid?(@type)
|
|
112
|
+
true
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
116
|
+
# @param [Object] type Object to be assigned
|
|
117
|
+
def type=(type)
|
|
118
|
+
validator = EnumAttributeValidator.new('String', ["extended graduated", "extended standard", "graduated", "income-contingent repayment", "income-based repayment", "interest-only", "other", "pay as you earn", "revised pay as you earn", "standard"])
|
|
119
|
+
unless validator.valid?(type)
|
|
120
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
121
|
+
end
|
|
122
|
+
@type = type
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Checks equality by comparing each attribute.
|
|
126
|
+
# @param [Object] Object to be compared
|
|
127
|
+
def ==(o)
|
|
128
|
+
return true if self.equal?(o)
|
|
129
|
+
self.class == o.class &&
|
|
130
|
+
description == o.description &&
|
|
131
|
+
type == o.type
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# @see the `==` method
|
|
135
|
+
# @param [Object] Object to be compared
|
|
136
|
+
def eql?(o)
|
|
137
|
+
self == o
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Calculates hash code according to all attributes.
|
|
141
|
+
# @return [Integer] Hash code
|
|
142
|
+
def hash
|
|
143
|
+
[description, type].hash
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Builds the object from hash
|
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
148
|
+
# @return [Object] Returns the model itself
|
|
149
|
+
def self.build_from_hash(attributes)
|
|
150
|
+
new.build_from_hash(attributes)
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Builds the object from hash
|
|
154
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
155
|
+
# @return [Object] Returns the model itself
|
|
156
|
+
def build_from_hash(attributes)
|
|
157
|
+
return nil unless attributes.is_a?(Hash)
|
|
158
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
159
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
160
|
+
self.send("#{key}=", nil)
|
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
162
|
+
# check to ensure the input is an array given that the attribute
|
|
163
|
+
# is documented as an array but the input is not
|
|
164
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
165
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
166
|
+
end
|
|
167
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
168
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
self
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Deserializes the data based on type
|
|
176
|
+
# @param string type Data type
|
|
177
|
+
# @param string value Value to be deserialized
|
|
178
|
+
# @return [Object] Deserialized data
|
|
179
|
+
def _deserialize(type, value)
|
|
180
|
+
case type.to_sym
|
|
181
|
+
when :Time
|
|
182
|
+
Time.parse(value)
|
|
183
|
+
when :Date
|
|
184
|
+
Date.parse(value)
|
|
185
|
+
when :String
|
|
186
|
+
value.to_s
|
|
187
|
+
when :Integer
|
|
188
|
+
value.to_i
|
|
189
|
+
when :Float
|
|
190
|
+
value.to_f
|
|
191
|
+
when :Boolean
|
|
192
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
193
|
+
true
|
|
194
|
+
else
|
|
195
|
+
false
|
|
196
|
+
end
|
|
197
|
+
when :Object
|
|
198
|
+
# generic object (usually a Hash), return directly
|
|
199
|
+
value
|
|
200
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
201
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
202
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
203
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
204
|
+
k_type = Regexp.last_match[:k_type]
|
|
205
|
+
v_type = Regexp.last_match[:v_type]
|
|
206
|
+
{}.tap do |hash|
|
|
207
|
+
value.each do |k, v|
|
|
208
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
else # model
|
|
212
|
+
# models (e.g. Pet) or oneOf
|
|
213
|
+
klass = Plaid.const_get(type)
|
|
214
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Returns the string representation of the object
|
|
219
|
+
# @return [String] String presentation of the object
|
|
220
|
+
def to_s
|
|
221
|
+
to_hash.to_s
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
225
|
+
# @return [Hash] Returns the object in the form of hash
|
|
226
|
+
def to_body
|
|
227
|
+
to_hash
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Returns the object in the form of hash
|
|
231
|
+
# @return [Hash] Returns the object in the form of hash
|
|
232
|
+
def to_hash
|
|
233
|
+
hash = {}
|
|
234
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
235
|
+
value = self.send(attr)
|
|
236
|
+
if value.nil?
|
|
237
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
238
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
hash[param] = _to_hash(value)
|
|
242
|
+
end
|
|
243
|
+
hash
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Outputs non-array value in the form of hash
|
|
247
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
248
|
+
# @param [Object] value Any valid value
|
|
249
|
+
# @return [Hash] Returns the value in the form of hash
|
|
250
|
+
def _to_hash(value)
|
|
251
|
+
if value.is_a?(Array)
|
|
252
|
+
value.compact.map { |v| _to_hash(v) }
|
|
253
|
+
elsif value.is_a?(Hash)
|
|
254
|
+
{}.tap do |hash|
|
|
255
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
256
|
+
end
|
|
257
|
+
elsif value.respond_to? :to_hash
|
|
258
|
+
value.to_hash
|
|
259
|
+
else
|
|
260
|
+
value
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
end
|
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#The Plaid API
|
|
3
|
+
|
|
4
|
+
#The Plaid REST API. Please see https://plaid.com/docs/api for more details.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2020-09-14_1.5.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.0.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Plaid
|
|
17
|
+
# A representation of a transaction
|
|
18
|
+
class Transaction
|
|
19
|
+
# Please use the `payment_channel` field, `transaction_type` will be deprecated in the future. `digital:` transactions that took place online. `place:` transactions that were made at a physical location. `special:` transactions that relate to banks, e.g. fees or deposits. `unresolved:` transactions that do not fit into the other three types.
|
|
20
|
+
attr_accessor :transaction_type
|
|
21
|
+
|
|
22
|
+
# The unique ID of the transaction. Like all Plaid identifiers, the `transaction_id` is case sensitive.
|
|
23
|
+
attr_accessor :transaction_id
|
|
24
|
+
|
|
25
|
+
# The name of the account owner. This field is not typically populated and only relevant when dealing with sub-accounts.
|
|
26
|
+
attr_accessor :account_owner
|
|
27
|
+
|
|
28
|
+
# The ID of a posted transaction's associated pending transaction, where applicable.
|
|
29
|
+
attr_accessor :pending_transaction_id
|
|
30
|
+
|
|
31
|
+
# When `true`, identifies the transaction as pending or unsettled. Pending transaction details (name, type, amount, category ID) may change before they are settled.
|
|
32
|
+
attr_accessor :pending
|
|
33
|
+
|
|
34
|
+
# 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. This field replaces the `transaction_type` field.
|
|
35
|
+
attr_accessor :payment_channel
|
|
36
|
+
|
|
37
|
+
attr_accessor :payment_meta
|
|
38
|
+
|
|
39
|
+
# The merchant name or transaction description. If the `transaction` object was returned by a Transactions endpoint such as `/transactions/get`, this field will always appear. If the `transaction` object was returned by an Assets endpoint such as `/asset_report/get/` or `/asset_report/pdf/get`, this field will only appear in an Asset Report with Insights.
|
|
40
|
+
attr_accessor :name
|
|
41
|
+
|
|
42
|
+
# The merchant name, as extracted by Plaid from the `name` field.
|
|
43
|
+
attr_accessor :merchant_name
|
|
44
|
+
|
|
45
|
+
attr_accessor :location
|
|
46
|
+
|
|
47
|
+
# The date that the transaction was authorized. Dates are returned in an ISO 8601 format ( `YYYY-MM-DD` ).
|
|
48
|
+
attr_accessor :authorized_date
|
|
49
|
+
|
|
50
|
+
# For pending transactions, the date that the transaction occurred; for posted transactions, the date that the transaction posted. Both dates are returned in an ISO 8601 format ( `YYYY-MM-DD` ).
|
|
51
|
+
attr_accessor :date
|
|
52
|
+
|
|
53
|
+
# The ID of the category to which this transaction belongs. See [Categories](https://plaid.com/docs/#category-overview). If the `transaction` object was returned by an Assets endpoint such as `/asset_report/get/` or `/asset_report/pdf/get`, this field will only appear in an Asset Report with Insights.
|
|
54
|
+
attr_accessor :category_id
|
|
55
|
+
|
|
56
|
+
# A hierarchical array of the categories to which this transaction belongs. See [Categories](https://plaid.com/docs/#category-overview). If the `transaction` object was returned by an Assets endpoint such as `/asset_report/get/` or `/asset_report/pdf/get`, this field will only appear in an Asset Report with Insights.
|
|
57
|
+
attr_accessor :category
|
|
58
|
+
|
|
59
|
+
# The unofficial currency code associated with the transaction. Always `null` if `iso_currency_code` is non-`null`. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries. See the [currency code schema](/docs/api/accounts#currency-code-schema) for a full listing of supported `iso_currency_code`s.
|
|
60
|
+
attr_accessor :unofficial_currency_code
|
|
61
|
+
|
|
62
|
+
# The ISO-4217 currency code of the transaction. Always `null` if `unofficial_currency_code` is non-null.
|
|
63
|
+
attr_accessor :iso_currency_code
|
|
64
|
+
|
|
65
|
+
# The settled value of the transaction, denominated in the account's currency, as stated in `iso_currency_code` or `unofficial_currency_code`. Positive values when money moves out of the account; negative values when money moves in. For example, debit card purchases are positive; credit card payments, direct deposits, and refunds are negative.
|
|
66
|
+
attr_accessor :amount
|
|
67
|
+
|
|
68
|
+
# The ID of the account in which this transaction occurred.
|
|
69
|
+
attr_accessor :account_id
|
|
70
|
+
|
|
71
|
+
attr_accessor :transaction_code
|
|
72
|
+
|
|
73
|
+
class EnumAttributeValidator
|
|
74
|
+
attr_reader :datatype
|
|
75
|
+
attr_reader :allowable_values
|
|
76
|
+
|
|
77
|
+
def initialize(datatype, allowable_values)
|
|
78
|
+
@allowable_values = allowable_values.map do |value|
|
|
79
|
+
case datatype.to_s
|
|
80
|
+
when /Integer/i
|
|
81
|
+
value.to_i
|
|
82
|
+
when /Float/i
|
|
83
|
+
value.to_f
|
|
84
|
+
else
|
|
85
|
+
value
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def valid?(value)
|
|
91
|
+
!value || allowable_values.include?(value)
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
96
|
+
def self.attribute_map
|
|
97
|
+
{
|
|
98
|
+
:'transaction_type' => :'transaction_type',
|
|
99
|
+
:'transaction_id' => :'transaction_id',
|
|
100
|
+
:'account_owner' => :'account_owner',
|
|
101
|
+
:'pending_transaction_id' => :'pending_transaction_id',
|
|
102
|
+
:'pending' => :'pending',
|
|
103
|
+
:'payment_channel' => :'payment_channel',
|
|
104
|
+
:'payment_meta' => :'payment_meta',
|
|
105
|
+
:'name' => :'name',
|
|
106
|
+
:'merchant_name' => :'merchant_name',
|
|
107
|
+
:'location' => :'location',
|
|
108
|
+
:'authorized_date' => :'authorized_date',
|
|
109
|
+
:'date' => :'date',
|
|
110
|
+
:'category_id' => :'category_id',
|
|
111
|
+
:'category' => :'category',
|
|
112
|
+
:'unofficial_currency_code' => :'unofficial_currency_code',
|
|
113
|
+
:'iso_currency_code' => :'iso_currency_code',
|
|
114
|
+
:'amount' => :'amount',
|
|
115
|
+
:'account_id' => :'account_id',
|
|
116
|
+
:'transaction_code' => :'transaction_code'
|
|
117
|
+
}
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Returns all the JSON keys this model knows about
|
|
121
|
+
def self.acceptable_attributes
|
|
122
|
+
attribute_map.values
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Attribute type mapping.
|
|
126
|
+
def self.openapi_types
|
|
127
|
+
{
|
|
128
|
+
:'transaction_type' => :'String',
|
|
129
|
+
:'transaction_id' => :'String',
|
|
130
|
+
:'account_owner' => :'String',
|
|
131
|
+
:'pending_transaction_id' => :'String',
|
|
132
|
+
:'pending' => :'Boolean',
|
|
133
|
+
:'payment_channel' => :'String',
|
|
134
|
+
:'payment_meta' => :'PaymentMeta',
|
|
135
|
+
:'name' => :'String',
|
|
136
|
+
:'merchant_name' => :'String',
|
|
137
|
+
:'location' => :'Location',
|
|
138
|
+
:'authorized_date' => :'String',
|
|
139
|
+
:'date' => :'String',
|
|
140
|
+
:'category_id' => :'String',
|
|
141
|
+
:'category' => :'Array<String>',
|
|
142
|
+
:'unofficial_currency_code' => :'String',
|
|
143
|
+
:'iso_currency_code' => :'String',
|
|
144
|
+
:'amount' => :'Float',
|
|
145
|
+
:'account_id' => :'String',
|
|
146
|
+
:'transaction_code' => :'TransactionCode'
|
|
147
|
+
}
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# List of attributes with nullable: true
|
|
151
|
+
def self.openapi_nullable
|
|
152
|
+
Set.new([
|
|
153
|
+
:'account_owner',
|
|
154
|
+
:'pending_transaction_id',
|
|
155
|
+
:'merchant_name',
|
|
156
|
+
:'authorized_date',
|
|
157
|
+
:'category',
|
|
158
|
+
:'unofficial_currency_code',
|
|
159
|
+
:'iso_currency_code',
|
|
160
|
+
:'transaction_code'
|
|
161
|
+
])
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Initializes the object
|
|
165
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
166
|
+
def initialize(attributes = {})
|
|
167
|
+
if (!attributes.is_a?(Hash))
|
|
168
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::Transaction` initialize method"
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
172
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
173
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
174
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::Transaction`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
175
|
+
end
|
|
176
|
+
h[k.to_sym] = v
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if attributes.key?(:'transaction_type')
|
|
180
|
+
self.transaction_type = attributes[:'transaction_type']
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'transaction_id')
|
|
184
|
+
self.transaction_id = attributes[:'transaction_id']
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if attributes.key?(:'account_owner')
|
|
188
|
+
self.account_owner = attributes[:'account_owner']
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if attributes.key?(:'pending_transaction_id')
|
|
192
|
+
self.pending_transaction_id = attributes[:'pending_transaction_id']
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if attributes.key?(:'pending')
|
|
196
|
+
self.pending = attributes[:'pending']
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if attributes.key?(:'payment_channel')
|
|
200
|
+
self.payment_channel = attributes[:'payment_channel']
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if attributes.key?(:'payment_meta')
|
|
204
|
+
self.payment_meta = attributes[:'payment_meta']
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
if attributes.key?(:'name')
|
|
208
|
+
self.name = attributes[:'name']
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if attributes.key?(:'merchant_name')
|
|
212
|
+
self.merchant_name = attributes[:'merchant_name']
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if attributes.key?(:'location')
|
|
216
|
+
self.location = attributes[:'location']
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if attributes.key?(:'authorized_date')
|
|
220
|
+
self.authorized_date = attributes[:'authorized_date']
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if attributes.key?(:'date')
|
|
224
|
+
self.date = attributes[:'date']
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if attributes.key?(:'category_id')
|
|
228
|
+
self.category_id = attributes[:'category_id']
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
if attributes.key?(:'category')
|
|
232
|
+
if (value = attributes[:'category']).is_a?(Array)
|
|
233
|
+
self.category = value
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
if attributes.key?(:'unofficial_currency_code')
|
|
238
|
+
self.unofficial_currency_code = attributes[:'unofficial_currency_code']
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
if attributes.key?(:'iso_currency_code')
|
|
242
|
+
self.iso_currency_code = attributes[:'iso_currency_code']
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
if attributes.key?(:'amount')
|
|
246
|
+
self.amount = attributes[:'amount']
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
if attributes.key?(:'account_id')
|
|
250
|
+
self.account_id = attributes[:'account_id']
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
if attributes.key?(:'transaction_code')
|
|
254
|
+
self.transaction_code = attributes[:'transaction_code']
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
259
|
+
# @return Array for valid properties with the reasons
|
|
260
|
+
def list_invalid_properties
|
|
261
|
+
invalid_properties = Array.new
|
|
262
|
+
if @transaction_id.nil?
|
|
263
|
+
invalid_properties.push('invalid value for "transaction_id", transaction_id cannot be nil.')
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
if @pending.nil?
|
|
267
|
+
invalid_properties.push('invalid value for "pending", pending cannot be nil.')
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
if @date.nil?
|
|
271
|
+
invalid_properties.push('invalid value for "date", date cannot be nil.')
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
if @amount.nil?
|
|
275
|
+
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
if @account_id.nil?
|
|
279
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
invalid_properties
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Check to see if the all the properties in the model are valid
|
|
286
|
+
# @return true if the model is valid
|
|
287
|
+
def valid?
|
|
288
|
+
transaction_type_validator = EnumAttributeValidator.new('String', ["digital", "place", "special", "unresolved"])
|
|
289
|
+
return false unless transaction_type_validator.valid?(@transaction_type)
|
|
290
|
+
return false if @transaction_id.nil?
|
|
291
|
+
return false if @pending.nil?
|
|
292
|
+
payment_channel_validator = EnumAttributeValidator.new('String', ["online", "in store", "other"])
|
|
293
|
+
return false unless payment_channel_validator.valid?(@payment_channel)
|
|
294
|
+
return false if @date.nil?
|
|
295
|
+
return false if @amount.nil?
|
|
296
|
+
return false if @account_id.nil?
|
|
297
|
+
true
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
301
|
+
# @param [Object] transaction_type Object to be assigned
|
|
302
|
+
def transaction_type=(transaction_type)
|
|
303
|
+
validator = EnumAttributeValidator.new('String', ["digital", "place", "special", "unresolved"])
|
|
304
|
+
unless validator.valid?(transaction_type)
|
|
305
|
+
fail ArgumentError, "invalid value for \"transaction_type\", must be one of #{validator.allowable_values}."
|
|
306
|
+
end
|
|
307
|
+
@transaction_type = transaction_type
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
311
|
+
# @param [Object] payment_channel Object to be assigned
|
|
312
|
+
def payment_channel=(payment_channel)
|
|
313
|
+
validator = EnumAttributeValidator.new('String', ["online", "in store", "other"])
|
|
314
|
+
unless validator.valid?(payment_channel)
|
|
315
|
+
fail ArgumentError, "invalid value for \"payment_channel\", must be one of #{validator.allowable_values}."
|
|
316
|
+
end
|
|
317
|
+
@payment_channel = payment_channel
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
# Checks equality by comparing each attribute.
|
|
321
|
+
# @param [Object] Object to be compared
|
|
322
|
+
def ==(o)
|
|
323
|
+
return true if self.equal?(o)
|
|
324
|
+
self.class == o.class &&
|
|
325
|
+
transaction_type == o.transaction_type &&
|
|
326
|
+
transaction_id == o.transaction_id &&
|
|
327
|
+
account_owner == o.account_owner &&
|
|
328
|
+
pending_transaction_id == o.pending_transaction_id &&
|
|
329
|
+
pending == o.pending &&
|
|
330
|
+
payment_channel == o.payment_channel &&
|
|
331
|
+
payment_meta == o.payment_meta &&
|
|
332
|
+
name == o.name &&
|
|
333
|
+
merchant_name == o.merchant_name &&
|
|
334
|
+
location == o.location &&
|
|
335
|
+
authorized_date == o.authorized_date &&
|
|
336
|
+
date == o.date &&
|
|
337
|
+
category_id == o.category_id &&
|
|
338
|
+
category == o.category &&
|
|
339
|
+
unofficial_currency_code == o.unofficial_currency_code &&
|
|
340
|
+
iso_currency_code == o.iso_currency_code &&
|
|
341
|
+
amount == o.amount &&
|
|
342
|
+
account_id == o.account_id &&
|
|
343
|
+
transaction_code == o.transaction_code
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# @see the `==` method
|
|
347
|
+
# @param [Object] Object to be compared
|
|
348
|
+
def eql?(o)
|
|
349
|
+
self == o
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
# Calculates hash code according to all attributes.
|
|
353
|
+
# @return [Integer] Hash code
|
|
354
|
+
def hash
|
|
355
|
+
[transaction_type, transaction_id, account_owner, pending_transaction_id, pending, payment_channel, payment_meta, name, merchant_name, location, authorized_date, date, category_id, category, unofficial_currency_code, iso_currency_code, amount, account_id, transaction_code].hash
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
# Builds the object from hash
|
|
359
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
360
|
+
# @return [Object] Returns the model itself
|
|
361
|
+
def self.build_from_hash(attributes)
|
|
362
|
+
new.build_from_hash(attributes)
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# Builds the object from hash
|
|
366
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
367
|
+
# @return [Object] Returns the model itself
|
|
368
|
+
def build_from_hash(attributes)
|
|
369
|
+
return nil unless attributes.is_a?(Hash)
|
|
370
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
371
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
372
|
+
self.send("#{key}=", nil)
|
|
373
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
374
|
+
# check to ensure the input is an array given that the attribute
|
|
375
|
+
# is documented as an array but the input is not
|
|
376
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
377
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
378
|
+
end
|
|
379
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
380
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
381
|
+
end
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
self
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
# Deserializes the data based on type
|
|
388
|
+
# @param string type Data type
|
|
389
|
+
# @param string value Value to be deserialized
|
|
390
|
+
# @return [Object] Deserialized data
|
|
391
|
+
def _deserialize(type, value)
|
|
392
|
+
case type.to_sym
|
|
393
|
+
when :Time
|
|
394
|
+
Time.parse(value)
|
|
395
|
+
when :Date
|
|
396
|
+
Date.parse(value)
|
|
397
|
+
when :String
|
|
398
|
+
value.to_s
|
|
399
|
+
when :Integer
|
|
400
|
+
value.to_i
|
|
401
|
+
when :Float
|
|
402
|
+
value.to_f
|
|
403
|
+
when :Boolean
|
|
404
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
405
|
+
true
|
|
406
|
+
else
|
|
407
|
+
false
|
|
408
|
+
end
|
|
409
|
+
when :Object
|
|
410
|
+
# generic object (usually a Hash), return directly
|
|
411
|
+
value
|
|
412
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
413
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
414
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
415
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
416
|
+
k_type = Regexp.last_match[:k_type]
|
|
417
|
+
v_type = Regexp.last_match[:v_type]
|
|
418
|
+
{}.tap do |hash|
|
|
419
|
+
value.each do |k, v|
|
|
420
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
421
|
+
end
|
|
422
|
+
end
|
|
423
|
+
else # model
|
|
424
|
+
# models (e.g. Pet) or oneOf
|
|
425
|
+
klass = Plaid.const_get(type)
|
|
426
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
427
|
+
end
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
# Returns the string representation of the object
|
|
431
|
+
# @return [String] String presentation of the object
|
|
432
|
+
def to_s
|
|
433
|
+
to_hash.to_s
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
437
|
+
# @return [Hash] Returns the object in the form of hash
|
|
438
|
+
def to_body
|
|
439
|
+
to_hash
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
# Returns the object in the form of hash
|
|
443
|
+
# @return [Hash] Returns the object in the form of hash
|
|
444
|
+
def to_hash
|
|
445
|
+
hash = {}
|
|
446
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
447
|
+
value = self.send(attr)
|
|
448
|
+
if value.nil?
|
|
449
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
450
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
451
|
+
end
|
|
452
|
+
|
|
453
|
+
hash[param] = _to_hash(value)
|
|
454
|
+
end
|
|
455
|
+
hash
|
|
456
|
+
end
|
|
457
|
+
|
|
458
|
+
# Outputs non-array value in the form of hash
|
|
459
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
460
|
+
# @param [Object] value Any valid value
|
|
461
|
+
# @return [Hash] Returns the value in the form of hash
|
|
462
|
+
def _to_hash(value)
|
|
463
|
+
if value.is_a?(Array)
|
|
464
|
+
value.compact.map { |v| _to_hash(v) }
|
|
465
|
+
elsif value.is_a?(Hash)
|
|
466
|
+
{}.tap do |hash|
|
|
467
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
468
|
+
end
|
|
469
|
+
elsif value.respond_to? :to_hash
|
|
470
|
+
value.to_hash
|
|
471
|
+
else
|
|
472
|
+
value
|
|
473
|
+
end
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
end
|
|
477
|
+
|
|
478
|
+
end
|