diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 19272949e..94c999a28 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -9,6 +9,8 @@ docs/AccountFilter.md docs/AccountFiltersResponse.md docs/AccountIdentity.md docs/AccountIdentityAllOf.md +docs/AccountIdentityMatchScore.md +docs/AccountIdentityMatchScoreAllOf.md docs/AccountProductAccess.md docs/AccountProductAccessNullable.md docs/AccountSelectionCardinality.md @@ -22,11 +24,18 @@ docs/AccountsGetResponse.md docs/Address.md docs/AddressData.md docs/AddressDataNullable.md +docs/AddressMatchScore.md docs/AddressNullable.md docs/AddressPurposeLabel.md docs/Application.md docs/ApplicationGetRequest.md docs/ApplicationGetResponse.md +docs/Asset.md +docs/AssetDetail.md +docs/AssetHolder.md +docs/AssetHolderName.md +docs/AssetOwner.md +docs/AssetOwners.md docs/AssetReport.md docs/AssetReportAuditCopyCreateRequest.md docs/AssetReportAuditCopyCreateResponse.md @@ -38,28 +47,33 @@ docs/AssetReportCreateRequestOptions.md docs/AssetReportCreateResponse.md docs/AssetReportFilterRequest.md docs/AssetReportFilterResponse.md +docs/AssetReportFreddie.md +docs/AssetReportFreddieGetRequest.md +docs/AssetReportFreddieGetResponse.md docs/AssetReportGetRequest.md +docs/AssetReportGetRequestOptions.md docs/AssetReportGetResponse.md docs/AssetReportItem.md docs/AssetReportPDFGetRequest.md +docs/AssetReportPDFGetRequestOptions.md docs/AssetReportRefreshRequest.md docs/AssetReportRefreshRequestOptions.md docs/AssetReportRefreshResponse.md -docs/AssetReportRelayCreateRequest.md -docs/AssetReportRelayCreateResponse.md -docs/AssetReportRelayGetRequest.md -docs/AssetReportRelayRefreshRequest.md -docs/AssetReportRelayRefreshResponse.md -docs/AssetReportRelayRemoveRequest.md -docs/AssetReportRelayRemoveResponse.md docs/AssetReportRemoveRequest.md docs/AssetReportRemoveResponse.md docs/AssetReportTransaction.md docs/AssetReportTransactionAllOf.md docs/AssetReportUser.md +docs/AssetTransaction.md +docs/AssetTransactionCategoryType.md +docs/AssetTransactionDescription.md +docs/AssetTransactionDetail.md +docs/AssetTransactionType.md +docs/AssetTransactions.md +docs/AssetType.md +docs/Assets.md docs/AssetsErrorWebhook.md docs/AssetsProductReadyWebhook.md -docs/AssetsRelayWebhook.md docs/AuthGetNumbers.md docs/AuthGetRequest.md docs/AuthGetRequestOptions.md @@ -109,10 +123,9 @@ docs/CauseAllOf.md docs/ClientProvidedEnhancedTransaction.md docs/ClientProvidedRawTransaction.md docs/ConnectedApplication.md +docs/Counterparty.md +docs/CounterpartyType.md docs/CountryCode.md -docs/CreateEntityScreeningRequest.md -docs/CreateEntityWatchlistScreeningReviewRequest.md -docs/CreateIndividualWatchlistScreeningReviewRequest.md docs/Credit1099.md docs/Credit1099Filer.md docs/Credit1099Payer.md @@ -145,6 +158,7 @@ docs/CreditBankIncomeWarning.md docs/CreditBankIncomeWarningCode.md docs/CreditBankIncomeWarningType.md docs/CreditCardLiability.md +docs/CreditCategory.md docs/CreditDocumentMetadata.md docs/CreditEmployerVerification.md docs/CreditEmploymentGetRequest.md @@ -159,7 +173,6 @@ docs/CreditPayStubEarnings.md docs/CreditPayStubEmployee.md docs/CreditPayStubEmployer.md docs/CreditPayStubNetPay.md -docs/CreditPayStubVerification.md docs/CreditPayrollIncomeGetRequest.md docs/CreditPayrollIncomeGetResponse.md docs/CreditPayrollIncomePrecheckRequest.md @@ -176,10 +189,20 @@ docs/CreditRelayRefreshRequest.md docs/CreditRelayRefreshResponse.md docs/CreditRelayRemoveRequest.md docs/CreditRelayRemoveResponse.md +docs/CreditSession.md +docs/CreditSessionBankIncomeResult.md +docs/CreditSessionBankIncomeStatus.md +docs/CreditSessionItemAddResult.md +docs/CreditSessionResults.md +docs/CreditSessionsGetRequest.md +docs/CreditSessionsGetResponse.md docs/CreditW2.md docs/CustomerInitiatedReturnRisk.md docs/DashboardUser.md -docs/DashboardUserResponse.md +docs/DashboardUserGetRequest.md +docs/DashboardUserGetResponse.md +docs/DashboardUserListRequest.md +docs/DashboardUserListResponse.md docs/DashboardUserStatus.md docs/DateRange.md docs/Deductions.md @@ -219,6 +242,7 @@ docs/EarningsBreakdown.md docs/EarningsBreakdownCanonicalDescription.md docs/EarningsTotal.md docs/Email.md +docs/EmailAddressMatchScore.md docs/Employee.md docs/EmployeeIncomeSummaryFieldString.md docs/Employer.md @@ -248,12 +272,9 @@ docs/EntityScreeningHitsPhoneNumberItems.md docs/EntityScreeningStatusUpdatedWebhook.md docs/EntityWatchlistCode.md docs/EntityWatchlistProgram.md -docs/EntityWatchlistProgramResponse.md docs/EntityWatchlistScreening.md docs/EntityWatchlistScreeningHit.md -docs/EntityWatchlistScreeningResponse.md docs/EntityWatchlistScreeningReview.md -docs/EntityWatchlistScreeningReviewResponse.md docs/EntityWatchlistScreeningSearchTerms.md docs/EntityWatchlistSearchTerms.md docs/Error.md @@ -264,14 +285,22 @@ docs/ExternalPaymentRefundDetails.md docs/ExternalPaymentScheduleBase.md docs/ExternalPaymentScheduleGet.md docs/ExternalPaymentScheduleRequest.md +docs/FDXContentTypes.md +docs/FDXFiAttribute.md +docs/FDXHateoasLink.md +docs/FDXHateoasLinkAction.md +docs/FDXNotification.md +docs/FDXNotificationCategory.md +docs/FDXNotificationPayload.md +docs/FDXNotificationPayloadIdType.md +docs/FDXNotificationPriority.md +docs/FDXNotificationSeverity.md +docs/FDXNotificationType.md +docs/FDXParty.md +docs/FDXPartyRegistry.md +docs/FDXPartyType.md docs/Form1099Type.md docs/GenericScreeningHitLocationItems.md -docs/GetDashboardUserRequest.md -docs/GetEntityWatchlistScreeningRequest.md -docs/GetIdentityVerificationRequest.md -docs/GetIndividualWatchlistScreeningRequest.md -docs/GetWatchlistScreeningEntityProgramRequest.md -docs/GetWatchlistScreeningIndividualProgramRequest.md docs/HealthIncident.md docs/HistoricalBalance.md docs/HistoricalUpdateWebhook.md @@ -290,11 +319,16 @@ docs/IdentityMatchUser.md docs/IdentityUpdateTypes.md docs/IdentityVerification.md docs/IdentityVerificationCreateRequest.md +docs/IdentityVerificationCreateResponse.md +docs/IdentityVerificationGetRequest.md +docs/IdentityVerificationGetResponse.md +docs/IdentityVerificationListRequest.md +docs/IdentityVerificationListResponse.md docs/IdentityVerificationRequestUser.md -docs/IdentityVerificationResponse.md docs/IdentityVerificationRetriedWebhook.md docs/IdentityVerificationRetryRequest.md docs/IdentityVerificationRetryRequestStepsObject.md +docs/IdentityVerificationRetryResponse.md docs/IdentityVerificationStatus.md docs/IdentityVerificationStatusUpdatedWebhook.md docs/IdentityVerificationStepStatus.md @@ -323,6 +357,7 @@ docs/IncomeVerificationPrecheckEmployer.md docs/IncomeVerificationPrecheckEmployerAddress.md docs/IncomeVerificationPrecheckEmployerAddressData.md docs/IncomeVerificationPrecheckMilitaryInfo.md +docs/IncomeVerificationPrecheckPayrollInstitution.md docs/IncomeVerificationPrecheckRequest.md docs/IncomeVerificationPrecheckResponse.md docs/IncomeVerificationPrecheckUser.md @@ -333,10 +368,10 @@ docs/IncomeVerificationStatusWebhook.md docs/IncomeVerificationTaxformsGetRequest.md docs/IncomeVerificationTaxformsGetResponse.md docs/IncomeVerificationWebhookStatus.md +docs/IndividualName.md docs/IndividualScreeningHitNames.md docs/IndividualWatchlistCode.md docs/IndividualWatchlistProgram.md -docs/IndividualWatchlistProgramResponse.md docs/InflowModel.md docs/InitialUpdateWebhook.md docs/Institution.md @@ -409,6 +444,12 @@ docs/LiabilitiesGetRequestOptions.md docs/LiabilitiesGetResponse.md docs/LiabilitiesObject.md docs/LiabilityOverride.md +docs/LinkDeliveryCreateRequest.md +docs/LinkDeliveryCreateResponse.md +docs/LinkDeliveryDeliveryMethod.md +docs/LinkDeliveryGetRequest.md +docs/LinkDeliveryGetResponse.md +docs/LinkDeliverySessionStatus.md docs/LinkTokenAccountFilters.md docs/LinkTokenCreateCreditFilter.md docs/LinkTokenCreateDepositoryFilter.md @@ -433,20 +474,14 @@ docs/LinkTokenEUConfig.md docs/LinkTokenGetMetadataResponse.md docs/LinkTokenGetRequest.md docs/LinkTokenGetResponse.md -docs/ListDashboardUserRequest.md -docs/ListEntityWatchlistScreeningRequest.md -docs/ListIdentityVerificationRequest.md -docs/ListIndividualWatchlistScreeningRequest.md -docs/ListWatchlistScreeningEntityHistoryRequest.md -docs/ListWatchlistScreeningEntityHitRequest.md -docs/ListWatchlistScreeningEntityProgramsRequest.md -docs/ListWatchlistScreeningEntityReviewsRequest.md -docs/ListWatchlistScreeningIndividualHistoryRequest.md -docs/ListWatchlistScreeningIndividualHitRequest.md -docs/ListWatchlistScreeningIndividualProgramsRequest.md -docs/ListWatchlistScreeningIndividualReviewsRequest.md +docs/LinkTokenInvestments.md +docs/Loan.md docs/LoanAccountSubtype.md docs/LoanFilter.md +docs/LoanIdentifier.md +docs/LoanIdentifierType.md +docs/LoanIdentifiers.md +docs/Loans.md docs/Location.md docs/MFA.md docs/MatchSummary.md @@ -456,6 +491,7 @@ docs/MortgageInterestRate.md docs/MortgageLiability.md docs/MortgagePropertyAddress.md docs/MultiDocumentRiskSignal.md +docs/NameMatchScore.md docs/NetPay.md docs/NewAccountsAvailableWebhook.md docs/Numbers.md @@ -473,21 +509,24 @@ docs/OverrideAccountType.md docs/OverrideAccounts.md docs/Owner.md docs/OwnerOverride.md +docs/OwnershipType.md docs/POBoxStatus.md docs/PSLFStatus.md -docs/PaginatedDashboardUserListResponse.md -docs/PaginatedEntityWatchlistProgramListResponse.md -docs/PaginatedEntityWatchlistScreeningHitListResponse.md -docs/PaginatedEntityWatchlistScreeningListResponse.md -docs/PaginatedEntityWatchlistScreeningReviewListResponse.md -docs/PaginatedIdentityVerificationListResponse.md -docs/PaginatedIndividualWatchlistProgramListResponse.md -docs/PaginatedIndividualWatchlistScreeningHitListResponse.md -docs/PaginatedIndividualWatchlistScreeningListResponse.md -docs/PaginatedIndividualWatchlistScreeningReviewListResponse.md -docs/PartnerCustomersCreateRequest.md -docs/PartnerCustomersCreateResponse.md -docs/PartnerEndCustomerClient.md +docs/Parties.md +docs/PartnerCustomerCreateRequest.md +docs/PartnerCustomerCreateResponse.md +docs/PartnerCustomerGetRequest.md +docs/PartnerCustomerGetResponse.md +docs/PartnerEndCustomer.md +docs/PartnerEndCustomerAddress.md +docs/PartnerEndCustomerBillingContact.md +docs/PartnerEndCustomerSecrets.md +docs/PartnerEndCustomerStatus.md +docs/PartnerEndCustomerTechnicalContact.md +docs/PartnerEndCustomerWithSecrets.md +docs/Party.md +docs/PartyIndividual.md +docs/PartyRoleType.md docs/Pay.md docs/PayFrequency.md docs/PayFrequencyValue.md @@ -499,7 +538,6 @@ docs/PayStubEarningsBreakdown.md docs/PayStubEarningsTotal.md docs/PayStubPayPeriodDetails.md docs/PayStubTaxpayerID.md -docs/PayStubVerificationAttribute.md docs/PaymentAmount.md docs/PaymentAmountCurrency.md docs/PaymentChannel.md @@ -545,7 +583,6 @@ docs/PaymentInitiationRecipientGetResponse.md docs/PaymentInitiationRecipientGetResponseAllOf.md docs/PaymentInitiationRecipientListRequest.md docs/PaymentInitiationRecipientListResponse.md -docs/PaymentInitiationRefundStatus.md docs/PaymentInitiationStandingOrderMetadata.md docs/PaymentMeta.md docs/PaymentProfileCreateRequest.md @@ -574,12 +611,11 @@ docs/PaystubOverrideEmployee.md docs/PaystubOverrideEmployeeAddress.md docs/PaystubOverrideEmployer.md docs/PaystubPayFrequency.md -docs/PaystubVerification.md -docs/PaystubVerificationStatus.md docs/PaystubYTDDetails.md docs/PendingExpirationWebhook.md docs/PersonalFinanceCategory.md docs/PhoneNumber.md +docs/PhoneNumberMatchScore.md docs/PhoneType.md docs/PhysicalDocumentCategory.md docs/PhysicalDocumentExtractedData.md @@ -614,11 +650,13 @@ docs/RecipientBACS.md docs/RecipientBACSNullable.md docs/RecurringTransactionFrequency.md docs/RecurringTransactionsUpdateWebhook.md -docs/RelayEvent.md docs/RemovedTransaction.md -docs/ReportToken.md docs/ReportType.md +docs/ReportingInformation.md docs/RiskSignalDocumentReference.md +docs/Role.md +docs/RoleDetail.md +docs/Roles.md docs/SandboxBankTransferFireWebhookRequest.md docs/SandboxBankTransferFireWebhookResponse.md docs/SandboxBankTransferSimulateRequest.md @@ -659,7 +697,12 @@ docs/ScreeningStatusUpdatedWebhook.md docs/Security.md docs/SecurityOverride.md docs/SenderBACSNullable.md +docs/Service.md +docs/ServiceProductFulfillment.md +docs/ServiceProductFulfillmentDetail.md +docs/ServiceProductFulfillmentIdentifier.md docs/ServicerAddressData.md +docs/Services.md docs/SignalAddressData.md docs/SignalDecisionReportRequest.md docs/SignalDecisionReportResponse.md @@ -680,6 +723,8 @@ docs/Source.md docs/StandaloneAccountType.md docs/StandaloneCurrencyCodeList.md docs/StandaloneInvestmentTransactionType.md +docs/Status.md +docs/Statuses.md docs/Strategy.md docs/StudentLoan.md docs/StudentLoanRepaymentModel.md @@ -688,6 +733,9 @@ docs/StudentRepaymentPlan.md docs/SyncUpdatesAvailableWebhook.md docs/Taxform.md docs/TaxpayerID.md +docs/TaxpayerIdentifier.md +docs/TaxpayerIdentifierType.md +docs/TaxpayerIdentifiers.md docs/Total.md docs/TotalCanonicalDescription.md docs/Transaction.md @@ -783,12 +831,9 @@ docs/TransferType.md docs/TransferUserAddressInRequest.md docs/TransferUserAddressInResponse.md docs/TransferUserInRequest.md +docs/TransferUserInRequestDeprecated.md docs/TransferUserInResponse.md -docs/UpdateEntityScreeningRequest.md -docs/UpdateEntityScreeningRequestResettableField.md docs/UpdateEntityScreeningRequestSearchTerms.md -docs/UpdateIndividualScreeningRequest.md -docs/UpdateIndividualScreeningRequestResettableField.md docs/UpdateIndividualScreeningRequestSearchTerms.md docs/UserAddress.md docs/UserCreateRequest.md @@ -800,8 +845,11 @@ docs/UserPermissionRevokedWebhook.md docs/UserStatedIncomeSourceCategory.md docs/UserStatedIncomeSourceFrequency.md docs/UserStatedIncomeSourcePayType.md -docs/VerificationAttribute.md +docs/ValidationSource.md +docs/ValidationSources.md docs/VerificationExpiredWebhook.md +docs/VerificationOfAsset.md +docs/VerificationOfAssetResponse.md docs/VerificationRefreshStatus.md docs/VerificationStatus.md docs/W2.md @@ -828,24 +876,65 @@ docs/WalletTransactionExecuteResponse.md docs/WalletTransactionGetRequest.md docs/WalletTransactionGetResponse.md docs/WalletTransactionStatus.md +docs/WalletTransactionStatusUpdateWebhook.md docs/WalletTransactionsListRequest.md docs/WalletTransactionsListResponse.md docs/Warning.md docs/WatchlistScreeningAuditTrail.md -docs/WatchlistScreeningCreateRequest.md docs/WatchlistScreeningDocument.md docs/WatchlistScreeningDocumentType.md +docs/WatchlistScreeningEntityCreateRequest.md +docs/WatchlistScreeningEntityCreateResponse.md +docs/WatchlistScreeningEntityGetRequest.md +docs/WatchlistScreeningEntityGetResponse.md +docs/WatchlistScreeningEntityHistoryListRequest.md +docs/WatchlistScreeningEntityHistoryListResponse.md +docs/WatchlistScreeningEntityHitListRequest.md +docs/WatchlistScreeningEntityHitListResponse.md +docs/WatchlistScreeningEntityListRequest.md +docs/WatchlistScreeningEntityListResponse.md +docs/WatchlistScreeningEntityProgramGetRequest.md +docs/WatchlistScreeningEntityProgramGetResponse.md +docs/WatchlistScreeningEntityProgramListRequest.md +docs/WatchlistScreeningEntityProgramListResponse.md +docs/WatchlistScreeningEntityReviewCreateRequest.md +docs/WatchlistScreeningEntityReviewCreateResponse.md +docs/WatchlistScreeningEntityReviewListRequest.md +docs/WatchlistScreeningEntityReviewListResponse.md +docs/WatchlistScreeningEntityUpdateRequest.md +docs/WatchlistScreeningEntityUpdateRequestResettableField.md +docs/WatchlistScreeningEntityUpdateResponse.md docs/WatchlistScreeningHit.md docs/WatchlistScreeningHitLocations.md docs/WatchlistScreeningHitStatus.md docs/WatchlistScreeningIndividual.md -docs/WatchlistScreeningIndividualResponse.md +docs/WatchlistScreeningIndividualCreateRequest.md +docs/WatchlistScreeningIndividualCreateResponse.md +docs/WatchlistScreeningIndividualGetRequest.md +docs/WatchlistScreeningIndividualGetResponse.md +docs/WatchlistScreeningIndividualHistoryListRequest.md +docs/WatchlistScreeningIndividualHistoryListResponse.md +docs/WatchlistScreeningIndividualHitListRequest.md +docs/WatchlistScreeningIndividualHitListResponse.md +docs/WatchlistScreeningIndividualListRequest.md +docs/WatchlistScreeningIndividualListResponse.md +docs/WatchlistScreeningIndividualProgramGetRequest.md +docs/WatchlistScreeningIndividualProgramGetResponse.md +docs/WatchlistScreeningIndividualProgramListRequest.md +docs/WatchlistScreeningIndividualProgramListResponse.md +docs/WatchlistScreeningIndividualReviewCreateRequest.md +docs/WatchlistScreeningIndividualReviewCreateResponse.md +docs/WatchlistScreeningIndividualReviewListRequest.md +docs/WatchlistScreeningIndividualReviewListResponse.md +docs/WatchlistScreeningIndividualUpdateRequest.md +docs/WatchlistScreeningIndividualUpdateRequestResettableField.md +docs/WatchlistScreeningIndividualUpdateResponse.md docs/WatchlistScreeningRequestSearchTerms.md docs/WatchlistScreeningReview.md -docs/WatchlistScreeningReviewResponse.md docs/WatchlistScreeningSearchTerms.md docs/WatchlistScreeningStatus.md docs/WeakAliasDetermination.md +docs/WebhookEnvironmentValues.md docs/WebhookType.md docs/WebhookUpdateAcknowledgedWebhook.md docs/WebhookVerificationKeyGetRequest.md @@ -866,6 +955,8 @@ lib/plaid/models/account_filter.rb lib/plaid/models/account_filters_response.rb lib/plaid/models/account_identity.rb lib/plaid/models/account_identity_all_of.rb +lib/plaid/models/account_identity_match_score.rb +lib/plaid/models/account_identity_match_score_all_of.rb lib/plaid/models/account_product_access.rb lib/plaid/models/account_product_access_nullable.rb lib/plaid/models/account_selection_cardinality.rb @@ -880,12 +971,19 @@ lib/plaid/models/ach_class.rb lib/plaid/models/address.rb lib/plaid/models/address_data.rb lib/plaid/models/address_data_nullable.rb +lib/plaid/models/address_match_score.rb lib/plaid/models/address_nullable.rb lib/plaid/models/address_purpose_label.rb lib/plaid/models/application.rb lib/plaid/models/application_get_request.rb lib/plaid/models/application_get_response.rb lib/plaid/models/apr.rb +lib/plaid/models/asset.rb +lib/plaid/models/asset_detail.rb +lib/plaid/models/asset_holder.rb +lib/plaid/models/asset_holder_name.rb +lib/plaid/models/asset_owner.rb +lib/plaid/models/asset_owners.rb lib/plaid/models/asset_report.rb lib/plaid/models/asset_report_audit_copy_create_request.rb lib/plaid/models/asset_report_audit_copy_create_response.rb @@ -897,28 +995,33 @@ lib/plaid/models/asset_report_create_request_options.rb lib/plaid/models/asset_report_create_response.rb lib/plaid/models/asset_report_filter_request.rb lib/plaid/models/asset_report_filter_response.rb +lib/plaid/models/asset_report_freddie.rb +lib/plaid/models/asset_report_freddie_get_request.rb +lib/plaid/models/asset_report_freddie_get_response.rb lib/plaid/models/asset_report_get_request.rb +lib/plaid/models/asset_report_get_request_options.rb lib/plaid/models/asset_report_get_response.rb lib/plaid/models/asset_report_item.rb lib/plaid/models/asset_report_pdf_get_request.rb +lib/plaid/models/asset_report_pdf_get_request_options.rb lib/plaid/models/asset_report_refresh_request.rb lib/plaid/models/asset_report_refresh_request_options.rb lib/plaid/models/asset_report_refresh_response.rb -lib/plaid/models/asset_report_relay_create_request.rb -lib/plaid/models/asset_report_relay_create_response.rb -lib/plaid/models/asset_report_relay_get_request.rb -lib/plaid/models/asset_report_relay_refresh_request.rb -lib/plaid/models/asset_report_relay_refresh_response.rb -lib/plaid/models/asset_report_relay_remove_request.rb -lib/plaid/models/asset_report_relay_remove_response.rb lib/plaid/models/asset_report_remove_request.rb lib/plaid/models/asset_report_remove_response.rb lib/plaid/models/asset_report_transaction.rb lib/plaid/models/asset_report_transaction_all_of.rb lib/plaid/models/asset_report_user.rb +lib/plaid/models/asset_transaction.rb +lib/plaid/models/asset_transaction_category_type.rb +lib/plaid/models/asset_transaction_description.rb +lib/plaid/models/asset_transaction_detail.rb +lib/plaid/models/asset_transaction_type.rb +lib/plaid/models/asset_transactions.rb +lib/plaid/models/asset_type.rb +lib/plaid/models/assets.rb lib/plaid/models/assets_error_webhook.rb lib/plaid/models/assets_product_ready_webhook.rb -lib/plaid/models/assets_relay_webhook.rb lib/plaid/models/auth_get_numbers.rb lib/plaid/models/auth_get_request.rb lib/plaid/models/auth_get_request_options.rb @@ -968,10 +1071,9 @@ lib/plaid/models/cause_all_of.rb lib/plaid/models/client_provided_enhanced_transaction.rb lib/plaid/models/client_provided_raw_transaction.rb lib/plaid/models/connected_application.rb +lib/plaid/models/counterparty.rb +lib/plaid/models/counterparty_type.rb lib/plaid/models/country_code.rb -lib/plaid/models/create_entity_screening_request.rb -lib/plaid/models/create_entity_watchlist_screening_review_request.rb -lib/plaid/models/create_individual_watchlist_screening_review_request.rb lib/plaid/models/credit1099.rb lib/plaid/models/credit1099_filer.rb lib/plaid/models/credit1099_payer.rb @@ -1004,6 +1106,7 @@ lib/plaid/models/credit_bank_income_warning.rb lib/plaid/models/credit_bank_income_warning_code.rb lib/plaid/models/credit_bank_income_warning_type.rb lib/plaid/models/credit_card_liability.rb +lib/plaid/models/credit_category.rb lib/plaid/models/credit_document_metadata.rb lib/plaid/models/credit_employer_verification.rb lib/plaid/models/credit_employment_get_request.rb @@ -1018,7 +1121,6 @@ lib/plaid/models/credit_pay_stub_earnings.rb lib/plaid/models/credit_pay_stub_employee.rb lib/plaid/models/credit_pay_stub_employer.rb lib/plaid/models/credit_pay_stub_net_pay.rb -lib/plaid/models/credit_pay_stub_verification.rb lib/plaid/models/credit_payroll_income_get_request.rb lib/plaid/models/credit_payroll_income_get_response.rb lib/plaid/models/credit_payroll_income_precheck_request.rb @@ -1035,10 +1137,20 @@ lib/plaid/models/credit_relay_refresh_request.rb lib/plaid/models/credit_relay_refresh_response.rb lib/plaid/models/credit_relay_remove_request.rb lib/plaid/models/credit_relay_remove_response.rb +lib/plaid/models/credit_session.rb +lib/plaid/models/credit_session_bank_income_result.rb +lib/plaid/models/credit_session_bank_income_status.rb +lib/plaid/models/credit_session_item_add_result.rb +lib/plaid/models/credit_session_results.rb +lib/plaid/models/credit_sessions_get_request.rb +lib/plaid/models/credit_sessions_get_response.rb lib/plaid/models/credit_w2.rb lib/plaid/models/customer_initiated_return_risk.rb lib/plaid/models/dashboard_user.rb -lib/plaid/models/dashboard_user_response.rb +lib/plaid/models/dashboard_user_get_request.rb +lib/plaid/models/dashboard_user_get_response.rb +lib/plaid/models/dashboard_user_list_request.rb +lib/plaid/models/dashboard_user_list_response.rb lib/plaid/models/dashboard_user_status.rb lib/plaid/models/date_range.rb lib/plaid/models/deductions.rb @@ -1078,6 +1190,7 @@ lib/plaid/models/earnings_breakdown.rb lib/plaid/models/earnings_breakdown_canonical_description.rb lib/plaid/models/earnings_total.rb lib/plaid/models/email.rb +lib/plaid/models/email_address_match_score.rb lib/plaid/models/employee.rb lib/plaid/models/employee_income_summary_field_string.rb lib/plaid/models/employer.rb @@ -1107,12 +1220,9 @@ lib/plaid/models/entity_screening_hits_phone_number_items.rb lib/plaid/models/entity_screening_status_updated_webhook.rb lib/plaid/models/entity_watchlist_code.rb lib/plaid/models/entity_watchlist_program.rb -lib/plaid/models/entity_watchlist_program_response.rb lib/plaid/models/entity_watchlist_screening.rb lib/plaid/models/entity_watchlist_screening_hit.rb -lib/plaid/models/entity_watchlist_screening_response.rb lib/plaid/models/entity_watchlist_screening_review.rb -lib/plaid/models/entity_watchlist_screening_review_response.rb lib/plaid/models/entity_watchlist_screening_search_terms.rb lib/plaid/models/entity_watchlist_search_terms.rb lib/plaid/models/error.rb @@ -1123,14 +1233,22 @@ lib/plaid/models/external_payment_refund_details.rb lib/plaid/models/external_payment_schedule_base.rb lib/plaid/models/external_payment_schedule_get.rb lib/plaid/models/external_payment_schedule_request.rb +lib/plaid/models/fdx_content_types.rb +lib/plaid/models/fdx_hateoas_link.rb +lib/plaid/models/fdx_hateoas_link_action.rb +lib/plaid/models/fdx_notification.rb +lib/plaid/models/fdx_notification_category.rb +lib/plaid/models/fdx_notification_payload.rb +lib/plaid/models/fdx_notification_payload_id_type.rb +lib/plaid/models/fdx_notification_priority.rb +lib/plaid/models/fdx_notification_severity.rb +lib/plaid/models/fdx_notification_type.rb +lib/plaid/models/fdx_party.rb +lib/plaid/models/fdx_party_registry.rb +lib/plaid/models/fdx_party_type.rb +lib/plaid/models/fdxfi_attribute.rb lib/plaid/models/form1099_type.rb lib/plaid/models/generic_screening_hit_location_items.rb -lib/plaid/models/get_dashboard_user_request.rb -lib/plaid/models/get_entity_watchlist_screening_request.rb -lib/plaid/models/get_identity_verification_request.rb -lib/plaid/models/get_individual_watchlist_screening_request.rb -lib/plaid/models/get_watchlist_screening_entity_program_request.rb -lib/plaid/models/get_watchlist_screening_individual_program_request.rb lib/plaid/models/health_incident.rb lib/plaid/models/historical_balance.rb lib/plaid/models/historical_update_webhook.rb @@ -1149,11 +1267,16 @@ lib/plaid/models/identity_match_user.rb lib/plaid/models/identity_update_types.rb lib/plaid/models/identity_verification.rb lib/plaid/models/identity_verification_create_request.rb +lib/plaid/models/identity_verification_create_response.rb +lib/plaid/models/identity_verification_get_request.rb +lib/plaid/models/identity_verification_get_response.rb +lib/plaid/models/identity_verification_list_request.rb +lib/plaid/models/identity_verification_list_response.rb lib/plaid/models/identity_verification_request_user.rb -lib/plaid/models/identity_verification_response.rb lib/plaid/models/identity_verification_retried_webhook.rb lib/plaid/models/identity_verification_retry_request.rb lib/plaid/models/identity_verification_retry_request_steps_object.rb +lib/plaid/models/identity_verification_retry_response.rb lib/plaid/models/identity_verification_status.rb lib/plaid/models/identity_verification_status_updated_webhook.rb lib/plaid/models/identity_verification_step_status.rb @@ -1182,6 +1305,7 @@ lib/plaid/models/income_verification_precheck_employer.rb lib/plaid/models/income_verification_precheck_employer_address.rb lib/plaid/models/income_verification_precheck_employer_address_data.rb lib/plaid/models/income_verification_precheck_military_info.rb +lib/plaid/models/income_verification_precheck_payroll_institution.rb lib/plaid/models/income_verification_precheck_request.rb lib/plaid/models/income_verification_precheck_response.rb lib/plaid/models/income_verification_precheck_user.rb @@ -1192,10 +1316,10 @@ lib/plaid/models/income_verification_status_webhook.rb lib/plaid/models/income_verification_taxforms_get_request.rb lib/plaid/models/income_verification_taxforms_get_response.rb lib/plaid/models/income_verification_webhook_status.rb +lib/plaid/models/individual_name.rb lib/plaid/models/individual_screening_hit_names.rb lib/plaid/models/individual_watchlist_code.rb lib/plaid/models/individual_watchlist_program.rb -lib/plaid/models/individual_watchlist_program_response.rb lib/plaid/models/inflow_model.rb lib/plaid/models/initial_update_webhook.rb lib/plaid/models/institution.rb @@ -1268,6 +1392,12 @@ lib/plaid/models/liabilities_get_request_options.rb lib/plaid/models/liabilities_get_response.rb lib/plaid/models/liabilities_object.rb lib/plaid/models/liability_override.rb +lib/plaid/models/link_delivery_create_request.rb +lib/plaid/models/link_delivery_create_response.rb +lib/plaid/models/link_delivery_delivery_method.rb +lib/plaid/models/link_delivery_get_request.rb +lib/plaid/models/link_delivery_get_response.rb +lib/plaid/models/link_delivery_session_status.rb lib/plaid/models/link_token_account_filters.rb lib/plaid/models/link_token_create_credit_filter.rb lib/plaid/models/link_token_create_depository_filter.rb @@ -1292,20 +1422,14 @@ lib/plaid/models/link_token_eu_config.rb lib/plaid/models/link_token_get_metadata_response.rb lib/plaid/models/link_token_get_request.rb lib/plaid/models/link_token_get_response.rb -lib/plaid/models/list_dashboard_user_request.rb -lib/plaid/models/list_entity_watchlist_screening_request.rb -lib/plaid/models/list_identity_verification_request.rb -lib/plaid/models/list_individual_watchlist_screening_request.rb -lib/plaid/models/list_watchlist_screening_entity_history_request.rb -lib/plaid/models/list_watchlist_screening_entity_hit_request.rb -lib/plaid/models/list_watchlist_screening_entity_programs_request.rb -lib/plaid/models/list_watchlist_screening_entity_reviews_request.rb -lib/plaid/models/list_watchlist_screening_individual_history_request.rb -lib/plaid/models/list_watchlist_screening_individual_hit_request.rb -lib/plaid/models/list_watchlist_screening_individual_programs_request.rb -lib/plaid/models/list_watchlist_screening_individual_reviews_request.rb +lib/plaid/models/link_token_investments.rb +lib/plaid/models/loan.rb lib/plaid/models/loan_account_subtype.rb lib/plaid/models/loan_filter.rb +lib/plaid/models/loan_identifier.rb +lib/plaid/models/loan_identifier_type.rb +lib/plaid/models/loan_identifiers.rb +lib/plaid/models/loans.rb lib/plaid/models/location.rb lib/plaid/models/match_summary.rb lib/plaid/models/match_summary_code.rb @@ -1315,6 +1439,7 @@ lib/plaid/models/mortgage_interest_rate.rb lib/plaid/models/mortgage_liability.rb lib/plaid/models/mortgage_property_address.rb lib/plaid/models/multi_document_risk_signal.rb +lib/plaid/models/name_match_score.rb lib/plaid/models/net_pay.rb lib/plaid/models/new_accounts_available_webhook.rb lib/plaid/models/numbers.rb @@ -1332,19 +1457,22 @@ lib/plaid/models/override_account_type.rb lib/plaid/models/override_accounts.rb lib/plaid/models/owner.rb lib/plaid/models/owner_override.rb -lib/plaid/models/paginated_dashboard_user_list_response.rb -lib/plaid/models/paginated_entity_watchlist_program_list_response.rb -lib/plaid/models/paginated_entity_watchlist_screening_hit_list_response.rb -lib/plaid/models/paginated_entity_watchlist_screening_list_response.rb -lib/plaid/models/paginated_entity_watchlist_screening_review_list_response.rb -lib/plaid/models/paginated_identity_verification_list_response.rb -lib/plaid/models/paginated_individual_watchlist_program_list_response.rb -lib/plaid/models/paginated_individual_watchlist_screening_hit_list_response.rb -lib/plaid/models/paginated_individual_watchlist_screening_list_response.rb -lib/plaid/models/paginated_individual_watchlist_screening_review_list_response.rb -lib/plaid/models/partner_customers_create_request.rb -lib/plaid/models/partner_customers_create_response.rb -lib/plaid/models/partner_end_customer_client.rb +lib/plaid/models/ownership_type.rb +lib/plaid/models/parties.rb +lib/plaid/models/partner_customer_create_request.rb +lib/plaid/models/partner_customer_create_response.rb +lib/plaid/models/partner_customer_get_request.rb +lib/plaid/models/partner_customer_get_response.rb +lib/plaid/models/partner_end_customer.rb +lib/plaid/models/partner_end_customer_address.rb +lib/plaid/models/partner_end_customer_billing_contact.rb +lib/plaid/models/partner_end_customer_secrets.rb +lib/plaid/models/partner_end_customer_status.rb +lib/plaid/models/partner_end_customer_technical_contact.rb +lib/plaid/models/partner_end_customer_with_secrets.rb +lib/plaid/models/party.rb +lib/plaid/models/party_individual.rb +lib/plaid/models/party_role_type.rb lib/plaid/models/pay.rb lib/plaid/models/pay_frequency.rb lib/plaid/models/pay_frequency_value.rb @@ -1356,7 +1484,6 @@ lib/plaid/models/pay_stub_earnings_breakdown.rb lib/plaid/models/pay_stub_earnings_total.rb lib/plaid/models/pay_stub_pay_period_details.rb lib/plaid/models/pay_stub_taxpayer_id.rb -lib/plaid/models/pay_stub_verification_attribute.rb lib/plaid/models/payment_amount.rb lib/plaid/models/payment_amount_currency.rb lib/plaid/models/payment_channel.rb @@ -1402,7 +1529,6 @@ lib/plaid/models/payment_initiation_recipient_get_response.rb lib/plaid/models/payment_initiation_recipient_get_response_all_of.rb lib/plaid/models/payment_initiation_recipient_list_request.rb lib/plaid/models/payment_initiation_recipient_list_response.rb -lib/plaid/models/payment_initiation_refund_status.rb lib/plaid/models/payment_initiation_standing_order_metadata.rb lib/plaid/models/payment_meta.rb lib/plaid/models/payment_profile_create_request.rb @@ -1431,12 +1557,11 @@ lib/plaid/models/paystub_override_employee.rb lib/plaid/models/paystub_override_employee_address.rb lib/plaid/models/paystub_override_employer.rb lib/plaid/models/paystub_pay_frequency.rb -lib/plaid/models/paystub_verification.rb -lib/plaid/models/paystub_verification_status.rb lib/plaid/models/paystub_ytd_details.rb lib/plaid/models/pending_expiration_webhook.rb lib/plaid/models/personal_finance_category.rb lib/plaid/models/phone_number.rb +lib/plaid/models/phone_number_match_score.rb lib/plaid/models/phone_type.rb lib/plaid/models/physical_document_category.rb lib/plaid/models/physical_document_extracted_data.rb @@ -1472,11 +1597,13 @@ lib/plaid/models/recipient_bacs.rb lib/plaid/models/recipient_bacs_nullable.rb lib/plaid/models/recurring_transaction_frequency.rb lib/plaid/models/recurring_transactions_update_webhook.rb -lib/plaid/models/relay_event.rb lib/plaid/models/removed_transaction.rb -lib/plaid/models/report_token.rb lib/plaid/models/report_type.rb +lib/plaid/models/reporting_information.rb lib/plaid/models/risk_signal_document_reference.rb +lib/plaid/models/role.rb +lib/plaid/models/role_detail.rb +lib/plaid/models/roles.rb lib/plaid/models/sandbox_bank_transfer_fire_webhook_request.rb lib/plaid/models/sandbox_bank_transfer_fire_webhook_response.rb lib/plaid/models/sandbox_bank_transfer_simulate_request.rb @@ -1517,7 +1644,12 @@ lib/plaid/models/screening_status_updated_webhook.rb lib/plaid/models/security.rb lib/plaid/models/security_override.rb lib/plaid/models/sender_bacs_nullable.rb +lib/plaid/models/service.rb +lib/plaid/models/service_product_fulfillment.rb +lib/plaid/models/service_product_fulfillment_detail.rb +lib/plaid/models/service_product_fulfillment_identifier.rb lib/plaid/models/servicer_address_data.rb +lib/plaid/models/services.rb lib/plaid/models/signal_address_data.rb lib/plaid/models/signal_decision_report_request.rb lib/plaid/models/signal_decision_report_response.rb @@ -1538,6 +1670,8 @@ lib/plaid/models/source.rb lib/plaid/models/standalone_account_type.rb lib/plaid/models/standalone_currency_code_list.rb lib/plaid/models/standalone_investment_transaction_type.rb +lib/plaid/models/status.rb +lib/plaid/models/statuses.rb lib/plaid/models/strategy.rb lib/plaid/models/student_loan.rb lib/plaid/models/student_loan_repayment_model.rb @@ -1546,6 +1680,9 @@ lib/plaid/models/student_repayment_plan.rb lib/plaid/models/sync_updates_available_webhook.rb lib/plaid/models/taxform.rb lib/plaid/models/taxpayer_id.rb +lib/plaid/models/taxpayer_identifier.rb +lib/plaid/models/taxpayer_identifier_type.rb +lib/plaid/models/taxpayer_identifiers.rb lib/plaid/models/total.rb lib/plaid/models/total_canonical_description.rb lib/plaid/models/transaction.rb @@ -1641,12 +1778,9 @@ lib/plaid/models/transfer_type.rb lib/plaid/models/transfer_user_address_in_request.rb lib/plaid/models/transfer_user_address_in_response.rb lib/plaid/models/transfer_user_in_request.rb +lib/plaid/models/transfer_user_in_request_deprecated.rb lib/plaid/models/transfer_user_in_response.rb -lib/plaid/models/update_entity_screening_request.rb -lib/plaid/models/update_entity_screening_request_resettable_field.rb lib/plaid/models/update_entity_screening_request_search_terms.rb -lib/plaid/models/update_individual_screening_request.rb -lib/plaid/models/update_individual_screening_request_resettable_field.rb lib/plaid/models/update_individual_screening_request_search_terms.rb lib/plaid/models/user_address.rb lib/plaid/models/user_create_request.rb @@ -1658,8 +1792,11 @@ lib/plaid/models/user_permission_revoked_webhook.rb lib/plaid/models/user_stated_income_source_category.rb lib/plaid/models/user_stated_income_source_frequency.rb lib/plaid/models/user_stated_income_source_pay_type.rb -lib/plaid/models/verification_attribute.rb +lib/plaid/models/validation_source.rb +lib/plaid/models/validation_sources.rb lib/plaid/models/verification_expired_webhook.rb +lib/plaid/models/verification_of_asset.rb +lib/plaid/models/verification_of_asset_response.rb lib/plaid/models/verification_refresh_status.rb lib/plaid/models/verification_status.rb lib/plaid/models/w2.rb @@ -1686,24 +1823,65 @@ lib/plaid/models/wallet_transaction_execute_response.rb lib/plaid/models/wallet_transaction_get_request.rb lib/plaid/models/wallet_transaction_get_response.rb lib/plaid/models/wallet_transaction_status.rb +lib/plaid/models/wallet_transaction_status_update_webhook.rb lib/plaid/models/wallet_transactions_list_request.rb lib/plaid/models/wallet_transactions_list_response.rb lib/plaid/models/warning.rb lib/plaid/models/watchlist_screening_audit_trail.rb -lib/plaid/models/watchlist_screening_create_request.rb lib/plaid/models/watchlist_screening_document.rb lib/plaid/models/watchlist_screening_document_type.rb +lib/plaid/models/watchlist_screening_entity_create_request.rb +lib/plaid/models/watchlist_screening_entity_create_response.rb +lib/plaid/models/watchlist_screening_entity_get_request.rb +lib/plaid/models/watchlist_screening_entity_get_response.rb +lib/plaid/models/watchlist_screening_entity_history_list_request.rb +lib/plaid/models/watchlist_screening_entity_history_list_response.rb +lib/plaid/models/watchlist_screening_entity_hit_list_request.rb +lib/plaid/models/watchlist_screening_entity_hit_list_response.rb +lib/plaid/models/watchlist_screening_entity_list_request.rb +lib/plaid/models/watchlist_screening_entity_list_response.rb +lib/plaid/models/watchlist_screening_entity_program_get_request.rb +lib/plaid/models/watchlist_screening_entity_program_get_response.rb +lib/plaid/models/watchlist_screening_entity_program_list_request.rb +lib/plaid/models/watchlist_screening_entity_program_list_response.rb +lib/plaid/models/watchlist_screening_entity_review_create_request.rb +lib/plaid/models/watchlist_screening_entity_review_create_response.rb +lib/plaid/models/watchlist_screening_entity_review_list_request.rb +lib/plaid/models/watchlist_screening_entity_review_list_response.rb +lib/plaid/models/watchlist_screening_entity_update_request.rb +lib/plaid/models/watchlist_screening_entity_update_request_resettable_field.rb +lib/plaid/models/watchlist_screening_entity_update_response.rb lib/plaid/models/watchlist_screening_hit.rb lib/plaid/models/watchlist_screening_hit_locations.rb lib/plaid/models/watchlist_screening_hit_status.rb lib/plaid/models/watchlist_screening_individual.rb -lib/plaid/models/watchlist_screening_individual_response.rb +lib/plaid/models/watchlist_screening_individual_create_request.rb +lib/plaid/models/watchlist_screening_individual_create_response.rb +lib/plaid/models/watchlist_screening_individual_get_request.rb +lib/plaid/models/watchlist_screening_individual_get_response.rb +lib/plaid/models/watchlist_screening_individual_history_list_request.rb +lib/plaid/models/watchlist_screening_individual_history_list_response.rb +lib/plaid/models/watchlist_screening_individual_hit_list_request.rb +lib/plaid/models/watchlist_screening_individual_hit_list_response.rb +lib/plaid/models/watchlist_screening_individual_list_request.rb +lib/plaid/models/watchlist_screening_individual_list_response.rb +lib/plaid/models/watchlist_screening_individual_program_get_request.rb +lib/plaid/models/watchlist_screening_individual_program_get_response.rb +lib/plaid/models/watchlist_screening_individual_program_list_request.rb +lib/plaid/models/watchlist_screening_individual_program_list_response.rb +lib/plaid/models/watchlist_screening_individual_review_create_request.rb +lib/plaid/models/watchlist_screening_individual_review_create_response.rb +lib/plaid/models/watchlist_screening_individual_review_list_request.rb +lib/plaid/models/watchlist_screening_individual_review_list_response.rb +lib/plaid/models/watchlist_screening_individual_update_request.rb +lib/plaid/models/watchlist_screening_individual_update_request_resettable_field.rb +lib/plaid/models/watchlist_screening_individual_update_response.rb lib/plaid/models/watchlist_screening_request_search_terms.rb lib/plaid/models/watchlist_screening_review.rb -lib/plaid/models/watchlist_screening_review_response.rb lib/plaid/models/watchlist_screening_search_terms.rb lib/plaid/models/watchlist_screening_status.rb lib/plaid/models/weak_alias_determination.rb +lib/plaid/models/webhook_environment_values.rb lib/plaid/models/webhook_type.rb lib/plaid/models/webhook_update_acknowledged_webhook.rb lib/plaid/models/webhook_verification_key_get_request.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fd8513e7..858343849 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,219 @@ See full changelog for the OpenAPI schema (OAS) [here](https://github.com/plaid/plaid-openapi/blob/master/CHANGELOG.md). +# 16.0.0 +- Updating to OAS 2020-09-14_1.181.1 + +## OpenAPI Schema Changes +### 2020-09-14_1.181.1 +- Update `report_tokens` in `/credit/relay/create` endpoint request to be a list of strings instead a list of objects + +### 2020-09-14_1.181.0 + +- Add `credit/sessions/get` endpoint + +### 2020-09-14_1.180.0 + +- Remove `Date` and `DateNullable` types in identity_verification and monitor endpoints. Replace with `ISO8601Date` and `ISO8601DateNullable` + instead. + +### 2020-09-14_1.179.0 + +- Remove `idempotency_key` field from resp of /transfer/authorization/create endpoint. + +### 2020-09-14_1.178.2 + +- Change `institution_price_as_of` field on the Holdings object to nullable + +### 2020-09-14_1.178.1 + +- Add `AUTHORISING` wallet transaction status + +### 2020-09-14_1.178.0 + +- Add `/partner/customer/get` endpoint. +- Add `status` to the response for `/partner/customer/create`. + +### 2020-09-14_1.177.4 + +- Add `settled` as a valid event type for `/sandbox/transfer/simulate` + +### 2020-09-14_1.177.3 +- Replace `ASSET_TRANSACTION_DESCRIPTION` with `ASSET_TRANSACTION_DESCRIPTON` in Freddie Mac + Asset Report + +### 2020-09-14_1.177.2 +- Add `ownership_type` to Asset Report account object, to reflect actual API behavior. +- Update and clarify docs, including update to reflect new Transfers cutoff times. + +### 2020-09-14_1.177.1 +- Add `settled` as a possible Transfer status and `swept_settled` as a possible Transfer sweep status +- Add `settled` and `swept_settled` as new Transfer event types +- Add `settled` field to Transfer sweep object +- Add `standard_return_window` and `unauthorized_return_window` fields to Transfer object + +### 2020-09-14_1.177.0 + +- Add `options` and `days_to_included` to `AssetReportGetRequest` + +### 2020-09-14_1.176.2 +- Add `recipient_id` field examples to the `/wallet/create`, `/wallet/get`, and `/wallet/list` responses + +### 2020-09-14_1.176.1 +- Set `employment_report_token` field in the `/credit/employment/get` endpoint to be not required + +### 2020-09-14_1.176.0 + +- Add `mask` to the `meta` field of overridden accounts in the sandbox custom user configuration object schema. + +### 2020-09-14_1.175.0 + +- Remove `MiddleName` and add `VALIDATION_SOURCES` to Freddie Mac Asset Report + +### 2020-09-14_1.174.1 + +- Add `adyen` as processor partner + +### 2020-09-14_1.174.0 + +- Add `environment` as an attribute to all webhook payloads + +### 2020-09-14_1.173.0 + +- Add `idempotency_key` field in req/resp of /transfer/authorization/create endpoint. + +### 2020-09-14_1.172.1 + +- Removed `/asset_report/relay/` endpoints + +### 2020-09-14_1.172.0 + +- Add payroll institution to /credit/income/precheck endpoint. + +### 2020-09-14_1.171.0 + +- Add `recipient_id` to the `/wallet/create`, `/wallet/get`, and `/wallet/list` responses + +### 2020-09-14_1.170.1 + +- Fix that `client_id` and `secret` were erroneously marked as `required` for the request bodies of some endpoints. (These fields can be sent in the header and thus are not required in bodies). + +### 2020-09-14_1.170.0 + +- Add `with_guarantee` field in request of `/transfer/authorization/create` + +### 2020-09-14_1.169.0 + +- Add `issuing_region` as a field in the extracted data to documentary verification documents `/identity_verification/create`, `/identity_verification/get`, `/identity_verification/list` and `/identity_verification/retry` responses. + +### 2020-09-14_1.168.2 + +- Add `bacs`/`iban` recommendation for `/payment_initiation/recipient/create` + +### 2020-09-14_1.168.1 + +- Update descriptions for `/payment_profile/create`, `/payment_profile/get` and `/payment_profile/remove` + +### 2020-09-14_1.168.0 + +-- Add `counterparties` to `/beta/transactions/v1/enhance` response + +### 2020-09-14_1.167.1 + +- Added `MICRODEPOSIT_ERROR` which was returned by the API but missing from the error type enum. +- Various fixes to typos and descriptions + +### 2020-09-14_1.167.0 + +- Add authorization code `MIGRATED_ACCOUNT_ITEM` for Items created via `/transfer/migrate_account` endpoint + +### 2020-09-14_1.166.0 + +- Add `updated_at` field to Payroll Item entries in `/credit/payroll_income/get` + +### 2020-09-14_1.165.3 + +- removed LoanRoleType, ReportIdentifierType, and ReportDateTime fields from `/credit/asset_report/freddie_mac/get` + +### 2020-09-14_1.165.2 + +- Remove deprecated reverse_swept enum value from documentation + +### 2020-09-14_1.165.1 + +- Update example response for the `wallet/list` endpoint + +### 2020-09-14_1.165.0 + +- Add details for `IdentityMatchResponse` for `/identity/match` endpoint + +### 2020-09-14_1.164.10 + +- Update descriptions for `HOLDINGS: DEFAULT_UPDATE` and `INVESTMENT_TRANSACTIONS: DEFAULT_UPDATE` webhooks + +### 2020-09-14_1.164.9 + +- Removed report_type from the request to `/credit/asset_report/freddie_mae/get` + +### 2020-09-14_1.164.8 + +- Add documentation for credit categories in the `/asset_report/get` endpoint + +### 2020-09-14_1.164.7 + +- Remove redundant parameters from the `/transfer/create` endpoint from docs and mark them as deprecated + +### 2020-09-14_1.164.6 + +- Add the following new currencies for the `/payment_initiation` API route group: PLN, SEK, DKK, NOK, CHF, CZK + +### 2020-09-14_1.164.5 + +- Update description for `/payment_initiation/payment/reverse` to indicate that this endpoint only works with virtual accounts +- Update description for `/wallet/transaction/execute` to indicate that settlement will take seconds to days + +### 2020-09-14_1.164.4 + +- Remove verification fields from `/credit/payroll_income/get` and `/income/verification/paystubs/get` + +### 2020-09-14_1.164.3 + +- Remove pull_id field from `/credit/payroll_income/get` + +### 2020-09-14_1.164.2 + +- Update external documentation links for the `/wallet/` API route group +- Update `/payment_initiation/payment/reverse` description to cover which payments are eligible for refunds +- Update `/payment_initiation/payment/create` reference field description to indicate that references should be unique and will be adjusted automatically +- Update `PaymentInitiationPaymentStatus` description to indicate that payments may take seconds to days to settle depending on the payment rail used +- Update `WalletTransactionStatus` description to indicate that transactions may take seconds to days to settle depending on the payment rail used + +### 2020-09-14_1.164.1 + +- Make `is_savings_or_money_market_account` field in `SignalEvaluateCoreAttributes` nullable + +### 2020-09-14_1.164.0 + +- Add new endpoint `/credit/asset_report/freddie_mac` + +### 2020-09-14_1.163.0 + +- Add `/link_delivery/create` endpoint +- Add `/link_delivery/get` endpoint + +### 2020-09-14_1.162.2 + +- Fix minimum and maximum values in `/signal/evaluate` scores + +### 2020-09-14_1.162.1 + +- Make holdings `institution_price_as_of` non-nullable + +### 2020-09-14_1.162.0 + +- Add `WalletTransactionStatusUpdateWebhook` object +- Update `WalletTransactionStatus` to include an additional `SETTLED` enum +- Update `PaymentInitiationPaymentStatus` to include an additional `PAYMENT_STATUS_SETTLED` enum + # 15.11.0 - Updating to OAS 2020-09-14_1.161.5 diff --git a/Makefile b/Makefile index e0e3a8d30..79dcfa9b6 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Ruby embeds the version in the generator where as others don't so it's not possible to cat for it. -RUBY_PACKAGE_VERSION=15.11.0 +RUBY_PACKAGE_VERSION=16.0.0 .PHONY: release release: diff --git a/README.md b/README.md index a4e223290..d98c52e2b 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,33 @@ item_remove_request.access_token = access_token client.item_remove(item_remove_request) ``` -### Get paginated transactions +### Get paginated transactions (preferred method) +```ruby +request = Plaid::ItemPublicTokenExchangeRequest.new +request.public_token = public_token + +response = client.item_public_token_exchange(request) +access_token = response.access_token + +transactions_sync_request = Plaid::TransactionsSyncRequest.new +transactions_sync_request.access_token = access_token + +transaction_response = client.transactions_sync(transactions_sync_request) +transactions = transaction_response.transactions + +# the transactions in the response are paginated, so make multiple calls while +# updating the cursor to retrieve all transactions +while transaction_response.has_more + transactions_sync_request = Plaid::TransactionsSyncRequest.new + transactions_sync_request.access_token = access_token + transactions_sync_request.cursor = transaction_response.next_cursor + + transaction_response = client.transactions_sync(transactions_sync_request) + transactions += transaction_response.transactions +end +``` + +### Get paginated transactions (older method) ```ruby request = Plaid::ItemPublicTokenExchangeRequest.new request.public_token = public_token diff --git a/lib/plaid.rb b/lib/plaid.rb index 34a05300b..38800048c 100644 --- a/lib/plaid.rb +++ b/lib/plaid.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -28,6 +28,8 @@ require 'plaid/models/account_filters_response' require 'plaid/models/account_identity' require 'plaid/models/account_identity_all_of' +require 'plaid/models/account_identity_match_score' +require 'plaid/models/account_identity_match_score_all_of' require 'plaid/models/account_product_access' require 'plaid/models/account_product_access_nullable' require 'plaid/models/account_selection_cardinality' @@ -41,11 +43,18 @@ require 'plaid/models/address' require 'plaid/models/address_data' require 'plaid/models/address_data_nullable' +require 'plaid/models/address_match_score' require 'plaid/models/address_nullable' require 'plaid/models/address_purpose_label' require 'plaid/models/application' require 'plaid/models/application_get_request' require 'plaid/models/application_get_response' +require 'plaid/models/asset' +require 'plaid/models/asset_detail' +require 'plaid/models/asset_holder' +require 'plaid/models/asset_holder_name' +require 'plaid/models/asset_owner' +require 'plaid/models/asset_owners' require 'plaid/models/asset_report' require 'plaid/models/asset_report_audit_copy_create_request' require 'plaid/models/asset_report_audit_copy_create_response' @@ -57,28 +66,33 @@ require 'plaid/models/asset_report_create_response' require 'plaid/models/asset_report_filter_request' require 'plaid/models/asset_report_filter_response' +require 'plaid/models/asset_report_freddie' +require 'plaid/models/asset_report_freddie_get_request' +require 'plaid/models/asset_report_freddie_get_response' require 'plaid/models/asset_report_get_request' +require 'plaid/models/asset_report_get_request_options' require 'plaid/models/asset_report_get_response' require 'plaid/models/asset_report_item' require 'plaid/models/asset_report_pdf_get_request' +require 'plaid/models/asset_report_pdf_get_request_options' require 'plaid/models/asset_report_refresh_request' require 'plaid/models/asset_report_refresh_request_options' require 'plaid/models/asset_report_refresh_response' -require 'plaid/models/asset_report_relay_create_request' -require 'plaid/models/asset_report_relay_create_response' -require 'plaid/models/asset_report_relay_get_request' -require 'plaid/models/asset_report_relay_refresh_request' -require 'plaid/models/asset_report_relay_refresh_response' -require 'plaid/models/asset_report_relay_remove_request' -require 'plaid/models/asset_report_relay_remove_response' require 'plaid/models/asset_report_remove_request' require 'plaid/models/asset_report_remove_response' require 'plaid/models/asset_report_transaction' require 'plaid/models/asset_report_transaction_all_of' require 'plaid/models/asset_report_user' +require 'plaid/models/asset_transaction' +require 'plaid/models/asset_transaction_category_type' +require 'plaid/models/asset_transaction_description' +require 'plaid/models/asset_transaction_detail' +require 'plaid/models/asset_transaction_type' +require 'plaid/models/asset_transactions' +require 'plaid/models/asset_type' +require 'plaid/models/assets' require 'plaid/models/assets_error_webhook' require 'plaid/models/assets_product_ready_webhook' -require 'plaid/models/assets_relay_webhook' require 'plaid/models/auth_get_numbers' require 'plaid/models/auth_get_request' require 'plaid/models/auth_get_request_options' @@ -128,10 +142,9 @@ require 'plaid/models/client_provided_enhanced_transaction' require 'plaid/models/client_provided_raw_transaction' require 'plaid/models/connected_application' +require 'plaid/models/counterparty' +require 'plaid/models/counterparty_type' require 'plaid/models/country_code' -require 'plaid/models/create_entity_screening_request' -require 'plaid/models/create_entity_watchlist_screening_review_request' -require 'plaid/models/create_individual_watchlist_screening_review_request' require 'plaid/models/credit1099' require 'plaid/models/credit1099_filer' require 'plaid/models/credit1099_payer' @@ -164,6 +177,7 @@ require 'plaid/models/credit_bank_income_warning_code' require 'plaid/models/credit_bank_income_warning_type' require 'plaid/models/credit_card_liability' +require 'plaid/models/credit_category' require 'plaid/models/credit_document_metadata' require 'plaid/models/credit_employer_verification' require 'plaid/models/credit_employment_get_request' @@ -178,7 +192,6 @@ require 'plaid/models/credit_pay_stub_employee' require 'plaid/models/credit_pay_stub_employer' require 'plaid/models/credit_pay_stub_net_pay' -require 'plaid/models/credit_pay_stub_verification' require 'plaid/models/credit_payroll_income_get_request' require 'plaid/models/credit_payroll_income_get_response' require 'plaid/models/credit_payroll_income_precheck_request' @@ -195,10 +208,20 @@ require 'plaid/models/credit_relay_refresh_response' require 'plaid/models/credit_relay_remove_request' require 'plaid/models/credit_relay_remove_response' +require 'plaid/models/credit_session' +require 'plaid/models/credit_session_bank_income_result' +require 'plaid/models/credit_session_bank_income_status' +require 'plaid/models/credit_session_item_add_result' +require 'plaid/models/credit_session_results' +require 'plaid/models/credit_sessions_get_request' +require 'plaid/models/credit_sessions_get_response' require 'plaid/models/credit_w2' require 'plaid/models/customer_initiated_return_risk' require 'plaid/models/dashboard_user' -require 'plaid/models/dashboard_user_response' +require 'plaid/models/dashboard_user_get_request' +require 'plaid/models/dashboard_user_get_response' +require 'plaid/models/dashboard_user_list_request' +require 'plaid/models/dashboard_user_list_response' require 'plaid/models/dashboard_user_status' require 'plaid/models/date_range' require 'plaid/models/deductions' @@ -238,6 +261,7 @@ require 'plaid/models/earnings_breakdown_canonical_description' require 'plaid/models/earnings_total' require 'plaid/models/email' +require 'plaid/models/email_address_match_score' require 'plaid/models/employee' require 'plaid/models/employee_income_summary_field_string' require 'plaid/models/employer' @@ -267,12 +291,9 @@ require 'plaid/models/entity_screening_status_updated_webhook' require 'plaid/models/entity_watchlist_code' require 'plaid/models/entity_watchlist_program' -require 'plaid/models/entity_watchlist_program_response' require 'plaid/models/entity_watchlist_screening' require 'plaid/models/entity_watchlist_screening_hit' -require 'plaid/models/entity_watchlist_screening_response' require 'plaid/models/entity_watchlist_screening_review' -require 'plaid/models/entity_watchlist_screening_review_response' require 'plaid/models/entity_watchlist_screening_search_terms' require 'plaid/models/entity_watchlist_search_terms' require 'plaid/models/error' @@ -283,14 +304,22 @@ require 'plaid/models/external_payment_schedule_base' require 'plaid/models/external_payment_schedule_get' require 'plaid/models/external_payment_schedule_request' +require 'plaid/models/fdx_content_types' +require 'plaid/models/fdxfi_attribute' +require 'plaid/models/fdx_hateoas_link' +require 'plaid/models/fdx_hateoas_link_action' +require 'plaid/models/fdx_notification' +require 'plaid/models/fdx_notification_category' +require 'plaid/models/fdx_notification_payload' +require 'plaid/models/fdx_notification_payload_id_type' +require 'plaid/models/fdx_notification_priority' +require 'plaid/models/fdx_notification_severity' +require 'plaid/models/fdx_notification_type' +require 'plaid/models/fdx_party' +require 'plaid/models/fdx_party_registry' +require 'plaid/models/fdx_party_type' require 'plaid/models/form1099_type' require 'plaid/models/generic_screening_hit_location_items' -require 'plaid/models/get_dashboard_user_request' -require 'plaid/models/get_entity_watchlist_screening_request' -require 'plaid/models/get_identity_verification_request' -require 'plaid/models/get_individual_watchlist_screening_request' -require 'plaid/models/get_watchlist_screening_entity_program_request' -require 'plaid/models/get_watchlist_screening_individual_program_request' require 'plaid/models/health_incident' require 'plaid/models/historical_balance' require 'plaid/models/historical_update_webhook' @@ -309,11 +338,16 @@ require 'plaid/models/identity_update_types' require 'plaid/models/identity_verification' require 'plaid/models/identity_verification_create_request' +require 'plaid/models/identity_verification_create_response' +require 'plaid/models/identity_verification_get_request' +require 'plaid/models/identity_verification_get_response' +require 'plaid/models/identity_verification_list_request' +require 'plaid/models/identity_verification_list_response' require 'plaid/models/identity_verification_request_user' -require 'plaid/models/identity_verification_response' require 'plaid/models/identity_verification_retried_webhook' require 'plaid/models/identity_verification_retry_request' require 'plaid/models/identity_verification_retry_request_steps_object' +require 'plaid/models/identity_verification_retry_response' require 'plaid/models/identity_verification_status' require 'plaid/models/identity_verification_status_updated_webhook' require 'plaid/models/identity_verification_step_status' @@ -342,6 +376,7 @@ require 'plaid/models/income_verification_precheck_employer_address' require 'plaid/models/income_verification_precheck_employer_address_data' require 'plaid/models/income_verification_precheck_military_info' +require 'plaid/models/income_verification_precheck_payroll_institution' require 'plaid/models/income_verification_precheck_request' require 'plaid/models/income_verification_precheck_response' require 'plaid/models/income_verification_precheck_user' @@ -352,10 +387,10 @@ require 'plaid/models/income_verification_taxforms_get_request' require 'plaid/models/income_verification_taxforms_get_response' require 'plaid/models/income_verification_webhook_status' +require 'plaid/models/individual_name' require 'plaid/models/individual_screening_hit_names' require 'plaid/models/individual_watchlist_code' require 'plaid/models/individual_watchlist_program' -require 'plaid/models/individual_watchlist_program_response' require 'plaid/models/inflow_model' require 'plaid/models/initial_update_webhook' require 'plaid/models/institution' @@ -428,6 +463,12 @@ require 'plaid/models/liabilities_get_response' require 'plaid/models/liabilities_object' require 'plaid/models/liability_override' +require 'plaid/models/link_delivery_create_request' +require 'plaid/models/link_delivery_create_response' +require 'plaid/models/link_delivery_delivery_method' +require 'plaid/models/link_delivery_get_request' +require 'plaid/models/link_delivery_get_response' +require 'plaid/models/link_delivery_session_status' require 'plaid/models/link_token_account_filters' require 'plaid/models/link_token_create_credit_filter' require 'plaid/models/link_token_create_depository_filter' @@ -452,20 +493,14 @@ require 'plaid/models/link_token_get_metadata_response' require 'plaid/models/link_token_get_request' require 'plaid/models/link_token_get_response' -require 'plaid/models/list_dashboard_user_request' -require 'plaid/models/list_entity_watchlist_screening_request' -require 'plaid/models/list_identity_verification_request' -require 'plaid/models/list_individual_watchlist_screening_request' -require 'plaid/models/list_watchlist_screening_entity_history_request' -require 'plaid/models/list_watchlist_screening_entity_hit_request' -require 'plaid/models/list_watchlist_screening_entity_programs_request' -require 'plaid/models/list_watchlist_screening_entity_reviews_request' -require 'plaid/models/list_watchlist_screening_individual_history_request' -require 'plaid/models/list_watchlist_screening_individual_hit_request' -require 'plaid/models/list_watchlist_screening_individual_programs_request' -require 'plaid/models/list_watchlist_screening_individual_reviews_request' +require 'plaid/models/link_token_investments' +require 'plaid/models/loan' require 'plaid/models/loan_account_subtype' require 'plaid/models/loan_filter' +require 'plaid/models/loan_identifier' +require 'plaid/models/loan_identifier_type' +require 'plaid/models/loan_identifiers' +require 'plaid/models/loans' require 'plaid/models/location' require 'plaid/models/mfa' require 'plaid/models/match_summary' @@ -475,6 +510,7 @@ require 'plaid/models/mortgage_liability' require 'plaid/models/mortgage_property_address' require 'plaid/models/multi_document_risk_signal' +require 'plaid/models/name_match_score' require 'plaid/models/net_pay' require 'plaid/models/new_accounts_available_webhook' require 'plaid/models/numbers' @@ -492,21 +528,24 @@ require 'plaid/models/override_accounts' require 'plaid/models/owner' require 'plaid/models/owner_override' +require 'plaid/models/ownership_type' require 'plaid/models/po_box_status' require 'plaid/models/pslf_status' -require 'plaid/models/paginated_dashboard_user_list_response' -require 'plaid/models/paginated_entity_watchlist_program_list_response' -require 'plaid/models/paginated_entity_watchlist_screening_hit_list_response' -require 'plaid/models/paginated_entity_watchlist_screening_list_response' -require 'plaid/models/paginated_entity_watchlist_screening_review_list_response' -require 'plaid/models/paginated_identity_verification_list_response' -require 'plaid/models/paginated_individual_watchlist_program_list_response' -require 'plaid/models/paginated_individual_watchlist_screening_hit_list_response' -require 'plaid/models/paginated_individual_watchlist_screening_list_response' -require 'plaid/models/paginated_individual_watchlist_screening_review_list_response' -require 'plaid/models/partner_customers_create_request' -require 'plaid/models/partner_customers_create_response' -require 'plaid/models/partner_end_customer_client' +require 'plaid/models/parties' +require 'plaid/models/partner_customer_create_request' +require 'plaid/models/partner_customer_create_response' +require 'plaid/models/partner_customer_get_request' +require 'plaid/models/partner_customer_get_response' +require 'plaid/models/partner_end_customer' +require 'plaid/models/partner_end_customer_address' +require 'plaid/models/partner_end_customer_billing_contact' +require 'plaid/models/partner_end_customer_secrets' +require 'plaid/models/partner_end_customer_status' +require 'plaid/models/partner_end_customer_technical_contact' +require 'plaid/models/partner_end_customer_with_secrets' +require 'plaid/models/party' +require 'plaid/models/party_individual' +require 'plaid/models/party_role_type' require 'plaid/models/pay' require 'plaid/models/pay_frequency' require 'plaid/models/pay_frequency_value' @@ -518,7 +557,6 @@ require 'plaid/models/pay_stub_earnings_total' require 'plaid/models/pay_stub_pay_period_details' require 'plaid/models/pay_stub_taxpayer_id' -require 'plaid/models/pay_stub_verification_attribute' require 'plaid/models/payment_amount' require 'plaid/models/payment_amount_currency' require 'plaid/models/payment_channel' @@ -564,7 +602,6 @@ require 'plaid/models/payment_initiation_recipient_get_response_all_of' require 'plaid/models/payment_initiation_recipient_list_request' require 'plaid/models/payment_initiation_recipient_list_response' -require 'plaid/models/payment_initiation_refund_status' require 'plaid/models/payment_initiation_standing_order_metadata' require 'plaid/models/payment_meta' require 'plaid/models/payment_profile_create_request' @@ -593,12 +630,11 @@ require 'plaid/models/paystub_override_employee_address' require 'plaid/models/paystub_override_employer' require 'plaid/models/paystub_pay_frequency' -require 'plaid/models/paystub_verification' -require 'plaid/models/paystub_verification_status' require 'plaid/models/paystub_ytd_details' require 'plaid/models/pending_expiration_webhook' require 'plaid/models/personal_finance_category' require 'plaid/models/phone_number' +require 'plaid/models/phone_number_match_score' require 'plaid/models/phone_type' require 'plaid/models/physical_document_category' require 'plaid/models/physical_document_extracted_data' @@ -632,11 +668,13 @@ require 'plaid/models/recipient_bacs_nullable' require 'plaid/models/recurring_transaction_frequency' require 'plaid/models/recurring_transactions_update_webhook' -require 'plaid/models/relay_event' require 'plaid/models/removed_transaction' -require 'plaid/models/report_token' require 'plaid/models/report_type' +require 'plaid/models/reporting_information' require 'plaid/models/risk_signal_document_reference' +require 'plaid/models/role' +require 'plaid/models/role_detail' +require 'plaid/models/roles' require 'plaid/models/sandbox_bank_transfer_fire_webhook_request' require 'plaid/models/sandbox_bank_transfer_fire_webhook_response' require 'plaid/models/sandbox_bank_transfer_simulate_request' @@ -677,7 +715,12 @@ require 'plaid/models/security' require 'plaid/models/security_override' require 'plaid/models/sender_bacs_nullable' +require 'plaid/models/service' +require 'plaid/models/service_product_fulfillment' +require 'plaid/models/service_product_fulfillment_detail' +require 'plaid/models/service_product_fulfillment_identifier' require 'plaid/models/servicer_address_data' +require 'plaid/models/services' require 'plaid/models/signal_address_data' require 'plaid/models/signal_decision_report_request' require 'plaid/models/signal_decision_report_response' @@ -698,6 +741,8 @@ require 'plaid/models/standalone_account_type' require 'plaid/models/standalone_currency_code_list' require 'plaid/models/standalone_investment_transaction_type' +require 'plaid/models/status' +require 'plaid/models/statuses' require 'plaid/models/strategy' require 'plaid/models/student_loan' require 'plaid/models/student_loan_repayment_model' @@ -706,6 +751,9 @@ require 'plaid/models/sync_updates_available_webhook' require 'plaid/models/taxform' require 'plaid/models/taxpayer_id' +require 'plaid/models/taxpayer_identifier' +require 'plaid/models/taxpayer_identifier_type' +require 'plaid/models/taxpayer_identifiers' require 'plaid/models/total' require 'plaid/models/total_canonical_description' require 'plaid/models/transaction' @@ -801,12 +849,9 @@ require 'plaid/models/transfer_user_address_in_request' require 'plaid/models/transfer_user_address_in_response' require 'plaid/models/transfer_user_in_request' +require 'plaid/models/transfer_user_in_request_deprecated' require 'plaid/models/transfer_user_in_response' -require 'plaid/models/update_entity_screening_request' -require 'plaid/models/update_entity_screening_request_resettable_field' require 'plaid/models/update_entity_screening_request_search_terms' -require 'plaid/models/update_individual_screening_request' -require 'plaid/models/update_individual_screening_request_resettable_field' require 'plaid/models/update_individual_screening_request_search_terms' require 'plaid/models/user_address' require 'plaid/models/user_create_request' @@ -818,8 +863,11 @@ require 'plaid/models/user_stated_income_source_category' require 'plaid/models/user_stated_income_source_frequency' require 'plaid/models/user_stated_income_source_pay_type' -require 'plaid/models/verification_attribute' +require 'plaid/models/validation_source' +require 'plaid/models/validation_sources' require 'plaid/models/verification_expired_webhook' +require 'plaid/models/verification_of_asset' +require 'plaid/models/verification_of_asset_response' require 'plaid/models/verification_refresh_status' require 'plaid/models/verification_status' require 'plaid/models/w2' @@ -846,24 +894,65 @@ require 'plaid/models/wallet_transaction_get_request' require 'plaid/models/wallet_transaction_get_response' require 'plaid/models/wallet_transaction_status' +require 'plaid/models/wallet_transaction_status_update_webhook' require 'plaid/models/wallet_transactions_list_request' require 'plaid/models/wallet_transactions_list_response' require 'plaid/models/warning' require 'plaid/models/watchlist_screening_audit_trail' -require 'plaid/models/watchlist_screening_create_request' require 'plaid/models/watchlist_screening_document' require 'plaid/models/watchlist_screening_document_type' +require 'plaid/models/watchlist_screening_entity_create_request' +require 'plaid/models/watchlist_screening_entity_create_response' +require 'plaid/models/watchlist_screening_entity_get_request' +require 'plaid/models/watchlist_screening_entity_get_response' +require 'plaid/models/watchlist_screening_entity_history_list_request' +require 'plaid/models/watchlist_screening_entity_history_list_response' +require 'plaid/models/watchlist_screening_entity_hit_list_request' +require 'plaid/models/watchlist_screening_entity_hit_list_response' +require 'plaid/models/watchlist_screening_entity_list_request' +require 'plaid/models/watchlist_screening_entity_list_response' +require 'plaid/models/watchlist_screening_entity_program_get_request' +require 'plaid/models/watchlist_screening_entity_program_get_response' +require 'plaid/models/watchlist_screening_entity_program_list_request' +require 'plaid/models/watchlist_screening_entity_program_list_response' +require 'plaid/models/watchlist_screening_entity_review_create_request' +require 'plaid/models/watchlist_screening_entity_review_create_response' +require 'plaid/models/watchlist_screening_entity_review_list_request' +require 'plaid/models/watchlist_screening_entity_review_list_response' +require 'plaid/models/watchlist_screening_entity_update_request' +require 'plaid/models/watchlist_screening_entity_update_request_resettable_field' +require 'plaid/models/watchlist_screening_entity_update_response' require 'plaid/models/watchlist_screening_hit' require 'plaid/models/watchlist_screening_hit_locations' require 'plaid/models/watchlist_screening_hit_status' require 'plaid/models/watchlist_screening_individual' -require 'plaid/models/watchlist_screening_individual_response' +require 'plaid/models/watchlist_screening_individual_create_request' +require 'plaid/models/watchlist_screening_individual_create_response' +require 'plaid/models/watchlist_screening_individual_get_request' +require 'plaid/models/watchlist_screening_individual_get_response' +require 'plaid/models/watchlist_screening_individual_history_list_request' +require 'plaid/models/watchlist_screening_individual_history_list_response' +require 'plaid/models/watchlist_screening_individual_hit_list_request' +require 'plaid/models/watchlist_screening_individual_hit_list_response' +require 'plaid/models/watchlist_screening_individual_list_request' +require 'plaid/models/watchlist_screening_individual_list_response' +require 'plaid/models/watchlist_screening_individual_program_get_request' +require 'plaid/models/watchlist_screening_individual_program_get_response' +require 'plaid/models/watchlist_screening_individual_program_list_request' +require 'plaid/models/watchlist_screening_individual_program_list_response' +require 'plaid/models/watchlist_screening_individual_review_create_request' +require 'plaid/models/watchlist_screening_individual_review_create_response' +require 'plaid/models/watchlist_screening_individual_review_list_request' +require 'plaid/models/watchlist_screening_individual_review_list_response' +require 'plaid/models/watchlist_screening_individual_update_request' +require 'plaid/models/watchlist_screening_individual_update_request_resettable_field' +require 'plaid/models/watchlist_screening_individual_update_response' require 'plaid/models/watchlist_screening_request_search_terms' require 'plaid/models/watchlist_screening_review' -require 'plaid/models/watchlist_screening_review_response' require 'plaid/models/watchlist_screening_search_terms' require 'plaid/models/watchlist_screening_status' require 'plaid/models/weak_alias_determination' +require 'plaid/models/webhook_environment_values' require 'plaid/models/webhook_type' require 'plaid/models/webhook_update_acknowledged_webhook' require 'plaid/models/webhook_verification_key_get_request' diff --git a/lib/plaid/api/plaid_api.rb b/lib/plaid/api/plaid_api.rb index acf0e9823..7311203d1 100644 --- a/lib/plaid/api/plaid_api.rb +++ b/lib/plaid/api/plaid_api.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -734,266 +734,6 @@ def asset_report_refresh_with_http_info(asset_report_refresh_request, opts = {}) return data, status_code, headers end - # Create an `asset_relay_token` to share an Asset Report with a partner client - # Plaid can share an Asset Report directly with a participating third party on your behalf. The shared Asset Report is the exact same Asset Report originally created in `/asset_report/create`. To grant access to an Asset Report to a third party, use the `/asset_report/relay/create` endpoint to create an `asset_relay_token` and then pass that token to the third party who needs access. Each third party has its own `secondary_client_id`, for example `ce5bd328dcd34123456`. You'll need to create a separate `asset_relay_token` for each third party to whom you want to grant access to the Report. - # @param asset_report_relay_create_request [AssetReportRelayCreateRequest] - # @param [Hash] opts the optional parameters - # @return [AssetReportRelayCreateResponse] - def asset_report_relay_create(asset_report_relay_create_request, opts = {}) - data, _status_code, _headers = asset_report_relay_create_with_http_info(asset_report_relay_create_request, opts) - data - end - - # Create an `asset_relay_token` to share an Asset Report with a partner client - # Plaid can share an Asset Report directly with a participating third party on your behalf. The shared Asset Report is the exact same Asset Report originally created in `/asset_report/create`. To grant access to an Asset Report to a third party, use the `/asset_report/relay/create` endpoint to create an `asset_relay_token` and then pass that token to the third party who needs access. Each third party has its own `secondary_client_id`, for example `ce5bd328dcd34123456`. You'll need to create a separate `asset_relay_token` for each third party to whom you want to grant access to the Report. - # @param asset_report_relay_create_request [AssetReportRelayCreateRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(AssetReportRelayCreateResponse, Integer, Hash)>] AssetReportRelayCreateResponse data, response status code and response headers - def asset_report_relay_create_with_http_info(asset_report_relay_create_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.asset_report_relay_create ...' - end - # verify the required parameter 'asset_report_relay_create_request' is set - if @api_client.config.client_side_validation && asset_report_relay_create_request.nil? - fail ArgumentError, "Missing the required parameter 'asset_report_relay_create_request' when calling PlaidApi.asset_report_relay_create" - end - # resource path - local_var_path = '/asset_report/relay/create' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(asset_report_relay_create_request) - - # return_type - return_type = opts[:debug_return_type] || 'AssetReportRelayCreateResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] - - new_options = opts.merge( - :operation => :"PlaidApi.asset_report_relay_create", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PlaidApi#asset_report_relay_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Retrieve an Asset Report that was shared with you - # `/asset_report/relay/get` allows third parties to get an Asset Report that was shared with them, using an `asset_relay_token` that was created by the report owner. - # @param asset_report_relay_get_request [AssetReportRelayGetRequest] - # @param [Hash] opts the optional parameters - # @return [AssetReportGetResponse] - def asset_report_relay_get(asset_report_relay_get_request, opts = {}) - data, _status_code, _headers = asset_report_relay_get_with_http_info(asset_report_relay_get_request, opts) - data - end - - # Retrieve an Asset Report that was shared with you - # `/asset_report/relay/get` allows third parties to get an Asset Report that was shared with them, using an `asset_relay_token` that was created by the report owner. - # @param asset_report_relay_get_request [AssetReportRelayGetRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(AssetReportGetResponse, Integer, Hash)>] AssetReportGetResponse data, response status code and response headers - def asset_report_relay_get_with_http_info(asset_report_relay_get_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.asset_report_relay_get ...' - end - # verify the required parameter 'asset_report_relay_get_request' is set - if @api_client.config.client_side_validation && asset_report_relay_get_request.nil? - fail ArgumentError, "Missing the required parameter 'asset_report_relay_get_request' when calling PlaidApi.asset_report_relay_get" - end - # resource path - local_var_path = '/asset_report/relay/get' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(asset_report_relay_get_request) - - # return_type - return_type = opts[:debug_return_type] || 'AssetReportGetResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] - - new_options = opts.merge( - :operation => :"PlaidApi.asset_report_relay_get", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PlaidApi#asset_report_relay_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Refresh a Relay Token's Asset Report - # The `/asset_report/relay/refresh` endpoint allows third parties to refresh an Asset Report that was relayed to them, using an `asset_relay_token` that was created by the report owner. A new Asset Report will be created based on the old one, but with the most recent data available. - # @param asset_report_relay_refresh_request [AssetReportRelayRefreshRequest] - # @param [Hash] opts the optional parameters - # @return [AssetReportRelayRefreshResponse] - def asset_report_relay_refresh(asset_report_relay_refresh_request, opts = {}) - data, _status_code, _headers = asset_report_relay_refresh_with_http_info(asset_report_relay_refresh_request, opts) - data - end - - # Refresh a Relay Token's Asset Report - # The `/asset_report/relay/refresh` endpoint allows third parties to refresh an Asset Report that was relayed to them, using an `asset_relay_token` that was created by the report owner. A new Asset Report will be created based on the old one, but with the most recent data available. - # @param asset_report_relay_refresh_request [AssetReportRelayRefreshRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(AssetReportRelayRefreshResponse, Integer, Hash)>] AssetReportRelayRefreshResponse data, response status code and response headers - def asset_report_relay_refresh_with_http_info(asset_report_relay_refresh_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.asset_report_relay_refresh ...' - end - # verify the required parameter 'asset_report_relay_refresh_request' is set - if @api_client.config.client_side_validation && asset_report_relay_refresh_request.nil? - fail ArgumentError, "Missing the required parameter 'asset_report_relay_refresh_request' when calling PlaidApi.asset_report_relay_refresh" - end - # resource path - local_var_path = '/asset_report/relay/refresh' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(asset_report_relay_refresh_request) - - # return_type - return_type = opts[:debug_return_type] || 'AssetReportRelayRefreshResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] - - new_options = opts.merge( - :operation => :"PlaidApi.asset_report_relay_refresh", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PlaidApi#asset_report_relay_refresh\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Remove Asset Report Relay Token - # The `/asset_report/relay/remove` endpoint allows you to invalidate an `asset_relay_token`, meaning the third party holding the token will no longer be able to use it to access the Asset Report to which the `asset_relay_token` gives access to. The Asset Report, Items associated with it, and other Asset Relay Tokens that provide access to the same Asset Report are not affected and will remain accessible after removing the given `asset_relay_token. - # @param asset_report_relay_remove_request [AssetReportRelayRemoveRequest] - # @param [Hash] opts the optional parameters - # @return [AssetReportRelayRemoveResponse] - def asset_report_relay_remove(asset_report_relay_remove_request, opts = {}) - data, _status_code, _headers = asset_report_relay_remove_with_http_info(asset_report_relay_remove_request, opts) - data - end - - # Remove Asset Report Relay Token - # The `/asset_report/relay/remove` endpoint allows you to invalidate an `asset_relay_token`, meaning the third party holding the token will no longer be able to use it to access the Asset Report to which the `asset_relay_token` gives access to. The Asset Report, Items associated with it, and other Asset Relay Tokens that provide access to the same Asset Report are not affected and will remain accessible after removing the given `asset_relay_token. - # @param asset_report_relay_remove_request [AssetReportRelayRemoveRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(AssetReportRelayRemoveResponse, Integer, Hash)>] AssetReportRelayRemoveResponse data, response status code and response headers - def asset_report_relay_remove_with_http_info(asset_report_relay_remove_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.asset_report_relay_remove ...' - end - # verify the required parameter 'asset_report_relay_remove_request' is set - if @api_client.config.client_side_validation && asset_report_relay_remove_request.nil? - fail ArgumentError, "Missing the required parameter 'asset_report_relay_remove_request' when calling PlaidApi.asset_report_relay_remove" - end - # resource path - local_var_path = '/asset_report/relay/remove' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(asset_report_relay_remove_request) - - # return_type - return_type = opts[:debug_return_type] || 'AssetReportRelayRemoveResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] - - new_options = opts.merge( - :operation => :"PlaidApi.asset_report_relay_remove", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PlaidApi#asset_report_relay_remove\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Delete an Asset Report # The `/item/remove` endpoint allows you to invalidate an `access_token`, meaning you will not be able to create new Asset Reports with it. Removing an Item does not affect any Asset Reports or Audit Copies you have already created, which will remain accessible until you remove them specifically. The `/asset_report/remove` endpoint allows you to remove an Asset Report. Removing an Asset Report invalidates its `asset_report_token`, meaning you will no longer be able to use it to access Report data or create new Audit Copies. Removing an Asset Report does not affect the underlying Items, but does invalidate any `audit_copy_tokens` associated with the Asset Report. # @param asset_report_remove_request [AssetReportRemoveRequest] @@ -1904,6 +1644,71 @@ def create_payment_token_with_http_info(payment_initiation_payment_token_create_ return data, status_code, headers end + # Retrieve an Asset Report with Freddie Mac format. Only Freddie Mac can use this endpoint. + # The `credit/asset_report/freddie_mac/get` endpoint retrieves the Asset Report in Freddie Mac's JSON format. + # @param request_body [Hash] + # @param [Hash] opts the optional parameters + # @return [AssetReportFreddieGetResponse] + def credit_asset_report_freddie_mac_get(request_body, opts = {}) + data, _status_code, _headers = credit_asset_report_freddie_mac_get_with_http_info(request_body, opts) + data + end + + # Retrieve an Asset Report with Freddie Mac format. Only Freddie Mac can use this endpoint. + # The `credit/asset_report/freddie_mac/get` endpoint retrieves the Asset Report in Freddie Mac's JSON format. + # @param request_body [Hash] + # @param [Hash] opts the optional parameters + # @return [Array<(AssetReportFreddieGetResponse, Integer, Hash)>] AssetReportFreddieGetResponse data, response status code and response headers + def credit_asset_report_freddie_mac_get_with_http_info(request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.credit_asset_report_freddie_mac_get ...' + end + # verify the required parameter 'request_body' is set + if @api_client.config.client_side_validation && request_body.nil? + fail ArgumentError, "Missing the required parameter 'request_body' when calling PlaidApi.credit_asset_report_freddie_mac_get" + end + # resource path + local_var_path = '/credit/asset_report/freddie_mac/get' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) + + # return_type + return_type = opts[:debug_return_type] || 'AssetReportFreddieGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.credit_asset_report_freddie_mac_get", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PlaidApi#credit_asset_report_freddie_mac_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create Asset or Income Report Audit Copy Token # Plaid can provide an Audit Copy token of an Asset Report and/or Income Report directly to a participating third party on your behalf. For example, Plaid can supply an Audit Copy token directly to Fannie Mae on your behalf if you participate in the Day 1 Certainty™ program. An Audit Copy token contains the same underlying data as the Asset Report and/or Income Report (result of /credit/payroll_income/get). To grant access to an Audit Copy token, use the `/credit/audit_copy_token/create` endpoint to create an `audit_copy_token` and then pass that token to the third party who needs access. Each third party has its own `auditor_id`, for example `fannie_mae`. You’ll need to create a separate Audit Copy for each third party to whom you want to grant access to the Report. # @param credit_audit_copy_token_create_request [CreditAuditCopyTokenCreateRequest] @@ -2295,7 +2100,7 @@ def credit_payroll_income_get_with_http_info(credit_payroll_income_get_request, end # Check income verification eligibility and optimize conversion - # `/credit/payroll_income/precheck` is an optional endpoint that can be called before initializing a Link session for income verification. It evaluates whether a given user is supportable by digital income verification. If the user is eligible for digital verification, that information will be associated with the user token, and in this way will generate a Link UI optimized for the end user and their specific employer. If the user cannot be confirmed as eligible, the user can still use the income verification flow, but they may be required to manually upload a paystub to verify their income. While all request fields are optional, providing `employer` data will increase the chance of receiving a useful result. + # `/credit/payroll_income/precheck` is an optional endpoint that can be called before initializing a Link session for income verification. It evaluates whether a given user is supportable by digital income verification. If the user is eligible for digital verification, that information will be associated with the user token, and in this way will generate a Link UI optimized for the end user and their specific employer. If the user cannot be confirmed as eligible, the user can still use the income verification flow, but they may be required to manually upload a paystub to verify their income. While all request fields are optional, providing `employer` data will increase the chance of receiving a useful result. When testing in Sandbox, you can control the results by providing special test values in the `employer` and `access_tokens` fields. `employer_good` and `employer_bad` will result in `HIGH` and `LOW` confidence values, respectively. `employer_multi` will result in a `HIGH` confidence with multiple payroll options. Likewise, `access_good` and `access_bad` will result in `HIGH` and `LOW` confidence values, respectively. Any other value for `employer` and `access_tokens` in Sandbox will result in `UNKNOWN` confidence. # @param credit_payroll_income_precheck_request [CreditPayrollIncomePrecheckRequest] # @param [Hash] opts the optional parameters # @return [CreditPayrollIncomePrecheckResponse] @@ -2305,7 +2110,7 @@ def credit_payroll_income_precheck(credit_payroll_income_precheck_request, opts end # Check income verification eligibility and optimize conversion - # `/credit/payroll_income/precheck` is an optional endpoint that can be called before initializing a Link session for income verification. It evaluates whether a given user is supportable by digital income verification. If the user is eligible for digital verification, that information will be associated with the user token, and in this way will generate a Link UI optimized for the end user and their specific employer. If the user cannot be confirmed as eligible, the user can still use the income verification flow, but they may be required to manually upload a paystub to verify their income. While all request fields are optional, providing `employer` data will increase the chance of receiving a useful result. + # `/credit/payroll_income/precheck` is an optional endpoint that can be called before initializing a Link session for income verification. It evaluates whether a given user is supportable by digital income verification. If the user is eligible for digital verification, that information will be associated with the user token, and in this way will generate a Link UI optimized for the end user and their specific employer. If the user cannot be confirmed as eligible, the user can still use the income verification flow, but they may be required to manually upload a paystub to verify their income. While all request fields are optional, providing `employer` data will increase the chance of receiving a useful result. When testing in Sandbox, you can control the results by providing special test values in the `employer` and `access_tokens` fields. `employer_good` and `employer_bad` will result in `HIGH` and `LOW` confidence values, respectively. `employer_multi` will result in a `HIGH` confidence with multiple payroll options. Likewise, `access_good` and `access_bad` will result in `HIGH` and `LOW` confidence values, respectively. Any other value for `employer` and `access_tokens` in Sandbox will result in `UNKNOWN` confidence. # @param credit_payroll_income_precheck_request [CreditPayrollIncomePrecheckRequest] # @param [Hash] opts the optional parameters # @return [Array<(CreditPayrollIncomePrecheckResponse, Integer, Hash)>] CreditPayrollIncomePrecheckResponse data, response status code and response headers @@ -2749,31 +2554,31 @@ def credit_report_audit_copy_remove_with_http_info(credit_audit_copy_token_remov return data, status_code, headers end - # List dashboard users - # List all dashboard users associated with your account. - # @param list_dashboard_user_request [ListDashboardUserRequest] + # Retrieve Link Sessions For Your User + # This endpoint can be used for your end users after they complete the Link flow. This endpoint returns a list of Link sessions that your user completed, where each session includes the results from the Link flow. These results include details about the Item that was created and some product related metadata(for e.g. whether the user finished the bank income verification step). + # @param credit_sessions_get_request [CreditSessionsGetRequest] # @param [Hash] opts the optional parameters - # @return [PaginatedDashboardUserListResponse] - def dashboard_user_list(list_dashboard_user_request, opts = {}) - data, _status_code, _headers = dashboard_user_list_with_http_info(list_dashboard_user_request, opts) + # @return [CreditSessionsGetResponse] + def credit_sessions_get(credit_sessions_get_request, opts = {}) + data, _status_code, _headers = credit_sessions_get_with_http_info(credit_sessions_get_request, opts) data end - # List dashboard users - # List all dashboard users associated with your account. - # @param list_dashboard_user_request [ListDashboardUserRequest] + # Retrieve Link Sessions For Your User + # This endpoint can be used for your end users after they complete the Link flow. This endpoint returns a list of Link sessions that your user completed, where each session includes the results from the Link flow. These results include details about the Item that was created and some product related metadata(for e.g. whether the user finished the bank income verification step). + # @param credit_sessions_get_request [CreditSessionsGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaginatedDashboardUserListResponse, Integer, Hash)>] PaginatedDashboardUserListResponse data, response status code and response headers - def dashboard_user_list_with_http_info(list_dashboard_user_request, opts = {}) + # @return [Array<(CreditSessionsGetResponse, Integer, Hash)>] CreditSessionsGetResponse data, response status code and response headers + def credit_sessions_get_with_http_info(credit_sessions_get_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.dashboard_user_list ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.credit_sessions_get ...' end - # verify the required parameter 'list_dashboard_user_request' is set - if @api_client.config.client_side_validation && list_dashboard_user_request.nil? - fail ArgumentError, "Missing the required parameter 'list_dashboard_user_request' when calling PlaidApi.dashboard_user_list" + # verify the required parameter 'credit_sessions_get_request' is set + if @api_client.config.client_side_validation && credit_sessions_get_request.nil? + fail ArgumentError, "Missing the required parameter 'credit_sessions_get_request' when calling PlaidApi.credit_sessions_get" end # resource path - local_var_path = '/dashboard_user/list' + local_var_path = '/credit/sessions/get' # query parameters query_params = opts[:query_params] || {} @@ -2789,16 +2594,16 @@ def dashboard_user_list_with_http_info(list_dashboard_user_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(list_dashboard_user_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(credit_sessions_get_request) # return_type - return_type = opts[:debug_return_type] || 'PaginatedDashboardUserListResponse' + return_type = opts[:debug_return_type] || 'CreditSessionsGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.dashboard_user_list", + :operation => :"PlaidApi.credit_sessions_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2809,33 +2614,33 @@ def dashboard_user_list_with_http_info(list_dashboard_user_request, opts = {}) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: PlaidApi#dashboard_user_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#credit_sessions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a dashboard user # Retrieve information about a dashboard user. - # @param get_dashboard_user_request [GetDashboardUserRequest] + # @param dashboard_user_get_request [DashboardUserGetRequest] # @param [Hash] opts the optional parameters - # @return [DashboardUserResponse] - def dashobard_user_get(get_dashboard_user_request, opts = {}) - data, _status_code, _headers = dashobard_user_get_with_http_info(get_dashboard_user_request, opts) + # @return [DashboardUserGetResponse] + def dashboard_user_get(dashboard_user_get_request, opts = {}) + data, _status_code, _headers = dashboard_user_get_with_http_info(dashboard_user_get_request, opts) data end # Retrieve a dashboard user # Retrieve information about a dashboard user. - # @param get_dashboard_user_request [GetDashboardUserRequest] + # @param dashboard_user_get_request [DashboardUserGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(DashboardUserResponse, Integer, Hash)>] DashboardUserResponse data, response status code and response headers - def dashobard_user_get_with_http_info(get_dashboard_user_request, opts = {}) + # @return [Array<(DashboardUserGetResponse, Integer, Hash)>] DashboardUserGetResponse data, response status code and response headers + def dashboard_user_get_with_http_info(dashboard_user_get_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.dashobard_user_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.dashboard_user_get ...' end - # verify the required parameter 'get_dashboard_user_request' is set - if @api_client.config.client_side_validation && get_dashboard_user_request.nil? - fail ArgumentError, "Missing the required parameter 'get_dashboard_user_request' when calling PlaidApi.dashobard_user_get" + # verify the required parameter 'dashboard_user_get_request' is set + if @api_client.config.client_side_validation && dashboard_user_get_request.nil? + fail ArgumentError, "Missing the required parameter 'dashboard_user_get_request' when calling PlaidApi.dashboard_user_get" end # resource path local_var_path = '/dashboard_user/get' @@ -2854,16 +2659,16 @@ def dashobard_user_get_with_http_info(get_dashboard_user_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(get_dashboard_user_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(dashboard_user_get_request) # return_type - return_type = opts[:debug_return_type] || 'DashboardUserResponse' + return_type = opts[:debug_return_type] || 'DashboardUserGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.dashobard_user_get", + :operation => :"PlaidApi.dashboard_user_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2874,7 +2679,72 @@ def dashobard_user_get_with_http_info(get_dashboard_user_request, opts = {}) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: PlaidApi#dashobard_user_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#dashboard_user_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List dashboard users + # List all dashboard users associated with your account. + # @param dashboard_user_list_request [DashboardUserListRequest] + # @param [Hash] opts the optional parameters + # @return [DashboardUserListResponse] + def dashboard_user_list(dashboard_user_list_request, opts = {}) + data, _status_code, _headers = dashboard_user_list_with_http_info(dashboard_user_list_request, opts) + data + end + + # List dashboard users + # List all dashboard users associated with your account. + # @param dashboard_user_list_request [DashboardUserListRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(DashboardUserListResponse, Integer, Hash)>] DashboardUserListResponse data, response status code and response headers + def dashboard_user_list_with_http_info(dashboard_user_list_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.dashboard_user_list ...' + end + # verify the required parameter 'dashboard_user_list_request' is set + if @api_client.config.client_side_validation && dashboard_user_list_request.nil? + fail ArgumentError, "Missing the required parameter 'dashboard_user_list_request' when calling PlaidApi.dashboard_user_list" + end + # resource path + local_var_path = '/dashboard_user/list' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(dashboard_user_list_request) + + # return_type + return_type = opts[:debug_return_type] || 'DashboardUserListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.dashboard_user_list", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PlaidApi#dashboard_user_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -3403,7 +3273,7 @@ def identity_match_with_http_info(identity_match_request, opts = {}) # Create a new Identity Verification for the user specified by the `client_user_id` field. The requirements and behavior of the verification are determined by the `template_id` provided. If you don't know whether the associated user already has an active Identity Verification, you can specify `\"is_idempotent\": true` in the request body. With idempotency enabled, a new Identity Verification will only be created if one does not already exist for the associated `client_user_id` and `template_id`. If an Identity Verification is found, it will be returned unmodified with an `200 OK` HTTP status code. # @param identity_verification_create_request [IdentityVerificationCreateRequest] # @param [Hash] opts the optional parameters - # @return [IdentityVerificationResponse] + # @return [IdentityVerificationCreateResponse] def identity_verification_create(identity_verification_create_request, opts = {}) data, _status_code, _headers = identity_verification_create_with_http_info(identity_verification_create_request, opts) data @@ -3413,7 +3283,7 @@ def identity_verification_create(identity_verification_create_request, opts = {} # Create a new Identity Verification for the user specified by the `client_user_id` field. The requirements and behavior of the verification are determined by the `template_id` provided. If you don't know whether the associated user already has an active Identity Verification, you can specify `\"is_idempotent\": true` in the request body. With idempotency enabled, a new Identity Verification will only be created if one does not already exist for the associated `client_user_id` and `template_id`. If an Identity Verification is found, it will be returned unmodified with an `200 OK` HTTP status code. # @param identity_verification_create_request [IdentityVerificationCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(IdentityVerificationResponse, Integer, Hash)>] IdentityVerificationResponse data, response status code and response headers + # @return [Array<(IdentityVerificationCreateResponse, Integer, Hash)>] IdentityVerificationCreateResponse data, response status code and response headers def identity_verification_create_with_http_info(identity_verification_create_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.identity_verification_create ...' @@ -3442,7 +3312,7 @@ def identity_verification_create_with_http_info(identity_verification_create_req post_body = opts[:debug_body] || @api_client.object_to_http_body(identity_verification_create_request) # return_type - return_type = opts[:debug_return_type] || 'IdentityVerificationResponse' + return_type = opts[:debug_return_type] || 'IdentityVerificationCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -3466,26 +3336,26 @@ def identity_verification_create_with_http_info(identity_verification_create_req # Retrieve Identity Verification # Retrieve a previously created identity verification - # @param get_identity_verification_request [GetIdentityVerificationRequest] + # @param identity_verification_get_request [IdentityVerificationGetRequest] # @param [Hash] opts the optional parameters - # @return [IdentityVerificationResponse] - def identity_verification_get(get_identity_verification_request, opts = {}) - data, _status_code, _headers = identity_verification_get_with_http_info(get_identity_verification_request, opts) + # @return [IdentityVerificationGetResponse] + def identity_verification_get(identity_verification_get_request, opts = {}) + data, _status_code, _headers = identity_verification_get_with_http_info(identity_verification_get_request, opts) data end # Retrieve Identity Verification # Retrieve a previously created identity verification - # @param get_identity_verification_request [GetIdentityVerificationRequest] + # @param identity_verification_get_request [IdentityVerificationGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(IdentityVerificationResponse, Integer, Hash)>] IdentityVerificationResponse data, response status code and response headers - def identity_verification_get_with_http_info(get_identity_verification_request, opts = {}) + # @return [Array<(IdentityVerificationGetResponse, Integer, Hash)>] IdentityVerificationGetResponse data, response status code and response headers + def identity_verification_get_with_http_info(identity_verification_get_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.identity_verification_get ...' end - # verify the required parameter 'get_identity_verification_request' is set - if @api_client.config.client_side_validation && get_identity_verification_request.nil? - fail ArgumentError, "Missing the required parameter 'get_identity_verification_request' when calling PlaidApi.identity_verification_get" + # verify the required parameter 'identity_verification_get_request' is set + if @api_client.config.client_side_validation && identity_verification_get_request.nil? + fail ArgumentError, "Missing the required parameter 'identity_verification_get_request' when calling PlaidApi.identity_verification_get" end # resource path local_var_path = '/identity_verification/get' @@ -3504,10 +3374,10 @@ def identity_verification_get_with_http_info(get_identity_verification_request, form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(get_identity_verification_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(identity_verification_get_request) # return_type - return_type = opts[:debug_return_type] || 'IdentityVerificationResponse' + return_type = opts[:debug_return_type] || 'IdentityVerificationGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -3531,26 +3401,26 @@ def identity_verification_get_with_http_info(get_identity_verification_request, # List Identity Verifications # Filter and list Identity Verifications created by your account - # @param list_identity_verification_request [ListIdentityVerificationRequest] + # @param identity_verification_list_request [IdentityVerificationListRequest] # @param [Hash] opts the optional parameters - # @return [PaginatedIdentityVerificationListResponse] - def identity_verification_list(list_identity_verification_request, opts = {}) - data, _status_code, _headers = identity_verification_list_with_http_info(list_identity_verification_request, opts) + # @return [IdentityVerificationListResponse] + def identity_verification_list(identity_verification_list_request, opts = {}) + data, _status_code, _headers = identity_verification_list_with_http_info(identity_verification_list_request, opts) data end # List Identity Verifications # Filter and list Identity Verifications created by your account - # @param list_identity_verification_request [ListIdentityVerificationRequest] + # @param identity_verification_list_request [IdentityVerificationListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaginatedIdentityVerificationListResponse, Integer, Hash)>] PaginatedIdentityVerificationListResponse data, response status code and response headers - def identity_verification_list_with_http_info(list_identity_verification_request, opts = {}) + # @return [Array<(IdentityVerificationListResponse, Integer, Hash)>] IdentityVerificationListResponse data, response status code and response headers + def identity_verification_list_with_http_info(identity_verification_list_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.identity_verification_list ...' end - # verify the required parameter 'list_identity_verification_request' is set - if @api_client.config.client_side_validation && list_identity_verification_request.nil? - fail ArgumentError, "Missing the required parameter 'list_identity_verification_request' when calling PlaidApi.identity_verification_list" + # verify the required parameter 'identity_verification_list_request' is set + if @api_client.config.client_side_validation && identity_verification_list_request.nil? + fail ArgumentError, "Missing the required parameter 'identity_verification_list_request' when calling PlaidApi.identity_verification_list" end # resource path local_var_path = '/identity_verification/list' @@ -3569,10 +3439,10 @@ def identity_verification_list_with_http_info(list_identity_verification_request form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(list_identity_verification_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(identity_verification_list_request) # return_type - return_type = opts[:debug_return_type] || 'PaginatedIdentityVerificationListResponse' + return_type = opts[:debug_return_type] || 'IdentityVerificationListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -3598,7 +3468,7 @@ def identity_verification_list_with_http_info(list_identity_verification_request # Allow a customer to retry their identity verification # @param identity_verification_retry_request [IdentityVerificationRetryRequest] # @param [Hash] opts the optional parameters - # @return [IdentityVerificationResponse] + # @return [IdentityVerificationRetryResponse] def identity_verification_retry(identity_verification_retry_request, opts = {}) data, _status_code, _headers = identity_verification_retry_with_http_info(identity_verification_retry_request, opts) data @@ -3608,7 +3478,7 @@ def identity_verification_retry(identity_verification_retry_request, opts = {}) # Allow a customer to retry their identity verification # @param identity_verification_retry_request [IdentityVerificationRetryRequest] # @param [Hash] opts the optional parameters - # @return [Array<(IdentityVerificationResponse, Integer, Hash)>] IdentityVerificationResponse data, response status code and response headers + # @return [Array<(IdentityVerificationRetryResponse, Integer, Hash)>] IdentityVerificationRetryResponse data, response status code and response headers def identity_verification_retry_with_http_info(identity_verification_retry_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.identity_verification_retry ...' @@ -3637,7 +3507,7 @@ def identity_verification_retry_with_http_info(identity_verification_retry_reque post_body = opts[:debug_body] || @api_client.object_to_http_body(identity_verification_retry_request) # return_type - return_type = opts[:debug_return_type] || 'IdentityVerificationResponse' + return_type = opts[:debug_return_type] || 'IdentityVerificationRetryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -5024,6 +4894,136 @@ def liabilities_get_with_http_info(liabilities_get_request, opts = {}) return data, status_code, headers end + # Create link delivery session + # Use the `/link_delivery/create` endpoint to create a Link Delivery session. + # @param link_delivery_create_request [LinkDeliveryCreateRequest] + # @param [Hash] opts the optional parameters + # @return [LinkDeliveryCreateResponse] + def link_delivery_create(link_delivery_create_request, opts = {}) + data, _status_code, _headers = link_delivery_create_with_http_info(link_delivery_create_request, opts) + data + end + + # Create link delivery session + # Use the `/link_delivery/create` endpoint to create a Link Delivery session. + # @param link_delivery_create_request [LinkDeliveryCreateRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(LinkDeliveryCreateResponse, Integer, Hash)>] LinkDeliveryCreateResponse data, response status code and response headers + def link_delivery_create_with_http_info(link_delivery_create_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.link_delivery_create ...' + end + # verify the required parameter 'link_delivery_create_request' is set + if @api_client.config.client_side_validation && link_delivery_create_request.nil? + fail ArgumentError, "Missing the required parameter 'link_delivery_create_request' when calling PlaidApi.link_delivery_create" + end + # resource path + local_var_path = '/link_delivery/create' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(link_delivery_create_request) + + # return_type + return_type = opts[:debug_return_type] || 'LinkDeliveryCreateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.link_delivery_create", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PlaidApi#link_delivery_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get link delivery session + # Use the `/link_delivery/get` endpoint to get the status of a Link Delivery session. + # @param link_delivery_get_request [LinkDeliveryGetRequest] + # @param [Hash] opts the optional parameters + # @return [LinkDeliveryGetResponse] + def link_delivery_get(link_delivery_get_request, opts = {}) + data, _status_code, _headers = link_delivery_get_with_http_info(link_delivery_get_request, opts) + data + end + + # Get link delivery session + # Use the `/link_delivery/get` endpoint to get the status of a Link Delivery session. + # @param link_delivery_get_request [LinkDeliveryGetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(LinkDeliveryGetResponse, Integer, Hash)>] LinkDeliveryGetResponse data, response status code and response headers + def link_delivery_get_with_http_info(link_delivery_get_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.link_delivery_get ...' + end + # verify the required parameter 'link_delivery_get_request' is set + if @api_client.config.client_side_validation && link_delivery_get_request.nil? + fail ArgumentError, "Missing the required parameter 'link_delivery_get_request' when calling PlaidApi.link_delivery_get" + end + # resource path + local_var_path = '/link_delivery/get' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(link_delivery_get_request) + + # return_type + return_type = opts[:debug_return_type] || 'LinkDeliveryGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.link_delivery_get", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PlaidApi#link_delivery_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create Link Token # The `/link/token/create` endpoint creates a `link_token`, which is required as a parameter when initializing Link. Once Link has been initialized, it returns a `public_token`, which can then be exchanged for an `access_token` via `/item/public_token/exchange` as part of the main Link flow. A `link_token` generated by `/link/token/create` is also used to initialize other Link flows, such as the update mode flow for tokens with expired credentials, or the Payment Initiation (Europe) flow. # @param link_token_create_request [LinkTokenCreateRequest] @@ -5154,31 +5154,96 @@ def link_token_get_with_http_info(link_token_get_request, opts = {}) return data, status_code, headers end - # Creates a new client for a reseller partner end customer. - # The `/partner/v1/customers/create` endpoint is used by reseller partners to create an end customer client. - # @param partner_customers_create_request [PartnerCustomersCreateRequest] + # Creates a new end customer for a Plaid reseller. + # The `/partner/customer/create` endpoint is used by reseller partners to create end customers. + # @param partner_customer_create_request [PartnerCustomerCreateRequest] + # @param [Hash] opts the optional parameters + # @return [PartnerCustomerCreateResponse] + def partner_customer_create(partner_customer_create_request, opts = {}) + data, _status_code, _headers = partner_customer_create_with_http_info(partner_customer_create_request, opts) + data + end + + # Creates a new end customer for a Plaid reseller. + # The `/partner/customer/create` endpoint is used by reseller partners to create end customers. + # @param partner_customer_create_request [PartnerCustomerCreateRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(PartnerCustomerCreateResponse, Integer, Hash)>] PartnerCustomerCreateResponse data, response status code and response headers + def partner_customer_create_with_http_info(partner_customer_create_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.partner_customer_create ...' + end + # verify the required parameter 'partner_customer_create_request' is set + if @api_client.config.client_side_validation && partner_customer_create_request.nil? + fail ArgumentError, "Missing the required parameter 'partner_customer_create_request' when calling PlaidApi.partner_customer_create" + end + # resource path + local_var_path = '/partner/customer/create' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(partner_customer_create_request) + + # return_type + return_type = opts[:debug_return_type] || 'PartnerCustomerCreateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.partner_customer_create", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PlaidApi#partner_customer_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Returns a Plaid reseller's end customer. + # The `/partner/customer/get` endpoint is used by reseller partners to retrieve data about a single end customer. + # @param partner_customer_get_request [PartnerCustomerGetRequest] # @param [Hash] opts the optional parameters - # @return [PartnerCustomersCreateResponse] - def partner_customers_create(partner_customers_create_request, opts = {}) - data, _status_code, _headers = partner_customers_create_with_http_info(partner_customers_create_request, opts) + # @return [PartnerCustomerGetResponse] + def partner_customer_get(partner_customer_get_request, opts = {}) + data, _status_code, _headers = partner_customer_get_with_http_info(partner_customer_get_request, opts) data end - # Creates a new client for a reseller partner end customer. - # The `/partner/v1/customers/create` endpoint is used by reseller partners to create an end customer client. - # @param partner_customers_create_request [PartnerCustomersCreateRequest] + # Returns a Plaid reseller's end customer. + # The `/partner/customer/get` endpoint is used by reseller partners to retrieve data about a single end customer. + # @param partner_customer_get_request [PartnerCustomerGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PartnerCustomersCreateResponse, Integer, Hash)>] PartnerCustomersCreateResponse data, response status code and response headers - def partner_customers_create_with_http_info(partner_customers_create_request, opts = {}) + # @return [Array<(PartnerCustomerGetResponse, Integer, Hash)>] PartnerCustomerGetResponse data, response status code and response headers + def partner_customer_get_with_http_info(partner_customer_get_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.partner_customers_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.partner_customer_get ...' end - # verify the required parameter 'partner_customers_create_request' is set - if @api_client.config.client_side_validation && partner_customers_create_request.nil? - fail ArgumentError, "Missing the required parameter 'partner_customers_create_request' when calling PlaidApi.partner_customers_create" + # verify the required parameter 'partner_customer_get_request' is set + if @api_client.config.client_side_validation && partner_customer_get_request.nil? + fail ArgumentError, "Missing the required parameter 'partner_customer_get_request' when calling PlaidApi.partner_customer_get" end # resource path - local_var_path = '/beta/partner/v1/customers/create' + local_var_path = '/partner/customer/get' # query parameters query_params = opts[:query_params] || {} @@ -5194,16 +5259,16 @@ def partner_customers_create_with_http_info(partner_customers_create_request, op form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(partner_customers_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(partner_customer_get_request) # return_type - return_type = opts[:debug_return_type] || 'PartnerCustomersCreateResponse' + return_type = opts[:debug_return_type] || 'PartnerCustomerGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.partner_customers_create", + :operation => :"PlaidApi.partner_customer_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5214,7 +5279,7 @@ def partner_customers_create_with_http_info(partner_customers_create_request, op data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: PlaidApi#partner_customers_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#partner_customer_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -5675,7 +5740,7 @@ def payment_initiation_payment_list_with_http_info(payment_initiation_payment_li end # Reverse an existing payment - # Reverse a previously initiated payment. A payment can only be reversed once and will be refunded to the original sender's account. + # Reverse a previously settled payment from a Plaid virtual account. The original payment must be in a settled state to be refunded and only full payment refunds are currently supported. To power partial refunds, use `/wallet/transaction/execute`, where you can specify the exact amount for a payout to an end user. A payment can only be reversed once and will be refunded back to the same source account that initiated the payment. The original payment must have been initiated to a Plaid virtual account. The refund will be initiated from the same virtual account that the payment was paid into. # @param payment_initiation_payment_reverse_request [PaymentInitiationPaymentReverseRequest] # @param [Hash] opts the optional parameters # @return [PaymentInitiationPaymentReverseResponse] @@ -5685,7 +5750,7 @@ def payment_initiation_payment_reverse(payment_initiation_payment_reverse_reques end # Reverse an existing payment - # Reverse a previously initiated payment. A payment can only be reversed once and will be refunded to the original sender's account. + # Reverse a previously settled payment from a Plaid virtual account. The original payment must be in a settled state to be refunded and only full payment refunds are currently supported. To power partial refunds, use `/wallet/transaction/execute`, where you can specify the exact amount for a payout to an end user. A payment can only be reversed once and will be refunded back to the same source account that initiated the payment. The original payment must have been initiated to a Plaid virtual account. The refund will be initiated from the same virtual account that the payment was paid into. # @param payment_initiation_payment_reverse_request [PaymentInitiationPaymentReverseRequest] # @param [Hash] opts the optional parameters # @return [Array<(PaymentInitiationPaymentReverseResponse, Integer, Hash)>] PaymentInitiationPaymentReverseResponse data, response status code and response headers @@ -5740,7 +5805,7 @@ def payment_initiation_payment_reverse_with_http_info(payment_initiation_payment end # Create payment recipient - # Create a payment recipient for payment initiation. The recipient must be in Europe, within a country that is a member of the Single Euro Payment Area (SEPA). For a standing order (recurring) payment, the recipient must be in the UK. The endpoint is idempotent: if a developer has already made a request with the same payment details, Plaid will return the same `recipient_id`. + # Create a payment recipient for payment initiation. The recipient must be in Europe, within a country that is a member of the Single Euro Payment Area (SEPA). For a standing order (recurring) payment, the recipient must be in the UK. It is recommended to use `bacs` in the UK and `iban` in EU. The endpoint is idempotent: if a developer has already made a request with the same payment details, Plaid will return the same `recipient_id`. # @param payment_initiation_recipient_create_request [PaymentInitiationRecipientCreateRequest] # @param [Hash] opts the optional parameters # @return [PaymentInitiationRecipientCreateResponse] @@ -5750,7 +5815,7 @@ def payment_initiation_recipient_create(payment_initiation_recipient_create_requ end # Create payment recipient - # Create a payment recipient for payment initiation. The recipient must be in Europe, within a country that is a member of the Single Euro Payment Area (SEPA). For a standing order (recurring) payment, the recipient must be in the UK. The endpoint is idempotent: if a developer has already made a request with the same payment details, Plaid will return the same `recipient_id`. + # Create a payment recipient for payment initiation. The recipient must be in Europe, within a country that is a member of the Single Euro Payment Area (SEPA). For a standing order (recurring) payment, the recipient must be in the UK. It is recommended to use `bacs` in the UK and `iban` in EU. The endpoint is idempotent: if a developer has already made a request with the same payment details, Plaid will return the same `recipient_id`. # @param payment_initiation_recipient_create_request [PaymentInitiationRecipientCreateRequest] # @param [Hash] opts the optional parameters # @return [Array<(PaymentInitiationRecipientCreateResponse, Integer, Hash)>] PaymentInitiationRecipientCreateResponse data, response status code and response headers @@ -5935,7 +6000,7 @@ def payment_initiation_recipient_list_with_http_info(payment_initiation_recipien end # Create payment profile - # Use `/payment_profile/create` endpoint to create a new payment profile, the return value is a Payment Profile ID. Attach it to the link token create request and the link workflow will then \"activate\" this Payment Profile if the linkage is successful. It can then be used to create Transfers using `/transfer/authorization/create` and /transfer/create`. + # Use `/payment_profile/create` endpoint to create a new payment profile, identified by a Payment Profile ID. To initiate the account linking experience, call `/link/token/create` and provide the Payment Profile ID in the `transfer.payment_profile_id` field. You can then use the Payment Profile ID when creating transfers using `/transfer/authorization/create` and `/transfer/create`. # @param payment_profile_create_request [PaymentProfileCreateRequest] # @param [Hash] opts the optional parameters # @return [PaymentProfileCreateResponse] @@ -5945,7 +6010,7 @@ def payment_profile_create(payment_profile_create_request, opts = {}) end # Create payment profile - # Use `/payment_profile/create` endpoint to create a new payment profile, the return value is a Payment Profile ID. Attach it to the link token create request and the link workflow will then \"activate\" this Payment Profile if the linkage is successful. It can then be used to create Transfers using `/transfer/authorization/create` and /transfer/create`. + # Use `/payment_profile/create` endpoint to create a new payment profile, identified by a Payment Profile ID. To initiate the account linking experience, call `/link/token/create` and provide the Payment Profile ID in the `transfer.payment_profile_id` field. You can then use the Payment Profile ID when creating transfers using `/transfer/authorization/create` and `/transfer/create`. # @param payment_profile_create_request [PaymentProfileCreateRequest] # @param [Hash] opts the optional parameters # @return [Array<(PaymentProfileCreateResponse, Integer, Hash)>] PaymentProfileCreateResponse data, response status code and response headers @@ -6000,7 +6065,7 @@ def payment_profile_create_with_http_info(payment_profile_create_request, opts = end # Get payment profile - # Use the `/payment_profile/get` endpoint to get the status of a given Payment Profile. + # Use `/payment_profile/get` endpoint to get the status of a given Payment Profile. # @param payment_profile_get_request [PaymentProfileGetRequest] # @param [Hash] opts the optional parameters # @return [PaymentProfileGetResponse] @@ -6010,7 +6075,7 @@ def payment_profile_get(payment_profile_get_request, opts = {}) end # Get payment profile - # Use the `/payment_profile/get` endpoint to get the status of a given Payment Profile. + # Use `/payment_profile/get` endpoint to get the status of a given Payment Profile. # @param payment_profile_get_request [PaymentProfileGetRequest] # @param [Hash] opts the optional parameters # @return [Array<(PaymentProfileGetResponse, Integer, Hash)>] PaymentProfileGetResponse data, response status code and response headers @@ -6455,7 +6520,7 @@ def processor_identity_get_with_http_info(processor_identity_get_request, opts = end # Create Stripe bank account token - # Used to create a token suitable for sending to Stripe to enable Plaid-Stripe integrations. For a detailed guide on integrating Stripe, see [Add Stripe to your app](https://plaid.com/docs/auth/partnerships/stripe/). Bank account tokens can also be revoked, using `/item/remove`. + # Used to create a token suitable for sending to Stripe to enable Plaid-Stripe integrations. For a detailed guide on integrating Stripe, see [Add Stripe to your app](https://plaid.com/docs/auth/partnerships/stripe/). Note that the Stripe bank account token is a one-time use token. To store bank account information for later use, you can use a Stripe customer object and create an associated bank account from the token, or you can use a Stripe Custom account and create an associated external bank account from the token. This bank account information should work indefinitely, unless the user's bank account information changes or they revoke Plaid's permissions to access their account. Stripe bank account information cannot be modified once the bank account token has been created. If you ever need to change the bank account details used by Stripe for a specific customer, have the user go through Link again and create a new bank account token from the new `access_token`. Bank account tokens can also be revoked, using `/item/remove`.' # @param processor_stripe_bank_account_token_create_request [ProcessorStripeBankAccountTokenCreateRequest] # @param [Hash] opts the optional parameters # @return [ProcessorStripeBankAccountTokenCreateResponse] @@ -6465,7 +6530,7 @@ def processor_stripe_bank_account_token_create(processor_stripe_bank_account_tok end # Create Stripe bank account token - # Used to create a token suitable for sending to Stripe to enable Plaid-Stripe integrations. For a detailed guide on integrating Stripe, see [Add Stripe to your app](https://plaid.com/docs/auth/partnerships/stripe/). Bank account tokens can also be revoked, using `/item/remove`. + # Used to create a token suitable for sending to Stripe to enable Plaid-Stripe integrations. For a detailed guide on integrating Stripe, see [Add Stripe to your app](https://plaid.com/docs/auth/partnerships/stripe/). Note that the Stripe bank account token is a one-time use token. To store bank account information for later use, you can use a Stripe customer object and create an associated bank account from the token, or you can use a Stripe Custom account and create an associated external bank account from the token. This bank account information should work indefinitely, unless the user's bank account information changes or they revoke Plaid's permissions to access their account. Stripe bank account information cannot be modified once the bank account token has been created. If you ever need to change the bank account details used by Stripe for a specific customer, have the user go through Link again and create a new bank account token from the new `access_token`. Bank account tokens can also be revoked, using `/item/remove`.' # @param processor_stripe_bank_account_token_create_request [ProcessorStripeBankAccountTokenCreateRequest] # @param [Hash] opts the optional parameters # @return [Array<(ProcessorStripeBankAccountTokenCreateResponse, Integer, Hash)>] ProcessorStripeBankAccountTokenCreateResponse data, response status code and response headers @@ -6520,7 +6585,7 @@ def processor_stripe_bank_account_token_create_with_http_info(processor_stripe_b end # Create processor token - # Used to create a token suitable for sending to one of Plaid's partners to enable integrations. Note that Stripe partnerships use bank account tokens instead; see `/processor/stripe/bank_account_token/create` for creating tokens for use with Stripe integrations. Processor tokens can also be revoked, using `/item/remove`. + # Used to create a token suitable for sending to one of Plaid's partners to enable integrations. Note that Stripe partnerships use bank account tokens instead; see `/processor/stripe/bank_account_token/create` for creating tokens for use with Stripe integrations. Once created, a processor token for a given Item cannot be modified or updated. If the account must be linked to a new or different partner resource, create a new Item by having the user go through the Link flow again; a new processor token can then be created from the new `access_token`. Processor tokens can also be revoked, using `/item/remove`. # @param processor_token_create_request [ProcessorTokenCreateRequest] # @param [Hash] opts the optional parameters # @return [ProcessorTokenCreateResponse] @@ -6530,7 +6595,7 @@ def processor_token_create(processor_token_create_request, opts = {}) end # Create processor token - # Used to create a token suitable for sending to one of Plaid's partners to enable integrations. Note that Stripe partnerships use bank account tokens instead; see `/processor/stripe/bank_account_token/create` for creating tokens for use with Stripe integrations. Processor tokens can also be revoked, using `/item/remove`. + # Used to create a token suitable for sending to one of Plaid's partners to enable integrations. Note that Stripe partnerships use bank account tokens instead; see `/processor/stripe/bank_account_token/create` for creating tokens for use with Stripe integrations. Once created, a processor token for a given Item cannot be modified or updated. If the account must be linked to a new or different partner resource, create a new Item by having the user go through the Link flow again; a new processor token can then be created from the new `access_token`. Processor tokens can also be revoked, using `/item/remove`. # @param processor_token_create_request [ProcessorTokenCreateRequest] # @param [Hash] opts the optional parameters # @return [Array<(ProcessorTokenCreateResponse, Integer, Hash)>] ProcessorTokenCreateResponse data, response status code and response headers @@ -8210,7 +8275,7 @@ def transactions_sync_with_http_info(transactions_sync_request, opts = {}) end # Create a transfer authorization - # Use the `/transfer/authorization/create` endpoint to determine transfer failure risk. In Plaid's sandbox environment the decisions will be returned as follows: - To approve a transfer with null rationale code, make an authorization request with an `amount` less than the available balance in the account. - To approve a transfer with the rationale code `MANUALLY_VERIFIED_ITEM`, create an Item in Link through the [Same Day Micro-deposits flow](https://plaid.com/docs/auth/coverage/testing/#testing-same-day-micro-deposits). - To approve a transfer with the rationale code `LOGIN_REQUIRED`, [reset the login for an Item](https://plaid.com/docs/sandbox/#item_login_required). - To decline a transfer with the rationale code `NSF`, the available balance on the account must be less than the authorization `amount`. See [Create Sandbox test data](https://plaid.com/docs/sandbox/user-custom/) for details on how to customize data in Sandbox. - To decline a transfer with the rationale code `RISK`, the available balance on the account must be exactly $0. See [Create Sandbox test data](https://plaid.com/docs/sandbox/user-custom/) for details on how to customize data in Sandbox. For guaranteed ACH customers, the following fields are required : `user.phone_number` (optional if `email_address` provided), `user.email_address` (optional if `phone_number` provided), `device.ip_address`, `device.user_agent`, and `user_present`. + # Use the `/transfer/authorization/create` endpoint to determine transfer failure risk. In Plaid's Sandbox environment the decisions will be returned as follows: - To approve a transfer with null rationale code, make an authorization request with an `amount` less than the available balance in the account. - To approve a transfer with the rationale code `MANUALLY_VERIFIED_ITEM`, create an Item in Link through the [Same Day Micro-deposits flow](https://plaid.com/docs/auth/coverage/testing/#testing-same-day-micro-deposits). - To approve a transfer with the rationale code `LOGIN_REQUIRED`, [reset the login for an Item](https://plaid.com/docs/sandbox/#item_login_required). - To decline a transfer with the rationale code `NSF`, the available balance on the account must be less than the authorization `amount`. See [Create Sandbox test data](https://plaid.com/docs/sandbox/user-custom/) for details on how to customize data in Sandbox. - To decline a transfer with the rationale code `RISK`, the available balance on the account must be exactly $0. See [Create Sandbox test data](https://plaid.com/docs/sandbox/user-custom/) for details on how to customize data in Sandbox. For [Guarantee](https://www.plaid.com/docs//transfer/guarantee/), the following fields are required : `idempotency_key`, `user.phone_number` (optional if `email_address` provided), `user.email_address` (optional if `phone_number` provided), `device.ip_address`, `device.user_agent`, and `user_present`. # @param transfer_authorization_create_request [TransferAuthorizationCreateRequest] # @param [Hash] opts the optional parameters # @return [TransferAuthorizationCreateResponse] @@ -8220,7 +8285,7 @@ def transfer_authorization_create(transfer_authorization_create_request, opts = end # Create a transfer authorization - # Use the `/transfer/authorization/create` endpoint to determine transfer failure risk. In Plaid's sandbox environment the decisions will be returned as follows: - To approve a transfer with null rationale code, make an authorization request with an `amount` less than the available balance in the account. - To approve a transfer with the rationale code `MANUALLY_VERIFIED_ITEM`, create an Item in Link through the [Same Day Micro-deposits flow](https://plaid.com/docs/auth/coverage/testing/#testing-same-day-micro-deposits). - To approve a transfer with the rationale code `LOGIN_REQUIRED`, [reset the login for an Item](https://plaid.com/docs/sandbox/#item_login_required). - To decline a transfer with the rationale code `NSF`, the available balance on the account must be less than the authorization `amount`. See [Create Sandbox test data](https://plaid.com/docs/sandbox/user-custom/) for details on how to customize data in Sandbox. - To decline a transfer with the rationale code `RISK`, the available balance on the account must be exactly $0. See [Create Sandbox test data](https://plaid.com/docs/sandbox/user-custom/) for details on how to customize data in Sandbox. For guaranteed ACH customers, the following fields are required : `user.phone_number` (optional if `email_address` provided), `user.email_address` (optional if `phone_number` provided), `device.ip_address`, `device.user_agent`, and `user_present`. + # Use the `/transfer/authorization/create` endpoint to determine transfer failure risk. In Plaid's Sandbox environment the decisions will be returned as follows: - To approve a transfer with null rationale code, make an authorization request with an `amount` less than the available balance in the account. - To approve a transfer with the rationale code `MANUALLY_VERIFIED_ITEM`, create an Item in Link through the [Same Day Micro-deposits flow](https://plaid.com/docs/auth/coverage/testing/#testing-same-day-micro-deposits). - To approve a transfer with the rationale code `LOGIN_REQUIRED`, [reset the login for an Item](https://plaid.com/docs/sandbox/#item_login_required). - To decline a transfer with the rationale code `NSF`, the available balance on the account must be less than the authorization `amount`. See [Create Sandbox test data](https://plaid.com/docs/sandbox/user-custom/) for details on how to customize data in Sandbox. - To decline a transfer with the rationale code `RISK`, the available balance on the account must be exactly $0. See [Create Sandbox test data](https://plaid.com/docs/sandbox/user-custom/) for details on how to customize data in Sandbox. For [Guarantee](https://www.plaid.com/docs//transfer/guarantee/), the following fields are required : `idempotency_key`, `user.phone_number` (optional if `email_address` provided), `user.email_address` (optional if `phone_number` provided), `device.ip_address`, `device.user_agent`, and `user_present`. # @param transfer_authorization_create_request [TransferAuthorizationCreateRequest] # @param [Hash] opts the optional parameters # @return [Array<(TransferAuthorizationCreateResponse, Integer, Hash)>] TransferAuthorizationCreateResponse data, response status code and response headers @@ -8275,7 +8340,7 @@ def transfer_authorization_create_with_http_info(transfer_authorization_create_r end # Cancel a transfer - # Use the `/transfer/cancel` endpoint to cancel a transfer. A transfer is eligible for cancelation if the `cancellable` property returned by `/transfer/get` is `true`. + # Use the `/transfer/cancel` endpoint to cancel a transfer. A transfer is eligible for cancellation if the `cancellable` property returned by `/transfer/get` is `true`. # @param transfer_cancel_request [TransferCancelRequest] # @param [Hash] opts the optional parameters # @return [TransferCancelResponse] @@ -8285,7 +8350,7 @@ def transfer_cancel(transfer_cancel_request, opts = {}) end # Cancel a transfer - # Use the `/transfer/cancel` endpoint to cancel a transfer. A transfer is eligible for cancelation if the `cancellable` property returned by `/transfer/get` is `true`. + # Use the `/transfer/cancel` endpoint to cancel a transfer. A transfer is eligible for cancellation if the `cancellable` property returned by `/transfer/get` is `true`. # @param transfer_cancel_request [TransferCancelRequest] # @param [Hash] opts the optional parameters # @return [Array<(TransferCancelResponse, Integer, Hash)>] TransferCancelResponse data, response status code and response headers @@ -9120,7 +9185,7 @@ def transfer_sweep_list_with_http_info(transfer_sweep_list_request, opts = {}) end # Create user - # This endpoint should be called for each of your end users before they begin a Plaid income flow. This provides you a single token to access all income data associated with the user. You should only create one per end user. If you call the endpoint multiple times with the same `client_user_id`, the first creation call will succeed and the rest will fail with an error message indicating that the user has been created for the given `client_user_id`. + # This endpoint should be called for each of your end users before they begin a Plaid income flow. This provides you a single token to access all income data associated with the user. You should only create one per end user. If you call the endpoint multiple times with the same `client_user_id`, the first creation call will succeed and the rest will fail with an error message indicating that the user has been created for the given `client_user_id`. Ensure that you store the `user_token` along with your user's identifier in your database, as it is not possible to retrieve a previously created `user_token`. # @param user_create_request [UserCreateRequest] # @param [Hash] opts the optional parameters # @return [UserCreateResponse] @@ -9130,7 +9195,7 @@ def user_create(user_create_request, opts = {}) end # Create user - # This endpoint should be called for each of your end users before they begin a Plaid income flow. This provides you a single token to access all income data associated with the user. You should only create one per end user. If you call the endpoint multiple times with the same `client_user_id`, the first creation call will succeed and the rest will fail with an error message indicating that the user has been created for the given `client_user_id`. + # This endpoint should be called for each of your end users before they begin a Plaid income flow. This provides you a single token to access all income data associated with the user. You should only create one per end user. If you call the endpoint multiple times with the same `client_user_id`, the first creation call will succeed and the rest will fail with an error message indicating that the user has been created for the given `client_user_id`. Ensure that you store the `user_token` along with your user's identifier in your database, as it is not possible to retrieve a previously created `user_token`. # @param user_create_request [UserCreateRequest] # @param [Hash] opts the optional parameters # @return [Array<(UserCreateResponse, Integer, Hash)>] UserCreateResponse data, response status code and response headers @@ -9380,7 +9445,7 @@ def wallet_list_with_http_info(wallet_list_request, opts = {}) end # Execute a transaction using an e-wallet - # Execute a transaction using the specified e-wallet. Specify the e-wallet to debit from, the counterparty to credit to, the idempotency key to prevent duplicate payouts, the amount and reference for the payout. The payouts are executed over the Faster Payment rails, where settlement usually only takes a few seconds. + # Execute a transaction using the specified e-wallet. Specify the e-wallet to debit from, the counterparty to credit to, the idempotency key to prevent duplicate transactions, the amount and reference for the transaction. Transactions will settle in seconds to several days, depending on the underlying payment rail. # @param wallet_transaction_execute_request [WalletTransactionExecuteRequest] # @param [Hash] opts the optional parameters # @return [WalletTransactionExecuteResponse] @@ -9390,7 +9455,7 @@ def wallet_transaction_execute(wallet_transaction_execute_request, opts = {}) end # Execute a transaction using an e-wallet - # Execute a transaction using the specified e-wallet. Specify the e-wallet to debit from, the counterparty to credit to, the idempotency key to prevent duplicate payouts, the amount and reference for the payout. The payouts are executed over the Faster Payment rails, where settlement usually only takes a few seconds. + # Execute a transaction using the specified e-wallet. Specify the e-wallet to debit from, the counterparty to credit to, the idempotency key to prevent duplicate transactions, the amount and reference for the transaction. Transactions will settle in seconds to several days, depending on the underlying payment rail. # @param wallet_transaction_execute_request [WalletTransactionExecuteRequest] # @param [Hash] opts the optional parameters # @return [Array<(WalletTransactionExecuteResponse, Integer, Hash)>] WalletTransactionExecuteResponse data, response status code and response headers @@ -9444,6 +9509,7 @@ def wallet_transaction_execute_with_http_info(wallet_transaction_execute_request return data, status_code, headers end + # Fetch an e-wallet transaction # Fetch a specific e-wallet transaction # @param wallet_transaction_get_request [WalletTransactionGetRequest] # @param [Hash] opts the optional parameters @@ -9453,6 +9519,7 @@ def wallet_transaction_get(wallet_transaction_get_request, opts = {}) data end + # Fetch an e-wallet transaction # Fetch a specific e-wallet transaction # @param wallet_transaction_get_request [WalletTransactionGetRequest] # @param [Hash] opts the optional parameters @@ -9574,26 +9641,26 @@ def wallet_transactions_list_with_http_info(wallet_transactions_list_request, op # Create a watchlist screening for an entity # Create a new entity watchlist screening to check your customer against watchlists defined in the associated entity watchlist program. If your associated program has ongoing screening enabled, this is the profile information that will be used to monitor your customer over time. - # @param create_entity_screening_request [CreateEntityScreeningRequest] + # @param watchlist_screening_entity_create_request [WatchlistScreeningEntityCreateRequest] # @param [Hash] opts the optional parameters - # @return [EntityWatchlistScreeningResponse] - def watchlist_screening_entity_create(create_entity_screening_request, opts = {}) - data, _status_code, _headers = watchlist_screening_entity_create_with_http_info(create_entity_screening_request, opts) + # @return [WatchlistScreeningEntityCreateResponse] + def watchlist_screening_entity_create(watchlist_screening_entity_create_request, opts = {}) + data, _status_code, _headers = watchlist_screening_entity_create_with_http_info(watchlist_screening_entity_create_request, opts) data end # Create a watchlist screening for an entity # Create a new entity watchlist screening to check your customer against watchlists defined in the associated entity watchlist program. If your associated program has ongoing screening enabled, this is the profile information that will be used to monitor your customer over time. - # @param create_entity_screening_request [CreateEntityScreeningRequest] + # @param watchlist_screening_entity_create_request [WatchlistScreeningEntityCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(EntityWatchlistScreeningResponse, Integer, Hash)>] EntityWatchlistScreeningResponse data, response status code and response headers - def watchlist_screening_entity_create_with_http_info(create_entity_screening_request, opts = {}) + # @return [Array<(WatchlistScreeningEntityCreateResponse, Integer, Hash)>] WatchlistScreeningEntityCreateResponse data, response status code and response headers + def watchlist_screening_entity_create_with_http_info(watchlist_screening_entity_create_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_create ...' end - # verify the required parameter 'create_entity_screening_request' is set - if @api_client.config.client_side_validation && create_entity_screening_request.nil? - fail ArgumentError, "Missing the required parameter 'create_entity_screening_request' when calling PlaidApi.watchlist_screening_entity_create" + # verify the required parameter 'watchlist_screening_entity_create_request' is set + if @api_client.config.client_side_validation && watchlist_screening_entity_create_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_entity_create_request' when calling PlaidApi.watchlist_screening_entity_create" end # resource path local_var_path = '/watchlist_screening/entity/create' @@ -9612,10 +9679,10 @@ def watchlist_screening_entity_create_with_http_info(create_entity_screening_req form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(create_entity_screening_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_entity_create_request) # return_type - return_type = opts[:debug_return_type] || 'EntityWatchlistScreeningResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningEntityCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -9639,26 +9706,26 @@ def watchlist_screening_entity_create_with_http_info(create_entity_screening_req # Get an entity screening # Retrieve an entity watchlist screening. - # @param get_entity_watchlist_screening_request [GetEntityWatchlistScreeningRequest] + # @param watchlist_screening_entity_get_request [WatchlistScreeningEntityGetRequest] # @param [Hash] opts the optional parameters - # @return [EntityWatchlistScreeningResponse] - def watchlist_screening_entity_get(get_entity_watchlist_screening_request, opts = {}) - data, _status_code, _headers = watchlist_screening_entity_get_with_http_info(get_entity_watchlist_screening_request, opts) + # @return [WatchlistScreeningEntityGetResponse] + def watchlist_screening_entity_get(watchlist_screening_entity_get_request, opts = {}) + data, _status_code, _headers = watchlist_screening_entity_get_with_http_info(watchlist_screening_entity_get_request, opts) data end # Get an entity screening # Retrieve an entity watchlist screening. - # @param get_entity_watchlist_screening_request [GetEntityWatchlistScreeningRequest] + # @param watchlist_screening_entity_get_request [WatchlistScreeningEntityGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(EntityWatchlistScreeningResponse, Integer, Hash)>] EntityWatchlistScreeningResponse data, response status code and response headers - def watchlist_screening_entity_get_with_http_info(get_entity_watchlist_screening_request, opts = {}) + # @return [Array<(WatchlistScreeningEntityGetResponse, Integer, Hash)>] WatchlistScreeningEntityGetResponse data, response status code and response headers + def watchlist_screening_entity_get_with_http_info(watchlist_screening_entity_get_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_get ...' end - # verify the required parameter 'get_entity_watchlist_screening_request' is set - if @api_client.config.client_side_validation && get_entity_watchlist_screening_request.nil? - fail ArgumentError, "Missing the required parameter 'get_entity_watchlist_screening_request' when calling PlaidApi.watchlist_screening_entity_get" + # verify the required parameter 'watchlist_screening_entity_get_request' is set + if @api_client.config.client_side_validation && watchlist_screening_entity_get_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_entity_get_request' when calling PlaidApi.watchlist_screening_entity_get" end # resource path local_var_path = '/watchlist_screening/entity/get' @@ -9677,10 +9744,10 @@ def watchlist_screening_entity_get_with_http_info(get_entity_watchlist_screening form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(get_entity_watchlist_screening_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_entity_get_request) # return_type - return_type = opts[:debug_return_type] || 'EntityWatchlistScreeningResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningEntityGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -9704,26 +9771,26 @@ def watchlist_screening_entity_get_with_http_info(get_entity_watchlist_screening # List history for entity watchlist screenings # List all changes to the entity watchlist screening in reverse-chronological order. If the watchlist screening has not been edited, no history will be returned. - # @param list_watchlist_screening_entity_history_request [ListWatchlistScreeningEntityHistoryRequest] + # @param watchlist_screening_entity_history_list_request [WatchlistScreeningEntityHistoryListRequest] # @param [Hash] opts the optional parameters - # @return [PaginatedEntityWatchlistScreeningListResponse] - def watchlist_screening_entity_history_list(list_watchlist_screening_entity_history_request, opts = {}) - data, _status_code, _headers = watchlist_screening_entity_history_list_with_http_info(list_watchlist_screening_entity_history_request, opts) + # @return [WatchlistScreeningEntityHistoryListResponse] + def watchlist_screening_entity_history_list(watchlist_screening_entity_history_list_request, opts = {}) + data, _status_code, _headers = watchlist_screening_entity_history_list_with_http_info(watchlist_screening_entity_history_list_request, opts) data end # List history for entity watchlist screenings # List all changes to the entity watchlist screening in reverse-chronological order. If the watchlist screening has not been edited, no history will be returned. - # @param list_watchlist_screening_entity_history_request [ListWatchlistScreeningEntityHistoryRequest] + # @param watchlist_screening_entity_history_list_request [WatchlistScreeningEntityHistoryListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaginatedEntityWatchlistScreeningListResponse, Integer, Hash)>] PaginatedEntityWatchlistScreeningListResponse data, response status code and response headers - def watchlist_screening_entity_history_list_with_http_info(list_watchlist_screening_entity_history_request, opts = {}) + # @return [Array<(WatchlistScreeningEntityHistoryListResponse, Integer, Hash)>] WatchlistScreeningEntityHistoryListResponse data, response status code and response headers + def watchlist_screening_entity_history_list_with_http_info(watchlist_screening_entity_history_list_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_history_list ...' end - # verify the required parameter 'list_watchlist_screening_entity_history_request' is set - if @api_client.config.client_side_validation && list_watchlist_screening_entity_history_request.nil? - fail ArgumentError, "Missing the required parameter 'list_watchlist_screening_entity_history_request' when calling PlaidApi.watchlist_screening_entity_history_list" + # verify the required parameter 'watchlist_screening_entity_history_list_request' is set + if @api_client.config.client_side_validation && watchlist_screening_entity_history_list_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_entity_history_list_request' when calling PlaidApi.watchlist_screening_entity_history_list" end # resource path local_var_path = '/watchlist_screening/entity/history/list' @@ -9742,10 +9809,10 @@ def watchlist_screening_entity_history_list_with_http_info(list_watchlist_screen form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_entity_history_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_entity_history_list_request) # return_type - return_type = opts[:debug_return_type] || 'PaginatedEntityWatchlistScreeningListResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningEntityHistoryListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -9769,26 +9836,26 @@ def watchlist_screening_entity_history_list_with_http_info(list_watchlist_screen # List hits for entity watchlist screenings # List all hits for the entity watchlist screening. - # @param list_watchlist_screening_entity_hit_request [ListWatchlistScreeningEntityHitRequest] + # @param watchlist_screening_entity_hit_list_request [WatchlistScreeningEntityHitListRequest] # @param [Hash] opts the optional parameters - # @return [PaginatedEntityWatchlistScreeningHitListResponse] - def watchlist_screening_entity_hits_list(list_watchlist_screening_entity_hit_request, opts = {}) - data, _status_code, _headers = watchlist_screening_entity_hits_list_with_http_info(list_watchlist_screening_entity_hit_request, opts) + # @return [WatchlistScreeningEntityHitListResponse] + def watchlist_screening_entity_hit_list(watchlist_screening_entity_hit_list_request, opts = {}) + data, _status_code, _headers = watchlist_screening_entity_hit_list_with_http_info(watchlist_screening_entity_hit_list_request, opts) data end # List hits for entity watchlist screenings # List all hits for the entity watchlist screening. - # @param list_watchlist_screening_entity_hit_request [ListWatchlistScreeningEntityHitRequest] + # @param watchlist_screening_entity_hit_list_request [WatchlistScreeningEntityHitListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaginatedEntityWatchlistScreeningHitListResponse, Integer, Hash)>] PaginatedEntityWatchlistScreeningHitListResponse data, response status code and response headers - def watchlist_screening_entity_hits_list_with_http_info(list_watchlist_screening_entity_hit_request, opts = {}) + # @return [Array<(WatchlistScreeningEntityHitListResponse, Integer, Hash)>] WatchlistScreeningEntityHitListResponse data, response status code and response headers + def watchlist_screening_entity_hit_list_with_http_info(watchlist_screening_entity_hit_list_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_hits_list ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_hit_list ...' end - # verify the required parameter 'list_watchlist_screening_entity_hit_request' is set - if @api_client.config.client_side_validation && list_watchlist_screening_entity_hit_request.nil? - fail ArgumentError, "Missing the required parameter 'list_watchlist_screening_entity_hit_request' when calling PlaidApi.watchlist_screening_entity_hits_list" + # verify the required parameter 'watchlist_screening_entity_hit_list_request' is set + if @api_client.config.client_side_validation && watchlist_screening_entity_hit_list_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_entity_hit_list_request' when calling PlaidApi.watchlist_screening_entity_hit_list" end # resource path local_var_path = '/watchlist_screening/entity/hit/list' @@ -9807,16 +9874,16 @@ def watchlist_screening_entity_hits_list_with_http_info(list_watchlist_screening form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_entity_hit_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_entity_hit_list_request) # return_type - return_type = opts[:debug_return_type] || 'PaginatedEntityWatchlistScreeningHitListResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningEntityHitListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.watchlist_screening_entity_hits_list", + :operation => :"PlaidApi.watchlist_screening_entity_hit_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -9827,33 +9894,33 @@ def watchlist_screening_entity_hits_list_with_http_info(list_watchlist_screening data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_entity_hits_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_entity_hit_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List entity watchlist screenings # List all entity screenings. - # @param list_entity_watchlist_screening_request [ListEntityWatchlistScreeningRequest] + # @param watchlist_screening_entity_list_request [WatchlistScreeningEntityListRequest] # @param [Hash] opts the optional parameters - # @return [PaginatedEntityWatchlistScreeningListResponse] - def watchlist_screening_entity_list(list_entity_watchlist_screening_request, opts = {}) - data, _status_code, _headers = watchlist_screening_entity_list_with_http_info(list_entity_watchlist_screening_request, opts) + # @return [WatchlistScreeningEntityListResponse] + def watchlist_screening_entity_list(watchlist_screening_entity_list_request, opts = {}) + data, _status_code, _headers = watchlist_screening_entity_list_with_http_info(watchlist_screening_entity_list_request, opts) data end # List entity watchlist screenings # List all entity screenings. - # @param list_entity_watchlist_screening_request [ListEntityWatchlistScreeningRequest] + # @param watchlist_screening_entity_list_request [WatchlistScreeningEntityListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaginatedEntityWatchlistScreeningListResponse, Integer, Hash)>] PaginatedEntityWatchlistScreeningListResponse data, response status code and response headers - def watchlist_screening_entity_list_with_http_info(list_entity_watchlist_screening_request, opts = {}) + # @return [Array<(WatchlistScreeningEntityListResponse, Integer, Hash)>] WatchlistScreeningEntityListResponse data, response status code and response headers + def watchlist_screening_entity_list_with_http_info(watchlist_screening_entity_list_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_list ...' end - # verify the required parameter 'list_entity_watchlist_screening_request' is set - if @api_client.config.client_side_validation && list_entity_watchlist_screening_request.nil? - fail ArgumentError, "Missing the required parameter 'list_entity_watchlist_screening_request' when calling PlaidApi.watchlist_screening_entity_list" + # verify the required parameter 'watchlist_screening_entity_list_request' is set + if @api_client.config.client_side_validation && watchlist_screening_entity_list_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_entity_list_request' when calling PlaidApi.watchlist_screening_entity_list" end # resource path local_var_path = '/watchlist_screening/entity/list' @@ -9872,10 +9939,10 @@ def watchlist_screening_entity_list_with_http_info(list_entity_watchlist_screeni form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(list_entity_watchlist_screening_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_entity_list_request) # return_type - return_type = opts[:debug_return_type] || 'PaginatedEntityWatchlistScreeningListResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningEntityListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -9899,26 +9966,26 @@ def watchlist_screening_entity_list_with_http_info(list_entity_watchlist_screeni # Get entity watchlist screening program # Get an entity watchlist screening program - # @param get_watchlist_screening_entity_program_request [GetWatchlistScreeningEntityProgramRequest] + # @param watchlist_screening_entity_program_get_request [WatchlistScreeningEntityProgramGetRequest] # @param [Hash] opts the optional parameters - # @return [EntityWatchlistProgramResponse] - def watchlist_screening_entity_program_get(get_watchlist_screening_entity_program_request, opts = {}) - data, _status_code, _headers = watchlist_screening_entity_program_get_with_http_info(get_watchlist_screening_entity_program_request, opts) + # @return [WatchlistScreeningEntityProgramGetResponse] + def watchlist_screening_entity_program_get(watchlist_screening_entity_program_get_request, opts = {}) + data, _status_code, _headers = watchlist_screening_entity_program_get_with_http_info(watchlist_screening_entity_program_get_request, opts) data end # Get entity watchlist screening program # Get an entity watchlist screening program - # @param get_watchlist_screening_entity_program_request [GetWatchlistScreeningEntityProgramRequest] + # @param watchlist_screening_entity_program_get_request [WatchlistScreeningEntityProgramGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(EntityWatchlistProgramResponse, Integer, Hash)>] EntityWatchlistProgramResponse data, response status code and response headers - def watchlist_screening_entity_program_get_with_http_info(get_watchlist_screening_entity_program_request, opts = {}) + # @return [Array<(WatchlistScreeningEntityProgramGetResponse, Integer, Hash)>] WatchlistScreeningEntityProgramGetResponse data, response status code and response headers + def watchlist_screening_entity_program_get_with_http_info(watchlist_screening_entity_program_get_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_program_get ...' end - # verify the required parameter 'get_watchlist_screening_entity_program_request' is set - if @api_client.config.client_side_validation && get_watchlist_screening_entity_program_request.nil? - fail ArgumentError, "Missing the required parameter 'get_watchlist_screening_entity_program_request' when calling PlaidApi.watchlist_screening_entity_program_get" + # verify the required parameter 'watchlist_screening_entity_program_get_request' is set + if @api_client.config.client_side_validation && watchlist_screening_entity_program_get_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_entity_program_get_request' when calling PlaidApi.watchlist_screening_entity_program_get" end # resource path local_var_path = '/watchlist_screening/entity/program/get' @@ -9937,10 +10004,10 @@ def watchlist_screening_entity_program_get_with_http_info(get_watchlist_screenin form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(get_watchlist_screening_entity_program_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_entity_program_get_request) # return_type - return_type = opts[:debug_return_type] || 'EntityWatchlistProgramResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningEntityProgramGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -9964,26 +10031,26 @@ def watchlist_screening_entity_program_get_with_http_info(get_watchlist_screenin # List entity watchlist screening programs # List all entity watchlist screening programs - # @param list_watchlist_screening_entity_programs_request [ListWatchlistScreeningEntityProgramsRequest] + # @param watchlist_screening_entity_program_list_request [WatchlistScreeningEntityProgramListRequest] # @param [Hash] opts the optional parameters - # @return [PaginatedEntityWatchlistProgramListResponse] - def watchlist_screening_entity_program_list(list_watchlist_screening_entity_programs_request, opts = {}) - data, _status_code, _headers = watchlist_screening_entity_program_list_with_http_info(list_watchlist_screening_entity_programs_request, opts) + # @return [WatchlistScreeningEntityProgramListResponse] + def watchlist_screening_entity_program_list(watchlist_screening_entity_program_list_request, opts = {}) + data, _status_code, _headers = watchlist_screening_entity_program_list_with_http_info(watchlist_screening_entity_program_list_request, opts) data end # List entity watchlist screening programs # List all entity watchlist screening programs - # @param list_watchlist_screening_entity_programs_request [ListWatchlistScreeningEntityProgramsRequest] + # @param watchlist_screening_entity_program_list_request [WatchlistScreeningEntityProgramListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaginatedEntityWatchlistProgramListResponse, Integer, Hash)>] PaginatedEntityWatchlistProgramListResponse data, response status code and response headers - def watchlist_screening_entity_program_list_with_http_info(list_watchlist_screening_entity_programs_request, opts = {}) + # @return [Array<(WatchlistScreeningEntityProgramListResponse, Integer, Hash)>] WatchlistScreeningEntityProgramListResponse data, response status code and response headers + def watchlist_screening_entity_program_list_with_http_info(watchlist_screening_entity_program_list_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_program_list ...' end - # verify the required parameter 'list_watchlist_screening_entity_programs_request' is set - if @api_client.config.client_side_validation && list_watchlist_screening_entity_programs_request.nil? - fail ArgumentError, "Missing the required parameter 'list_watchlist_screening_entity_programs_request' when calling PlaidApi.watchlist_screening_entity_program_list" + # verify the required parameter 'watchlist_screening_entity_program_list_request' is set + if @api_client.config.client_side_validation && watchlist_screening_entity_program_list_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_entity_program_list_request' when calling PlaidApi.watchlist_screening_entity_program_list" end # resource path local_var_path = '/watchlist_screening/entity/program/list' @@ -10002,10 +10069,10 @@ def watchlist_screening_entity_program_list_with_http_info(list_watchlist_screen form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_entity_programs_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_entity_program_list_request) # return_type - return_type = opts[:debug_return_type] || 'PaginatedEntityWatchlistProgramListResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningEntityProgramListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -10029,26 +10096,26 @@ def watchlist_screening_entity_program_list_with_http_info(list_watchlist_screen # Create a review for an entity watchlist screening # Create a review for an entity watchlist screening. Reviews are compliance reports created by users in your organization regarding the relevance of potential hits found by Plaid. - # @param create_entity_watchlist_screening_review_request [CreateEntityWatchlistScreeningReviewRequest] + # @param watchlist_screening_entity_review_create_request [WatchlistScreeningEntityReviewCreateRequest] # @param [Hash] opts the optional parameters - # @return [EntityWatchlistScreeningReviewResponse] - def watchlist_screening_entity_review_create(create_entity_watchlist_screening_review_request, opts = {}) - data, _status_code, _headers = watchlist_screening_entity_review_create_with_http_info(create_entity_watchlist_screening_review_request, opts) + # @return [WatchlistScreeningEntityReviewCreateResponse] + def watchlist_screening_entity_review_create(watchlist_screening_entity_review_create_request, opts = {}) + data, _status_code, _headers = watchlist_screening_entity_review_create_with_http_info(watchlist_screening_entity_review_create_request, opts) data end # Create a review for an entity watchlist screening # Create a review for an entity watchlist screening. Reviews are compliance reports created by users in your organization regarding the relevance of potential hits found by Plaid. - # @param create_entity_watchlist_screening_review_request [CreateEntityWatchlistScreeningReviewRequest] + # @param watchlist_screening_entity_review_create_request [WatchlistScreeningEntityReviewCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(EntityWatchlistScreeningReviewResponse, Integer, Hash)>] EntityWatchlistScreeningReviewResponse data, response status code and response headers - def watchlist_screening_entity_review_create_with_http_info(create_entity_watchlist_screening_review_request, opts = {}) + # @return [Array<(WatchlistScreeningEntityReviewCreateResponse, Integer, Hash)>] WatchlistScreeningEntityReviewCreateResponse data, response status code and response headers + def watchlist_screening_entity_review_create_with_http_info(watchlist_screening_entity_review_create_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_review_create ...' end - # verify the required parameter 'create_entity_watchlist_screening_review_request' is set - if @api_client.config.client_side_validation && create_entity_watchlist_screening_review_request.nil? - fail ArgumentError, "Missing the required parameter 'create_entity_watchlist_screening_review_request' when calling PlaidApi.watchlist_screening_entity_review_create" + # verify the required parameter 'watchlist_screening_entity_review_create_request' is set + if @api_client.config.client_side_validation && watchlist_screening_entity_review_create_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_entity_review_create_request' when calling PlaidApi.watchlist_screening_entity_review_create" end # resource path local_var_path = '/watchlist_screening/entity/review/create' @@ -10067,10 +10134,10 @@ def watchlist_screening_entity_review_create_with_http_info(create_entity_watchl form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(create_entity_watchlist_screening_review_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_entity_review_create_request) # return_type - return_type = opts[:debug_return_type] || 'EntityWatchlistScreeningReviewResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningEntityReviewCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -10094,26 +10161,26 @@ def watchlist_screening_entity_review_create_with_http_info(create_entity_watchl # List reviews for entity watchlist screenings # List all reviews for a particular entity watchlist screening. Reviews are compliance reports created by users in your organization regarding the relevance of potential hits found by Plaid. - # @param list_watchlist_screening_entity_reviews_request [ListWatchlistScreeningEntityReviewsRequest] + # @param watchlist_screening_entity_review_list_request [WatchlistScreeningEntityReviewListRequest] # @param [Hash] opts the optional parameters - # @return [PaginatedEntityWatchlistScreeningReviewListResponse] - def watchlist_screening_entity_review_list(list_watchlist_screening_entity_reviews_request, opts = {}) - data, _status_code, _headers = watchlist_screening_entity_review_list_with_http_info(list_watchlist_screening_entity_reviews_request, opts) + # @return [WatchlistScreeningEntityReviewListResponse] + def watchlist_screening_entity_review_list(watchlist_screening_entity_review_list_request, opts = {}) + data, _status_code, _headers = watchlist_screening_entity_review_list_with_http_info(watchlist_screening_entity_review_list_request, opts) data end # List reviews for entity watchlist screenings # List all reviews for a particular entity watchlist screening. Reviews are compliance reports created by users in your organization regarding the relevance of potential hits found by Plaid. - # @param list_watchlist_screening_entity_reviews_request [ListWatchlistScreeningEntityReviewsRequest] + # @param watchlist_screening_entity_review_list_request [WatchlistScreeningEntityReviewListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaginatedEntityWatchlistScreeningReviewListResponse, Integer, Hash)>] PaginatedEntityWatchlistScreeningReviewListResponse data, response status code and response headers - def watchlist_screening_entity_review_list_with_http_info(list_watchlist_screening_entity_reviews_request, opts = {}) + # @return [Array<(WatchlistScreeningEntityReviewListResponse, Integer, Hash)>] WatchlistScreeningEntityReviewListResponse data, response status code and response headers + def watchlist_screening_entity_review_list_with_http_info(watchlist_screening_entity_review_list_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_review_list ...' end - # verify the required parameter 'list_watchlist_screening_entity_reviews_request' is set - if @api_client.config.client_side_validation && list_watchlist_screening_entity_reviews_request.nil? - fail ArgumentError, "Missing the required parameter 'list_watchlist_screening_entity_reviews_request' when calling PlaidApi.watchlist_screening_entity_review_list" + # verify the required parameter 'watchlist_screening_entity_review_list_request' is set + if @api_client.config.client_side_validation && watchlist_screening_entity_review_list_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_entity_review_list_request' when calling PlaidApi.watchlist_screening_entity_review_list" end # resource path local_var_path = '/watchlist_screening/entity/review/list' @@ -10132,10 +10199,10 @@ def watchlist_screening_entity_review_list_with_http_info(list_watchlist_screeni form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_entity_reviews_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_entity_review_list_request) # return_type - return_type = opts[:debug_return_type] || 'PaginatedEntityWatchlistScreeningReviewListResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningEntityReviewListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -10159,26 +10226,26 @@ def watchlist_screening_entity_review_list_with_http_info(list_watchlist_screeni # Update an entity screening # Update an entity watchlist screening. - # @param update_entity_screening_request [UpdateEntityScreeningRequest] The entity screening was successfully updated. + # @param watchlist_screening_entity_update_request [WatchlistScreeningEntityUpdateRequest] The entity screening was successfully updated. # @param [Hash] opts the optional parameters - # @return [EntityWatchlistScreeningResponse] - def watchlist_screening_entity_update(update_entity_screening_request, opts = {}) - data, _status_code, _headers = watchlist_screening_entity_update_with_http_info(update_entity_screening_request, opts) + # @return [WatchlistScreeningEntityUpdateResponse] + def watchlist_screening_entity_update(watchlist_screening_entity_update_request, opts = {}) + data, _status_code, _headers = watchlist_screening_entity_update_with_http_info(watchlist_screening_entity_update_request, opts) data end # Update an entity screening # Update an entity watchlist screening. - # @param update_entity_screening_request [UpdateEntityScreeningRequest] The entity screening was successfully updated. + # @param watchlist_screening_entity_update_request [WatchlistScreeningEntityUpdateRequest] The entity screening was successfully updated. # @param [Hash] opts the optional parameters - # @return [Array<(EntityWatchlistScreeningResponse, Integer, Hash)>] EntityWatchlistScreeningResponse data, response status code and response headers - def watchlist_screening_entity_update_with_http_info(update_entity_screening_request, opts = {}) + # @return [Array<(WatchlistScreeningEntityUpdateResponse, Integer, Hash)>] WatchlistScreeningEntityUpdateResponse data, response status code and response headers + def watchlist_screening_entity_update_with_http_info(watchlist_screening_entity_update_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_update ...' end - # verify the required parameter 'update_entity_screening_request' is set - if @api_client.config.client_side_validation && update_entity_screening_request.nil? - fail ArgumentError, "Missing the required parameter 'update_entity_screening_request' when calling PlaidApi.watchlist_screening_entity_update" + # verify the required parameter 'watchlist_screening_entity_update_request' is set + if @api_client.config.client_side_validation && watchlist_screening_entity_update_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_entity_update_request' when calling PlaidApi.watchlist_screening_entity_update" end # resource path local_var_path = '/watchlist_screening/entity/update' @@ -10197,10 +10264,10 @@ def watchlist_screening_entity_update_with_http_info(update_entity_screening_req form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(update_entity_screening_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_entity_update_request) # return_type - return_type = opts[:debug_return_type] || 'EntityWatchlistScreeningResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningEntityUpdateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -10224,26 +10291,26 @@ def watchlist_screening_entity_update_with_http_info(update_entity_screening_req # Create a watchlist screening for a person # Create a new Watchlist Screening to check your customer against watchlists defined in the associated Watchlist Program. If your associated program has ongoing screening enabled, this is the profile information that will be used to monitor your customer over time. - # @param watchlist_screening_create_request [WatchlistScreeningCreateRequest] + # @param watchlist_screening_individual_create_request [WatchlistScreeningIndividualCreateRequest] # @param [Hash] opts the optional parameters - # @return [WatchlistScreeningIndividualResponse] - def watchlist_screening_individual_create(watchlist_screening_create_request, opts = {}) - data, _status_code, _headers = watchlist_screening_individual_create_with_http_info(watchlist_screening_create_request, opts) + # @return [WatchlistScreeningIndividualCreateResponse] + def watchlist_screening_individual_create(watchlist_screening_individual_create_request, opts = {}) + data, _status_code, _headers = watchlist_screening_individual_create_with_http_info(watchlist_screening_individual_create_request, opts) data end # Create a watchlist screening for a person # Create a new Watchlist Screening to check your customer against watchlists defined in the associated Watchlist Program. If your associated program has ongoing screening enabled, this is the profile information that will be used to monitor your customer over time. - # @param watchlist_screening_create_request [WatchlistScreeningCreateRequest] + # @param watchlist_screening_individual_create_request [WatchlistScreeningIndividualCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(WatchlistScreeningIndividualResponse, Integer, Hash)>] WatchlistScreeningIndividualResponse data, response status code and response headers - def watchlist_screening_individual_create_with_http_info(watchlist_screening_create_request, opts = {}) + # @return [Array<(WatchlistScreeningIndividualCreateResponse, Integer, Hash)>] WatchlistScreeningIndividualCreateResponse data, response status code and response headers + def watchlist_screening_individual_create_with_http_info(watchlist_screening_individual_create_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_create ...' end - # verify the required parameter 'watchlist_screening_create_request' is set - if @api_client.config.client_side_validation && watchlist_screening_create_request.nil? - fail ArgumentError, "Missing the required parameter 'watchlist_screening_create_request' when calling PlaidApi.watchlist_screening_individual_create" + # verify the required parameter 'watchlist_screening_individual_create_request' is set + if @api_client.config.client_side_validation && watchlist_screening_individual_create_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_individual_create_request' when calling PlaidApi.watchlist_screening_individual_create" end # resource path local_var_path = '/watchlist_screening/individual/create' @@ -10262,10 +10329,10 @@ def watchlist_screening_individual_create_with_http_info(watchlist_screening_cre form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_individual_create_request) # return_type - return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividualResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividualCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -10289,26 +10356,26 @@ def watchlist_screening_individual_create_with_http_info(watchlist_screening_cre # Retrieve an individual watchlist screening # Retrieve a previously created individual watchlist screening - # @param get_individual_watchlist_screening_request [GetIndividualWatchlistScreeningRequest] + # @param watchlist_screening_individual_get_request [WatchlistScreeningIndividualGetRequest] # @param [Hash] opts the optional parameters - # @return [WatchlistScreeningIndividualResponse] - def watchlist_screening_individual_get(get_individual_watchlist_screening_request, opts = {}) - data, _status_code, _headers = watchlist_screening_individual_get_with_http_info(get_individual_watchlist_screening_request, opts) + # @return [WatchlistScreeningIndividualGetResponse] + def watchlist_screening_individual_get(watchlist_screening_individual_get_request, opts = {}) + data, _status_code, _headers = watchlist_screening_individual_get_with_http_info(watchlist_screening_individual_get_request, opts) data end # Retrieve an individual watchlist screening # Retrieve a previously created individual watchlist screening - # @param get_individual_watchlist_screening_request [GetIndividualWatchlistScreeningRequest] + # @param watchlist_screening_individual_get_request [WatchlistScreeningIndividualGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(WatchlistScreeningIndividualResponse, Integer, Hash)>] WatchlistScreeningIndividualResponse data, response status code and response headers - def watchlist_screening_individual_get_with_http_info(get_individual_watchlist_screening_request, opts = {}) + # @return [Array<(WatchlistScreeningIndividualGetResponse, Integer, Hash)>] WatchlistScreeningIndividualGetResponse data, response status code and response headers + def watchlist_screening_individual_get_with_http_info(watchlist_screening_individual_get_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_get ...' end - # verify the required parameter 'get_individual_watchlist_screening_request' is set - if @api_client.config.client_side_validation && get_individual_watchlist_screening_request.nil? - fail ArgumentError, "Missing the required parameter 'get_individual_watchlist_screening_request' when calling PlaidApi.watchlist_screening_individual_get" + # verify the required parameter 'watchlist_screening_individual_get_request' is set + if @api_client.config.client_side_validation && watchlist_screening_individual_get_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_individual_get_request' when calling PlaidApi.watchlist_screening_individual_get" end # resource path local_var_path = '/watchlist_screening/individual/get' @@ -10327,10 +10394,10 @@ def watchlist_screening_individual_get_with_http_info(get_individual_watchlist_s form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(get_individual_watchlist_screening_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_individual_get_request) # return_type - return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividualResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividualGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -10354,26 +10421,26 @@ def watchlist_screening_individual_get_with_http_info(get_individual_watchlist_s # List history for individual watchlist screenings # List all changes to the individual watchlist screening in reverse-chronological order. If the watchlist screening has not been edited, no history will be returned. - # @param list_watchlist_screening_individual_history_request [ListWatchlistScreeningIndividualHistoryRequest] + # @param watchlist_screening_individual_history_list_request [WatchlistScreeningIndividualHistoryListRequest] # @param [Hash] opts the optional parameters - # @return [PaginatedIndividualWatchlistScreeningListResponse] - def watchlist_screening_individual_history_list(list_watchlist_screening_individual_history_request, opts = {}) - data, _status_code, _headers = watchlist_screening_individual_history_list_with_http_info(list_watchlist_screening_individual_history_request, opts) + # @return [WatchlistScreeningIndividualHistoryListResponse] + def watchlist_screening_individual_history_list(watchlist_screening_individual_history_list_request, opts = {}) + data, _status_code, _headers = watchlist_screening_individual_history_list_with_http_info(watchlist_screening_individual_history_list_request, opts) data end # List history for individual watchlist screenings # List all changes to the individual watchlist screening in reverse-chronological order. If the watchlist screening has not been edited, no history will be returned. - # @param list_watchlist_screening_individual_history_request [ListWatchlistScreeningIndividualHistoryRequest] + # @param watchlist_screening_individual_history_list_request [WatchlistScreeningIndividualHistoryListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaginatedIndividualWatchlistScreeningListResponse, Integer, Hash)>] PaginatedIndividualWatchlistScreeningListResponse data, response status code and response headers - def watchlist_screening_individual_history_list_with_http_info(list_watchlist_screening_individual_history_request, opts = {}) + # @return [Array<(WatchlistScreeningIndividualHistoryListResponse, Integer, Hash)>] WatchlistScreeningIndividualHistoryListResponse data, response status code and response headers + def watchlist_screening_individual_history_list_with_http_info(watchlist_screening_individual_history_list_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_history_list ...' end - # verify the required parameter 'list_watchlist_screening_individual_history_request' is set - if @api_client.config.client_side_validation && list_watchlist_screening_individual_history_request.nil? - fail ArgumentError, "Missing the required parameter 'list_watchlist_screening_individual_history_request' when calling PlaidApi.watchlist_screening_individual_history_list" + # verify the required parameter 'watchlist_screening_individual_history_list_request' is set + if @api_client.config.client_side_validation && watchlist_screening_individual_history_list_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_individual_history_list_request' when calling PlaidApi.watchlist_screening_individual_history_list" end # resource path local_var_path = '/watchlist_screening/individual/history/list' @@ -10392,10 +10459,10 @@ def watchlist_screening_individual_history_list_with_http_info(list_watchlist_sc form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_individual_history_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_individual_history_list_request) # return_type - return_type = opts[:debug_return_type] || 'PaginatedIndividualWatchlistScreeningListResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividualHistoryListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -10419,26 +10486,26 @@ def watchlist_screening_individual_history_list_with_http_info(list_watchlist_sc # List hits for individual watchlist screening # List all hits found by Plaid for a particular individual watchlist screening. - # @param list_watchlist_screening_individual_hit_request [ListWatchlistScreeningIndividualHitRequest] + # @param watchlist_screening_individual_hit_list_request [WatchlistScreeningIndividualHitListRequest] # @param [Hash] opts the optional parameters - # @return [PaginatedIndividualWatchlistScreeningHitListResponse] - def watchlist_screening_individual_hit_list(list_watchlist_screening_individual_hit_request, opts = {}) - data, _status_code, _headers = watchlist_screening_individual_hit_list_with_http_info(list_watchlist_screening_individual_hit_request, opts) + # @return [WatchlistScreeningIndividualHitListResponse] + def watchlist_screening_individual_hit_list(watchlist_screening_individual_hit_list_request, opts = {}) + data, _status_code, _headers = watchlist_screening_individual_hit_list_with_http_info(watchlist_screening_individual_hit_list_request, opts) data end # List hits for individual watchlist screening # List all hits found by Plaid for a particular individual watchlist screening. - # @param list_watchlist_screening_individual_hit_request [ListWatchlistScreeningIndividualHitRequest] + # @param watchlist_screening_individual_hit_list_request [WatchlistScreeningIndividualHitListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaginatedIndividualWatchlistScreeningHitListResponse, Integer, Hash)>] PaginatedIndividualWatchlistScreeningHitListResponse data, response status code and response headers - def watchlist_screening_individual_hit_list_with_http_info(list_watchlist_screening_individual_hit_request, opts = {}) + # @return [Array<(WatchlistScreeningIndividualHitListResponse, Integer, Hash)>] WatchlistScreeningIndividualHitListResponse data, response status code and response headers + def watchlist_screening_individual_hit_list_with_http_info(watchlist_screening_individual_hit_list_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_hit_list ...' end - # verify the required parameter 'list_watchlist_screening_individual_hit_request' is set - if @api_client.config.client_side_validation && list_watchlist_screening_individual_hit_request.nil? - fail ArgumentError, "Missing the required parameter 'list_watchlist_screening_individual_hit_request' when calling PlaidApi.watchlist_screening_individual_hit_list" + # verify the required parameter 'watchlist_screening_individual_hit_list_request' is set + if @api_client.config.client_side_validation && watchlist_screening_individual_hit_list_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_individual_hit_list_request' when calling PlaidApi.watchlist_screening_individual_hit_list" end # resource path local_var_path = '/watchlist_screening/individual/hit/list' @@ -10457,10 +10524,10 @@ def watchlist_screening_individual_hit_list_with_http_info(list_watchlist_screen form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_individual_hit_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_individual_hit_list_request) # return_type - return_type = opts[:debug_return_type] || 'PaginatedIndividualWatchlistScreeningHitListResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividualHitListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -10484,26 +10551,26 @@ def watchlist_screening_individual_hit_list_with_http_info(list_watchlist_screen # List Individual Watchlist Screenings # List previously created watchlist screenings for individuals - # @param list_individual_watchlist_screening_request [ListIndividualWatchlistScreeningRequest] + # @param watchlist_screening_individual_list_request [WatchlistScreeningIndividualListRequest] # @param [Hash] opts the optional parameters - # @return [PaginatedIndividualWatchlistScreeningListResponse] - def watchlist_screening_individual_list(list_individual_watchlist_screening_request, opts = {}) - data, _status_code, _headers = watchlist_screening_individual_list_with_http_info(list_individual_watchlist_screening_request, opts) + # @return [WatchlistScreeningIndividualListResponse] + def watchlist_screening_individual_list(watchlist_screening_individual_list_request, opts = {}) + data, _status_code, _headers = watchlist_screening_individual_list_with_http_info(watchlist_screening_individual_list_request, opts) data end # List Individual Watchlist Screenings # List previously created watchlist screenings for individuals - # @param list_individual_watchlist_screening_request [ListIndividualWatchlistScreeningRequest] + # @param watchlist_screening_individual_list_request [WatchlistScreeningIndividualListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaginatedIndividualWatchlistScreeningListResponse, Integer, Hash)>] PaginatedIndividualWatchlistScreeningListResponse data, response status code and response headers - def watchlist_screening_individual_list_with_http_info(list_individual_watchlist_screening_request, opts = {}) + # @return [Array<(WatchlistScreeningIndividualListResponse, Integer, Hash)>] WatchlistScreeningIndividualListResponse data, response status code and response headers + def watchlist_screening_individual_list_with_http_info(watchlist_screening_individual_list_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_list ...' end - # verify the required parameter 'list_individual_watchlist_screening_request' is set - if @api_client.config.client_side_validation && list_individual_watchlist_screening_request.nil? - fail ArgumentError, "Missing the required parameter 'list_individual_watchlist_screening_request' when calling PlaidApi.watchlist_screening_individual_list" + # verify the required parameter 'watchlist_screening_individual_list_request' is set + if @api_client.config.client_side_validation && watchlist_screening_individual_list_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_individual_list_request' when calling PlaidApi.watchlist_screening_individual_list" end # resource path local_var_path = '/watchlist_screening/individual/list' @@ -10522,10 +10589,10 @@ def watchlist_screening_individual_list_with_http_info(list_individual_watchlist form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(list_individual_watchlist_screening_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_individual_list_request) # return_type - return_type = opts[:debug_return_type] || 'PaginatedIndividualWatchlistScreeningListResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividualListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -10549,26 +10616,26 @@ def watchlist_screening_individual_list_with_http_info(list_individual_watchlist # Get individual watchlist screening program # Get an individual watchlist screening program - # @param get_watchlist_screening_individual_program_request [GetWatchlistScreeningIndividualProgramRequest] + # @param watchlist_screening_individual_program_get_request [WatchlistScreeningIndividualProgramGetRequest] # @param [Hash] opts the optional parameters - # @return [IndividualWatchlistProgramResponse] - def watchlist_screening_individual_program_get(get_watchlist_screening_individual_program_request, opts = {}) - data, _status_code, _headers = watchlist_screening_individual_program_get_with_http_info(get_watchlist_screening_individual_program_request, opts) + # @return [WatchlistScreeningIndividualProgramGetResponse] + def watchlist_screening_individual_program_get(watchlist_screening_individual_program_get_request, opts = {}) + data, _status_code, _headers = watchlist_screening_individual_program_get_with_http_info(watchlist_screening_individual_program_get_request, opts) data end # Get individual watchlist screening program # Get an individual watchlist screening program - # @param get_watchlist_screening_individual_program_request [GetWatchlistScreeningIndividualProgramRequest] + # @param watchlist_screening_individual_program_get_request [WatchlistScreeningIndividualProgramGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(IndividualWatchlistProgramResponse, Integer, Hash)>] IndividualWatchlistProgramResponse data, response status code and response headers - def watchlist_screening_individual_program_get_with_http_info(get_watchlist_screening_individual_program_request, opts = {}) + # @return [Array<(WatchlistScreeningIndividualProgramGetResponse, Integer, Hash)>] WatchlistScreeningIndividualProgramGetResponse data, response status code and response headers + def watchlist_screening_individual_program_get_with_http_info(watchlist_screening_individual_program_get_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_program_get ...' end - # verify the required parameter 'get_watchlist_screening_individual_program_request' is set - if @api_client.config.client_side_validation && get_watchlist_screening_individual_program_request.nil? - fail ArgumentError, "Missing the required parameter 'get_watchlist_screening_individual_program_request' when calling PlaidApi.watchlist_screening_individual_program_get" + # verify the required parameter 'watchlist_screening_individual_program_get_request' is set + if @api_client.config.client_side_validation && watchlist_screening_individual_program_get_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_individual_program_get_request' when calling PlaidApi.watchlist_screening_individual_program_get" end # resource path local_var_path = '/watchlist_screening/individual/program/get' @@ -10587,10 +10654,10 @@ def watchlist_screening_individual_program_get_with_http_info(get_watchlist_scre form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(get_watchlist_screening_individual_program_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_individual_program_get_request) # return_type - return_type = opts[:debug_return_type] || 'IndividualWatchlistProgramResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividualProgramGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -10614,26 +10681,26 @@ def watchlist_screening_individual_program_get_with_http_info(get_watchlist_scre # List individual watchlist screening programs # List all individual watchlist screening programs - # @param list_watchlist_screening_individual_programs_request [ListWatchlistScreeningIndividualProgramsRequest] + # @param watchlist_screening_individual_program_list_request [WatchlistScreeningIndividualProgramListRequest] # @param [Hash] opts the optional parameters - # @return [PaginatedIndividualWatchlistProgramListResponse] - def watchlist_screening_individual_program_list(list_watchlist_screening_individual_programs_request, opts = {}) - data, _status_code, _headers = watchlist_screening_individual_program_list_with_http_info(list_watchlist_screening_individual_programs_request, opts) + # @return [WatchlistScreeningIndividualProgramListResponse] + def watchlist_screening_individual_program_list(watchlist_screening_individual_program_list_request, opts = {}) + data, _status_code, _headers = watchlist_screening_individual_program_list_with_http_info(watchlist_screening_individual_program_list_request, opts) data end # List individual watchlist screening programs # List all individual watchlist screening programs - # @param list_watchlist_screening_individual_programs_request [ListWatchlistScreeningIndividualProgramsRequest] + # @param watchlist_screening_individual_program_list_request [WatchlistScreeningIndividualProgramListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaginatedIndividualWatchlistProgramListResponse, Integer, Hash)>] PaginatedIndividualWatchlistProgramListResponse data, response status code and response headers - def watchlist_screening_individual_program_list_with_http_info(list_watchlist_screening_individual_programs_request, opts = {}) + # @return [Array<(WatchlistScreeningIndividualProgramListResponse, Integer, Hash)>] WatchlistScreeningIndividualProgramListResponse data, response status code and response headers + def watchlist_screening_individual_program_list_with_http_info(watchlist_screening_individual_program_list_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_program_list ...' end - # verify the required parameter 'list_watchlist_screening_individual_programs_request' is set - if @api_client.config.client_side_validation && list_watchlist_screening_individual_programs_request.nil? - fail ArgumentError, "Missing the required parameter 'list_watchlist_screening_individual_programs_request' when calling PlaidApi.watchlist_screening_individual_program_list" + # verify the required parameter 'watchlist_screening_individual_program_list_request' is set + if @api_client.config.client_side_validation && watchlist_screening_individual_program_list_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_individual_program_list_request' when calling PlaidApi.watchlist_screening_individual_program_list" end # resource path local_var_path = '/watchlist_screening/individual/program/list' @@ -10652,10 +10719,10 @@ def watchlist_screening_individual_program_list_with_http_info(list_watchlist_sc form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_individual_programs_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_individual_program_list_request) # return_type - return_type = opts[:debug_return_type] || 'PaginatedIndividualWatchlistProgramListResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividualProgramListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -10679,26 +10746,26 @@ def watchlist_screening_individual_program_list_with_http_info(list_watchlist_sc # Create a review for an individual watchlist screening # Create a review for the individual watchlist screening. Reviews are compliance reports created by users in your organization regarding the relevance of potential hits found by Plaid. - # @param create_individual_watchlist_screening_review_request [CreateIndividualWatchlistScreeningReviewRequest] + # @param watchlist_screening_individual_review_create_request [WatchlistScreeningIndividualReviewCreateRequest] # @param [Hash] opts the optional parameters - # @return [WatchlistScreeningReviewResponse] - def watchlist_screening_individual_review_create(create_individual_watchlist_screening_review_request, opts = {}) - data, _status_code, _headers = watchlist_screening_individual_review_create_with_http_info(create_individual_watchlist_screening_review_request, opts) + # @return [WatchlistScreeningIndividualReviewCreateResponse] + def watchlist_screening_individual_review_create(watchlist_screening_individual_review_create_request, opts = {}) + data, _status_code, _headers = watchlist_screening_individual_review_create_with_http_info(watchlist_screening_individual_review_create_request, opts) data end # Create a review for an individual watchlist screening # Create a review for the individual watchlist screening. Reviews are compliance reports created by users in your organization regarding the relevance of potential hits found by Plaid. - # @param create_individual_watchlist_screening_review_request [CreateIndividualWatchlistScreeningReviewRequest] + # @param watchlist_screening_individual_review_create_request [WatchlistScreeningIndividualReviewCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(WatchlistScreeningReviewResponse, Integer, Hash)>] WatchlistScreeningReviewResponse data, response status code and response headers - def watchlist_screening_individual_review_create_with_http_info(create_individual_watchlist_screening_review_request, opts = {}) + # @return [Array<(WatchlistScreeningIndividualReviewCreateResponse, Integer, Hash)>] WatchlistScreeningIndividualReviewCreateResponse data, response status code and response headers + def watchlist_screening_individual_review_create_with_http_info(watchlist_screening_individual_review_create_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_review_create ...' end - # verify the required parameter 'create_individual_watchlist_screening_review_request' is set - if @api_client.config.client_side_validation && create_individual_watchlist_screening_review_request.nil? - fail ArgumentError, "Missing the required parameter 'create_individual_watchlist_screening_review_request' when calling PlaidApi.watchlist_screening_individual_review_create" + # verify the required parameter 'watchlist_screening_individual_review_create_request' is set + if @api_client.config.client_side_validation && watchlist_screening_individual_review_create_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_individual_review_create_request' when calling PlaidApi.watchlist_screening_individual_review_create" end # resource path local_var_path = '/watchlist_screening/individual/review/create' @@ -10717,10 +10784,10 @@ def watchlist_screening_individual_review_create_with_http_info(create_individua form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(create_individual_watchlist_screening_review_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_individual_review_create_request) # return_type - return_type = opts[:debug_return_type] || 'WatchlistScreeningReviewResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividualReviewCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] @@ -10744,26 +10811,26 @@ def watchlist_screening_individual_review_create_with_http_info(create_individua # List reviews for individual watchlist screenings # List all reviews for the individual watchlist screening. - # @param list_watchlist_screening_individual_reviews_request [ListWatchlistScreeningIndividualReviewsRequest] + # @param watchlist_screening_individual_review_list_request [WatchlistScreeningIndividualReviewListRequest] # @param [Hash] opts the optional parameters - # @return [PaginatedIndividualWatchlistScreeningReviewListResponse] - def watchlist_screening_individual_reviews_list(list_watchlist_screening_individual_reviews_request, opts = {}) - data, _status_code, _headers = watchlist_screening_individual_reviews_list_with_http_info(list_watchlist_screening_individual_reviews_request, opts) + # @return [WatchlistScreeningIndividualReviewListResponse] + def watchlist_screening_individual_review_list(watchlist_screening_individual_review_list_request, opts = {}) + data, _status_code, _headers = watchlist_screening_individual_review_list_with_http_info(watchlist_screening_individual_review_list_request, opts) data end # List reviews for individual watchlist screenings # List all reviews for the individual watchlist screening. - # @param list_watchlist_screening_individual_reviews_request [ListWatchlistScreeningIndividualReviewsRequest] + # @param watchlist_screening_individual_review_list_request [WatchlistScreeningIndividualReviewListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaginatedIndividualWatchlistScreeningReviewListResponse, Integer, Hash)>] PaginatedIndividualWatchlistScreeningReviewListResponse data, response status code and response headers - def watchlist_screening_individual_reviews_list_with_http_info(list_watchlist_screening_individual_reviews_request, opts = {}) + # @return [Array<(WatchlistScreeningIndividualReviewListResponse, Integer, Hash)>] WatchlistScreeningIndividualReviewListResponse data, response status code and response headers + def watchlist_screening_individual_review_list_with_http_info(watchlist_screening_individual_review_list_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_reviews_list ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_review_list ...' end - # verify the required parameter 'list_watchlist_screening_individual_reviews_request' is set - if @api_client.config.client_side_validation && list_watchlist_screening_individual_reviews_request.nil? - fail ArgumentError, "Missing the required parameter 'list_watchlist_screening_individual_reviews_request' when calling PlaidApi.watchlist_screening_individual_reviews_list" + # verify the required parameter 'watchlist_screening_individual_review_list_request' is set + if @api_client.config.client_side_validation && watchlist_screening_individual_review_list_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_individual_review_list_request' when calling PlaidApi.watchlist_screening_individual_review_list" end # resource path local_var_path = '/watchlist_screening/individual/review/list' @@ -10782,16 +10849,16 @@ def watchlist_screening_individual_reviews_list_with_http_info(list_watchlist_sc form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_individual_reviews_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_individual_review_list_request) # return_type - return_type = opts[:debug_return_type] || 'PaginatedIndividualWatchlistScreeningReviewListResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividualReviewListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.watchlist_screening_individual_reviews_list", + :operation => :"PlaidApi.watchlist_screening_individual_review_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -10802,33 +10869,33 @@ def watchlist_screening_individual_reviews_list_with_http_info(list_watchlist_sc data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_individual_reviews_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_individual_review_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update individual watchlist screening # Update a specific individual watchlist screening. This endpoint can be used to add additional customer information, correct outdated information, add a reference id, assign the individual to a reviewer, and update which program it is associated with. Please note that you may not update `search_terms` and `status` at the same time since editing `search_terms` may trigger an automatic `status` change. - # @param update_individual_screening_request [UpdateIndividualScreeningRequest] + # @param watchlist_screening_individual_update_request [WatchlistScreeningIndividualUpdateRequest] # @param [Hash] opts the optional parameters - # @return [WatchlistScreeningIndividualResponse] - def watchlist_screening_individual_update(update_individual_screening_request, opts = {}) - data, _status_code, _headers = watchlist_screening_individual_update_with_http_info(update_individual_screening_request, opts) + # @return [WatchlistScreeningIndividualUpdateResponse] + def watchlist_screening_individual_update(watchlist_screening_individual_update_request, opts = {}) + data, _status_code, _headers = watchlist_screening_individual_update_with_http_info(watchlist_screening_individual_update_request, opts) data end # Update individual watchlist screening # Update a specific individual watchlist screening. This endpoint can be used to add additional customer information, correct outdated information, add a reference id, assign the individual to a reviewer, and update which program it is associated with. Please note that you may not update `search_terms` and `status` at the same time since editing `search_terms` may trigger an automatic `status` change. - # @param update_individual_screening_request [UpdateIndividualScreeningRequest] + # @param watchlist_screening_individual_update_request [WatchlistScreeningIndividualUpdateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(WatchlistScreeningIndividualResponse, Integer, Hash)>] WatchlistScreeningIndividualResponse data, response status code and response headers - def watchlist_screening_individual_update_with_http_info(update_individual_screening_request, opts = {}) + # @return [Array<(WatchlistScreeningIndividualUpdateResponse, Integer, Hash)>] WatchlistScreeningIndividualUpdateResponse data, response status code and response headers + def watchlist_screening_individual_update_with_http_info(watchlist_screening_individual_update_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_update ...' end - # verify the required parameter 'update_individual_screening_request' is set - if @api_client.config.client_side_validation && update_individual_screening_request.nil? - fail ArgumentError, "Missing the required parameter 'update_individual_screening_request' when calling PlaidApi.watchlist_screening_individual_update" + # verify the required parameter 'watchlist_screening_individual_update_request' is set + if @api_client.config.client_side_validation && watchlist_screening_individual_update_request.nil? + fail ArgumentError, "Missing the required parameter 'watchlist_screening_individual_update_request' when calling PlaidApi.watchlist_screening_individual_update" end # resource path local_var_path = '/watchlist_screening/individual/update' @@ -10847,10 +10914,10 @@ def watchlist_screening_individual_update_with_http_info(update_individual_scree form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(update_individual_screening_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_individual_update_request) # return_type - return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividualResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividualUpdateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] diff --git a/lib/plaid/api_client.rb b/lib/plaid/api_client.rb index 2044938bf..0a4405b16 100644 --- a/lib/plaid/api_client.rb +++ b/lib/plaid/api_client.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -33,7 +33,7 @@ class ApiClient # @option config [Configuration] Configuration for initializing the object, default to Configuration.default def initialize(config = Configuration.default) @config = config - @user_agent = "Plaid Ruby v15.11.0" + @user_agent = "Plaid Ruby v16.0.0" @default_headers = { 'Content-Type' => 'application/json', 'User-Agent' => @user_agent, diff --git a/lib/plaid/api_error.rb b/lib/plaid/api_error.rb index d4053a1f1..34525b190 100644 --- a/lib/plaid/api_error.rb +++ b/lib/plaid/api_error.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/configuration.rb b/lib/plaid/configuration.rb index 1b9922108..002e6b5b0 100644 --- a/lib/plaid/configuration.rb +++ b/lib/plaid/configuration.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/account_access.rb b/lib/plaid/models/account_access.rb index ebe2c0fec..233ee8a26 100644 --- a/lib/plaid/models/account_access.rb +++ b/lib/plaid/models/account_access.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/account_assets.rb b/lib/plaid/models/account_assets.rb index cfa6924e6..c3a429fc7 100644 --- a/lib/plaid/models/account_assets.rb +++ b/lib/plaid/models/account_assets.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -46,6 +46,8 @@ class AccountAssets # Data returned by the financial institution about the account owner or owners. Only returned by Identity or Assets endpoints. For business accounts, the name reported may be either the name of the individual or the name of the business, depending on the institution. Multiple owners on a single account will be represented in the same `owner` object, not in multiple owner objects within the array. In API versions 2018-05-22 and earlier, the `owners` object is not returned, and instead identity information is returned in the top level `identity` object. For more details, see [Plaid API versioning](https://plaid.com/docs/api/versioning/#version-2019-05-29) attr_accessor :owners + attr_accessor :ownership_type + # Calculated data about the historical balances on the account. Only returned by Assets endpoints and currently not supported by `brokerage` or `investment` accounts. attr_accessor :historical_balances @@ -85,6 +87,7 @@ def self.attribute_map :'days_available' => :'days_available', :'transactions' => :'transactions', :'owners' => :'owners', + :'ownership_type' => :'ownership_type', :'historical_balances' => :'historical_balances' } end @@ -108,6 +111,7 @@ def self.openapi_types :'days_available' => :'Float', :'transactions' => :'Array', :'owners' => :'Array', + :'ownership_type' => :'OwnershipType', :'historical_balances' => :'Array' } end @@ -118,6 +122,7 @@ def self.openapi_nullable :'mask', :'official_name', :'subtype', + :'ownership_type', ]) end @@ -192,6 +197,10 @@ def initialize(attributes = {}) end end + if attributes.key?(:'ownership_type') + self.ownership_type = attributes[:'ownership_type'] + end + if attributes.key?(:'historical_balances') if (value = attributes[:'historical_balances']).is_a?(Array) self.historical_balances = value @@ -280,6 +289,7 @@ def ==(o) days_available == o.days_available && transactions == o.transactions && owners == o.owners && + ownership_type == o.ownership_type && historical_balances == o.historical_balances end @@ -292,7 +302,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [account_id, balances, mask, name, official_name, type, subtype, verification_status, days_available, transactions, owners, historical_balances].hash + [account_id, balances, mask, name, official_name, type, subtype, verification_status, days_available, transactions, owners, ownership_type, historical_balances].hash end # Builds the object from hash diff --git a/lib/plaid/models/account_assets_all_of.rb b/lib/plaid/models/account_assets_all_of.rb index 623b60372..05f6d938c 100644 --- a/lib/plaid/models/account_assets_all_of.rb +++ b/lib/plaid/models/account_assets_all_of.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -24,6 +24,8 @@ class AccountAssetsAllOf # Data returned by the financial institution about the account owner or owners. Only returned by Identity or Assets endpoints. For business accounts, the name reported may be either the name of the individual or the name of the business, depending on the institution. Multiple owners on a single account will be represented in the same `owner` object, not in multiple owner objects within the array. In API versions 2018-05-22 and earlier, the `owners` object is not returned, and instead identity information is returned in the top level `identity` object. For more details, see [Plaid API versioning](https://plaid.com/docs/api/versioning/#version-2019-05-29) attr_accessor :owners + attr_accessor :ownership_type + # Calculated data about the historical balances on the account. Only returned by Assets endpoints and currently not supported by `brokerage` or `investment` accounts. attr_accessor :historical_balances @@ -33,6 +35,7 @@ def self.attribute_map :'days_available' => :'days_available', :'transactions' => :'transactions', :'owners' => :'owners', + :'ownership_type' => :'ownership_type', :'historical_balances' => :'historical_balances' } end @@ -48,6 +51,7 @@ def self.openapi_types :'days_available' => :'Float', :'transactions' => :'Array', :'owners' => :'Array', + :'ownership_type' => :'OwnershipType', :'historical_balances' => :'Array' } end @@ -55,6 +59,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'ownership_type', ]) end @@ -89,6 +94,10 @@ def initialize(attributes = {}) end end + if attributes.key?(:'ownership_type') + self.ownership_type = attributes[:'ownership_type'] + end + if attributes.key?(:'historical_balances') if (value = attributes[:'historical_balances']).is_a?(Array) self.historical_balances = value @@ -117,6 +126,7 @@ def ==(o) days_available == o.days_available && transactions == o.transactions && owners == o.owners && + ownership_type == o.ownership_type && historical_balances == o.historical_balances end @@ -129,7 +139,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [days_available, transactions, owners, historical_balances].hash + [days_available, transactions, owners, ownership_type, historical_balances].hash end # Builds the object from hash diff --git a/lib/plaid/models/account_balance.rb b/lib/plaid/models/account_balance.rb index c0f269398..8547b0526 100644 --- a/lib/plaid/models/account_balance.rb +++ b/lib/plaid/models/account_balance.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/account_base.rb b/lib/plaid/models/account_base.rb index 8c43d0435..209d2a4a4 100644 --- a/lib/plaid/models/account_base.rb +++ b/lib/plaid/models/account_base.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/account_filter.rb b/lib/plaid/models/account_filter.rb index 549101130..0b59d6182 100644 --- a/lib/plaid/models/account_filter.rb +++ b/lib/plaid/models/account_filter.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/account_filters_response.rb b/lib/plaid/models/account_filters_response.rb index 602639365..51486e8d7 100644 --- a/lib/plaid/models/account_filters_response.rb +++ b/lib/plaid/models/account_filters_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/account_identity.rb b/lib/plaid/models/account_identity.rb index bbf555b96..546dfae94 100644 --- a/lib/plaid/models/account_identity.rb +++ b/lib/plaid/models/account_identity.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/account_identity_all_of.rb b/lib/plaid/models/account_identity_all_of.rb index 7a07ae90b..2dd8d5a9b 100644 --- a/lib/plaid/models/account_identity_all_of.rb +++ b/lib/plaid/models/account_identity_all_of.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/account_identity_match_score.rb b/lib/plaid/models/account_identity_match_score.rb new file mode 100644 index 000000000..e85a293f7 --- /dev/null +++ b/lib/plaid/models/account_identity_match_score.rb @@ -0,0 +1,392 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Identity match scores for an account + class AccountIdentityMatchScore + # Plaid’s unique identifier for the account. This value will not change unless Plaid can't reconcile the account with the data returned by the financial institution. This may occur, for example, when the name of the account changes. If this happens a new `account_id` will be assigned to the account. The `account_id` can also change if the `access_token` is deleted and the same credentials that were used to generate that `access_token` are used to generate a new `access_token` on a later date. In that case, the new `account_id` will be different from the old `account_id`. If an account with a specific `account_id` disappears instead of changing, the account is likely closed. Closed accounts are not returned by the Plaid API. Like all Plaid identifiers, the `account_id` is case sensitive. + attr_accessor :account_id + + attr_accessor :balances + + # The last 2-4 alphanumeric characters of an account's official account number. Note that the mask may be non-unique between an Item's accounts, and it may also not match the mask that the bank displays to the user. + attr_accessor :mask + + # The name of the account, either assigned by the user or by the financial institution itself + attr_accessor :name + + # The official name of the account as given by the financial institution + attr_accessor :official_name + + attr_accessor :type + + attr_accessor :subtype + + # The current verification status of an Auth Item initiated through Automated or Manual micro-deposits. Returned for Auth Items only. `pending_automatic_verification`: The Item is pending automatic verification `pending_manual_verification`: The Item is pending manual micro-deposit verification. Items remain in this state until the user successfully verifies the two amounts. `automatically_verified`: The Item has successfully been automatically verified `manually_verified`: The Item has successfully been manually verified `verification_expired`: Plaid was unable to automatically verify the deposit within 7 calendar days and will no longer attempt to validate the Item. Users may retry by submitting their information again through Link. `verification_failed`: The Item failed manual micro-deposit verification because the user exhausted all 3 verification attempts. Users may retry by submitting their information again through Link. + attr_accessor :verification_status + + attr_accessor :legal_name + + attr_accessor :phone_number + + attr_accessor :email_address + + attr_accessor :address + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_id' => :'account_id', + :'balances' => :'balances', + :'mask' => :'mask', + :'name' => :'name', + :'official_name' => :'official_name', + :'type' => :'type', + :'subtype' => :'subtype', + :'verification_status' => :'verification_status', + :'legal_name' => :'legal_name', + :'phone_number' => :'phone_number', + :'email_address' => :'email_address', + :'address' => :'address' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'account_id' => :'String', + :'balances' => :'AccountBalance', + :'mask' => :'String', + :'name' => :'String', + :'official_name' => :'String', + :'type' => :'AccountType', + :'subtype' => :'AccountSubtype', + :'verification_status' => :'String', + :'legal_name' => :'NameMatchScore', + :'phone_number' => :'PhoneNumberMatchScore', + :'email_address' => :'EmailAddressMatchScore', + :'address' => :'AddressMatchScore' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'mask', + :'official_name', + :'subtype', + :'legal_name', + :'phone_number', + :'email_address', + :'address' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'AccountBase', + :'AccountIdentityMatchScoreAllOf' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AccountIdentityMatchScore` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AccountIdentityMatchScore`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'balances') + self.balances = attributes[:'balances'] + end + + if attributes.key?(:'mask') + self.mask = attributes[:'mask'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'official_name') + self.official_name = attributes[:'official_name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'subtype') + self.subtype = attributes[:'subtype'] + end + + if attributes.key?(:'verification_status') + self.verification_status = attributes[:'verification_status'] + end + + if attributes.key?(:'legal_name') + self.legal_name = attributes[:'legal_name'] + end + + if attributes.key?(:'phone_number') + self.phone_number = attributes[:'phone_number'] + end + + if attributes.key?(:'email_address') + self.email_address = attributes[:'email_address'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @account_id.nil? + invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') + end + + if @balances.nil? + invalid_properties.push('invalid value for "balances", balances cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @account_id.nil? + return false if @balances.nil? + return false if @name.nil? + return false if @type.nil? + verification_status_validator = EnumAttributeValidator.new('String', ["automatically_verified", "pending_automatic_verification", "pending_manual_verification", "manually_verified", "verification_expired", "verification_failed"]) + return false unless verification_status_validator.valid?(@verification_status) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] verification_status Object to be assigned + def verification_status=(verification_status) + validator = EnumAttributeValidator.new('String', ["automatically_verified", "pending_automatic_verification", "pending_manual_verification", "manually_verified", "verification_expired", "verification_failed"]) + unless validator.valid?(verification_status) + fail ArgumentError, "invalid value for \"verification_status\", must be one of #{validator.allowable_values}." + end + @verification_status = verification_status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_id == o.account_id && + balances == o.balances && + mask == o.mask && + name == o.name && + official_name == o.official_name && + type == o.type && + subtype == o.subtype && + verification_status == o.verification_status && + legal_name == o.legal_name && + phone_number == o.phone_number && + email_address == o.email_address && + address == o.address + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [account_id, balances, mask, name, official_name, type, subtype, verification_status, legal_name, phone_number, email_address, address].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/account_identity_match_score_all_of.rb b/lib/plaid/models/account_identity_match_score_all_of.rb new file mode 100644 index 000000000..eda65bd88 --- /dev/null +++ b/lib/plaid/models/account_identity_match_score_all_of.rb @@ -0,0 +1,249 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class AccountIdentityMatchScoreAllOf + attr_accessor :legal_name + + attr_accessor :phone_number + + attr_accessor :email_address + + attr_accessor :address + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'legal_name' => :'legal_name', + :'phone_number' => :'phone_number', + :'email_address' => :'email_address', + :'address' => :'address' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'legal_name' => :'NameMatchScore', + :'phone_number' => :'PhoneNumberMatchScore', + :'email_address' => :'EmailAddressMatchScore', + :'address' => :'AddressMatchScore' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'legal_name', + :'phone_number', + :'email_address', + :'address' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AccountIdentityMatchScoreAllOf` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AccountIdentityMatchScoreAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'legal_name') + self.legal_name = attributes[:'legal_name'] + end + + if attributes.key?(:'phone_number') + self.phone_number = attributes[:'phone_number'] + end + + if attributes.key?(:'email_address') + self.email_address = attributes[:'email_address'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + legal_name == o.legal_name && + phone_number == o.phone_number && + email_address == o.email_address && + address == o.address + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [legal_name, phone_number, email_address, address].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/account_product_access.rb b/lib/plaid/models/account_product_access.rb index 3bd6cf1ee..1f06eae8a 100644 --- a/lib/plaid/models/account_product_access.rb +++ b/lib/plaid/models/account_product_access.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/account_product_access_nullable.rb b/lib/plaid/models/account_product_access_nullable.rb index 60faa2323..5aa3f2c6e 100644 --- a/lib/plaid/models/account_product_access_nullable.rb +++ b/lib/plaid/models/account_product_access_nullable.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/account_selection_cardinality.rb b/lib/plaid/models/account_selection_cardinality.rb index f9faf646a..594e02e18 100644 --- a/lib/plaid/models/account_selection_cardinality.rb +++ b/lib/plaid/models/account_selection_cardinality.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/account_subtype.rb b/lib/plaid/models/account_subtype.rb index 528577172..9eb84775c 100644 --- a/lib/plaid/models/account_subtype.rb +++ b/lib/plaid/models/account_subtype.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/account_type.rb b/lib/plaid/models/account_type.rb index 09c622d54..500e2b7bd 100644 --- a/lib/plaid/models/account_type.rb +++ b/lib/plaid/models/account_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/accounts_balance_get_request.rb b/lib/plaid/models/accounts_balance_get_request.rb index 5ba7fa2c9..e5c50533a 100644 --- a/lib/plaid/models/accounts_balance_get_request.rb +++ b/lib/plaid/models/accounts_balance_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/accounts_balance_get_request_options.rb b/lib/plaid/models/accounts_balance_get_request_options.rb index 937bc4d0f..aef5ce416 100644 --- a/lib/plaid/models/accounts_balance_get_request_options.rb +++ b/lib/plaid/models/accounts_balance_get_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/accounts_get_request.rb b/lib/plaid/models/accounts_get_request.rb index e160d4ae3..791616bc6 100644 --- a/lib/plaid/models/accounts_get_request.rb +++ b/lib/plaid/models/accounts_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/accounts_get_request_options.rb b/lib/plaid/models/accounts_get_request_options.rb index 473a3dfb1..4bcc4f44e 100644 --- a/lib/plaid/models/accounts_get_request_options.rb +++ b/lib/plaid/models/accounts_get_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/accounts_get_response.rb b/lib/plaid/models/accounts_get_response.rb index 118c5e97e..ef57b1070 100644 --- a/lib/plaid/models/accounts_get_response.rb +++ b/lib/plaid/models/accounts_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/ach_class.rb b/lib/plaid/models/ach_class.rb index fc1337e19..e0511fb80 100644 --- a/lib/plaid/models/ach_class.rb +++ b/lib/plaid/models/ach_class.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/address.rb b/lib/plaid/models/address.rb index 9a9cc8eb3..3d0558ec0 100644 --- a/lib/plaid/models/address.rb +++ b/lib/plaid/models/address.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/address_data.rb b/lib/plaid/models/address_data.rb index 0862cd065..157d225ef 100644 --- a/lib/plaid/models/address_data.rb +++ b/lib/plaid/models/address_data.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/address_data_nullable.rb b/lib/plaid/models/address_data_nullable.rb index 3cf9aac87..0727d438f 100644 --- a/lib/plaid/models/address_data_nullable.rb +++ b/lib/plaid/models/address_data_nullable.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/address_match_score.rb b/lib/plaid/models/address_match_score.rb new file mode 100644 index 000000000..3f052b5e3 --- /dev/null +++ b/lib/plaid/models/address_match_score.rb @@ -0,0 +1,232 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Score found by matching address provided by the API with the address on the account at the financial institution. If the account contains multiple owners, the maximum match score is filled. + class AddressMatchScore + # Match score for address. 100 is a perfect match and 0 is a no match. If the address is missing from either the API or financial institution, this is empty. + attr_accessor :score + + # postal code was provided for both and was a match + attr_accessor :is_postal_code_match + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'score' => :'score', + :'is_postal_code_match' => :'is_postal_code_match' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'score' => :'Integer', + :'is_postal_code_match' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'score', + :'is_postal_code_match' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AddressMatchScore` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AddressMatchScore`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'score') + self.score = attributes[:'score'] + end + + if attributes.key?(:'is_postal_code_match') + self.is_postal_code_match = attributes[:'is_postal_code_match'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + score == o.score && + is_postal_code_match == o.is_postal_code_match + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [score, is_postal_code_match].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/address_nullable.rb b/lib/plaid/models/address_nullable.rb index 7857156cf..c28ffca3e 100644 --- a/lib/plaid/models/address_nullable.rb +++ b/lib/plaid/models/address_nullable.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/address_purpose_label.rb b/lib/plaid/models/address_purpose_label.rb index 0ac79bbfa..f1e339669 100644 --- a/lib/plaid/models/address_purpose_label.rb +++ b/lib/plaid/models/address_purpose_label.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/application.rb b/lib/plaid/models/application.rb index 8b37ebbdb..d5902e3ab 100644 --- a/lib/plaid/models/application.rb +++ b/lib/plaid/models/application.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/application_get_request.rb b/lib/plaid/models/application_get_request.rb index b1a0b2e7d..297189025 100644 --- a/lib/plaid/models/application_get_request.rb +++ b/lib/plaid/models/application_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/application_get_response.rb b/lib/plaid/models/application_get_response.rb index 67e8c3d65..6c6afcee7 100644 --- a/lib/plaid/models/application_get_response.rb +++ b/lib/plaid/models/application_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/apr.rb b/lib/plaid/models/apr.rb index 33e98b2f5..f8595809d 100644 --- a/lib/plaid/models/apr.rb +++ b/lib/plaid/models/apr.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset.rb b/lib/plaid/models/asset.rb new file mode 100644 index 000000000..d95e104bf --- /dev/null +++ b/lib/plaid/models/asset.rb @@ -0,0 +1,280 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # No documentation available + class Asset + attr_accessor :asset_detail + + attr_accessor :asset_owners + + attr_accessor :asset_holder + + attr_accessor :asset_transactions + + attr_accessor :validation_sources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'asset_detail' => :'ASSET_DETAIL', + :'asset_owners' => :'ASSET_OWNERS', + :'asset_holder' => :'ASSET_HOLDER', + :'asset_transactions' => :'ASSET_TRANSACTIONS', + :'validation_sources' => :'VALIDATION_SOURCES' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'asset_detail' => :'AssetDetail', + :'asset_owners' => :'AssetOwners', + :'asset_holder' => :'AssetHolder', + :'asset_transactions' => :'AssetTransactions', + :'validation_sources' => :'ValidationSources' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::Asset` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::Asset`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'asset_detail') + self.asset_detail = attributes[:'asset_detail'] + end + + if attributes.key?(:'asset_owners') + self.asset_owners = attributes[:'asset_owners'] + end + + if attributes.key?(:'asset_holder') + self.asset_holder = attributes[:'asset_holder'] + end + + if attributes.key?(:'asset_transactions') + self.asset_transactions = attributes[:'asset_transactions'] + end + + if attributes.key?(:'validation_sources') + self.validation_sources = attributes[:'validation_sources'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @asset_detail.nil? + invalid_properties.push('invalid value for "asset_detail", asset_detail cannot be nil.') + end + + if @asset_owners.nil? + invalid_properties.push('invalid value for "asset_owners", asset_owners cannot be nil.') + end + + if @asset_holder.nil? + invalid_properties.push('invalid value for "asset_holder", asset_holder cannot be nil.') + end + + if @asset_transactions.nil? + invalid_properties.push('invalid value for "asset_transactions", asset_transactions cannot be nil.') + end + + if @validation_sources.nil? + invalid_properties.push('invalid value for "validation_sources", validation_sources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @asset_detail.nil? + return false if @asset_owners.nil? + return false if @asset_holder.nil? + return false if @asset_transactions.nil? + return false if @validation_sources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + asset_detail == o.asset_detail && + asset_owners == o.asset_owners && + asset_holder == o.asset_holder && + asset_transactions == o.asset_transactions && + validation_sources == o.validation_sources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [asset_detail, asset_owners, asset_holder, asset_transactions, validation_sources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/asset_detail.rb b/lib/plaid/models/asset_detail.rb new file mode 100644 index 000000000..17a3ae82f --- /dev/null +++ b/lib/plaid/models/asset_detail.rb @@ -0,0 +1,347 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Details about an asset. + class AssetDetail + # A vendor creadted unique Identifier. + attr_accessor :asset_unique_identifier + + # A unique alphanumeric string identifying an asset. + attr_accessor :asset_account_identifier + + # Account Report As of Date / Create Date. Format YYYY-MM-DD + attr_accessor :asset_as_of_date + + # A text description that further defines the Asset. This could be used to describe the shares associated with the stocks, bonds or mutual funds, retirement funds or business owned that the borrower has disclosed (named) as an asset. + attr_accessor :asset_description + + # Asset Account Available Balance. + attr_accessor :asset_available_balance_amount + + # A vendor creadted unique Identifier + attr_accessor :asset_current_balance_amount + + attr_accessor :asset_type + + # Additional Asset Decription some examples are Investment Tax-Deferred , Loan, 401K, 403B, Checking, Money Market, Credit Card,ROTH,529,Biller,ROLLOVER,CD,Savings,Investment Taxable, IRA, Mortgage, Line Of Credit. + attr_accessor :asset_type_additional_description + + # The Number of days requested made to the Financial Institution. Example When looking for 3 months of data from the FI, pass in 90 days. + attr_accessor :asset_days_requested_count + + # Ownership type of the asset account. + attr_accessor :asset_ownership_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'asset_unique_identifier' => :'AssetUniqueIdentifier', + :'asset_account_identifier' => :'AssetAccountIdentifier', + :'asset_as_of_date' => :'AssetAsOfDate', + :'asset_description' => :'AssetDescription', + :'asset_available_balance_amount' => :'AssetAvailableBalanceAmount', + :'asset_current_balance_amount' => :'AssetCurrentBalanceAmount', + :'asset_type' => :'AssetType', + :'asset_type_additional_description' => :'AssetTypeAdditionalDescription', + :'asset_days_requested_count' => :'AssetDaysRequestedCount', + :'asset_ownership_type' => :'AssetOwnershipType' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'asset_unique_identifier' => :'String', + :'asset_account_identifier' => :'String', + :'asset_as_of_date' => :'String', + :'asset_description' => :'String', + :'asset_available_balance_amount' => :'Float', + :'asset_current_balance_amount' => :'Float', + :'asset_type' => :'AssetType', + :'asset_type_additional_description' => :'String', + :'asset_days_requested_count' => :'Integer', + :'asset_ownership_type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'asset_description', + :'asset_type_additional_description', + :'asset_ownership_type' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetDetail` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetDetail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'asset_unique_identifier') + self.asset_unique_identifier = attributes[:'asset_unique_identifier'] + end + + if attributes.key?(:'asset_account_identifier') + self.asset_account_identifier = attributes[:'asset_account_identifier'] + end + + if attributes.key?(:'asset_as_of_date') + self.asset_as_of_date = attributes[:'asset_as_of_date'] + end + + if attributes.key?(:'asset_description') + self.asset_description = attributes[:'asset_description'] + end + + if attributes.key?(:'asset_available_balance_amount') + self.asset_available_balance_amount = attributes[:'asset_available_balance_amount'] + end + + if attributes.key?(:'asset_current_balance_amount') + self.asset_current_balance_amount = attributes[:'asset_current_balance_amount'] + end + + if attributes.key?(:'asset_type') + self.asset_type = attributes[:'asset_type'] + end + + if attributes.key?(:'asset_type_additional_description') + self.asset_type_additional_description = attributes[:'asset_type_additional_description'] + end + + if attributes.key?(:'asset_days_requested_count') + self.asset_days_requested_count = attributes[:'asset_days_requested_count'] + end + + if attributes.key?(:'asset_ownership_type') + self.asset_ownership_type = attributes[:'asset_ownership_type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @asset_unique_identifier.nil? + invalid_properties.push('invalid value for "asset_unique_identifier", asset_unique_identifier cannot be nil.') + end + + if @asset_account_identifier.nil? + invalid_properties.push('invalid value for "asset_account_identifier", asset_account_identifier cannot be nil.') + end + + if @asset_as_of_date.nil? + invalid_properties.push('invalid value for "asset_as_of_date", asset_as_of_date cannot be nil.') + end + + if @asset_available_balance_amount.nil? + invalid_properties.push('invalid value for "asset_available_balance_amount", asset_available_balance_amount cannot be nil.') + end + + if @asset_current_balance_amount.nil? + invalid_properties.push('invalid value for "asset_current_balance_amount", asset_current_balance_amount cannot be nil.') + end + + if @asset_type.nil? + invalid_properties.push('invalid value for "asset_type", asset_type cannot be nil.') + end + + if @asset_days_requested_count.nil? + invalid_properties.push('invalid value for "asset_days_requested_count", asset_days_requested_count cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @asset_unique_identifier.nil? + return false if @asset_account_identifier.nil? + return false if @asset_as_of_date.nil? + return false if @asset_available_balance_amount.nil? + return false if @asset_current_balance_amount.nil? + return false if @asset_type.nil? + return false if @asset_days_requested_count.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + asset_unique_identifier == o.asset_unique_identifier && + asset_account_identifier == o.asset_account_identifier && + asset_as_of_date == o.asset_as_of_date && + asset_description == o.asset_description && + asset_available_balance_amount == o.asset_available_balance_amount && + asset_current_balance_amount == o.asset_current_balance_amount && + asset_type == o.asset_type && + asset_type_additional_description == o.asset_type_additional_description && + asset_days_requested_count == o.asset_days_requested_count && + asset_ownership_type == o.asset_ownership_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [asset_unique_identifier, asset_account_identifier, asset_as_of_date, asset_description, asset_available_balance_amount, asset_current_balance_amount, asset_type, asset_type_additional_description, asset_days_requested_count, asset_ownership_type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/pay_stub_verification_attribute.rb b/lib/plaid/models/asset_holder.rb similarity index 89% rename from lib/plaid/models/pay_stub_verification_attribute.rb rename to lib/plaid/models/asset_holder.rb index c2db6723a..05af7c6b5 100644 --- a/lib/plaid/models/pay_stub_verification_attribute.rb +++ b/lib/plaid/models/asset_holder.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,15 +14,14 @@ require 'time' module Plaid - # Details about a certain reason as to why a document could potentially be fraudulent. - class PayStubVerificationAttribute - # Message indicating the reason as to why the verification failed. - attr_accessor :type + # No documentation available + class AssetHolder + attr_accessor :name # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'type' => :'type' + :'name' => :'NAME' } end @@ -34,14 +33,13 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'type' => :'String' + :'name' => :'AssetHolderName' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'type' ]) end @@ -49,19 +47,19 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PayStubVerificationAttribute` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetHolder` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PayStubVerificationAttribute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetHolder`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'type') - self.type = attributes[:'type'] + if attributes.key?(:'name') + self.name = attributes[:'name'] end end @@ -69,12 +67,17 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if @name.nil? true end @@ -83,7 +86,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - type == o.type + name == o.name end # @see the `==` method @@ -95,7 +98,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type].hash + [name].hash end # Builds the object from hash diff --git a/lib/plaid/models/asset_holder_name.rb b/lib/plaid/models/asset_holder_name.rb new file mode 100644 index 000000000..85f3265b8 --- /dev/null +++ b/lib/plaid/models/asset_holder_name.rb @@ -0,0 +1,225 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # No documentation available + class AssetHolderName + # The unparsed name of either an individual or a legal entity. + attr_accessor :full_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'full_name' => :'FullName' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'full_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetHolderName` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetHolderName`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'full_name') + self.full_name = attributes[:'full_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @full_name.nil? + invalid_properties.push('invalid value for "full_name", full_name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @full_name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + full_name == o.full_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [full_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/asset_owner.rb b/lib/plaid/models/asset_owner.rb new file mode 100644 index 000000000..4351d080d --- /dev/null +++ b/lib/plaid/models/asset_owner.rb @@ -0,0 +1,221 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # No documentation available + class AssetOwner + # Account Owner Full Name. + attr_accessor :asset_owner_text + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'asset_owner_text' => :'AssetOwnerText' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'asset_owner_text' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'asset_owner_text' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetOwner` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetOwner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'asset_owner_text') + self.asset_owner_text = attributes[:'asset_owner_text'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + asset_owner_text == o.asset_owner_text + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [asset_owner_text].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/report_token.rb b/lib/plaid/models/asset_owners.rb similarity index 85% rename from lib/plaid/models/report_token.rb rename to lib/plaid/models/asset_owners.rb index 952a3fb64..831d4490f 100644 --- a/lib/plaid/models/report_token.rb +++ b/lib/plaid/models/asset_owners.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,18 +14,15 @@ require 'time' module Plaid - # ReportToken is a representation of a token that has a `report_type` field that can be one of `assets` or `income` and a `token` field which is the associated token with the `report_type`. The `token` can be an Asset Report token or Income Report token. - class ReportToken - attr_accessor :report_type - - # The report token. It can be an asset report token or an income report token. - attr_accessor :token + # No documentation available + class AssetOwners + # Multiple Occurances of Account Owners Full Name up to 4. + attr_accessor :asset_owner # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'report_type' => :'report_type', - :'token' => :'token' + :'asset_owner' => :'ASSET_OWNER' } end @@ -37,8 +34,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'report_type' => :'ReportType', - :'token' => :'String' + :'asset_owner' => :'Array' } end @@ -52,23 +48,21 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ReportToken` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetOwners` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ReportToken`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetOwners`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'report_type') - self.report_type = attributes[:'report_type'] - end - - if attributes.key?(:'token') - self.token = attributes[:'token'] + if attributes.key?(:'asset_owner') + if (value = attributes[:'asset_owner']).is_a?(Array) + self.asset_owner = value + end end end @@ -76,12 +70,17 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @asset_owner.nil? + invalid_properties.push('invalid value for "asset_owner", asset_owner cannot be nil.') + end + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if @asset_owner.nil? true end @@ -90,8 +89,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - report_type == o.report_type && - token == o.token + asset_owner == o.asset_owner end # @see the `==` method @@ -103,7 +101,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [report_type, token].hash + [asset_owner].hash end # Builds the object from hash diff --git a/lib/plaid/models/asset_report.rb b/lib/plaid/models/asset_report.rb index a18860242..6a8df3255 100644 --- a/lib/plaid/models/asset_report.rb +++ b/lib/plaid/models/asset_report.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_audit_copy_create_request.rb b/lib/plaid/models/asset_report_audit_copy_create_request.rb index 2d92e2fc3..ebb59c9a4 100644 --- a/lib/plaid/models/asset_report_audit_copy_create_request.rb +++ b/lib/plaid/models/asset_report_audit_copy_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_audit_copy_create_response.rb b/lib/plaid/models/asset_report_audit_copy_create_response.rb index 61cfc3713..a4cd77405 100644 --- a/lib/plaid/models/asset_report_audit_copy_create_response.rb +++ b/lib/plaid/models/asset_report_audit_copy_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_audit_copy_get_request.rb b/lib/plaid/models/asset_report_audit_copy_get_request.rb index fd24946d5..b1d95f21a 100644 --- a/lib/plaid/models/asset_report_audit_copy_get_request.rb +++ b/lib/plaid/models/asset_report_audit_copy_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_audit_copy_remove_request.rb b/lib/plaid/models/asset_report_audit_copy_remove_request.rb index 30c6d5226..840c93e45 100644 --- a/lib/plaid/models/asset_report_audit_copy_remove_request.rb +++ b/lib/plaid/models/asset_report_audit_copy_remove_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_audit_copy_remove_response.rb b/lib/plaid/models/asset_report_audit_copy_remove_response.rb index eb2b69a6b..90497e3fe 100644 --- a/lib/plaid/models/asset_report_audit_copy_remove_response.rb +++ b/lib/plaid/models/asset_report_audit_copy_remove_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_create_request.rb b/lib/plaid/models/asset_report_create_request.rb index 878bd410e..a3a7c3385 100644 --- a/lib/plaid/models/asset_report_create_request.rb +++ b/lib/plaid/models/asset_report_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_create_request_options.rb b/lib/plaid/models/asset_report_create_request_options.rb index 728c89880..76a3ad6b0 100644 --- a/lib/plaid/models/asset_report_create_request_options.rb +++ b/lib/plaid/models/asset_report_create_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_create_response.rb b/lib/plaid/models/asset_report_create_response.rb index b798abc8d..cf79009fc 100644 --- a/lib/plaid/models/asset_report_create_response.rb +++ b/lib/plaid/models/asset_report_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_filter_request.rb b/lib/plaid/models/asset_report_filter_request.rb index d808ae115..e889a3ab8 100644 --- a/lib/plaid/models/asset_report_filter_request.rb +++ b/lib/plaid/models/asset_report_filter_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_filter_response.rb b/lib/plaid/models/asset_report_filter_response.rb index aac25eaa0..592c1ed26 100644 --- a/lib/plaid/models/asset_report_filter_response.rb +++ b/lib/plaid/models/asset_report_filter_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_freddie.rb b/lib/plaid/models/asset_report_freddie.rb new file mode 100644 index 000000000..bef92bb06 --- /dev/null +++ b/lib/plaid/models/asset_report_freddie.rb @@ -0,0 +1,252 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # An object representing an Asset Report with Freddie Mac schema + class AssetReportFreddie + attr_accessor :loans + + attr_accessor :parties + + attr_accessor :services + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'loans' => :'LOANS', + :'parties' => :'PARTIES', + :'services' => :'SERVICES' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'loans' => :'Loans', + :'parties' => :'Parties', + :'services' => :'Services' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetReportFreddie` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetReportFreddie`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'loans') + self.loans = attributes[:'loans'] + end + + if attributes.key?(:'parties') + self.parties = attributes[:'parties'] + end + + if attributes.key?(:'services') + self.services = attributes[:'services'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @loans.nil? + invalid_properties.push('invalid value for "loans", loans cannot be nil.') + end + + if @parties.nil? + invalid_properties.push('invalid value for "parties", parties cannot be nil.') + end + + if @services.nil? + invalid_properties.push('invalid value for "services", services cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @loans.nil? + return false if @parties.nil? + return false if @services.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + loans == o.loans && + parties == o.parties && + services == o.services + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [loans, parties, services].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/asset_report_freddie_get_request.rb b/lib/plaid/models/asset_report_freddie_get_request.rb new file mode 100644 index 000000000..ba074f28d --- /dev/null +++ b/lib/plaid/models/asset_report_freddie_get_request.rb @@ -0,0 +1,245 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # AssetReportFreddieGetResponse defines the request schema for `credit/asset_report/freddie_mac/get` + class AssetReportFreddieGetRequest + # A token that can be shared with a third party auditor to allow them to obtain access to the Asset Report. This token should be stored securely. + attr_accessor :audit_copy_token + + # Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body. + attr_accessor :client_id + + # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. + attr_accessor :secret + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'audit_copy_token' => :'audit_copy_token', + :'client_id' => :'client_id', + :'secret' => :'secret' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'audit_copy_token' => :'String', + :'client_id' => :'String', + :'secret' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetReportFreddieGetRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetReportFreddieGetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'audit_copy_token') + self.audit_copy_token = attributes[:'audit_copy_token'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @audit_copy_token.nil? + invalid_properties.push('invalid value for "audit_copy_token", audit_copy_token cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @audit_copy_token.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + audit_copy_token == o.audit_copy_token && + client_id == o.client_id && + secret == o.secret + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [audit_copy_token, client_id, secret].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/asset_report_relay_remove_response.rb b/lib/plaid/models/asset_report_freddie_get_response.rb similarity index 88% rename from lib/plaid/models/asset_report_relay_remove_response.rb rename to lib/plaid/models/asset_report_freddie_get_response.rb index 7fa85cfda..da1e57ad9 100644 --- a/lib/plaid/models/asset_report_relay_remove_response.rb +++ b/lib/plaid/models/asset_report_freddie_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,10 +14,9 @@ require 'time' module Plaid - # AssetReportRelayRemoveResponse defines the response schema for `/asset_report/relay/remove` - class AssetReportRelayRemoveResponse - # `true` if the Asset Relay token was successfully removed. - attr_accessor :removed + # AssetReportFreddieGetResponse defines the response schema for `/asset_report/get` + class AssetReportFreddieGetResponse + attr_accessor :deal # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. attr_accessor :request_id @@ -25,7 +24,7 @@ class AssetReportRelayRemoveResponse # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'removed' => :'removed', + :'deal' => :'DEAL', :'request_id' => :'request_id' } end @@ -38,7 +37,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'removed' => :'Boolean', + :'deal' => :'AssetReportFreddie', :'request_id' => :'String' } end @@ -53,19 +52,19 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetReportRelayRemoveResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetReportFreddieGetResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetReportRelayRemoveResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetReportFreddieGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'removed') - self.removed = attributes[:'removed'] + if attributes.key?(:'deal') + self.deal = attributes[:'deal'] end if attributes.key?(:'request_id') @@ -77,8 +76,8 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @removed.nil? - invalid_properties.push('invalid value for "removed", removed cannot be nil.') + if @deal.nil? + invalid_properties.push('invalid value for "deal", deal cannot be nil.') end if @request_id.nil? @@ -91,7 +90,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @removed.nil? + return false if @deal.nil? return false if @request_id.nil? true end @@ -101,7 +100,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - removed == o.removed && + deal == o.deal && request_id == o.request_id end @@ -114,7 +113,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [removed, request_id].hash + [deal, request_id].hash end # Builds the object from hash diff --git a/lib/plaid/models/asset_report_get_request.rb b/lib/plaid/models/asset_report_get_request.rb index 93742575d..7a258473b 100644 --- a/lib/plaid/models/asset_report_get_request.rb +++ b/lib/plaid/models/asset_report_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -31,6 +31,8 @@ class AssetReportGetRequest # `true` to fetch \"fast\" version of asset report. Defaults to false if omitted. attr_accessor :fast_report + attr_accessor :options + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -38,7 +40,8 @@ def self.attribute_map :'secret' => :'secret', :'asset_report_token' => :'asset_report_token', :'include_insights' => :'include_insights', - :'fast_report' => :'fast_report' + :'fast_report' => :'fast_report', + :'options' => :'options' } end @@ -54,7 +57,8 @@ def self.openapi_types :'secret' => :'String', :'asset_report_token' => :'String', :'include_insights' => :'Boolean', - :'fast_report' => :'Boolean' + :'fast_report' => :'Boolean', + :'options' => :'AssetReportGetRequestOptions' } end @@ -102,6 +106,10 @@ def initialize(attributes = {}) else self.fast_report = false end + + if attributes.key?(:'options') + self.options = attributes[:'options'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -131,7 +139,8 @@ def ==(o) secret == o.secret && asset_report_token == o.asset_report_token && include_insights == o.include_insights && - fast_report == o.fast_report + fast_report == o.fast_report && + options == o.options end # @see the `==` method @@ -143,7 +152,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, secret, asset_report_token, include_insights, fast_report].hash + [client_id, secret, asset_report_token, include_insights, fast_report, options].hash end # Builds the object from hash diff --git a/lib/plaid/models/asset_report_get_request_options.rb b/lib/plaid/models/asset_report_get_request_options.rb new file mode 100644 index 000000000..2fe6041fc --- /dev/null +++ b/lib/plaid/models/asset_report_get_request_options.rb @@ -0,0 +1,247 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # An optional object to filter or add data to `/asset_report/get` results. If provided, must be non-`null`. + class AssetReportGetRequestOptions + # The maximum integer number of days of history to include in the Asset Report. + attr_accessor :days_to_include + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'days_to_include' => :'days_to_include' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'days_to_include' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'days_to_include' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetReportGetRequestOptions` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetReportGetRequestOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'days_to_include') + self.days_to_include = attributes[:'days_to_include'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@days_to_include.nil? && @days_to_include > 731 + invalid_properties.push('invalid value for "days_to_include", must be smaller than or equal to 731.') + end + + if !@days_to_include.nil? && @days_to_include < 0 + invalid_properties.push('invalid value for "days_to_include", must be greater than or equal to 0.') + end + + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@days_to_include.nil? && @days_to_include > 731 + return false if !@days_to_include.nil? && @days_to_include < 0 + true + end + + # Custom attribute writer method with validation + # @param [Object] days_to_include Value to be assigned + def days_to_include=(days_to_include) + if !days_to_include.nil? && days_to_include > 731 + fail ArgumentError, 'invalid value for "days_to_include", must be smaller than or equal to 731.' + end + + if !days_to_include.nil? && days_to_include < 0 + fail ArgumentError, 'invalid value for "days_to_include", must be greater than or equal to 0.' + end + + + @days_to_include = days_to_include + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + days_to_include == o.days_to_include + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [days_to_include].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/asset_report_get_response.rb b/lib/plaid/models/asset_report_get_response.rb index 5eb973bab..f5bfd91de 100644 --- a/lib/plaid/models/asset_report_get_response.rb +++ b/lib/plaid/models/asset_report_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_item.rb b/lib/plaid/models/asset_report_item.rb index d864fc6f3..22e68b104 100644 --- a/lib/plaid/models/asset_report_item.rb +++ b/lib/plaid/models/asset_report_item.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_pdf_get_request.rb b/lib/plaid/models/asset_report_pdf_get_request.rb index 4ffd59f8a..6f20dfda8 100644 --- a/lib/plaid/models/asset_report_pdf_get_request.rb +++ b/lib/plaid/models/asset_report_pdf_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,12 +25,15 @@ class AssetReportPDFGetRequest # A token that can be provided to endpoints such as `/asset_report/get` or `/asset_report/pdf/get` to fetch or update an Asset Report. attr_accessor :asset_report_token + attr_accessor :options + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'client_id' => :'client_id', :'secret' => :'secret', - :'asset_report_token' => :'asset_report_token' + :'asset_report_token' => :'asset_report_token', + :'options' => :'options' } end @@ -44,7 +47,8 @@ def self.openapi_types { :'client_id' => :'String', :'secret' => :'String', - :'asset_report_token' => :'String' + :'asset_report_token' => :'String', + :'options' => :'AssetReportPDFGetRequestOptions' } end @@ -80,6 +84,10 @@ def initialize(attributes = {}) if attributes.key?(:'asset_report_token') self.asset_report_token = attributes[:'asset_report_token'] end + + if attributes.key?(:'options') + self.options = attributes[:'options'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -107,7 +115,8 @@ def ==(o) self.class == o.class && client_id == o.client_id && secret == o.secret && - asset_report_token == o.asset_report_token + asset_report_token == o.asset_report_token && + options == o.options end # @see the `==` method @@ -119,7 +128,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, secret, asset_report_token].hash + [client_id, secret, asset_report_token, options].hash end # Builds the object from hash diff --git a/lib/plaid/models/asset_report_pdf_get_request_options.rb b/lib/plaid/models/asset_report_pdf_get_request_options.rb new file mode 100644 index 000000000..655c894f1 --- /dev/null +++ b/lib/plaid/models/asset_report_pdf_get_request_options.rb @@ -0,0 +1,247 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # An optional object to filter or add data to `/asset_report/get` results. If provided, must be non-`null`. + class AssetReportPDFGetRequestOptions + # The maximum integer number of days of history to include in the Asset Report. + attr_accessor :days_to_include + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'days_to_include' => :'days_to_include' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'days_to_include' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'days_to_include' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetReportPDFGetRequestOptions` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetReportPDFGetRequestOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'days_to_include') + self.days_to_include = attributes[:'days_to_include'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@days_to_include.nil? && @days_to_include > 731 + invalid_properties.push('invalid value for "days_to_include", must be smaller than or equal to 731.') + end + + if !@days_to_include.nil? && @days_to_include < 0 + invalid_properties.push('invalid value for "days_to_include", must be greater than or equal to 0.') + end + + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@days_to_include.nil? && @days_to_include > 731 + return false if !@days_to_include.nil? && @days_to_include < 0 + true + end + + # Custom attribute writer method with validation + # @param [Object] days_to_include Value to be assigned + def days_to_include=(days_to_include) + if !days_to_include.nil? && days_to_include > 731 + fail ArgumentError, 'invalid value for "days_to_include", must be smaller than or equal to 731.' + end + + if !days_to_include.nil? && days_to_include < 0 + fail ArgumentError, 'invalid value for "days_to_include", must be greater than or equal to 0.' + end + + + @days_to_include = days_to_include + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + days_to_include == o.days_to_include + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [days_to_include].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/asset_report_refresh_request.rb b/lib/plaid/models/asset_report_refresh_request.rb index ea8eea2ed..8ff35b1ec 100644 --- a/lib/plaid/models/asset_report_refresh_request.rb +++ b/lib/plaid/models/asset_report_refresh_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_refresh_request_options.rb b/lib/plaid/models/asset_report_refresh_request_options.rb index 7a624c506..f91b69392 100644 --- a/lib/plaid/models/asset_report_refresh_request_options.rb +++ b/lib/plaid/models/asset_report_refresh_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_refresh_response.rb b/lib/plaid/models/asset_report_refresh_response.rb index 9da00126f..1b0b8b91c 100644 --- a/lib/plaid/models/asset_report_refresh_response.rb +++ b/lib/plaid/models/asset_report_refresh_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_relay_create_request.rb b/lib/plaid/models/asset_report_relay_create_request.rb deleted file mode 100644 index 245a5a88b..000000000 --- a/lib/plaid/models/asset_report_relay_create_request.rb +++ /dev/null @@ -1,271 +0,0 @@ -=begin -#The Plaid API - -#The Plaid REST API. Please see https://plaid.com/docs/api for more details. - -The version of the OpenAPI document: 2020-09-14_1.161.5 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.1.1 - -=end - -require 'date' -require 'time' - -module Plaid - # AssetReportRelayCreateRequest defines the request schema for `/asset_report/relay/create` - class AssetReportRelayCreateRequest - # Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body. - attr_accessor :client_id - - # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. - attr_accessor :secret - - # A token that can be provided to endpoints such as `/asset_report/get` or `/asset_report/pdf/get` to fetch or update an Asset Report. - attr_accessor :asset_report_token - - # The `secondary_client_id` is the client id of the third party with whom you would like to share the Asset Report. - attr_accessor :secondary_client_id - - # URL to which Plaid will send webhooks when the Secondary Client successfully retrieves an Asset Report by calling `asset_report/relay/get`. - attr_accessor :webhook - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'client_id' => :'client_id', - :'secret' => :'secret', - :'asset_report_token' => :'asset_report_token', - :'secondary_client_id' => :'secondary_client_id', - :'webhook' => :'webhook' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'client_id' => :'String', - :'secret' => :'String', - :'asset_report_token' => :'String', - :'secondary_client_id' => :'String', - :'webhook' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - :'webhook' - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetReportRelayCreateRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetReportRelayCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'client_id') - self.client_id = attributes[:'client_id'] - end - - if attributes.key?(:'secret') - self.secret = attributes[:'secret'] - end - - if attributes.key?(:'asset_report_token') - self.asset_report_token = attributes[:'asset_report_token'] - end - - if attributes.key?(:'secondary_client_id') - self.secondary_client_id = attributes[:'secondary_client_id'] - end - - if attributes.key?(:'webhook') - self.webhook = attributes[:'webhook'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @asset_report_token.nil? - invalid_properties.push('invalid value for "asset_report_token", asset_report_token cannot be nil.') - end - - if @secondary_client_id.nil? - invalid_properties.push('invalid value for "secondary_client_id", secondary_client_id cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @asset_report_token.nil? - return false if @secondary_client_id.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - client_id == o.client_id && - secret == o.secret && - asset_report_token == o.asset_report_token && - secondary_client_id == o.secondary_client_id && - webhook == o.webhook - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [client_id, secret, asset_report_token, secondary_client_id, webhook].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = Plaid.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/plaid/models/asset_report_remove_request.rb b/lib/plaid/models/asset_report_remove_request.rb index 7358219b1..5133bdae2 100644 --- a/lib/plaid/models/asset_report_remove_request.rb +++ b/lib/plaid/models/asset_report_remove_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_remove_response.rb b/lib/plaid/models/asset_report_remove_response.rb index e4f2815b1..e69e5a2bb 100644 --- a/lib/plaid/models/asset_report_remove_response.rb +++ b/lib/plaid/models/asset_report_remove_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_transaction.rb b/lib/plaid/models/asset_report_transaction.rb index 08d09750c..1b8b4182b 100644 --- a/lib/plaid/models/asset_report_transaction.rb +++ b/lib/plaid/models/asset_report_transaction.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -71,6 +71,8 @@ class AssetReportTransaction # The date on which the transaction took place, in IS0 8601 format. attr_accessor :date_transacted + attr_accessor :credit_category + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -114,7 +116,8 @@ def self.attribute_map :'transaction_id' => :'transaction_id', :'merchant_name' => :'merchant_name', :'check_number' => :'check_number', - :'date_transacted' => :'date_transacted' + :'date_transacted' => :'date_transacted', + :'credit_category' => :'credit_category' } end @@ -144,7 +147,8 @@ def self.openapi_types :'transaction_id' => :'String', :'merchant_name' => :'String', :'check_number' => :'String', - :'date_transacted' => :'String' + :'date_transacted' => :'String', + :'credit_category' => :'CreditCategory' } end @@ -160,7 +164,8 @@ def self.openapi_nullable :'unofficial_currency_code', :'merchant_name', :'check_number', - :'date_transacted' + :'date_transacted', + :'credit_category' ]) end @@ -264,6 +269,10 @@ def initialize(attributes = {}) if attributes.key?(:'date_transacted') self.date_transacted = attributes[:'date_transacted'] end + + if attributes.key?(:'credit_category') + self.credit_category = attributes[:'credit_category'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -339,7 +348,8 @@ def ==(o) transaction_id == o.transaction_id && merchant_name == o.merchant_name && check_number == o.check_number && - date_transacted == o.date_transacted + date_transacted == o.date_transacted && + credit_category == o.credit_category end # @see the `==` method @@ -351,7 +361,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [transaction_type, pending_transaction_id, category_id, category, location, payment_meta, account_owner, name, original_description, account_id, amount, iso_currency_code, unofficial_currency_code, date, pending, transaction_id, merchant_name, check_number, date_transacted].hash + [transaction_type, pending_transaction_id, category_id, category, location, payment_meta, account_owner, name, original_description, account_id, amount, iso_currency_code, unofficial_currency_code, date, pending, transaction_id, merchant_name, check_number, date_transacted, credit_category].hash end # Builds the object from hash diff --git a/lib/plaid/models/asset_report_transaction_all_of.rb b/lib/plaid/models/asset_report_transaction_all_of.rb index 369577a91..857a4f29f 100644 --- a/lib/plaid/models/asset_report_transaction_all_of.rb +++ b/lib/plaid/models/asset_report_transaction_all_of.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -18,10 +18,13 @@ class AssetReportTransactionAllOf # The date on which the transaction took place, in IS0 8601 format. attr_accessor :date_transacted + attr_accessor :credit_category + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'date_transacted' => :'date_transacted' + :'date_transacted' => :'date_transacted', + :'credit_category' => :'credit_category' } end @@ -33,14 +36,16 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'date_transacted' => :'String' + :'date_transacted' => :'String', + :'credit_category' => :'CreditCategory' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'date_transacted' + :'date_transacted', + :'credit_category' ]) end @@ -62,6 +67,10 @@ def initialize(attributes = {}) if attributes.key?(:'date_transacted') self.date_transacted = attributes[:'date_transacted'] end + + if attributes.key?(:'credit_category') + self.credit_category = attributes[:'credit_category'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -82,7 +91,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - date_transacted == o.date_transacted + date_transacted == o.date_transacted && + credit_category == o.credit_category end # @see the `==` method @@ -94,7 +104,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [date_transacted].hash + [date_transacted, credit_category].hash end # Builds the object from hash diff --git a/lib/plaid/models/asset_report_user.rb b/lib/plaid/models/asset_report_user.rb index 0a0ac7515..43f7acfda 100644 --- a/lib/plaid/models/asset_report_user.rb +++ b/lib/plaid/models/asset_report_user.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_transaction.rb b/lib/plaid/models/asset_transaction.rb new file mode 100644 index 000000000..b8404b416 --- /dev/null +++ b/lib/plaid/models/asset_transaction.rb @@ -0,0 +1,241 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # An object representing... + class AssetTransaction + attr_accessor :asset_transaction_detail + + # No documentation available + attr_accessor :asset_transaction_descripton + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'asset_transaction_detail' => :'ASSET_TRANSACTION_DETAIL', + :'asset_transaction_descripton' => :'ASSET_TRANSACTION_DESCRIPTON' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'asset_transaction_detail' => :'AssetTransactionDetail', + :'asset_transaction_descripton' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetTransaction` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetTransaction`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'asset_transaction_detail') + self.asset_transaction_detail = attributes[:'asset_transaction_detail'] + end + + if attributes.key?(:'asset_transaction_descripton') + if (value = attributes[:'asset_transaction_descripton']).is_a?(Array) + self.asset_transaction_descripton = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @asset_transaction_detail.nil? + invalid_properties.push('invalid value for "asset_transaction_detail", asset_transaction_detail cannot be nil.') + end + + if @asset_transaction_descripton.nil? + invalid_properties.push('invalid value for "asset_transaction_descripton", asset_transaction_descripton cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @asset_transaction_detail.nil? + return false if @asset_transaction_descripton.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + asset_transaction_detail == o.asset_transaction_detail && + asset_transaction_descripton == o.asset_transaction_descripton + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [asset_transaction_detail, asset_transaction_descripton].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/asset_transaction_category_type.rb b/lib/plaid/models/asset_transaction_category_type.rb new file mode 100644 index 000000000..1a3c6f077 --- /dev/null +++ b/lib/plaid/models/asset_transaction_category_type.rb @@ -0,0 +1,144 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class AssetTransactionCategoryType + ATM_FEE = "ATMFee".freeze + ADVERTISING = "Advertising".freeze + AIR_TRAVEL = "AirTravel".freeze + ALCOHOL_BARS = "AlcoholBars".freeze + ALLOWANCE = "Allowance".freeze + AMUSEMENT = "Amusement".freeze + ARTS = "Arts".freeze + AUTO_TRANSPORT = "AutoTransport".freeze + AUTO_INSURANCE = "AutoInsurance".freeze + AUTO_PAYMENT = "AutoPayment".freeze + BABY_SUPPLIES = "BabySupplies".freeze + BABYSITTER_DAYCARE = "BabysitterDaycare".freeze + BANK_FEE = "BankFee".freeze + BILLS_UTILITIES = "BillsUtilities".freeze + BONUS = "Bonus".freeze + BOOKS_SUPPLIES = "BooksSupplies".freeze + BUSINESS_SERVICES = "Business Services".freeze + BUY = "Buy".freeze + CASH_ATM = "CashATM".freeze + CHARITY = "Charity".freeze + CHECK = "Check".freeze + CHILD_SUPPORT = "ChildSupport".freeze + CLOTHING = "Clothing".freeze + COFFEE_SHOPS = "CoffeeShops".freeze + CREDIT_CARD_PAYMENT = "CreditCardPayment".freeze + DENTIST = "Dentist".freeze + DOCTOR = "Doctor".freeze + EDUCATION = "Education".freeze + ELECTRONICS_SOFTWARE = "ElectronicsSoftware".freeze + ENTERTAINMENT = "Entertainment".freeze + EYECARE = "Eyecare".freeze + FAST_FOOD = "FastFood".freeze + FEDERAL_TAX = "FederalTax".freeze + FEES_CHARGES = "FeesCharges".freeze + FINANCE_CHARGE = "FinanceCharge".freeze + FINANCIAL = "Financial".freeze + FINANCIAL_ADVISOR = "FinancialAdvisor".freeze + FOOD_DINING = "FoodDining".freeze + FURNISHINGS = "Furnishings".freeze + GAS_FUEL = "GasFuel".freeze + GIFTS_DONATIONS = "GiftsDonations".freeze + GROCERIES = "Groceries".freeze + GYM = "Gym".freeze + HAIR = "Hair".freeze + HEALTH_FITNESS = "HealthFitness".freeze + HEALTH_INSURANCE = "HealthInsurance".freeze + HOBBIES = "Hobbies".freeze + HOME = "Home".freeze + HOME_IMPROVEMENT = "HomeImprovement".freeze + HOME_INSURANCE = "HomeInsurance".freeze + HOME_PHONE = "HomePhone".freeze + HOME_SERVICES = "HomeServices".freeze + HOME_SUPPLIES = "HomeSupplies".freeze + HOTEL = "Hotel".freeze + INCOME = "Income".freeze + INTEREST_INCOME = "InterestIncome".freeze + INTERNET = "Internet".freeze + INVESTMENTS = "Investments".freeze + KIDS = "Kids".freeze + KIDS_ACTIVITIES = "KidsActivities".freeze + LATE_FEE = "LateFee".freeze + LAUNDRY = "Laundry".freeze + LAWN_GARDEN = "LawnGarden".freeze + LEGAL = "Legal".freeze + LIFE_INSURANCE = "LifeInsurance".freeze + LOAN_INSURANCE = "LoanInsurance".freeze + LOAN_PAYMENT = "LoanPayment".freeze + LOANS = "Loans".freeze + MOBILE_PHONE = "MobilePhone".freeze + MORTGAGE_RENT = "MortgageRent".freeze + MOVIES_DVDS = "MoviesDVDs".freeze + MUSIC = "Music".freeze + NEWSPAPERS_MAGAZINES = "NewspapersMagazines".freeze + OFFICE_SUPPLIES = "OfficeSupplies".freeze + PARKING = "Parking".freeze + PAYCHECK = "Paycheck".freeze + PERSONAL_CARE = "PersonalCare".freeze + PET_FOOD_SUPPLIES = "PetFoodSupplies".freeze + PET_GROOMING = "PetGrooming".freeze + PETS = "Pets".freeze + PHARMACY = "Pharmacy".freeze + PRINTING = "Printing".freeze + PROPERTY_TAX = "Property Tax".freeze + PUBLIC_TRANSPORTATION = "Public Transportation".freeze + REIMBURSEMENT = "Reimbursement".freeze + RENTAL_CAR_TAXI = "RentalCarTaxi".freeze + RESTAURANTS = "Restaurants".freeze + SALES_TAX = "SalesTax".freeze + SERVICE_PARTS = "ServiceParts".freeze + SERVICE_FEE = "ServiceFee".freeze + SHIPPING = "Shipping".freeze + SHOPPING = "Shopping".freeze + SPA_MASSAGE = "SpaMassage".freeze + SPORTING_GOODS = "SportingGoods".freeze + SPORTS = "Sports".freeze + STATE_TAX = "StateTax".freeze + STUDENT_LOAN = "Student Loan".freeze + TAXES = "Taxes".freeze + TELEVISION = "Television".freeze + TOYS = "Toys".freeze + TRANSFER = "Transfer".freeze + TRAVEL = "Travel".freeze + TUITION = "Tuition".freeze + UNCATEGORIZED = "Uncategorized".freeze + UTILITIES = "Utilities".freeze + VACATION = "Vacation".freeze + VETERINARY = "Veterinary".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/asset_transaction_description.rb b/lib/plaid/models/asset_transaction_description.rb new file mode 100644 index 000000000..e91e31457 --- /dev/null +++ b/lib/plaid/models/asset_transaction_description.rb @@ -0,0 +1,225 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # No documentation available + class AssetTransactionDescription + # Asset Transaction Description String up to 3 occurances 1 required. + attr_accessor :asset_transaction_description + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'asset_transaction_description' => :'AssetTransactionDescription' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'asset_transaction_description' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetTransactionDescription` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetTransactionDescription`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'asset_transaction_description') + self.asset_transaction_description = attributes[:'asset_transaction_description'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @asset_transaction_description.nil? + invalid_properties.push('invalid value for "asset_transaction_description", asset_transaction_description cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @asset_transaction_description.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + asset_transaction_description == o.asset_transaction_description + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [asset_transaction_description].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/asset_transaction_detail.rb b/lib/plaid/models/asset_transaction_detail.rb new file mode 100644 index 000000000..595b47c65 --- /dev/null +++ b/lib/plaid/models/asset_transaction_detail.rb @@ -0,0 +1,327 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # No documentation available + class AssetTransactionDetail + # A vendor creadted unique Identifier. + attr_accessor :asset_transaction_unique_identifier + + # AssetTransactionAmountName. + attr_accessor :asset_transaction_amount + + # Asset Transaction Date. + attr_accessor :asset_transaction_date + + # Asset Transaction Post Date. + attr_accessor :asset_transaction_post_date + + attr_accessor :asset_transaction_type + + # Populate with who did the transaction. + attr_accessor :asset_transaction_paid_by_name + + # FI Provided - examples are atm, cash, check, credit, debit, deposit, directDebit, directDeposit, dividend, fee, interest, other, payment, pointOfSale, repeatPayment, serviceCharge, transfer. + attr_accessor :asset_transaction_type_additional_description + + attr_accessor :asset_transaction_category_type + + # FI provided Transaction Identifier. + attr_accessor :financial_institution_transaction_identifier + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'asset_transaction_unique_identifier' => :'AssetTransactionUniqueIdentifier', + :'asset_transaction_amount' => :'AssetTransactionAmount', + :'asset_transaction_date' => :'AssetTransactionDate', + :'asset_transaction_post_date' => :'AssetTransactionPostDate', + :'asset_transaction_type' => :'AssetTransactionType', + :'asset_transaction_paid_by_name' => :'AssetTransactionPaidByName', + :'asset_transaction_type_additional_description' => :'AssetTransactionTypeAdditionalDescription', + :'asset_transaction_category_type' => :'AssetTransactionCategoryType', + :'financial_institution_transaction_identifier' => :'FinancialInstitutionTransactionIdentifier' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'asset_transaction_unique_identifier' => :'String', + :'asset_transaction_amount' => :'Float', + :'asset_transaction_date' => :'Date', + :'asset_transaction_post_date' => :'Date', + :'asset_transaction_type' => :'AssetTransactionType', + :'asset_transaction_paid_by_name' => :'String', + :'asset_transaction_type_additional_description' => :'String', + :'asset_transaction_category_type' => :'AssetTransactionCategoryType', + :'financial_institution_transaction_identifier' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'asset_transaction_paid_by_name', + :'asset_transaction_type_additional_description', + :'asset_transaction_category_type', + :'financial_institution_transaction_identifier' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetTransactionDetail` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetTransactionDetail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'asset_transaction_unique_identifier') + self.asset_transaction_unique_identifier = attributes[:'asset_transaction_unique_identifier'] + end + + if attributes.key?(:'asset_transaction_amount') + self.asset_transaction_amount = attributes[:'asset_transaction_amount'] + end + + if attributes.key?(:'asset_transaction_date') + self.asset_transaction_date = attributes[:'asset_transaction_date'] + end + + if attributes.key?(:'asset_transaction_post_date') + self.asset_transaction_post_date = attributes[:'asset_transaction_post_date'] + end + + if attributes.key?(:'asset_transaction_type') + self.asset_transaction_type = attributes[:'asset_transaction_type'] + end + + if attributes.key?(:'asset_transaction_paid_by_name') + self.asset_transaction_paid_by_name = attributes[:'asset_transaction_paid_by_name'] + end + + if attributes.key?(:'asset_transaction_type_additional_description') + self.asset_transaction_type_additional_description = attributes[:'asset_transaction_type_additional_description'] + end + + if attributes.key?(:'asset_transaction_category_type') + self.asset_transaction_category_type = attributes[:'asset_transaction_category_type'] + end + + if attributes.key?(:'financial_institution_transaction_identifier') + self.financial_institution_transaction_identifier = attributes[:'financial_institution_transaction_identifier'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @asset_transaction_unique_identifier.nil? + invalid_properties.push('invalid value for "asset_transaction_unique_identifier", asset_transaction_unique_identifier cannot be nil.') + end + + if @asset_transaction_amount.nil? + invalid_properties.push('invalid value for "asset_transaction_amount", asset_transaction_amount cannot be nil.') + end + + if @asset_transaction_date.nil? + invalid_properties.push('invalid value for "asset_transaction_date", asset_transaction_date cannot be nil.') + end + + if @asset_transaction_post_date.nil? + invalid_properties.push('invalid value for "asset_transaction_post_date", asset_transaction_post_date cannot be nil.') + end + + if @asset_transaction_type.nil? + invalid_properties.push('invalid value for "asset_transaction_type", asset_transaction_type cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @asset_transaction_unique_identifier.nil? + return false if @asset_transaction_amount.nil? + return false if @asset_transaction_date.nil? + return false if @asset_transaction_post_date.nil? + return false if @asset_transaction_type.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + asset_transaction_unique_identifier == o.asset_transaction_unique_identifier && + asset_transaction_amount == o.asset_transaction_amount && + asset_transaction_date == o.asset_transaction_date && + asset_transaction_post_date == o.asset_transaction_post_date && + asset_transaction_type == o.asset_transaction_type && + asset_transaction_paid_by_name == o.asset_transaction_paid_by_name && + asset_transaction_type_additional_description == o.asset_transaction_type_additional_description && + asset_transaction_category_type == o.asset_transaction_category_type && + financial_institution_transaction_identifier == o.financial_institution_transaction_identifier + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [asset_transaction_unique_identifier, asset_transaction_amount, asset_transaction_date, asset_transaction_post_date, asset_transaction_type, asset_transaction_paid_by_name, asset_transaction_type_additional_description, asset_transaction_category_type, financial_institution_transaction_identifier].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/relay_event.rb b/lib/plaid/models/asset_transaction_type.rb similarity index 79% rename from lib/plaid/models/relay_event.rb rename to lib/plaid/models/asset_transaction_type.rb index 90d5becf5..27515217c 100644 --- a/lib/plaid/models/relay_event.rb +++ b/lib/plaid/models/asset_transaction_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,10 +14,9 @@ require 'time' module Plaid - class RelayEvent - GET_CALLED = "GET_CALLED".freeze - REFRESH_CALLED = "REFRESH_CALLED".freeze - AUDIT_COPY_CREATE_CALLED = "AUDIT_COPY_CREATE_CALLED".freeze + class AssetTransactionType + CREDIT = "Credit".freeze + DEBIT = "Debit".freeze # Builds the enum from string # @param [String] The enum value in the form of the string diff --git a/lib/plaid/models/asset_transactions.rb b/lib/plaid/models/asset_transactions.rb new file mode 100644 index 000000000..8710d7e03 --- /dev/null +++ b/lib/plaid/models/asset_transactions.rb @@ -0,0 +1,226 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # No documentation available + class AssetTransactions + attr_accessor :asset_transaction + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'asset_transaction' => :'ASSET_TRANSACTION' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'asset_transaction' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetTransactions` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetTransactions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'asset_transaction') + if (value = attributes[:'asset_transaction']).is_a?(Array) + self.asset_transaction = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @asset_transaction.nil? + invalid_properties.push('invalid value for "asset_transaction", asset_transaction cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @asset_transaction.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + asset_transaction == o.asset_transaction + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [asset_transaction].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/asset_type.rb b/lib/plaid/models/asset_type.rb new file mode 100644 index 000000000..5aa0aec97 --- /dev/null +++ b/lib/plaid/models/asset_type.rb @@ -0,0 +1,42 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class AssetType + CHECKING_ACCOUNT = "CheckingAccount".freeze + SAVINGS_ACCOUNT = "SavingsAccount".freeze + INVESTMENT = "Investment".freeze + MONEY_MARKET_FUND = "MoneyMarketFund".freeze + OTHER = "Other".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/assets.rb b/lib/plaid/models/assets.rb new file mode 100644 index 000000000..3c58f86b4 --- /dev/null +++ b/lib/plaid/models/assets.rb @@ -0,0 +1,227 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # No documentation available + class Assets + # No documentation available + attr_accessor :asset + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'asset' => :'ASSET' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'asset' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::Assets` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::Assets`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'asset') + if (value = attributes[:'asset']).is_a?(Array) + self.asset = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @asset.nil? + invalid_properties.push('invalid value for "asset", asset cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @asset.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + asset == o.asset + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [asset].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/assets_error_webhook.rb b/lib/plaid/models/assets_error_webhook.rb index 65a3082f8..7cedc8901 100644 --- a/lib/plaid/models/assets_error_webhook.rb +++ b/lib/plaid/models/assets_error_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/assets_product_ready_webhook.rb b/lib/plaid/models/assets_product_ready_webhook.rb index 4f5e09fb3..a91de320e 100644 --- a/lib/plaid/models/assets_product_ready_webhook.rb +++ b/lib/plaid/models/assets_product_ready_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/auth_get_numbers.rb b/lib/plaid/models/auth_get_numbers.rb index abcf03919..121fc647a 100644 --- a/lib/plaid/models/auth_get_numbers.rb +++ b/lib/plaid/models/auth_get_numbers.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/auth_get_request.rb b/lib/plaid/models/auth_get_request.rb index 422fc4bf9..3e8118e16 100644 --- a/lib/plaid/models/auth_get_request.rb +++ b/lib/plaid/models/auth_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/auth_get_request_options.rb b/lib/plaid/models/auth_get_request_options.rb index b0d4b810b..83b70fea4 100644 --- a/lib/plaid/models/auth_get_request_options.rb +++ b/lib/plaid/models/auth_get_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/auth_get_response.rb b/lib/plaid/models/auth_get_response.rb index a436821fe..e5e97cdc3 100644 --- a/lib/plaid/models/auth_get_response.rb +++ b/lib/plaid/models/auth_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/auth_metadata.rb b/lib/plaid/models/auth_metadata.rb index 0847331ad..694ad038e 100644 --- a/lib/plaid/models/auth_metadata.rb +++ b/lib/plaid/models/auth_metadata.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/auth_supported_methods.rb b/lib/plaid/models/auth_supported_methods.rb index 246b789b0..7a4d63e07 100644 --- a/lib/plaid/models/auth_supported_methods.rb +++ b/lib/plaid/models/auth_supported_methods.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/automatically_verified_webhook.rb b/lib/plaid/models/automatically_verified_webhook.rb index 0400bb88c..1bf247898 100644 --- a/lib/plaid/models/automatically_verified_webhook.rb +++ b/lib/plaid/models/automatically_verified_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -28,13 +28,16 @@ class AutomaticallyVerifiedWebhook # The `item_id` of the Item associated with this webhook, warning, or error attr_accessor :item_id + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', :'account_id' => :'account_id', - :'item_id' => :'item_id' + :'item_id' => :'item_id', + :'environment' => :'environment' } end @@ -49,7 +52,8 @@ def self.openapi_types :'webhook_type' => :'String', :'webhook_code' => :'String', :'account_id' => :'String', - :'item_id' => :'String' + :'item_id' => :'String', + :'environment' => :'WebhookEnvironmentValues' } end @@ -89,6 +93,10 @@ def initialize(attributes = {}) if attributes.key?(:'item_id') self.item_id = attributes[:'item_id'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -111,6 +119,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "item_id", item_id cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -121,6 +133,7 @@ def valid? return false if @webhook_code.nil? return false if @account_id.nil? return false if @item_id.nil? + return false if @environment.nil? true end @@ -132,7 +145,8 @@ def ==(o) webhook_type == o.webhook_type && webhook_code == o.webhook_code && account_id == o.account_id && - item_id == o.item_id + item_id == o.item_id && + environment == o.environment end # @see the `==` method @@ -144,7 +158,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, account_id, item_id].hash + [webhook_type, webhook_code, account_id, item_id, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/bank_initiated_return_risk.rb b/lib/plaid/models/bank_initiated_return_risk.rb index e85e96819..1491e662c 100644 --- a/lib/plaid/models/bank_initiated_return_risk.rb +++ b/lib/plaid/models/bank_initiated_return_risk.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -16,7 +16,7 @@ module Plaid # The object contains a risk score and a risk tier that evaluate the transaction return risk because an account is overdrawn or because an ineligible account is used. Common return codes in this category include: \"R01\", \"R02\", \"R03\", \"R04\", \"R06\", \"R08\", \"R09\", \"R13\", \"R16\", \"R17\", \"R20\", \"R23\". These returns have a turnaround time of 2 banking days. class BankInitiatedReturnRisk - # A score from 0-99 that indicates the transaction return risk: a higher risk score suggests a higher return likelihood. + # A score from 1-99 that indicates the transaction return risk: a higher risk score suggests a higher return likelihood. attr_accessor :score # In the `bank_initiated_return_risk` object, there are eight risk tiers corresponding to the scores: 1: Predicted bank-initiated return incidence rate between 0.0% - 0.5% 2: Predicted bank-initiated return incidence rate between 0.5% - 1.5% 3: Predicted bank-initiated return incidence rate between 1.5% - 3% 4: Predicted bank-initiated return incidence rate between 3% - 5% 5: Predicted bank-initiated return incidence rate between 5% - 10% 6: Predicted bank-initiated return incidence rate between 10% - 15% 7: Predicted bank-initiated return incidence rate between 15% and 50% 8: Predicted bank-initiated return incidence rate greater than 50% @@ -81,12 +81,12 @@ def list_invalid_properties invalid_properties.push('invalid value for "score", score cannot be nil.') end - if @score > 100 - invalid_properties.push('invalid value for "score", must be smaller than or equal to 100.') + if @score > 99 + invalid_properties.push('invalid value for "score", must be smaller than or equal to 99.') end - if @score < 0 - invalid_properties.push('invalid value for "score", must be greater than or equal to 0.') + if @score < 1 + invalid_properties.push('invalid value for "score", must be greater than or equal to 1.') end @@ -110,8 +110,8 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @score.nil? - return false if @score > 100 - return false if @score < 0 + return false if @score > 99 + return false if @score < 1 return false if @risk_tier.nil? return false if @risk_tier > 8 return false if @risk_tier < 1 @@ -125,12 +125,12 @@ def score=(score) fail ArgumentError, 'score cannot be nil' end - if score > 100 - fail ArgumentError, 'invalid value for "score", must be smaller than or equal to 100.' + if score > 99 + fail ArgumentError, 'invalid value for "score", must be smaller than or equal to 99.' end - if score < 0 - fail ArgumentError, 'invalid value for "score", must be greater than or equal to 0.' + if score < 1 + fail ArgumentError, 'invalid value for "score", must be greater than or equal to 1.' end diff --git a/lib/plaid/models/bank_transfer.rb b/lib/plaid/models/bank_transfer.rb index 1f7ac47d8..2e4f63707 100644 --- a/lib/plaid/models/bank_transfer.rb +++ b/lib/plaid/models/bank_transfer.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_balance.rb b/lib/plaid/models/bank_transfer_balance.rb index b201173d8..5870dc4f7 100644 --- a/lib/plaid/models/bank_transfer_balance.rb +++ b/lib/plaid/models/bank_transfer_balance.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_balance_get_request.rb b/lib/plaid/models/bank_transfer_balance_get_request.rb index 64c1e4748..4f78c1f95 100644 --- a/lib/plaid/models/bank_transfer_balance_get_request.rb +++ b/lib/plaid/models/bank_transfer_balance_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_balance_get_response.rb b/lib/plaid/models/bank_transfer_balance_get_response.rb index 9b4275c37..f93c035ee 100644 --- a/lib/plaid/models/bank_transfer_balance_get_response.rb +++ b/lib/plaid/models/bank_transfer_balance_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_cancel_request.rb b/lib/plaid/models/bank_transfer_cancel_request.rb index efa22a1ed..b26451a11 100644 --- a/lib/plaid/models/bank_transfer_cancel_request.rb +++ b/lib/plaid/models/bank_transfer_cancel_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_cancel_response.rb b/lib/plaid/models/bank_transfer_cancel_response.rb index 292cfa0c4..fc1bc3e1d 100644 --- a/lib/plaid/models/bank_transfer_cancel_response.rb +++ b/lib/plaid/models/bank_transfer_cancel_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_create_request.rb b/lib/plaid/models/bank_transfer_create_request.rb index c40fc08e9..17cde1627 100644 --- a/lib/plaid/models/bank_transfer_create_request.rb +++ b/lib/plaid/models/bank_transfer_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_create_response.rb b/lib/plaid/models/bank_transfer_create_response.rb index 984eedd5c..629f3eb90 100644 --- a/lib/plaid/models/bank_transfer_create_response.rb +++ b/lib/plaid/models/bank_transfer_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_direction.rb b/lib/plaid/models/bank_transfer_direction.rb index bac321de8..bf2047793 100644 --- a/lib/plaid/models/bank_transfer_direction.rb +++ b/lib/plaid/models/bank_transfer_direction.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_event.rb b/lib/plaid/models/bank_transfer_event.rb index c49669974..dfc5bdb3d 100644 --- a/lib/plaid/models/bank_transfer_event.rb +++ b/lib/plaid/models/bank_transfer_event.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_event_list_bank_transfer_type.rb b/lib/plaid/models/bank_transfer_event_list_bank_transfer_type.rb index 5a4c3bb81..61d6ae823 100644 --- a/lib/plaid/models/bank_transfer_event_list_bank_transfer_type.rb +++ b/lib/plaid/models/bank_transfer_event_list_bank_transfer_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_event_list_direction.rb b/lib/plaid/models/bank_transfer_event_list_direction.rb index e190dc988..e720880ab 100644 --- a/lib/plaid/models/bank_transfer_event_list_direction.rb +++ b/lib/plaid/models/bank_transfer_event_list_direction.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_event_list_request.rb b/lib/plaid/models/bank_transfer_event_list_request.rb index 4ebc16322..74b137d67 100644 --- a/lib/plaid/models/bank_transfer_event_list_request.rb +++ b/lib/plaid/models/bank_transfer_event_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_event_list_response.rb b/lib/plaid/models/bank_transfer_event_list_response.rb index a76610129..a456ccee6 100644 --- a/lib/plaid/models/bank_transfer_event_list_response.rb +++ b/lib/plaid/models/bank_transfer_event_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_event_sync_request.rb b/lib/plaid/models/bank_transfer_event_sync_request.rb index c7baa6b75..d06701bce 100644 --- a/lib/plaid/models/bank_transfer_event_sync_request.rb +++ b/lib/plaid/models/bank_transfer_event_sync_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_event_sync_response.rb b/lib/plaid/models/bank_transfer_event_sync_response.rb index 9f0f3352a..eb5ff33ab 100644 --- a/lib/plaid/models/bank_transfer_event_sync_response.rb +++ b/lib/plaid/models/bank_transfer_event_sync_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_event_type.rb b/lib/plaid/models/bank_transfer_event_type.rb index e2439e255..6dfbff329 100644 --- a/lib/plaid/models/bank_transfer_event_type.rb +++ b/lib/plaid/models/bank_transfer_event_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_failure.rb b/lib/plaid/models/bank_transfer_failure.rb index 73bb5cfb2..57e8a78d2 100644 --- a/lib/plaid/models/bank_transfer_failure.rb +++ b/lib/plaid/models/bank_transfer_failure.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_get_request.rb b/lib/plaid/models/bank_transfer_get_request.rb index 23fbaf502..312dc230b 100644 --- a/lib/plaid/models/bank_transfer_get_request.rb +++ b/lib/plaid/models/bank_transfer_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_get_response.rb b/lib/plaid/models/bank_transfer_get_response.rb index 69fa4fce9..4be26cc53 100644 --- a/lib/plaid/models/bank_transfer_get_response.rb +++ b/lib/plaid/models/bank_transfer_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_list_request.rb b/lib/plaid/models/bank_transfer_list_request.rb index 91b3cbdeb..f6961d29d 100644 --- a/lib/plaid/models/bank_transfer_list_request.rb +++ b/lib/plaid/models/bank_transfer_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_list_response.rb b/lib/plaid/models/bank_transfer_list_response.rb index 6821a4579..50c93f0d7 100644 --- a/lib/plaid/models/bank_transfer_list_response.rb +++ b/lib/plaid/models/bank_transfer_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_migrate_account_request.rb b/lib/plaid/models/bank_transfer_migrate_account_request.rb index 0c426d83e..25bf68159 100644 --- a/lib/plaid/models/bank_transfer_migrate_account_request.rb +++ b/lib/plaid/models/bank_transfer_migrate_account_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_migrate_account_response.rb b/lib/plaid/models/bank_transfer_migrate_account_response.rb index 1daaa7394..bdd1d508c 100644 --- a/lib/plaid/models/bank_transfer_migrate_account_response.rb +++ b/lib/plaid/models/bank_transfer_migrate_account_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_network.rb b/lib/plaid/models/bank_transfer_network.rb index 52237fb31..0706f835e 100644 --- a/lib/plaid/models/bank_transfer_network.rb +++ b/lib/plaid/models/bank_transfer_network.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_status.rb b/lib/plaid/models/bank_transfer_status.rb index 1a4acded1..fa27ab59f 100644 --- a/lib/plaid/models/bank_transfer_status.rb +++ b/lib/plaid/models/bank_transfer_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_sweep.rb b/lib/plaid/models/bank_transfer_sweep.rb index df7a536e8..82037576f 100644 --- a/lib/plaid/models/bank_transfer_sweep.rb +++ b/lib/plaid/models/bank_transfer_sweep.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_sweep_get_request.rb b/lib/plaid/models/bank_transfer_sweep_get_request.rb index 289b82d2d..33055f78a 100644 --- a/lib/plaid/models/bank_transfer_sweep_get_request.rb +++ b/lib/plaid/models/bank_transfer_sweep_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_sweep_get_response.rb b/lib/plaid/models/bank_transfer_sweep_get_response.rb index e6b48f254..aa2f95766 100644 --- a/lib/plaid/models/bank_transfer_sweep_get_response.rb +++ b/lib/plaid/models/bank_transfer_sweep_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_sweep_list_request.rb b/lib/plaid/models/bank_transfer_sweep_list_request.rb index 1c44cc6bf..186eb1634 100644 --- a/lib/plaid/models/bank_transfer_sweep_list_request.rb +++ b/lib/plaid/models/bank_transfer_sweep_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_sweep_list_response.rb b/lib/plaid/models/bank_transfer_sweep_list_response.rb index ddfb6370d..6412907a9 100644 --- a/lib/plaid/models/bank_transfer_sweep_list_response.rb +++ b/lib/plaid/models/bank_transfer_sweep_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_type.rb b/lib/plaid/models/bank_transfer_type.rb index 3d66cee89..ac48b836d 100644 --- a/lib/plaid/models/bank_transfer_type.rb +++ b/lib/plaid/models/bank_transfer_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer_user.rb b/lib/plaid/models/bank_transfer_user.rb index 57fbd676f..4d5756164 100644 --- a/lib/plaid/models/bank_transfer_user.rb +++ b/lib/plaid/models/bank_transfer_user.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfers_events_update_webhook.rb b/lib/plaid/models/bank_transfers_events_update_webhook.rb index 153505138..25560b7bf 100644 --- a/lib/plaid/models/bank_transfers_events_update_webhook.rb +++ b/lib/plaid/models/bank_transfers_events_update_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -22,11 +22,14 @@ class BankTransfersEventsUpdateWebhook # `BANK_TRANSFERS_EVENTS_UPDATE` attr_accessor :webhook_code + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', - :'webhook_code' => :'webhook_code' + :'webhook_code' => :'webhook_code', + :'environment' => :'environment' } end @@ -39,7 +42,8 @@ def self.acceptable_attributes def self.openapi_types { :'webhook_type' => :'String', - :'webhook_code' => :'String' + :'webhook_code' => :'String', + :'environment' => :'WebhookEnvironmentValues' } end @@ -71,6 +75,10 @@ def initialize(attributes = {}) if attributes.key?(:'webhook_code') self.webhook_code = attributes[:'webhook_code'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -85,6 +93,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "webhook_code", webhook_code cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -93,6 +105,7 @@ def list_invalid_properties def valid? return false if @webhook_type.nil? return false if @webhook_code.nil? + return false if @environment.nil? true end @@ -102,7 +115,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && webhook_type == o.webhook_type && - webhook_code == o.webhook_code + webhook_code == o.webhook_code && + environment == o.environment end # @see the `==` method @@ -114,7 +128,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code].hash + [webhook_type, webhook_code, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/categories_get_response.rb b/lib/plaid/models/categories_get_response.rb index 3705d370f..322bb9277 100644 --- a/lib/plaid/models/categories_get_response.rb +++ b/lib/plaid/models/categories_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/category.rb b/lib/plaid/models/category.rb index fe90e46cd..12e892bd4 100644 --- a/lib/plaid/models/category.rb +++ b/lib/plaid/models/category.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/cause.rb b/lib/plaid/models/cause.rb index ad331c3b1..b1dbd7a9a 100644 --- a/lib/plaid/models/cause.rb +++ b/lib/plaid/models/cause.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -207,7 +207,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @error_type.nil? - error_type_validator = EnumAttributeValidator.new('String', ["INVALID_REQUEST", "INVALID_RESULT", "INVALID_INPUT", "INSTITUTION_ERROR", "RATE_LIMIT_EXCEEDED", "API_ERROR", "ITEM_ERROR", "ASSET_REPORT_ERROR", "RECAPTCHA_ERROR", "OAUTH_ERROR", "PAYMENT_ERROR", "BANK_TRANSFER_ERROR", "INCOME_VERIFICATION_ERROR"]) + error_type_validator = EnumAttributeValidator.new('String', ["INVALID_REQUEST", "INVALID_RESULT", "INVALID_INPUT", "INSTITUTION_ERROR", "RATE_LIMIT_EXCEEDED", "API_ERROR", "ITEM_ERROR", "ASSET_REPORT_ERROR", "RECAPTCHA_ERROR", "OAUTH_ERROR", "PAYMENT_ERROR", "BANK_TRANSFER_ERROR", "INCOME_VERIFICATION_ERROR", "MICRODEPOSITS_ERROR"]) return false unless error_type_validator.valid?(@error_type) return false if @error_code.nil? return false if @error_message.nil? @@ -218,7 +218,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] error_type Object to be assigned def error_type=(error_type) - validator = EnumAttributeValidator.new('String', ["INVALID_REQUEST", "INVALID_RESULT", "INVALID_INPUT", "INSTITUTION_ERROR", "RATE_LIMIT_EXCEEDED", "API_ERROR", "ITEM_ERROR", "ASSET_REPORT_ERROR", "RECAPTCHA_ERROR", "OAUTH_ERROR", "PAYMENT_ERROR", "BANK_TRANSFER_ERROR", "INCOME_VERIFICATION_ERROR"]) + validator = EnumAttributeValidator.new('String', ["INVALID_REQUEST", "INVALID_RESULT", "INVALID_INPUT", "INSTITUTION_ERROR", "RATE_LIMIT_EXCEEDED", "API_ERROR", "ITEM_ERROR", "ASSET_REPORT_ERROR", "RECAPTCHA_ERROR", "OAUTH_ERROR", "PAYMENT_ERROR", "BANK_TRANSFER_ERROR", "INCOME_VERIFICATION_ERROR", "MICRODEPOSITS_ERROR"]) unless validator.valid?(error_type) fail ArgumentError, "invalid value for \"error_type\", must be one of #{validator.allowable_values}." end diff --git a/lib/plaid/models/cause_all_of.rb b/lib/plaid/models/cause_all_of.rb index e005b9667..51db132a5 100644 --- a/lib/plaid/models/cause_all_of.rb +++ b/lib/plaid/models/cause_all_of.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/client_provided_enhanced_transaction.rb b/lib/plaid/models/client_provided_enhanced_transaction.rb index 71b151b3e..829672d1e 100644 --- a/lib/plaid/models/client_provided_enhanced_transaction.rb +++ b/lib/plaid/models/client_provided_enhanced_transaction.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/client_provided_raw_transaction.rb b/lib/plaid/models/client_provided_raw_transaction.rb index 6a4005ef1..092b690a9 100644 --- a/lib/plaid/models/client_provided_raw_transaction.rb +++ b/lib/plaid/models/client_provided_raw_transaction.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/connected_application.rb b/lib/plaid/models/connected_application.rb index cd32e130a..cbfde5570 100644 --- a/lib/plaid/models/connected_application.rb +++ b/lib/plaid/models/connected_application.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/counterparty.rb b/lib/plaid/models/counterparty.rb new file mode 100644 index 000000000..8383c13f2 --- /dev/null +++ b/lib/plaid/models/counterparty.rb @@ -0,0 +1,239 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The counterparty, such as the merchant or financial institution, is extracted by Plaid from the raw description. + class Counterparty + # The name of the counterparty, such as the merchant or the financial institution, as extracted by Plaid from the raw description. + attr_accessor :name + + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'type' => :'type' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'type' => :'CounterpartyType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::Counterparty` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::Counterparty`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @name.nil? + return false if @type.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/counterparty_type.rb b/lib/plaid/models/counterparty_type.rb new file mode 100644 index 000000000..8210c3a07 --- /dev/null +++ b/lib/plaid/models/counterparty_type.rb @@ -0,0 +1,41 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class CounterpartyType + MERCHANT = "merchant".freeze + FINANCIAL_INSTITUTION = "financial_institution".freeze + PAYMENT_APP = "payment_app".freeze + DELIVERY_MARKETPLACE = "delivery_marketplace".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/country_code.rb b/lib/plaid/models/country_code.rb index 5ba1cd5b5..6849020f6 100644 --- a/lib/plaid/models/country_code.rb +++ b/lib/plaid/models/country_code.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit1099.rb b/lib/plaid/models/credit1099.rb index 5b4596a14..28a47e4a2 100644 --- a/lib/plaid/models/credit1099.rb +++ b/lib/plaid/models/credit1099.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit1099_filer.rb b/lib/plaid/models/credit1099_filer.rb index 23a45ff60..9e73f4fa9 100644 --- a/lib/plaid/models/credit1099_filer.rb +++ b/lib/plaid/models/credit1099_filer.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -24,7 +24,7 @@ class Credit1099Filer # Tax identification number of filer. attr_accessor :tin - # One of the following values will be provided: Payment Settlement Entity (PSE), Electronic Payment Fecilitator (EPF), Other Third Party + # One of the following values will be provided: Payment Settlement Entity (PSE), Electronic Payment Facilitator (EPF), Other Third Party attr_accessor :type # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/plaid/models/credit1099_payer.rb b/lib/plaid/models/credit1099_payer.rb index 327cc4b51..c62feebb6 100644 --- a/lib/plaid/models/credit1099_payer.rb +++ b/lib/plaid/models/credit1099_payer.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit1099_recipient.rb b/lib/plaid/models/credit1099_recipient.rb index c79d581d8..3f4092319 100644 --- a/lib/plaid/models/credit1099_recipient.rb +++ b/lib/plaid/models/credit1099_recipient.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_account_subtype.rb b/lib/plaid/models/credit_account_subtype.rb index 67902262f..ade44a55b 100644 --- a/lib/plaid/models/credit_account_subtype.rb +++ b/lib/plaid/models/credit_account_subtype.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_audit_copy_token_create_request.rb b/lib/plaid/models/credit_audit_copy_token_create_request.rb index 5eeb905e6..3921e53fd 100644 --- a/lib/plaid/models/credit_audit_copy_token_create_request.rb +++ b/lib/plaid/models/credit_audit_copy_token_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -48,7 +48,7 @@ def self.openapi_types { :'client_id' => :'String', :'secret' => :'String', - :'report_tokens' => :'Array', + :'report_tokens' => :'Array', :'auditor_id' => :'String' } end diff --git a/lib/plaid/models/credit_audit_copy_token_create_response.rb b/lib/plaid/models/credit_audit_copy_token_create_response.rb index ca5fbf6e9..a0332fe3d 100644 --- a/lib/plaid/models/credit_audit_copy_token_create_response.rb +++ b/lib/plaid/models/credit_audit_copy_token_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_audit_copy_token_remove_request.rb b/lib/plaid/models/credit_audit_copy_token_remove_request.rb index 21a7ebc90..41083df66 100644 --- a/lib/plaid/models/credit_audit_copy_token_remove_request.rb +++ b/lib/plaid/models/credit_audit_copy_token_remove_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_audit_copy_token_remove_response.rb b/lib/plaid/models/credit_audit_copy_token_remove_response.rb index 5aca2ca12..5d2efa1e6 100644 --- a/lib/plaid/models/credit_audit_copy_token_remove_response.rb +++ b/lib/plaid/models/credit_audit_copy_token_remove_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income.rb b/lib/plaid/models/credit_bank_income.rb index e0bce5665..5c361ae97 100644 --- a/lib/plaid/models/credit_bank_income.rb +++ b/lib/plaid/models/credit_bank_income.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_account.rb b/lib/plaid/models/credit_bank_income_account.rb index aaa9f8ed6..53d910e1f 100644 --- a/lib/plaid/models/credit_bank_income_account.rb +++ b/lib/plaid/models/credit_bank_income_account.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_account_type.rb b/lib/plaid/models/credit_bank_income_account_type.rb index 40c80b480..8da4dcc1e 100644 --- a/lib/plaid/models/credit_bank_income_account_type.rb +++ b/lib/plaid/models/credit_bank_income_account_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_category.rb b/lib/plaid/models/credit_bank_income_category.rb index 19859c551..36085608f 100644 --- a/lib/plaid/models/credit_bank_income_category.rb +++ b/lib/plaid/models/credit_bank_income_category.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,6 +25,9 @@ class CreditBankIncomeCategory RETIREMENT = "RETIREMENT".freeze LONG_TERM_DISABILITY = "LONG_TERM_DISABILITY".freeze BANK_INTEREST = "BANK_INTEREST".freeze + CASH_DEPOSIT = "CASH_DEPOSIT".freeze + TRANSFER_FROM_APPLICATION = "TRANSFER_FROM_APPLICATION".freeze + TAX_REFUND = "TAX_REFUND".freeze OTHER = "OTHER".freeze # Builds the enum from string diff --git a/lib/plaid/models/credit_bank_income_cause.rb b/lib/plaid/models/credit_bank_income_cause.rb index 397aa7402..aae23f479 100644 --- a/lib/plaid/models/credit_bank_income_cause.rb +++ b/lib/plaid/models/credit_bank_income_cause.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_error_type.rb b/lib/plaid/models/credit_bank_income_error_type.rb index 2352e7714..8df18bdc7 100644 --- a/lib/plaid/models/credit_bank_income_error_type.rb +++ b/lib/plaid/models/credit_bank_income_error_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_get_request.rb b/lib/plaid/models/credit_bank_income_get_request.rb index 799fbabb7..623772adf 100644 --- a/lib/plaid/models/credit_bank_income_get_request.rb +++ b/lib/plaid/models/credit_bank_income_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_get_request_options.rb b/lib/plaid/models/credit_bank_income_get_request_options.rb index 059435524..d602137fe 100644 --- a/lib/plaid/models/credit_bank_income_get_request_options.rb +++ b/lib/plaid/models/credit_bank_income_get_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_get_response.rb b/lib/plaid/models/credit_bank_income_get_response.rb index cdb969933..ed60a5d8a 100644 --- a/lib/plaid/models/credit_bank_income_get_response.rb +++ b/lib/plaid/models/credit_bank_income_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_historical_summary.rb b/lib/plaid/models/credit_bank_income_historical_summary.rb index 3d6165f6d..e04a60855 100644 --- a/lib/plaid/models/credit_bank_income_historical_summary.rb +++ b/lib/plaid/models/credit_bank_income_historical_summary.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_item.rb b/lib/plaid/models/credit_bank_income_item.rb index b5800d1b9..b0170ea21 100644 --- a/lib/plaid/models/credit_bank_income_item.rb +++ b/lib/plaid/models/credit_bank_income_item.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_pay_frequency.rb b/lib/plaid/models/credit_bank_income_pay_frequency.rb index 3e594c2b6..74b100e49 100644 --- a/lib/plaid/models/credit_bank_income_pay_frequency.rb +++ b/lib/plaid/models/credit_bank_income_pay_frequency.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_pdf_get_request.rb b/lib/plaid/models/credit_bank_income_pdf_get_request.rb index 266f10ade..0c2c6f277 100644 --- a/lib/plaid/models/credit_bank_income_pdf_get_request.rb +++ b/lib/plaid/models/credit_bank_income_pdf_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_refresh_request.rb b/lib/plaid/models/credit_bank_income_refresh_request.rb index d72dda789..ea6015697 100644 --- a/lib/plaid/models/credit_bank_income_refresh_request.rb +++ b/lib/plaid/models/credit_bank_income_refresh_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -94,14 +94,6 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @client_id.nil? - invalid_properties.push('invalid value for "client_id", client_id cannot be nil.') - end - - if @secret.nil? - invalid_properties.push('invalid value for "secret", secret cannot be nil.') - end - if @user_token.nil? invalid_properties.push('invalid value for "user_token", user_token cannot be nil.') end @@ -112,8 +104,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @client_id.nil? - return false if @secret.nil? return false if @user_token.nil? true end diff --git a/lib/plaid/models/credit_bank_income_refresh_request_options.rb b/lib/plaid/models/credit_bank_income_refresh_request_options.rb index 2d5448944..db2f1489a 100644 --- a/lib/plaid/models/credit_bank_income_refresh_request_options.rb +++ b/lib/plaid/models/credit_bank_income_refresh_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_refresh_response.rb b/lib/plaid/models/credit_bank_income_refresh_response.rb index fa0b4b572..a969adddc 100644 --- a/lib/plaid/models/credit_bank_income_refresh_response.rb +++ b/lib/plaid/models/credit_bank_income_refresh_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_source.rb b/lib/plaid/models/credit_bank_income_source.rb index 4f42bd672..556ffc76d 100644 --- a/lib/plaid/models/credit_bank_income_source.rb +++ b/lib/plaid/models/credit_bank_income_source.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -24,7 +24,7 @@ class CreditBankIncomeSource attr_accessor :income_category - # Plaid's unique idenfier for the account. + # Plaid's unique identifier for the account. attr_accessor :account_id # Minimum of all dates within the specific income sources in the user's bank account for days requested by the client. The date will be returned in an ISO 8601 format (YYYY-MM-DD). diff --git a/lib/plaid/models/credit_bank_income_summary.rb b/lib/plaid/models/credit_bank_income_summary.rb index 96f5dbdd5..288a0d00b 100644 --- a/lib/plaid/models/credit_bank_income_summary.rb +++ b/lib/plaid/models/credit_bank_income_summary.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_transaction.rb b/lib/plaid/models/credit_bank_income_transaction.rb index bb4dce540..d6f8654be 100644 --- a/lib/plaid/models/credit_bank_income_transaction.rb +++ b/lib/plaid/models/credit_bank_income_transaction.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_warning.rb b/lib/plaid/models/credit_bank_income_warning.rb index df56bab73..f204f0128 100644 --- a/lib/plaid/models/credit_bank_income_warning.rb +++ b/lib/plaid/models/credit_bank_income_warning.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_warning_code.rb b/lib/plaid/models/credit_bank_income_warning_code.rb index 451b2a7a5..f4e0922af 100644 --- a/lib/plaid/models/credit_bank_income_warning_code.rb +++ b/lib/plaid/models/credit_bank_income_warning_code.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_warning_type.rb b/lib/plaid/models/credit_bank_income_warning_type.rb index b96678259..99bd48856 100644 --- a/lib/plaid/models/credit_bank_income_warning_type.rb +++ b/lib/plaid/models/credit_bank_income_warning_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_card_liability.rb b/lib/plaid/models/credit_card_liability.rb index 5e31f533c..aeaaddb6e 100644 --- a/lib/plaid/models/credit_card_liability.rb +++ b/lib/plaid/models/credit_card_liability.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_category.rb b/lib/plaid/models/credit_category.rb new file mode 100644 index 000000000..67bae4888 --- /dev/null +++ b/lib/plaid/models/credit_category.rb @@ -0,0 +1,240 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Information describing the intent of the transaction. Most relevant for credit use cases, but not limited to such use cases. + class CreditCategory + # A high level category that communicates the broad category of the transaction. + attr_accessor :primary + + # A granular category conveying the transaction's intent. This field can also be used as a unique identifier for the category. + attr_accessor :detailed + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'primary' => :'primary', + :'detailed' => :'detailed' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'primary' => :'String', + :'detailed' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::CreditCategory` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::CreditCategory`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'primary') + self.primary = attributes[:'primary'] + end + + if attributes.key?(:'detailed') + self.detailed = attributes[:'detailed'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @primary.nil? + invalid_properties.push('invalid value for "primary", primary cannot be nil.') + end + + if @detailed.nil? + invalid_properties.push('invalid value for "detailed", detailed cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @primary.nil? + return false if @detailed.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + primary == o.primary && + detailed == o.detailed + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [primary, detailed].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/credit_document_metadata.rb b/lib/plaid/models/credit_document_metadata.rb index 4cdc8aa60..273ed80cf 100644 --- a/lib/plaid/models/credit_document_metadata.rb +++ b/lib/plaid/models/credit_document_metadata.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_employer_verification.rb b/lib/plaid/models/credit_employer_verification.rb index 62187320e..e9d81fcaa 100644 --- a/lib/plaid/models/credit_employer_verification.rb +++ b/lib/plaid/models/credit_employer_verification.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_employment_get_request.rb b/lib/plaid/models/credit_employment_get_request.rb index 9472419c1..4591db4c4 100644 --- a/lib/plaid/models/credit_employment_get_request.rb +++ b/lib/plaid/models/credit_employment_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -86,14 +86,6 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @client_id.nil? - invalid_properties.push('invalid value for "client_id", client_id cannot be nil.') - end - - if @secret.nil? - invalid_properties.push('invalid value for "secret", secret cannot be nil.') - end - if @user_token.nil? invalid_properties.push('invalid value for "user_token", user_token cannot be nil.') end @@ -104,8 +96,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @client_id.nil? - return false if @secret.nil? return false if @user_token.nil? true end diff --git a/lib/plaid/models/credit_employment_get_response.rb b/lib/plaid/models/credit_employment_get_response.rb index 0356f12b5..c628f6664 100644 --- a/lib/plaid/models/credit_employment_get_response.rb +++ b/lib/plaid/models/credit_employment_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_employment_item.rb b/lib/plaid/models/credit_employment_item.rb index 93d515bc9..7f4dd5ead 100644 --- a/lib/plaid/models/credit_employment_item.rb +++ b/lib/plaid/models/credit_employment_item.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -21,15 +21,15 @@ class CreditEmploymentItem attr_accessor :employments - # A reference id to reference what payroll data was returned from this endpoint - attr_accessor :pull_id + # Token to represent the underlying Employment data + attr_accessor :employment_report_token # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'item_id' => :'item_id', :'employments' => :'employments', - :'pull_id' => :'pull_id' + :'employment_report_token' => :'employment_report_token' } end @@ -43,7 +43,7 @@ def self.openapi_types { :'item_id' => :'String', :'employments' => :'Array', - :'pull_id' => :'String' + :'employment_report_token' => :'String' } end @@ -78,8 +78,8 @@ def initialize(attributes = {}) end end - if attributes.key?(:'pull_id') - self.pull_id = attributes[:'pull_id'] + if attributes.key?(:'employment_report_token') + self.employment_report_token = attributes[:'employment_report_token'] end end @@ -95,10 +95,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "employments", employments cannot be nil.') end - if @pull_id.nil? - invalid_properties.push('invalid value for "pull_id", pull_id cannot be nil.') - end - invalid_properties end @@ -107,7 +103,6 @@ def list_invalid_properties def valid? return false if @item_id.nil? return false if @employments.nil? - return false if @pull_id.nil? true end @@ -118,7 +113,7 @@ def ==(o) self.class == o.class && item_id == o.item_id && employments == o.employments && - pull_id == o.pull_id + employment_report_token == o.employment_report_token end # @see the `==` method @@ -130,7 +125,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [item_id, employments, pull_id].hash + [item_id, employments, employment_report_token].hash end # Builds the object from hash diff --git a/lib/plaid/models/credit_employment_verification.rb b/lib/plaid/models/credit_employment_verification.rb index 708d430c8..ec51c1459 100644 --- a/lib/plaid/models/credit_employment_verification.rb +++ b/lib/plaid/models/credit_employment_verification.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_filter.rb b/lib/plaid/models/credit_filter.rb index 6d4b60dbf..b819c6b19 100644 --- a/lib/plaid/models/credit_filter.rb +++ b/lib/plaid/models/credit_filter.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_pay_stub.rb b/lib/plaid/models/credit_pay_stub.rb index f5ffd3ab6..2d5bf8346 100644 --- a/lib/plaid/models/credit_pay_stub.rb +++ b/lib/plaid/models/credit_pay_stub.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -33,8 +33,6 @@ class CreditPayStub attr_accessor :pay_period_details - attr_accessor :verification - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -45,8 +43,7 @@ def self.attribute_map :'employee' => :'employee', :'employer' => :'employer', :'net_pay' => :'net_pay', - :'pay_period_details' => :'pay_period_details', - :'verification' => :'verification' + :'pay_period_details' => :'pay_period_details' } end @@ -65,8 +62,7 @@ def self.openapi_types :'employee' => :'CreditPayStubEmployee', :'employer' => :'CreditPayStubEmployer', :'net_pay' => :'CreditPayStubNetPay', - :'pay_period_details' => :'PayStubPayPeriodDetails', - :'verification' => :'CreditPayStubVerification' + :'pay_period_details' => :'PayStubPayPeriodDetails' } end @@ -74,7 +70,6 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'document_id', - :'verification' ]) end @@ -124,10 +119,6 @@ def initialize(attributes = {}) if attributes.key?(:'pay_period_details') self.pay_period_details = attributes[:'pay_period_details'] end - - if attributes.key?(:'verification') - self.verification = attributes[:'verification'] - end end # Show invalid properties with the reasons. Usually used together with valid? @@ -190,8 +181,7 @@ def ==(o) employee == o.employee && employer == o.employer && net_pay == o.net_pay && - pay_period_details == o.pay_period_details && - verification == o.verification + pay_period_details == o.pay_period_details end # @see the `==` method @@ -203,7 +193,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [deductions, document_id, document_metadata, earnings, employee, employer, net_pay, pay_period_details, verification].hash + [deductions, document_id, document_metadata, earnings, employee, employer, net_pay, pay_period_details].hash end # Builds the object from hash diff --git a/lib/plaid/models/credit_pay_stub_address.rb b/lib/plaid/models/credit_pay_stub_address.rb index ed67e87b8..400819e76 100644 --- a/lib/plaid/models/credit_pay_stub_address.rb +++ b/lib/plaid/models/credit_pay_stub_address.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_pay_stub_deductions.rb b/lib/plaid/models/credit_pay_stub_deductions.rb index 3e606871d..cd9b785e9 100644 --- a/lib/plaid/models/credit_pay_stub_deductions.rb +++ b/lib/plaid/models/credit_pay_stub_deductions.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_pay_stub_earnings.rb b/lib/plaid/models/credit_pay_stub_earnings.rb index 4226f76e8..f898cf531 100644 --- a/lib/plaid/models/credit_pay_stub_earnings.rb +++ b/lib/plaid/models/credit_pay_stub_earnings.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_pay_stub_employee.rb b/lib/plaid/models/credit_pay_stub_employee.rb index 45a62a39d..22ccc6159 100644 --- a/lib/plaid/models/credit_pay_stub_employee.rb +++ b/lib/plaid/models/credit_pay_stub_employee.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_pay_stub_employer.rb b/lib/plaid/models/credit_pay_stub_employer.rb index 45c14e20c..b2af1c6ee 100644 --- a/lib/plaid/models/credit_pay_stub_employer.rb +++ b/lib/plaid/models/credit_pay_stub_employer.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_pay_stub_net_pay.rb b/lib/plaid/models/credit_pay_stub_net_pay.rb index 6de4875ed..af430cfbe 100644 --- a/lib/plaid/models/credit_pay_stub_net_pay.rb +++ b/lib/plaid/models/credit_pay_stub_net_pay.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_pay_stub_verification.rb b/lib/plaid/models/credit_pay_stub_verification.rb deleted file mode 100644 index cea9d2966..000000000 --- a/lib/plaid/models/credit_pay_stub_verification.rb +++ /dev/null @@ -1,237 +0,0 @@ -=begin -#The Plaid API - -#The Plaid REST API. Please see https://plaid.com/docs/api for more details. - -The version of the OpenAPI document: 2020-09-14_1.161.5 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.1.1 - -=end - -require 'date' -require 'time' - -module Plaid - # (To be deprecated) Verification info will be moved to a separate endpoint in the future. An object containing details on the paystub's verification status. This object will only be populated if the [`income_verification.access_tokens`](/docs/api/tokens/#link-token-create-request-income-verification-access-tokens) parameter was provided during the `/link/token/create` call or if a problem was detected with the information supplied by the user; otherwise it will be `null`. - class CreditPayStubVerification - # Derived verification status. - attr_accessor :verification_status - - attr_accessor :verification_attributes - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'verification_status' => :'verification_status', - :'verification_attributes' => :'verification_attributes' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'verification_status' => :'String', - :'verification_attributes' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - :'verification_status', - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::CreditPayStubVerification` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::CreditPayStubVerification`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'verification_status') - self.verification_status = attributes[:'verification_status'] - end - - if attributes.key?(:'verification_attributes') - if (value = attributes[:'verification_attributes']).is_a?(Array) - self.verification_attributes = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @verification_attributes.nil? - invalid_properties.push('invalid value for "verification_attributes", verification_attributes cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @verification_attributes.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - verification_status == o.verification_status && - verification_attributes == o.verification_attributes - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [verification_status, verification_attributes].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = Plaid.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/plaid/models/credit_payroll_income_get_request.rb b/lib/plaid/models/credit_payroll_income_get_request.rb index ff1aa2938..66f4e1e88 100644 --- a/lib/plaid/models/credit_payroll_income_get_request.rb +++ b/lib/plaid/models/credit_payroll_income_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_payroll_income_get_response.rb b/lib/plaid/models/credit_payroll_income_get_response.rb index 54736a992..a4f701199 100644 --- a/lib/plaid/models/credit_payroll_income_get_response.rb +++ b/lib/plaid/models/credit_payroll_income_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_payroll_income_precheck_request.rb b/lib/plaid/models/credit_payroll_income_precheck_request.rb index 05edaca9d..4d368334a 100644 --- a/lib/plaid/models/credit_payroll_income_precheck_request.rb +++ b/lib/plaid/models/credit_payroll_income_precheck_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -32,6 +32,8 @@ class CreditPayrollIncomePrecheckRequest attr_accessor :us_military_info + attr_accessor :payroll_institution + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -40,7 +42,8 @@ def self.attribute_map :'user_token' => :'user_token', :'access_tokens' => :'access_tokens', :'employer' => :'employer', - :'us_military_info' => :'us_military_info' + :'us_military_info' => :'us_military_info', + :'payroll_institution' => :'payroll_institution' } end @@ -57,7 +60,8 @@ def self.openapi_types :'user_token' => :'String', :'access_tokens' => :'Array', :'employer' => :'IncomeVerificationPrecheckEmployer', - :'us_military_info' => :'IncomeVerificationPrecheckMilitaryInfo' + :'us_military_info' => :'IncomeVerificationPrecheckMilitaryInfo', + :'payroll_institution' => :'IncomeVerificationPrecheckPayrollInstitution' } end @@ -65,7 +69,8 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'employer', - :'us_military_info' + :'us_military_info', + :'payroll_institution' ]) end @@ -109,6 +114,10 @@ def initialize(attributes = {}) if attributes.key?(:'us_military_info') self.us_military_info = attributes[:'us_military_info'] end + + if attributes.key?(:'payroll_institution') + self.payroll_institution = attributes[:'payroll_institution'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -134,7 +143,8 @@ def ==(o) user_token == o.user_token && access_tokens == o.access_tokens && employer == o.employer && - us_military_info == o.us_military_info + us_military_info == o.us_military_info && + payroll_institution == o.payroll_institution end # @see the `==` method @@ -146,7 +156,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, secret, user_token, access_tokens, employer, us_military_info].hash + [client_id, secret, user_token, access_tokens, employer, us_military_info, payroll_institution].hash end # Builds the object from hash diff --git a/lib/plaid/models/credit_payroll_income_precheck_response.rb b/lib/plaid/models/credit_payroll_income_precheck_response.rb index 5cf7a86b4..a16834f7c 100644 --- a/lib/plaid/models/credit_payroll_income_precheck_response.rb +++ b/lib/plaid/models/credit_payroll_income_precheck_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_payroll_income_refresh_request.rb b/lib/plaid/models/credit_payroll_income_refresh_request.rb index aca53abdd..5e0085f98 100644 --- a/lib/plaid/models/credit_payroll_income_refresh_request.rb +++ b/lib/plaid/models/credit_payroll_income_refresh_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_payroll_income_refresh_response.rb b/lib/plaid/models/credit_payroll_income_refresh_response.rb index 51df2dea2..0a90c701d 100644 --- a/lib/plaid/models/credit_payroll_income_refresh_response.rb +++ b/lib/plaid/models/credit_payroll_income_refresh_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_payroll_income_risk_signals_get_request.rb b/lib/plaid/models/credit_payroll_income_risk_signals_get_request.rb index 14b6a24ee..fd40f1423 100644 --- a/lib/plaid/models/credit_payroll_income_risk_signals_get_request.rb +++ b/lib/plaid/models/credit_payroll_income_risk_signals_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_payroll_income_risk_signals_get_response.rb b/lib/plaid/models/credit_payroll_income_risk_signals_get_response.rb index 120d046d5..94a40d1cb 100644 --- a/lib/plaid/models/credit_payroll_income_risk_signals_get_response.rb +++ b/lib/plaid/models/credit_payroll_income_risk_signals_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_platform_ids.rb b/lib/plaid/models/credit_platform_ids.rb index 2e761fb06..4012e2f36 100644 --- a/lib/plaid/models/credit_platform_ids.rb +++ b/lib/plaid/models/credit_platform_ids.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_relay_create_request.rb b/lib/plaid/models/credit_relay_create_request.rb index 7f8554cf9..2eadf7f5f 100644 --- a/lib/plaid/models/credit_relay_create_request.rb +++ b/lib/plaid/models/credit_relay_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -22,7 +22,7 @@ class CreditRelayCreateRequest # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret - # List of report tokens, with at most one token of each report type. Currently only Asset Report token is supported. + # List of report token strings, with at most one token of each report type. Currently only Asset Report token is supported. attr_accessor :report_tokens # The `secondary_client_id` is the client id of the third party with whom you would like to share the Relay Token. @@ -52,7 +52,7 @@ def self.openapi_types { :'client_id' => :'String', :'secret' => :'String', - :'report_tokens' => :'Array', + :'report_tokens' => :'Array', :'secondary_client_id' => :'String', :'webhook' => :'String' } diff --git a/lib/plaid/models/credit_relay_create_response.rb b/lib/plaid/models/credit_relay_create_response.rb index 732acfee5..1902a938c 100644 --- a/lib/plaid/models/credit_relay_create_response.rb +++ b/lib/plaid/models/credit_relay_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_relay_get_request.rb b/lib/plaid/models/credit_relay_get_request.rb index cf536d46c..937281c08 100644 --- a/lib/plaid/models/credit_relay_get_request.rb +++ b/lib/plaid/models/credit_relay_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_relay_refresh_request.rb b/lib/plaid/models/credit_relay_refresh_request.rb index 033d450f3..e9c6bb14c 100644 --- a/lib/plaid/models/credit_relay_refresh_request.rb +++ b/lib/plaid/models/credit_relay_refresh_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_relay_refresh_response.rb b/lib/plaid/models/credit_relay_refresh_response.rb index 2e9c1aa35..bdfa4b2e6 100644 --- a/lib/plaid/models/credit_relay_refresh_response.rb +++ b/lib/plaid/models/credit_relay_refresh_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_relay_remove_request.rb b/lib/plaid/models/credit_relay_remove_request.rb index 0779e66a7..ab474c3a1 100644 --- a/lib/plaid/models/credit_relay_remove_request.rb +++ b/lib/plaid/models/credit_relay_remove_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_relay_remove_response.rb b/lib/plaid/models/credit_relay_remove_response.rb index f0b8a7112..998bb554a 100644 --- a/lib/plaid/models/credit_relay_remove_response.rb +++ b/lib/plaid/models/credit_relay_remove_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_session.rb b/lib/plaid/models/credit_session.rb new file mode 100644 index 000000000..c9eeb8133 --- /dev/null +++ b/lib/plaid/models/credit_session.rb @@ -0,0 +1,239 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Metadata and results for a link session + class CreditSession + # The unique identifier associated with the Link Session. + attr_accessor :link_session_id + + # The time when the link session started + attr_accessor :session_start_time + + attr_accessor :results + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'link_session_id' => :'link_session_id', + :'session_start_time' => :'session_start_time', + :'results' => :'results' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'link_session_id' => :'String', + :'session_start_time' => :'Time', + :'results' => :'CreditSessionResults' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::CreditSession` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::CreditSession`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'link_session_id') + self.link_session_id = attributes[:'link_session_id'] + end + + if attributes.key?(:'session_start_time') + self.session_start_time = attributes[:'session_start_time'] + end + + if attributes.key?(:'results') + self.results = attributes[:'results'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + link_session_id == o.link_session_id && + session_start_time == o.session_start_time && + results == o.results + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [link_session_id, session_start_time, results].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/credit_session_bank_income_result.rb b/lib/plaid/models/credit_session_bank_income_result.rb new file mode 100644 index 000000000..39ce383e6 --- /dev/null +++ b/lib/plaid/models/credit_session_bank_income_result.rb @@ -0,0 +1,237 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The details of a bank income verification in link + class CreditSessionBankIncomeResult + attr_accessor :status + + attr_accessor :item_id + + attr_accessor :institution_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'item_id' => :'item_id', + :'institution_id' => :'institution_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'CreditSessionBankIncomeStatus', + :'item_id' => :'String', + :'institution_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::CreditSessionBankIncomeResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::CreditSessionBankIncomeResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'item_id') + self.item_id = attributes[:'item_id'] + end + + if attributes.key?(:'institution_id') + self.institution_id = attributes[:'institution_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + item_id == o.item_id && + institution_id == o.institution_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, item_id, institution_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/payment_initiation_refund_status.rb b/lib/plaid/models/credit_session_bank_income_status.rb similarity index 78% rename from lib/plaid/models/payment_initiation_refund_status.rb rename to lib/plaid/models/credit_session_bank_income_status.rb index 588a3f46b..64765626a 100644 --- a/lib/plaid/models/payment_initiation_refund_status.rb +++ b/lib/plaid/models/credit_session_bank_income_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,11 +14,9 @@ require 'time' module Plaid - class PaymentInitiationRefundStatus - PROCESSING = "PROCESSING".freeze - EXECUTED = "EXECUTED".freeze - INITIATED = "INITIATED".freeze - FAILED = "FAILED".freeze + class CreditSessionBankIncomeStatus + APPROVED = "APPROVED".freeze + NO_DEPOSITS_FOUND = "NO_DEPOSITS_FOUND".freeze # Builds the enum from string # @param [String] The enum value in the form of the string diff --git a/lib/plaid/models/credit_session_item_add_result.rb b/lib/plaid/models/credit_session_item_add_result.rb new file mode 100644 index 000000000..4d0138737 --- /dev/null +++ b/lib/plaid/models/credit_session_item_add_result.rb @@ -0,0 +1,237 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The details of an item add in link + class CreditSessionItemAddResult + attr_accessor :item_id + + attr_accessor :public_token + + attr_accessor :institution_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'item_id' => :'item_id', + :'public_token' => :'public_token', + :'institution_id' => :'institution_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'item_id' => :'String', + :'public_token' => :'String', + :'institution_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::CreditSessionItemAddResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::CreditSessionItemAddResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'item_id') + self.item_id = attributes[:'item_id'] + end + + if attributes.key?(:'public_token') + self.public_token = attributes[:'public_token'] + end + + if attributes.key?(:'institution_id') + self.institution_id = attributes[:'institution_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + item_id == o.item_id && + public_token == o.public_token && + institution_id == o.institution_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [item_id, public_token, institution_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/credit_session_results.rb b/lib/plaid/models/credit_session_results.rb new file mode 100644 index 000000000..cd8f4a783 --- /dev/null +++ b/lib/plaid/models/credit_session_results.rb @@ -0,0 +1,232 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The set of results for a link session + class CreditSessionResults + attr_accessor :item_add_results + + attr_accessor :bank_income_results + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'item_add_results' => :'item_add_results', + :'bank_income_results' => :'bank_income_results' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'item_add_results' => :'Array', + :'bank_income_results' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::CreditSessionResults` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::CreditSessionResults`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'item_add_results') + if (value = attributes[:'item_add_results']).is_a?(Array) + self.item_add_results = value + end + end + + if attributes.key?(:'bank_income_results') + if (value = attributes[:'bank_income_results']).is_a?(Array) + self.bank_income_results = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + item_add_results == o.item_add_results && + bank_income_results == o.bank_income_results + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [item_add_results, bank_income_results].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/asset_report_relay_remove_request.rb b/lib/plaid/models/credit_sessions_get_request.rb similarity index 86% rename from lib/plaid/models/asset_report_relay_remove_request.rb rename to lib/plaid/models/credit_sessions_get_request.rb index f5ab4f58c..17aa1e073 100644 --- a/lib/plaid/models/asset_report_relay_remove_request.rb +++ b/lib/plaid/models/credit_sessions_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,23 +14,23 @@ require 'time' module Plaid - # AssetReportRelayRemoveRequest defines the request schema for `/asset_report/relay/remove` - class AssetReportRelayRemoveRequest + # CreditSessionsGetRequest defines the request schema for `/credit/sessions/get` + class CreditSessionsGetRequest # Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body. attr_accessor :client_id # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret - # The `asset_relay_token` you would like to revoke. - attr_accessor :asset_relay_token + # The user token associated with the User data is being requested for. + attr_accessor :user_token # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'client_id' => :'client_id', :'secret' => :'secret', - :'asset_relay_token' => :'asset_relay_token' + :'user_token' => :'user_token' } end @@ -44,7 +44,7 @@ def self.openapi_types { :'client_id' => :'String', :'secret' => :'String', - :'asset_relay_token' => :'String' + :'user_token' => :'String' } end @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetReportRelayRemoveRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::CreditSessionsGetRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetReportRelayRemoveRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::CreditSessionsGetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -77,8 +77,8 @@ def initialize(attributes = {}) self.secret = attributes[:'secret'] end - if attributes.key?(:'asset_relay_token') - self.asset_relay_token = attributes[:'asset_relay_token'] + if attributes.key?(:'user_token') + self.user_token = attributes[:'user_token'] end end @@ -86,8 +86,8 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @asset_relay_token.nil? - invalid_properties.push('invalid value for "asset_relay_token", asset_relay_token cannot be nil.') + if @user_token.nil? + invalid_properties.push('invalid value for "user_token", user_token cannot be nil.') end invalid_properties @@ -96,7 +96,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @asset_relay_token.nil? + return false if @user_token.nil? true end @@ -107,7 +107,7 @@ def ==(o) self.class == o.class && client_id == o.client_id && secret == o.secret && - asset_relay_token == o.asset_relay_token + user_token == o.user_token end # @see the `==` method @@ -119,7 +119,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, secret, asset_relay_token].hash + [client_id, secret, user_token].hash end # Builds the object from hash diff --git a/lib/plaid/models/asset_report_relay_create_response.rb b/lib/plaid/models/credit_sessions_get_response.rb similarity index 85% rename from lib/plaid/models/asset_report_relay_create_response.rb rename to lib/plaid/models/credit_sessions_get_response.rb index 991013c99..5c1ba50b0 100644 --- a/lib/plaid/models/asset_report_relay_create_response.rb +++ b/lib/plaid/models/credit_sessions_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,10 +14,9 @@ require 'time' module Plaid - # AssetReportRelayCreateResponse defines the response schema for `/asset_report/relay/create` - class AssetReportRelayCreateResponse - # A token that can be shared with a third party to allow them to access the Asset Report. This token should be stored securely. - attr_accessor :asset_relay_token + # CreditSessionsGetResponse defines the response schema for `/credit/sessions/get` + class CreditSessionsGetResponse + attr_accessor :sessions # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. attr_accessor :request_id @@ -25,7 +24,7 @@ class AssetReportRelayCreateResponse # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'asset_relay_token' => :'asset_relay_token', + :'sessions' => :'sessions', :'request_id' => :'request_id' } end @@ -38,7 +37,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'asset_relay_token' => :'String', + :'sessions' => :'Array', :'request_id' => :'String' } end @@ -53,19 +52,21 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetReportRelayCreateResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::CreditSessionsGetResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetReportRelayCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::CreditSessionsGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'asset_relay_token') - self.asset_relay_token = attributes[:'asset_relay_token'] + if attributes.key?(:'sessions') + if (value = attributes[:'sessions']).is_a?(Array) + self.sessions = value + end end if attributes.key?(:'request_id') @@ -77,10 +78,6 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @asset_relay_token.nil? - invalid_properties.push('invalid value for "asset_relay_token", asset_relay_token cannot be nil.') - end - if @request_id.nil? invalid_properties.push('invalid value for "request_id", request_id cannot be nil.') end @@ -91,7 +88,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @asset_relay_token.nil? return false if @request_id.nil? true end @@ -101,7 +97,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - asset_relay_token == o.asset_relay_token && + sessions == o.sessions && request_id == o.request_id end @@ -114,7 +110,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [asset_relay_token, request_id].hash + [sessions, request_id].hash end # Builds the object from hash diff --git a/lib/plaid/models/credit_w2.rb b/lib/plaid/models/credit_w2.rb index d1125255b..06e8ae655 100644 --- a/lib/plaid/models/credit_w2.rb +++ b/lib/plaid/models/credit_w2.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/customer_initiated_return_risk.rb b/lib/plaid/models/customer_initiated_return_risk.rb index eee5b63ec..e9408c23f 100644 --- a/lib/plaid/models/customer_initiated_return_risk.rb +++ b/lib/plaid/models/customer_initiated_return_risk.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -16,7 +16,7 @@ module Plaid # The object contains a risk score and a risk tier that evaluate the transaction return risk of an unauthorized debit. Common return codes in this category include: \"R05\", \"R07\", \"R10\", \"R11\", \"R29\". These returns typically have a return time frame of up to 60 calendar days. During this period, the customer of financial institutions can dispute a transaction as unauthorized. class CustomerInitiatedReturnRisk - # A score from 0-99 that indicates the transaction return risk: a higher risk score suggests a higher return likelihood. + # A score from 1-99 that indicates the transaction return risk: a higher risk score suggests a higher return likelihood. attr_accessor :score # A tier corresponding to the projected likelihood that the transaction, if initiated, will be subject to a return. In the `customer_initiated_return_risk` object, there are five risk tiers corresponding to the scores: 1: Predicted customer-initiated return incidence rate between 0.00% - 0.02% 2: Predicted customer-initiated return incidence rate between 0.02% - 0.05% 3: Predicted customer-initiated return incidence rate between 0.05% - 0.1% 4: Predicted customer-initiated return incidence rate between 0.1% - 0.5% 5: Predicted customer-initiated return incidence rate greater than 0.5% @@ -81,12 +81,12 @@ def list_invalid_properties invalid_properties.push('invalid value for "score", score cannot be nil.') end - if @score > 100 - invalid_properties.push('invalid value for "score", must be smaller than or equal to 100.') + if @score > 99 + invalid_properties.push('invalid value for "score", must be smaller than or equal to 99.') end - if @score < 0 - invalid_properties.push('invalid value for "score", must be greater than or equal to 0.') + if @score < 1 + invalid_properties.push('invalid value for "score", must be greater than or equal to 1.') end @@ -110,8 +110,8 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @score.nil? - return false if @score > 100 - return false if @score < 0 + return false if @score > 99 + return false if @score < 1 return false if @risk_tier.nil? return false if @risk_tier > 5 return false if @risk_tier < 1 @@ -125,12 +125,12 @@ def score=(score) fail ArgumentError, 'score cannot be nil' end - if score > 100 - fail ArgumentError, 'invalid value for "score", must be smaller than or equal to 100.' + if score > 99 + fail ArgumentError, 'invalid value for "score", must be smaller than or equal to 99.' end - if score < 0 - fail ArgumentError, 'invalid value for "score", must be greater than or equal to 0.' + if score < 1 + fail ArgumentError, 'invalid value for "score", must be greater than or equal to 1.' end diff --git a/lib/plaid/models/dashboard_user.rb b/lib/plaid/models/dashboard_user.rb index f355b6591..9e94a1277 100644 --- a/lib/plaid/models/dashboard_user.rb +++ b/lib/plaid/models/dashboard_user.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/get_dashboard_user_request.rb b/lib/plaid/models/dashboard_user_get_request.rb similarity index 97% rename from lib/plaid/models/get_dashboard_user_request.rb rename to lib/plaid/models/dashboard_user_get_request.rb index 73d073b43..840c34ebe 100644 --- a/lib/plaid/models/get_dashboard_user_request.rb +++ b/lib/plaid/models/dashboard_user_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for fetching a dashboard user - class GetDashboardUserRequest + class DashboardUserGetRequest # ID of the associated user. attr_accessor :dashboard_user_id @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::GetDashboardUserRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::DashboardUserGetRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::GetDashboardUserRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::DashboardUserGetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/dashboard_user_response.rb b/lib/plaid/models/dashboard_user_get_response.rb similarity index 96% rename from lib/plaid/models/dashboard_user_response.rb rename to lib/plaid/models/dashboard_user_get_response.rb index 2b325b73d..291895dab 100644 --- a/lib/plaid/models/dashboard_user_response.rb +++ b/lib/plaid/models/dashboard_user_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Account information associated with a team member with access to the Plaid dashboard. - class DashboardUserResponse + class DashboardUserGetResponse # ID of the associated user. attr_accessor :id @@ -67,13 +67,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::DashboardUserResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::DashboardUserGetResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::DashboardUserResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::DashboardUserGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/list_dashboard_user_request.rb b/lib/plaid/models/dashboard_user_list_request.rb similarity index 97% rename from lib/plaid/models/list_dashboard_user_request.rb rename to lib/plaid/models/dashboard_user_list_request.rb index eabe3e877..f516ac134 100644 --- a/lib/plaid/models/list_dashboard_user_request.rb +++ b/lib/plaid/models/dashboard_user_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for listing dashboard users - class ListDashboardUserRequest + class DashboardUserListRequest # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret @@ -59,13 +59,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ListDashboardUserRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::DashboardUserListRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ListDashboardUserRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::DashboardUserListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/paginated_dashboard_user_list_response.rb b/lib/plaid/models/dashboard_user_list_response.rb similarity index 95% rename from lib/plaid/models/paginated_dashboard_user_list_response.rb rename to lib/plaid/models/dashboard_user_list_response.rb index 4ed81aa7d..c51bb7d94 100644 --- a/lib/plaid/models/paginated_dashboard_user_list_response.rb +++ b/lib/plaid/models/dashboard_user_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Paginated list of dashboard users - class PaginatedDashboardUserListResponse + class DashboardUserListResponse # List of dashboard users attr_accessor :dashboard_users @@ -59,13 +59,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PaginatedDashboardUserListResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::DashboardUserListResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PaginatedDashboardUserListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::DashboardUserListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/dashboard_user_status.rb b/lib/plaid/models/dashboard_user_status.rb index e199f93c7..8dfef5526 100644 --- a/lib/plaid/models/dashboard_user_status.rb +++ b/lib/plaid/models/dashboard_user_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/date_range.rb b/lib/plaid/models/date_range.rb index 13627209f..43dcda7f7 100644 --- a/lib/plaid/models/date_range.rb +++ b/lib/plaid/models/date_range.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deductions.rb b/lib/plaid/models/deductions.rb index ab0b809de..ef9e953ee 100644 --- a/lib/plaid/models/deductions.rb +++ b/lib/plaid/models/deductions.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deductions_breakdown.rb b/lib/plaid/models/deductions_breakdown.rb index 61b8d4b9c..e9024fec2 100644 --- a/lib/plaid/models/deductions_breakdown.rb +++ b/lib/plaid/models/deductions_breakdown.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deductions_total.rb b/lib/plaid/models/deductions_total.rb index c5776da36..dae02ec77 100644 --- a/lib/plaid/models/deductions_total.rb +++ b/lib/plaid/models/deductions_total.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/default_update_webhook.rb b/lib/plaid/models/default_update_webhook.rb index 26ea1fd77..8546c64ff 100644 --- a/lib/plaid/models/default_update_webhook.rb +++ b/lib/plaid/models/default_update_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -30,6 +30,8 @@ class DefaultUpdateWebhook # The `item_id` of the Item the webhook relates to. attr_accessor :item_id + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -37,7 +39,8 @@ def self.attribute_map :'webhook_code' => :'webhook_code', :'error' => :'error', :'new_transactions' => :'new_transactions', - :'item_id' => :'item_id' + :'item_id' => :'item_id', + :'environment' => :'environment' } end @@ -53,7 +56,8 @@ def self.openapi_types :'webhook_code' => :'String', :'error' => :'PlaidError', :'new_transactions' => :'Float', - :'item_id' => :'String' + :'item_id' => :'String', + :'environment' => :'WebhookEnvironmentValues' } end @@ -98,6 +102,10 @@ def initialize(attributes = {}) if attributes.key?(:'item_id') self.item_id = attributes[:'item_id'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -120,6 +128,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "item_id", item_id cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -130,6 +142,7 @@ def valid? return false if @webhook_code.nil? return false if @new_transactions.nil? return false if @item_id.nil? + return false if @environment.nil? true end @@ -142,7 +155,8 @@ def ==(o) webhook_code == o.webhook_code && error == o.error && new_transactions == o.new_transactions && - item_id == o.item_id + item_id == o.item_id && + environment == o.environment end # @see the `==` method @@ -154,7 +168,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, error, new_transactions, item_id].hash + [webhook_type, webhook_code, error, new_transactions, item_id, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/deposit_switch_address_data.rb b/lib/plaid/models/deposit_switch_address_data.rb index 839af6da8..af371290b 100644 --- a/lib/plaid/models/deposit_switch_address_data.rb +++ b/lib/plaid/models/deposit_switch_address_data.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deposit_switch_alt_create_request.rb b/lib/plaid/models/deposit_switch_alt_create_request.rb index a3a079116..493258732 100644 --- a/lib/plaid/models/deposit_switch_alt_create_request.rb +++ b/lib/plaid/models/deposit_switch_alt_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deposit_switch_alt_create_response.rb b/lib/plaid/models/deposit_switch_alt_create_response.rb index 6f853e752..e5011ac4c 100644 --- a/lib/plaid/models/deposit_switch_alt_create_response.rb +++ b/lib/plaid/models/deposit_switch_alt_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deposit_switch_create_request.rb b/lib/plaid/models/deposit_switch_create_request.rb index 28df7d54b..5336d66fb 100644 --- a/lib/plaid/models/deposit_switch_create_request.rb +++ b/lib/plaid/models/deposit_switch_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deposit_switch_create_request_options.rb b/lib/plaid/models/deposit_switch_create_request_options.rb index 88103ad94..7ebfd5aa8 100644 --- a/lib/plaid/models/deposit_switch_create_request_options.rb +++ b/lib/plaid/models/deposit_switch_create_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deposit_switch_create_response.rb b/lib/plaid/models/deposit_switch_create_response.rb index 3c8fb6f49..8d9c9f463 100644 --- a/lib/plaid/models/deposit_switch_create_response.rb +++ b/lib/plaid/models/deposit_switch_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deposit_switch_get_request.rb b/lib/plaid/models/deposit_switch_get_request.rb index 7033f8f79..d82c7d152 100644 --- a/lib/plaid/models/deposit_switch_get_request.rb +++ b/lib/plaid/models/deposit_switch_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deposit_switch_get_response.rb b/lib/plaid/models/deposit_switch_get_response.rb index d7db1e3df..03206cac8 100644 --- a/lib/plaid/models/deposit_switch_get_response.rb +++ b/lib/plaid/models/deposit_switch_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deposit_switch_state_update_webhook.rb b/lib/plaid/models/deposit_switch_state_update_webhook.rb index a6170fab2..ca74b63f6 100644 --- a/lib/plaid/models/deposit_switch_state_update_webhook.rb +++ b/lib/plaid/models/deposit_switch_state_update_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -28,13 +28,16 @@ class DepositSwitchStateUpdateWebhook # The ID of the deposit switch. attr_accessor :deposit_switch_id + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', :'state' => :'state', - :'deposit_switch_id' => :'deposit_switch_id' + :'deposit_switch_id' => :'deposit_switch_id', + :'environment' => :'environment' } end @@ -49,7 +52,8 @@ def self.openapi_types :'webhook_type' => :'String', :'webhook_code' => :'String', :'state' => :'String', - :'deposit_switch_id' => :'String' + :'deposit_switch_id' => :'String', + :'environment' => :'WebhookEnvironmentValues' } end @@ -89,6 +93,10 @@ def initialize(attributes = {}) if attributes.key?(:'deposit_switch_id') self.deposit_switch_id = attributes[:'deposit_switch_id'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -112,7 +120,8 @@ def ==(o) webhook_type == o.webhook_type && webhook_code == o.webhook_code && state == o.state && - deposit_switch_id == o.deposit_switch_id + deposit_switch_id == o.deposit_switch_id && + environment == o.environment end # @see the `==` method @@ -124,7 +133,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, state, deposit_switch_id].hash + [webhook_type, webhook_code, state, deposit_switch_id, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/deposit_switch_target_account.rb b/lib/plaid/models/deposit_switch_target_account.rb index d12b02aea..9f1ced361 100644 --- a/lib/plaid/models/deposit_switch_target_account.rb +++ b/lib/plaid/models/deposit_switch_target_account.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deposit_switch_target_user.rb b/lib/plaid/models/deposit_switch_target_user.rb index 7907f7a9a..683363643 100644 --- a/lib/plaid/models/deposit_switch_target_user.rb +++ b/lib/plaid/models/deposit_switch_target_user.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deposit_switch_token_create_request.rb b/lib/plaid/models/deposit_switch_token_create_request.rb index c95793a0e..b5ecb01d9 100644 --- a/lib/plaid/models/deposit_switch_token_create_request.rb +++ b/lib/plaid/models/deposit_switch_token_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deposit_switch_token_create_response.rb b/lib/plaid/models/deposit_switch_token_create_response.rb index f4e746d41..4048b0498 100644 --- a/lib/plaid/models/deposit_switch_token_create_response.rb +++ b/lib/plaid/models/deposit_switch_token_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/depository_account_subtype.rb b/lib/plaid/models/depository_account_subtype.rb index 671e28e92..a73348188 100644 --- a/lib/plaid/models/depository_account_subtype.rb +++ b/lib/plaid/models/depository_account_subtype.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/depository_filter.rb b/lib/plaid/models/depository_filter.rb index c59bc08df..cea379b46 100644 --- a/lib/plaid/models/depository_filter.rb +++ b/lib/plaid/models/depository_filter.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/distribution_breakdown.rb b/lib/plaid/models/distribution_breakdown.rb index 2f73028a5..85cc97e05 100644 --- a/lib/plaid/models/distribution_breakdown.rb +++ b/lib/plaid/models/distribution_breakdown.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/doc_type.rb b/lib/plaid/models/doc_type.rb index add853ae7..cd29bc082 100644 --- a/lib/plaid/models/doc_type.rb +++ b/lib/plaid/models/doc_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -26,6 +26,7 @@ class DocType DOCUMENT_TYPE_NONE = "DOCUMENT_TYPE_NONE".freeze DOCUMENT_TYPE_US_TAX_1099_MISC = "DOCUMENT_TYPE_US_TAX_1099_MISC".freeze DOCUMENT_TYPE_US_TAX_1099_K = "DOCUMENT_TYPE_US_TAX_1099_K".freeze + DOCUMENT_TYPE_PLAID_GENERATED_PAYSTUB_PDF = "DOCUMENT_TYPE_PLAID_GENERATED_PAYSTUB_PDF".freeze # Builds the enum from string # @param [String] The enum value in the form of the string diff --git a/lib/plaid/models/document_analysis.rb b/lib/plaid/models/document_analysis.rb index 6e1bae8bc..b8188902d 100644 --- a/lib/plaid/models/document_analysis.rb +++ b/lib/plaid/models/document_analysis.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/document_authenticity_match_code.rb b/lib/plaid/models/document_authenticity_match_code.rb index 106f43ba6..84e139ba5 100644 --- a/lib/plaid/models/document_authenticity_match_code.rb +++ b/lib/plaid/models/document_authenticity_match_code.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/document_date_of_birth_match_code.rb b/lib/plaid/models/document_date_of_birth_match_code.rb index 0b868dbe6..32a3d447a 100644 --- a/lib/plaid/models/document_date_of_birth_match_code.rb +++ b/lib/plaid/models/document_date_of_birth_match_code.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/document_metadata.rb b/lib/plaid/models/document_metadata.rb index 1f48bb45f..dd5270432 100644 --- a/lib/plaid/models/document_metadata.rb +++ b/lib/plaid/models/document_metadata.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/document_name_match_code.rb b/lib/plaid/models/document_name_match_code.rb index 09de674de..c7815e673 100644 --- a/lib/plaid/models/document_name_match_code.rb +++ b/lib/plaid/models/document_name_match_code.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/document_risk_signal.rb b/lib/plaid/models/document_risk_signal.rb index c64cb5819..9de3e408b 100644 --- a/lib/plaid/models/document_risk_signal.rb +++ b/lib/plaid/models/document_risk_signal.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/document_risk_signal_institution_metadata.rb b/lib/plaid/models/document_risk_signal_institution_metadata.rb index 1b8ffaa62..86b10ce62 100644 --- a/lib/plaid/models/document_risk_signal_institution_metadata.rb +++ b/lib/plaid/models/document_risk_signal_institution_metadata.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/document_risk_signals_object.rb b/lib/plaid/models/document_risk_signals_object.rb index 191050e29..c114a50cb 100644 --- a/lib/plaid/models/document_risk_signals_object.rb +++ b/lib/plaid/models/document_risk_signals_object.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/document_status.rb b/lib/plaid/models/document_status.rb index 6e6d43353..498683a8b 100644 --- a/lib/plaid/models/document_status.rb +++ b/lib/plaid/models/document_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/documentary_verification.rb b/lib/plaid/models/documentary_verification.rb index 93196d9df..d461550f7 100644 --- a/lib/plaid/models/documentary_verification.rb +++ b/lib/plaid/models/documentary_verification.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - # data, images, analysis, and results from the `documentary_verification` step. + # Data, images, analysis, and results from the `documentary_verification` step. This field will be `null` unless `steps.documentary_verification` has reached a terminal state of either `success` or `failed`. class DocumentaryVerification # The outcome status for the associated Identity Verification attempt's `documentary_verification` step. This field will always have the same value as `steps.documentary_verification`. attr_accessor :status diff --git a/lib/plaid/models/documentary_verification_document.rb b/lib/plaid/models/documentary_verification_document.rb index 34f1e284e..9df6069d9 100644 --- a/lib/plaid/models/documentary_verification_document.rb +++ b/lib/plaid/models/documentary_verification_document.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/earnings.rb b/lib/plaid/models/earnings.rb index 679902fc4..01363fc7e 100644 --- a/lib/plaid/models/earnings.rb +++ b/lib/plaid/models/earnings.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/earnings_breakdown.rb b/lib/plaid/models/earnings_breakdown.rb index 1e5d3ca95..41b6330de 100644 --- a/lib/plaid/models/earnings_breakdown.rb +++ b/lib/plaid/models/earnings_breakdown.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/earnings_breakdown_canonical_description.rb b/lib/plaid/models/earnings_breakdown_canonical_description.rb index a69e16cf2..9fbba6d4b 100644 --- a/lib/plaid/models/earnings_breakdown_canonical_description.rb +++ b/lib/plaid/models/earnings_breakdown_canonical_description.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/earnings_total.rb b/lib/plaid/models/earnings_total.rb index 0b4e55fec..d6f181daf 100644 --- a/lib/plaid/models/earnings_total.rb +++ b/lib/plaid/models/earnings_total.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/email.rb b/lib/plaid/models/email.rb index 502aebb3b..9e99341df 100644 --- a/lib/plaid/models/email.rb +++ b/lib/plaid/models/email.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/email_address_match_score.rb b/lib/plaid/models/email_address_match_score.rb new file mode 100644 index 000000000..77f752735 --- /dev/null +++ b/lib/plaid/models/email_address_match_score.rb @@ -0,0 +1,221 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Score found by matching email provided by the API with the email on the account at the financial institution. If the account contains multiple owners, the maximum match score is filled. + class EmailAddressMatchScore + # Match score for normalized email. 100 is a perfect match and 0 is a no match. If the email is missing from either the API or financial institution, this is empty. + attr_accessor :scores + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'scores' => :'scores' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'scores' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'scores' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::EmailAddressMatchScore` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::EmailAddressMatchScore`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'scores') + self.scores = attributes[:'scores'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + scores == o.scores + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [scores].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/employee.rb b/lib/plaid/models/employee.rb index 41d0b990a..3771985c6 100644 --- a/lib/plaid/models/employee.rb +++ b/lib/plaid/models/employee.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/employee_income_summary_field_string.rb b/lib/plaid/models/employee_income_summary_field_string.rb index de7b2fa89..76fb4d143 100644 --- a/lib/plaid/models/employee_income_summary_field_string.rb +++ b/lib/plaid/models/employee_income_summary_field_string.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/employer.rb b/lib/plaid/models/employer.rb index 3c813bec5..352521fe1 100644 --- a/lib/plaid/models/employer.rb +++ b/lib/plaid/models/employer.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/employer_income_summary_field_string.rb b/lib/plaid/models/employer_income_summary_field_string.rb index 9d4192dfe..47a0f5b94 100644 --- a/lib/plaid/models/employer_income_summary_field_string.rb +++ b/lib/plaid/models/employer_income_summary_field_string.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/employer_verification.rb b/lib/plaid/models/employer_verification.rb index f366d561c..ecbcf228b 100644 --- a/lib/plaid/models/employer_verification.rb +++ b/lib/plaid/models/employer_verification.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/employers_search_request.rb b/lib/plaid/models/employers_search_request.rb index 5fa04c066..dba33e9b8 100644 --- a/lib/plaid/models/employers_search_request.rb +++ b/lib/plaid/models/employers_search_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/employers_search_response.rb b/lib/plaid/models/employers_search_response.rb index 3624f00ac..5145108a7 100644 --- a/lib/plaid/models/employers_search_response.rb +++ b/lib/plaid/models/employers_search_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/employment_details.rb b/lib/plaid/models/employment_details.rb index a5b57af26..f326ff6ec 100644 --- a/lib/plaid/models/employment_details.rb +++ b/lib/plaid/models/employment_details.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/employment_verification.rb b/lib/plaid/models/employment_verification.rb index af48cd7e0..15b1eb80b 100644 --- a/lib/plaid/models/employment_verification.rb +++ b/lib/plaid/models/employment_verification.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/employment_verification_get_request.rb b/lib/plaid/models/employment_verification_get_request.rb index ebaf3b883..b9ca9198d 100644 --- a/lib/plaid/models/employment_verification_get_request.rb +++ b/lib/plaid/models/employment_verification_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/employment_verification_get_response.rb b/lib/plaid/models/employment_verification_get_response.rb index 4684aa3e6..688701177 100644 --- a/lib/plaid/models/employment_verification_get_response.rb +++ b/lib/plaid/models/employment_verification_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/employment_verification_status.rb b/lib/plaid/models/employment_verification_status.rb index 7f369f877..973c388e8 100644 --- a/lib/plaid/models/employment_verification_status.rb +++ b/lib/plaid/models/employment_verification_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/enhancements.rb b/lib/plaid/models/enhancements.rb index 8f04f75ce..4fac52df4 100644 --- a/lib/plaid/models/enhancements.rb +++ b/lib/plaid/models/enhancements.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -16,7 +16,7 @@ module Plaid # A grouping of the Plaid produced transaction enhancement fields. class Enhancements - # The merchant name, as extracted by Plaid from the raw description. + # The name of the primary counterparty, such as the merchant or the financial institution, as extracted by Plaid from the raw description. attr_accessor :merchant_name # The website associated with this transaction. @@ -43,6 +43,9 @@ class Enhancements # A link to the icon associated with the primary personal finance category. The logo will always be 100x100 resolution. attr_accessor :personal_finance_category_icon_url + # The counterparties present in the transaction. Counterparties, such as the merchant or the financial institution, are extracted by Plaid from the raw description. + attr_accessor :counterparties + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -55,7 +58,8 @@ def self.attribute_map :'category' => :'category', :'location' => :'location', :'personal_finance_category' => :'personal_finance_category', - :'personal_finance_category_icon_url' => :'personal_finance_category_icon_url' + :'personal_finance_category_icon_url' => :'personal_finance_category_icon_url', + :'counterparties' => :'counterparties' } end @@ -76,7 +80,8 @@ def self.openapi_types :'category' => :'Array', :'location' => :'Location', :'personal_finance_category' => :'PersonalFinanceCategory', - :'personal_finance_category_icon_url' => :'String' + :'personal_finance_category_icon_url' => :'String', + :'counterparties' => :'Array' } end @@ -148,6 +153,12 @@ def initialize(attributes = {}) if attributes.key?(:'personal_finance_category_icon_url') self.personal_finance_category_icon_url = attributes[:'personal_finance_category_icon_url'] end + + if attributes.key?(:'counterparties') + if (value = attributes[:'counterparties']).is_a?(Array) + self.counterparties = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -192,7 +203,8 @@ def ==(o) category == o.category && location == o.location && personal_finance_category == o.personal_finance_category && - personal_finance_category_icon_url == o.personal_finance_category_icon_url + personal_finance_category_icon_url == o.personal_finance_category_icon_url && + counterparties == o.counterparties end # @see the `==` method @@ -204,7 +216,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [merchant_name, website, logo_url, check_number, payment_channel, category_id, category, location, personal_finance_category, personal_finance_category_icon_url].hash + [merchant_name, website, logo_url, check_number, payment_channel, category_id, category, location, personal_finance_category, personal_finance_category_icon_url, counterparties].hash end # Builds the object from hash diff --git a/lib/plaid/models/entity_document.rb b/lib/plaid/models/entity_document.rb index b8d0fb797..59d99cf4d 100644 --- a/lib/plaid/models/entity_document.rb +++ b/lib/plaid/models/entity_document.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -88,11 +88,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "number", the character length must be great than or equal to 4.') end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if @number !~ pattern - invalid_properties.push("invalid value for \"number\", must conform to the pattern #{pattern}.") - end - invalid_properties end @@ -103,7 +98,6 @@ def valid? return false if @type.nil? return false if @number.nil? return false if @number.to_s.length < 4 - return false if @number !~ Regexp.new(/^\S+(\s+\S+)*$/) true end @@ -118,11 +112,6 @@ def number=(number) fail ArgumentError, 'invalid value for "number", the character length must be great than or equal to 4.' end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if number !~ pattern - fail ArgumentError, "invalid value for \"number\", must conform to the pattern #{pattern}." - end - @number = number end diff --git a/lib/plaid/models/entity_document_type.rb b/lib/plaid/models/entity_document_type.rb index e618e1f7a..f124eaf28 100644 --- a/lib/plaid/models/entity_document_type.rb +++ b/lib/plaid/models/entity_document_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/entity_screening_hit_analysis.rb b/lib/plaid/models/entity_screening_hit_analysis.rb index cff697b95..c8d1815aa 100644 --- a/lib/plaid/models/entity_screening_hit_analysis.rb +++ b/lib/plaid/models/entity_screening_hit_analysis.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/entity_screening_hit_data.rb b/lib/plaid/models/entity_screening_hit_data.rb index 4d6b6c060..771a0a711 100644 --- a/lib/plaid/models/entity_screening_hit_data.rb +++ b/lib/plaid/models/entity_screening_hit_data.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/entity_screening_hit_documents_items.rb b/lib/plaid/models/entity_screening_hit_documents_items.rb index e45994a42..ab9cb682a 100644 --- a/lib/plaid/models/entity_screening_hit_documents_items.rb +++ b/lib/plaid/models/entity_screening_hit_documents_items.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/entity_screening_hit_emails.rb b/lib/plaid/models/entity_screening_hit_emails.rb index ed161d10e..d5e85d50b 100644 --- a/lib/plaid/models/entity_screening_hit_emails.rb +++ b/lib/plaid/models/entity_screening_hit_emails.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/entity_screening_hit_emails_items.rb b/lib/plaid/models/entity_screening_hit_emails_items.rb index 69a2d2ab5..a70e45a97 100644 --- a/lib/plaid/models/entity_screening_hit_emails_items.rb +++ b/lib/plaid/models/entity_screening_hit_emails_items.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/entity_screening_hit_names.rb b/lib/plaid/models/entity_screening_hit_names.rb index 66964d511..65fa44697 100644 --- a/lib/plaid/models/entity_screening_hit_names.rb +++ b/lib/plaid/models/entity_screening_hit_names.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/entity_screening_hit_names_items.rb b/lib/plaid/models/entity_screening_hit_names_items.rb index c95460442..62e847f4d 100644 --- a/lib/plaid/models/entity_screening_hit_names_items.rb +++ b/lib/plaid/models/entity_screening_hit_names_items.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/entity_screening_hit_phone_numbers.rb b/lib/plaid/models/entity_screening_hit_phone_numbers.rb index 245dfd017..c93db18ba 100644 --- a/lib/plaid/models/entity_screening_hit_phone_numbers.rb +++ b/lib/plaid/models/entity_screening_hit_phone_numbers.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -84,12 +84,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.') end - pattern = Regexp.new(/^\+[1-9]\d{6,14}$/) - if @phone_number !~ pattern - invalid_properties.push("invalid value for \"phone_number\", must conform to the pattern #{pattern}.") - end - - invalid_properties end @@ -98,26 +92,9 @@ def list_invalid_properties def valid? return false if @type.nil? return false if @phone_number.nil? - return false if @phone_number !~ Regexp.new(/^\+[1-9]\d{6,14}$/) true end - # Custom attribute writer method with validation - # @param [Object] phone_number Value to be assigned - def phone_number=(phone_number) - if phone_number.nil? - fail ArgumentError, 'phone_number cannot be nil' - end - - pattern = Regexp.new(/^\+[1-9]\d{6,14}$/) - if phone_number !~ pattern - fail ArgumentError, "invalid value for \"phone_number\", must conform to the pattern #{pattern}." - end - - - @phone_number = phone_number - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/plaid/models/entity_screening_hit_urls.rb b/lib/plaid/models/entity_screening_hit_urls.rb index 6919364a8..dfa5ead21 100644 --- a/lib/plaid/models/entity_screening_hit_urls.rb +++ b/lib/plaid/models/entity_screening_hit_urls.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/entity_screening_hit_urls_items.rb b/lib/plaid/models/entity_screening_hit_urls_items.rb index c68f877d1..0ad1ddce0 100644 --- a/lib/plaid/models/entity_screening_hit_urls_items.rb +++ b/lib/plaid/models/entity_screening_hit_urls_items.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/entity_screening_hits_phone_number_items.rb b/lib/plaid/models/entity_screening_hits_phone_number_items.rb index 4ecda96d3..b9d7645dd 100644 --- a/lib/plaid/models/entity_screening_hits_phone_number_items.rb +++ b/lib/plaid/models/entity_screening_hits_phone_number_items.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/entity_screening_status_updated_webhook.rb b/lib/plaid/models/entity_screening_status_updated_webhook.rb index 1da60c13b..5928dbcc2 100644 --- a/lib/plaid/models/entity_screening_status_updated_webhook.rb +++ b/lib/plaid/models/entity_screening_status_updated_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,12 +25,15 @@ class EntityScreeningStatusUpdatedWebhook # The ID of the associated screening. attr_accessor :screening_id + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', - :'screening_id' => :'screening_id' + :'screening_id' => :'screening_id', + :'environment' => :'environment' } end @@ -44,14 +47,15 @@ def self.openapi_types { :'webhook_type' => :'String', :'webhook_code' => :'String', - :'screening_id' => :'AnyType' + :'screening_id' => :'AnyType', + :'environment' => :'WebhookEnvironmentValues' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'screening_id' + :'screening_id', ]) end @@ -81,6 +85,10 @@ def initialize(attributes = {}) if attributes.key?(:'screening_id') self.screening_id = attributes[:'screening_id'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -95,6 +103,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "webhook_code", webhook_code cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -103,6 +115,7 @@ def list_invalid_properties def valid? return false if @webhook_type.nil? return false if @webhook_code.nil? + return false if @environment.nil? true end @@ -113,7 +126,8 @@ def ==(o) self.class == o.class && webhook_type == o.webhook_type && webhook_code == o.webhook_code && - screening_id == o.screening_id + screening_id == o.screening_id && + environment == o.environment end # @see the `==` method @@ -125,7 +139,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, screening_id].hash + [webhook_type, webhook_code, screening_id, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/entity_watchlist_code.rb b/lib/plaid/models/entity_watchlist_code.rb index b13359b32..5f2c8f20b 100644 --- a/lib/plaid/models/entity_watchlist_code.rb +++ b/lib/plaid/models/entity_watchlist_code.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/entity_watchlist_program.rb b/lib/plaid/models/entity_watchlist_program.rb index 3bd70a9d6..cf40e3b75 100644 --- a/lib/plaid/models/entity_watchlist_program.rb +++ b/lib/plaid/models/entity_watchlist_program.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -156,11 +156,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if @name !~ pattern - invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.") - end - if @name_sensitivity.nil? invalid_properties.push('invalid value for "name_sensitivity", name_sensitivity cannot be nil.') @@ -186,7 +181,6 @@ def valid? return false if @lists_enabled.nil? return false if @name.nil? return false if @name.to_s.length < 1 - return false if @name !~ Regexp.new(/^\S+(\s+\S+)*$/) return false if @name_sensitivity.nil? return false if @audit_trail.nil? return false if @is_archived.nil? @@ -215,11 +209,6 @@ def name=(name) fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if name !~ pattern - fail ArgumentError, "invalid value for \"name\", must conform to the pattern #{pattern}." - end - @name = name end diff --git a/lib/plaid/models/entity_watchlist_screening.rb b/lib/plaid/models/entity_watchlist_screening.rb index 8c4c5325a..8d05d2b09 100644 --- a/lib/plaid/models/entity_watchlist_screening.rb +++ b/lib/plaid/models/entity_watchlist_screening.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -21,10 +21,12 @@ class EntityWatchlistScreening attr_accessor :search_terms + # ID of the associated user. attr_accessor :assignee attr_accessor :status + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. attr_accessor :client_user_id attr_accessor :audit_trail @@ -122,6 +124,11 @@ def list_invalid_properties invalid_properties.push('invalid value for "status", status cannot be nil.') end + if @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + if @audit_trail.nil? invalid_properties.push('invalid value for "audit_trail", audit_trail cannot be nil.') end @@ -135,10 +142,22 @@ def valid? return false if @id.nil? return false if @search_terms.nil? return false if @status.nil? + return false if @client_user_id.to_s.length < 1 return false if @audit_trail.nil? true end + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/plaid/models/entity_watchlist_screening_hit.rb b/lib/plaid/models/entity_watchlist_screening_hit.rb index d4e00a544..bb6ca593c 100644 --- a/lib/plaid/models/entity_watchlist_screening_hit.rb +++ b/lib/plaid/models/entity_watchlist_screening_hit.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/entity_watchlist_screening_review.rb b/lib/plaid/models/entity_watchlist_screening_review.rb index c7a011772..b84b53c1e 100644 --- a/lib/plaid/models/entity_watchlist_screening_review.rb +++ b/lib/plaid/models/entity_watchlist_screening_review.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/entity_watchlist_screening_search_terms.rb b/lib/plaid/models/entity_watchlist_screening_search_terms.rb index 73d7ecf9a..b21c6cf31 100644 --- a/lib/plaid/models/entity_watchlist_screening_search_terms.rb +++ b/lib/plaid/models/entity_watchlist_screening_search_terms.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -22,14 +22,19 @@ class EntityWatchlistScreeningSearchTerms # The name of the organization being screened. attr_accessor :legal_name + # The numeric or alphanumeric identifier associated with this document. attr_accessor :document_number + # A valid email address. attr_accessor :email_address + # Valid, capitalized, two-letter ISO code representing the country of this object. Must be in ISO 3166-1 alpha-2 form. attr_accessor :country + # A phone number in E.164 format. attr_accessor :phone_number + # An 'http' or 'https' URL (must begin with either of those). attr_accessor :url # The current version of the search terms. Starts at `1` and increments with each edit to `search_terms`. @@ -143,9 +148,14 @@ def list_invalid_properties invalid_properties.push('invalid value for "legal_name", the character length must be great than or equal to 1.') end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if @legal_name !~ pattern - invalid_properties.push("invalid value for \"legal_name\", must conform to the pattern #{pattern}.") + + if @document_number.to_s.length < 4 + invalid_properties.push('invalid value for "document_number", the character length must be great than or equal to 4.') + end + + + if @country.to_s.length < 2 + invalid_properties.push('invalid value for "country", the character length must be great than or equal to 2.') end @@ -162,7 +172,8 @@ def valid? return false if @entity_watchlist_program_id.nil? return false if @legal_name.nil? return false if @legal_name.to_s.length < 1 - return false if @legal_name !~ Regexp.new(/^\S+(\s+\S+)*$/) + return false if @document_number.to_s.length < 4 + return false if @country.to_s.length < 2 return false if @version.nil? true end @@ -178,13 +189,30 @@ def legal_name=(legal_name) fail ArgumentError, 'invalid value for "legal_name", the character length must be great than or equal to 1.' end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if legal_name !~ pattern - fail ArgumentError, "invalid value for \"legal_name\", must conform to the pattern #{pattern}." + + @legal_name = legal_name + end + + # Custom attribute writer method with validation + # @param [Object] document_number Value to be assigned + def document_number=(document_number) + if document_number.to_s.length < 4 + fail ArgumentError, 'invalid value for "document_number", the character length must be great than or equal to 4.' + end + + + @document_number = document_number + end + + # Custom attribute writer method with validation + # @param [Object] country Value to be assigned + def country=(country) + if country.to_s.length < 2 + fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 2.' end - @legal_name = legal_name + @country = country end # Checks equality by comparing each attribute. diff --git a/lib/plaid/models/entity_watchlist_search_terms.rb b/lib/plaid/models/entity_watchlist_search_terms.rb index b7448454c..cc386df2f 100644 --- a/lib/plaid/models/entity_watchlist_search_terms.rb +++ b/lib/plaid/models/entity_watchlist_search_terms.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -22,14 +22,19 @@ class EntityWatchlistSearchTerms # The name of the organization being screened. attr_accessor :legal_name + # The numeric or alphanumeric identifier associated with this document. attr_accessor :document_number + # A valid email address. attr_accessor :email_address + # Valid, capitalized, two-letter ISO code representing the country of this object. Must be in ISO 3166-1 alpha-2 form. attr_accessor :country + # A phone number in E.164 format. attr_accessor :phone_number + # An 'http' or 'https' URL (must begin with either of those). attr_accessor :url # Attribute mapping from ruby-style variable name to JSON key. @@ -134,9 +139,14 @@ def list_invalid_properties invalid_properties.push('invalid value for "legal_name", the character length must be great than or equal to 1.') end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if @legal_name !~ pattern - invalid_properties.push("invalid value for \"legal_name\", must conform to the pattern #{pattern}.") + + if !@document_number.nil? && @document_number.to_s.length < 4 + invalid_properties.push('invalid value for "document_number", the character length must be great than or equal to 4.') + end + + + if !@country.nil? && @country.to_s.length < 2 + invalid_properties.push('invalid value for "country", the character length must be great than or equal to 2.') end @@ -149,7 +159,8 @@ def valid? return false if @entity_watchlist_program_id.nil? return false if @legal_name.nil? return false if @legal_name.to_s.length < 1 - return false if @legal_name !~ Regexp.new(/^\S+(\s+\S+)*$/) + return false if !@document_number.nil? && @document_number.to_s.length < 4 + return false if !@country.nil? && @country.to_s.length < 2 true end @@ -164,13 +175,30 @@ def legal_name=(legal_name) fail ArgumentError, 'invalid value for "legal_name", the character length must be great than or equal to 1.' end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if legal_name !~ pattern - fail ArgumentError, "invalid value for \"legal_name\", must conform to the pattern #{pattern}." + + @legal_name = legal_name + end + + # Custom attribute writer method with validation + # @param [Object] document_number Value to be assigned + def document_number=(document_number) + if !document_number.nil? && document_number.to_s.length < 4 + fail ArgumentError, 'invalid value for "document_number", the character length must be great than or equal to 4.' + end + + + @document_number = document_number + end + + # Custom attribute writer method with validation + # @param [Object] country Value to be assigned + def country=(country) + if !country.nil? && country.to_s.length < 2 + fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 2.' end - @legal_name = legal_name + @country = country end # Checks equality by comparing each attribute. diff --git a/lib/plaid/models/error.rb b/lib/plaid/models/error.rb index 8b2321ace..c620200a1 100644 --- a/lib/plaid/models/error.rb +++ b/lib/plaid/models/error.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -186,7 +186,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @error_type.nil? - error_type_validator = EnumAttributeValidator.new('String', ["INVALID_REQUEST", "INVALID_RESULT", "INVALID_INPUT", "INSTITUTION_ERROR", "RATE_LIMIT_EXCEEDED", "API_ERROR", "ITEM_ERROR", "ASSET_REPORT_ERROR", "RECAPTCHA_ERROR", "OAUTH_ERROR", "PAYMENT_ERROR", "BANK_TRANSFER_ERROR", "INCOME_VERIFICATION_ERROR"]) + error_type_validator = EnumAttributeValidator.new('String', ["INVALID_REQUEST", "INVALID_RESULT", "INVALID_INPUT", "INSTITUTION_ERROR", "RATE_LIMIT_EXCEEDED", "API_ERROR", "ITEM_ERROR", "ASSET_REPORT_ERROR", "RECAPTCHA_ERROR", "OAUTH_ERROR", "PAYMENT_ERROR", "BANK_TRANSFER_ERROR", "INCOME_VERIFICATION_ERROR", "MICRODEPOSITS_ERROR"]) return false unless error_type_validator.valid?(@error_type) return false if @error_code.nil? return false if @error_message.nil? @@ -196,7 +196,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] error_type Object to be assigned def error_type=(error_type) - validator = EnumAttributeValidator.new('String', ["INVALID_REQUEST", "INVALID_RESULT", "INVALID_INPUT", "INSTITUTION_ERROR", "RATE_LIMIT_EXCEEDED", "API_ERROR", "ITEM_ERROR", "ASSET_REPORT_ERROR", "RECAPTCHA_ERROR", "OAUTH_ERROR", "PAYMENT_ERROR", "BANK_TRANSFER_ERROR", "INCOME_VERIFICATION_ERROR"]) + validator = EnumAttributeValidator.new('String', ["INVALID_REQUEST", "INVALID_RESULT", "INVALID_INPUT", "INSTITUTION_ERROR", "RATE_LIMIT_EXCEEDED", "API_ERROR", "ITEM_ERROR", "ASSET_REPORT_ERROR", "RECAPTCHA_ERROR", "OAUTH_ERROR", "PAYMENT_ERROR", "BANK_TRANSFER_ERROR", "INCOME_VERIFICATION_ERROR", "MICRODEPOSITS_ERROR"]) unless validator.valid?(error_type) fail ArgumentError, "invalid value for \"error_type\", must be one of #{validator.allowable_values}." end diff --git a/lib/plaid/models/expiration_date.rb b/lib/plaid/models/expiration_date.rb index 4d56d7c0b..84f1e3781 100644 --- a/lib/plaid/models/expiration_date.rb +++ b/lib/plaid/models/expiration_date.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/external_payment_initiation_consent_options.rb b/lib/plaid/models/external_payment_initiation_consent_options.rb index 154d34b23..22031580a 100644 --- a/lib/plaid/models/external_payment_initiation_consent_options.rb +++ b/lib/plaid/models/external_payment_initiation_consent_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/external_payment_options.rb b/lib/plaid/models/external_payment_options.rb index 712feb7e2..176cf6172 100644 --- a/lib/plaid/models/external_payment_options.rb +++ b/lib/plaid/models/external_payment_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/external_payment_refund_details.rb b/lib/plaid/models/external_payment_refund_details.rb index aa4fca2b9..171abfa45 100644 --- a/lib/plaid/models/external_payment_refund_details.rb +++ b/lib/plaid/models/external_payment_refund_details.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/external_payment_schedule_base.rb b/lib/plaid/models/external_payment_schedule_base.rb index a3e7f27ae..d861f0490 100644 --- a/lib/plaid/models/external_payment_schedule_base.rb +++ b/lib/plaid/models/external_payment_schedule_base.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/external_payment_schedule_get.rb b/lib/plaid/models/external_payment_schedule_get.rb index aaa6da08c..8a6c09750 100644 --- a/lib/plaid/models/external_payment_schedule_get.rb +++ b/lib/plaid/models/external_payment_schedule_get.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/external_payment_schedule_request.rb b/lib/plaid/models/external_payment_schedule_request.rb index 3b5c12cd0..6131393a8 100644 --- a/lib/plaid/models/external_payment_schedule_request.rb +++ b/lib/plaid/models/external_payment_schedule_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/fdx_content_types.rb b/lib/plaid/models/fdx_content_types.rb new file mode 100644 index 000000000..c4769e240 --- /dev/null +++ b/lib/plaid/models/fdx_content_types.rb @@ -0,0 +1,43 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class FDXContentTypes + APPLICATION_PDF = "application/pdf".freeze + IMAGE_GIF = "image/gif".freeze + IMAGE_JPEG = "image/jpeg".freeze + IMAGE_TIFF = "image/tiff".freeze + IMAGE_PNG = "image/png".freeze + APPLICATION_JSON = "application/json".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/fdx_hateoas_link.rb b/lib/plaid/models/fdx_hateoas_link.rb new file mode 100644 index 000000000..c8727780a --- /dev/null +++ b/lib/plaid/models/fdx_hateoas_link.rb @@ -0,0 +1,256 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # REST application constraint (Hypermedia As The Engine Of Application State) + class FDXHateoasLink + # URL to invoke the action on the resource + attr_accessor :href + + attr_accessor :action + + # Relation of this link to its containing entity, as defined by and with many example relation values at [IETF RFC5988](https://datatracker.ietf.org/doc/html/rfc5988) + attr_accessor :rel + + # Content-types that can be used in the Accept header + attr_accessor :types + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'href' => :'href', + :'action' => :'action', + :'rel' => :'rel', + :'types' => :'types' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'href' => :'String', + :'action' => :'FDXHateoasLinkAction', + :'rel' => :'String', + :'types' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::FDXHateoasLink` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::FDXHateoasLink`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'href') + self.href = attributes[:'href'] + end + + if attributes.key?(:'action') + self.action = attributes[:'action'] + end + + if attributes.key?(:'rel') + self.rel = attributes[:'rel'] + end + + if attributes.key?(:'types') + if (value = attributes[:'types']).is_a?(Array) + self.types = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @href.nil? + invalid_properties.push('invalid value for "href", href cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @href.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + href == o.href && + action == o.action && + rel == o.rel && + types == o.types + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [href, action, rel, types].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/fdx_hateoas_link_action.rb b/lib/plaid/models/fdx_hateoas_link_action.rb new file mode 100644 index 000000000..893f0df90 --- /dev/null +++ b/lib/plaid/models/fdx_hateoas_link_action.rb @@ -0,0 +1,42 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class FDXHateoasLinkAction + GET = "GET".freeze + POST = "POST".freeze + PATCH = "PATCH".freeze + DELETE = "DELETE".freeze + PUT = "PUT".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/fdx_notification.rb b/lib/plaid/models/fdx_notification.rb new file mode 100644 index 000000000..72580c29b --- /dev/null +++ b/lib/plaid/models/fdx_notification.rb @@ -0,0 +1,332 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Provides the base fields of a notification. Clients will read the `type` property to determine the expected notification payload + class FDXNotification + # Id of notification + attr_accessor :notification_id + + attr_accessor :type + + # ISO 8601 date-time in format 'YYYY-MM-DDThh:mm:ss.nnn[Z|[+|-]hh:mm]' according to [IETF RFC3339](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14) + attr_accessor :sent_on + + attr_accessor :category + + attr_accessor :severity + + attr_accessor :priority + + attr_accessor :publisher + + attr_accessor :subscriber + + attr_accessor :notification_payload + + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'notification_id' => :'notificationId', + :'type' => :'type', + :'sent_on' => :'sentOn', + :'category' => :'category', + :'severity' => :'severity', + :'priority' => :'priority', + :'publisher' => :'publisher', + :'subscriber' => :'subscriber', + :'notification_payload' => :'notificationPayload', + :'url' => :'url' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'notification_id' => :'String', + :'type' => :'FDXNotificationType', + :'sent_on' => :'Time', + :'category' => :'FDXNotificationCategory', + :'severity' => :'FDXNotificationSeverity', + :'priority' => :'FDXNotificationPriority', + :'publisher' => :'FDXParty', + :'subscriber' => :'FDXParty', + :'notification_payload' => :'FDXNotificationPayload', + :'url' => :'FDXHateoasLink' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::FDXNotification` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::FDXNotification`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'notification_id') + self.notification_id = attributes[:'notification_id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'sent_on') + self.sent_on = attributes[:'sent_on'] + end + + if attributes.key?(:'category') + self.category = attributes[:'category'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + end + + if attributes.key?(:'priority') + self.priority = attributes[:'priority'] + end + + if attributes.key?(:'publisher') + self.publisher = attributes[:'publisher'] + end + + if attributes.key?(:'subscriber') + self.subscriber = attributes[:'subscriber'] + end + + if attributes.key?(:'notification_payload') + self.notification_payload = attributes[:'notification_payload'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @notification_id.nil? + invalid_properties.push('invalid value for "notification_id", notification_id cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @sent_on.nil? + invalid_properties.push('invalid value for "sent_on", sent_on cannot be nil.') + end + + if @category.nil? + invalid_properties.push('invalid value for "category", category cannot be nil.') + end + + if @publisher.nil? + invalid_properties.push('invalid value for "publisher", publisher cannot be nil.') + end + + if @notification_payload.nil? + invalid_properties.push('invalid value for "notification_payload", notification_payload cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @notification_id.nil? + return false if @type.nil? + return false if @sent_on.nil? + return false if @category.nil? + return false if @publisher.nil? + return false if @notification_payload.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + notification_id == o.notification_id && + type == o.type && + sent_on == o.sent_on && + category == o.category && + severity == o.severity && + priority == o.priority && + publisher == o.publisher && + subscriber == o.subscriber && + notification_payload == o.notification_payload && + url == o.url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [notification_id, type, sent_on, category, severity, priority, publisher, subscriber, notification_payload, url].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/fdx_notification_category.rb b/lib/plaid/models/fdx_notification_category.rb new file mode 100644 index 000000000..840b7b6ea --- /dev/null +++ b/lib/plaid/models/fdx_notification_category.rb @@ -0,0 +1,42 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class FDXNotificationCategory + SECURITY = "SECURITY".freeze + MAINTENANCE = "MAINTENANCE".freeze + FRAUD = "FRAUD".freeze + CONSENT = "CONSENT".freeze + NEW_DATA = "NEW_DATA".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/fdx_notification_payload.rb b/lib/plaid/models/fdx_notification_payload.rb new file mode 100644 index 000000000..dc539955b --- /dev/null +++ b/lib/plaid/models/fdx_notification_payload.rb @@ -0,0 +1,238 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Custom key-value pairs payload for a notification + class FDXNotificationPayload + # ID for the origination entity related to the notification + attr_accessor :id + + attr_accessor :id_type + + attr_accessor :custom_fields + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'id_type' => :'idType', + :'custom_fields' => :'customFields' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'id_type' => :'FDXNotificationPayloadIdType', + :'custom_fields' => :'FDXFiAttribute' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::FDXNotificationPayload` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::FDXNotificationPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'id_type') + self.id_type = attributes[:'id_type'] + end + + if attributes.key?(:'custom_fields') + self.custom_fields = attributes[:'custom_fields'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + id_type == o.id_type && + custom_fields == o.custom_fields + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, id_type, custom_fields].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/fdx_notification_payload_id_type.rb b/lib/plaid/models/fdx_notification_payload_id_type.rb new file mode 100644 index 000000000..2cdef4d70 --- /dev/null +++ b/lib/plaid/models/fdx_notification_payload_id_type.rb @@ -0,0 +1,42 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class FDXNotificationPayloadIdType + ACCOUNT = "ACCOUNT".freeze + CUSTOMER = "CUSTOMER".freeze + PARTY = "PARTY".freeze + MAINTENANCE = "MAINTENANCE".freeze + CONSENT = "CONSENT".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/fdx_notification_priority.rb b/lib/plaid/models/fdx_notification_priority.rb new file mode 100644 index 000000000..8b5f07a15 --- /dev/null +++ b/lib/plaid/models/fdx_notification_priority.rb @@ -0,0 +1,40 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class FDXNotificationPriority + HIGH = "HIGH".freeze + MEDIUM = "MEDIUM".freeze + LOW = "LOW".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/fdx_notification_severity.rb b/lib/plaid/models/fdx_notification_severity.rb new file mode 100644 index 000000000..57a42fa66 --- /dev/null +++ b/lib/plaid/models/fdx_notification_severity.rb @@ -0,0 +1,42 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class FDXNotificationSeverity + EMERGENCY = "EMERGENCY".freeze + ALERT = "ALERT".freeze + WARNING = "WARNING".freeze + NOTICE = "NOTICE".freeze + INFO = "INFO".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/fdx_notification_type.rb b/lib/plaid/models/fdx_notification_type.rb new file mode 100644 index 000000000..bcd15b303 --- /dev/null +++ b/lib/plaid/models/fdx_notification_type.rb @@ -0,0 +1,43 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class FDXNotificationType + CONSENT_REVOKED = "CONSENT_REVOKED".freeze + CONSENT_UPDATED = "CONSENT_UPDATED".freeze + CUSTOM = "CUSTOM".freeze + SERVICE = "SERVICE".freeze + BALANCE = "BALANCE".freeze + PLANNED_OUTAGE = "PLANNED_OUTAGE".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/verification_attribute.rb b/lib/plaid/models/fdx_party.rb similarity index 69% rename from lib/plaid/models/verification_attribute.rb rename to lib/plaid/models/fdx_party.rb index 08711667a..009768c93 100644 --- a/lib/plaid/models/verification_attribute.rb +++ b/lib/plaid/models/fdx_party.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,37 +14,37 @@ require 'time' module Plaid - # Details about a certain reason as to why a document could potentially be fraudulent - class VerificationAttribute - # Message indicating the reason as to why the verification failed + # FDX Participant - an entity or person that is a part of a FDX API transaction + class FDXParty + # Human recognizable common name + attr_accessor :name + attr_accessor :type - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end + # URI for party, where an end user could learn more about the company or application involved in the data sharing chain + attr_accessor :home_uri - def valid?(value) - !value || allowable_values.include?(value) - end - end + # URI for a logo asset to be displayed to the end user + attr_accessor :logo_uri + + attr_accessor :registry + + # Registered name of party + attr_accessor :registered_entity_name + + # Registered id of party + attr_accessor :registered_entity_id # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'type' => :'type' + :'name' => :'name', + :'type' => :'type', + :'home_uri' => :'homeUri', + :'logo_uri' => :'logoUri', + :'registry' => :'registry', + :'registered_entity_name' => :'registeredEntityName', + :'registered_entity_id' => :'registeredEntityId' } end @@ -56,14 +56,19 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'type' => :'String' + :'name' => :'String', + :'type' => :'FDXPartyType', + :'home_uri' => :'String', + :'logo_uri' => :'String', + :'registry' => :'FDXPartyRegistry', + :'registered_entity_name' => :'String', + :'registered_entity_id' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'type' ]) end @@ -71,53 +76,81 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::VerificationAttribute` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::FDXParty` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::VerificationAttribute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::FDXParty`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + if attributes.key?(:'type') self.type = attributes[:'type'] end + + if attributes.key?(:'home_uri') + self.home_uri = attributes[:'home_uri'] + end + + if attributes.key?(:'logo_uri') + self.logo_uri = attributes[:'logo_uri'] + end + + if attributes.key?(:'registry') + self.registry = attributes[:'registry'] + end + + if attributes.key?(:'registered_entity_name') + self.registered_entity_name = attributes[:'registered_entity_name'] + end + + if attributes.key?(:'registered_entity_id') + self.registered_entity_id = attributes[:'registered_entity_id'] + end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - type_validator = EnumAttributeValidator.new('String', ["VERIFICATION_ATTRIBUTE_TYPE_UNKNOWN", "VERIFICATION_ATTRIBUTE_TYPE_AMOUNT_MATCH", "VERIFICATION_ATTRIBUTE_TYPE_DATE_MATCH", "VERIFICATION_ATTRIBUTE_TYPE_DATE_MISMATCH", "VERIFICATION_ATTRIBUTE_TYPE_FILE_TAMPERING", "VERIFICATION_ATTRIBUTE_TYPE_DESCRIPTION_MATCH", "VERIFICATION_ATTRIBUTE_TYPE_DESCRIPTION_MISMATCH", "VERIFICATION_ATTRIBUTE_TYPE_FIRST_NAME_MATCH", "VERIFICATION_ATTRIBUTE_TYPE_FIRST_NAME_MISMATCH", "VERIFICATION_ATTRIBUTE_TYPE_LAST_NAME_MATCH", "VERIFICATION_ATTRIBUTE_TYPE_LAST_NAME_MISMATCH", "null"]) - return false unless type_validator.valid?(@type) + return false if @name.nil? + return false if @type.nil? true end - # Custom attribute writer method checking allowed values (enum). - # @param [Object] type Object to be assigned - def type=(type) - validator = EnumAttributeValidator.new('String', ["VERIFICATION_ATTRIBUTE_TYPE_UNKNOWN", "VERIFICATION_ATTRIBUTE_TYPE_AMOUNT_MATCH", "VERIFICATION_ATTRIBUTE_TYPE_DATE_MATCH", "VERIFICATION_ATTRIBUTE_TYPE_DATE_MISMATCH", "VERIFICATION_ATTRIBUTE_TYPE_FILE_TAMPERING", "VERIFICATION_ATTRIBUTE_TYPE_DESCRIPTION_MATCH", "VERIFICATION_ATTRIBUTE_TYPE_DESCRIPTION_MISMATCH", "VERIFICATION_ATTRIBUTE_TYPE_FIRST_NAME_MATCH", "VERIFICATION_ATTRIBUTE_TYPE_FIRST_NAME_MISMATCH", "VERIFICATION_ATTRIBUTE_TYPE_LAST_NAME_MATCH", "VERIFICATION_ATTRIBUTE_TYPE_LAST_NAME_MISMATCH", "null"]) - unless validator.valid?(type) - fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." - end - @type = type - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && - type == o.type + name == o.name && + type == o.type && + home_uri == o.home_uri && + logo_uri == o.logo_uri && + registry == o.registry && + registered_entity_name == o.registered_entity_name && + registered_entity_id == o.registered_entity_id end # @see the `==` method @@ -129,7 +162,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type].hash + [name, type, home_uri, logo_uri, registry, registered_entity_name, registered_entity_id].hash end # Builds the object from hash diff --git a/lib/plaid/models/fdx_party_registry.rb b/lib/plaid/models/fdx_party_registry.rb new file mode 100644 index 000000000..c745e32d4 --- /dev/null +++ b/lib/plaid/models/fdx_party_registry.rb @@ -0,0 +1,41 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class FDXPartyRegistry + FDX = "FDX".freeze + GLEIF = "GLEIF".freeze + ICANN = "ICANN".freeze + PRIVATE = "PRIVATE".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/fdx_party_type.rb b/lib/plaid/models/fdx_party_type.rb new file mode 100644 index 000000000..8eacec253 --- /dev/null +++ b/lib/plaid/models/fdx_party_type.rb @@ -0,0 +1,43 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class FDXPartyType + DATA_ACCESS_PLATFORM = "DATA_ACCESS_PLATFORM".freeze + DATA_PROVIDER = "DATA_PROVIDER".freeze + DATA_RECIPIENT = "DATA_RECIPIENT".freeze + INDIVIDUAL = "INDIVIDUAL".freeze + MERCHANT = "MERCHANT".freeze + VENDOR = "VENDOR".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/fdxfi_attribute.rb b/lib/plaid/models/fdxfi_attribute.rb new file mode 100644 index 000000000..aa19058a9 --- /dev/null +++ b/lib/plaid/models/fdxfi_attribute.rb @@ -0,0 +1,230 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Financial Institution provider-specific attribute + class FDXFiAttribute + # Name of attribute + attr_accessor :name + + # Value of attribute + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'value' => :'value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::FDXFiAttribute` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::FDXFiAttribute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/form1099_type.rb b/lib/plaid/models/form1099_type.rb index 1428689f8..80536d3b7 100644 --- a/lib/plaid/models/form1099_type.rb +++ b/lib/plaid/models/form1099_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/generic_screening_hit_location_items.rb b/lib/plaid/models/generic_screening_hit_location_items.rb index 66492245e..198b6aca5 100644 --- a/lib/plaid/models/generic_screening_hit_location_items.rb +++ b/lib/plaid/models/generic_screening_hit_location_items.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/health_incident.rb b/lib/plaid/models/health_incident.rb index 14c8e6fbc..13743db2f 100644 --- a/lib/plaid/models/health_incident.rb +++ b/lib/plaid/models/health_incident.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/historical_balance.rb b/lib/plaid/models/historical_balance.rb index ec27eb9ec..250c68e69 100644 --- a/lib/plaid/models/historical_balance.rb +++ b/lib/plaid/models/historical_balance.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/historical_update_webhook.rb b/lib/plaid/models/historical_update_webhook.rb index 6f04e8e26..5ee858f30 100644 --- a/lib/plaid/models/historical_update_webhook.rb +++ b/lib/plaid/models/historical_update_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -30,6 +30,8 @@ class HistoricalUpdateWebhook # The `item_id` of the Item associated with this webhook, warning, or error attr_accessor :item_id + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -37,7 +39,8 @@ def self.attribute_map :'webhook_code' => :'webhook_code', :'error' => :'error', :'new_transactions' => :'new_transactions', - :'item_id' => :'item_id' + :'item_id' => :'item_id', + :'environment' => :'environment' } end @@ -53,7 +56,8 @@ def self.openapi_types :'webhook_code' => :'String', :'error' => :'PlaidError', :'new_transactions' => :'Float', - :'item_id' => :'String' + :'item_id' => :'String', + :'environment' => :'WebhookEnvironmentValues' } end @@ -98,6 +102,10 @@ def initialize(attributes = {}) if attributes.key?(:'item_id') self.item_id = attributes[:'item_id'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -120,6 +128,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "item_id", item_id cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -130,6 +142,7 @@ def valid? return false if @webhook_code.nil? return false if @new_transactions.nil? return false if @item_id.nil? + return false if @environment.nil? true end @@ -142,7 +155,8 @@ def ==(o) webhook_code == o.webhook_code && error == o.error && new_transactions == o.new_transactions && - item_id == o.item_id + item_id == o.item_id && + environment == o.environment end # @see the `==` method @@ -154,7 +168,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, error, new_transactions, item_id].hash + [webhook_type, webhook_code, error, new_transactions, item_id, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/holding.rb b/lib/plaid/models/holding.rb index c72f1568b..12f8e7d96 100644 --- a/lib/plaid/models/holding.rb +++ b/lib/plaid/models/holding.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/holdings_default_update_webhook.rb b/lib/plaid/models/holdings_default_update_webhook.rb index 30fb8d0fe..b701f81bb 100644 --- a/lib/plaid/models/holdings_default_update_webhook.rb +++ b/lib/plaid/models/holdings_default_update_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - # Fired when new or updated holdings have been detected on an investment account. The webhook typically fires once per day, after market close, in response to any newly added holdings or price changes to existing holdings. + # Fired when new or updated holdings have been detected on an investment account. The webhook typically fires in response to any newly added holdings or price changes to existing holdings, most commonly after market close. class HoldingsDefaultUpdateWebhook # `HOLDINGS` attr_accessor :webhook_type @@ -33,6 +33,8 @@ class HoldingsDefaultUpdateWebhook # The number of updated holdings reported since the last time this webhook was fired. attr_accessor :updated_holdings + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -41,7 +43,8 @@ def self.attribute_map :'item_id' => :'item_id', :'error' => :'error', :'new_holdings' => :'new_holdings', - :'updated_holdings' => :'updated_holdings' + :'updated_holdings' => :'updated_holdings', + :'environment' => :'environment' } end @@ -58,7 +61,8 @@ def self.openapi_types :'item_id' => :'String', :'error' => :'PlaidError', :'new_holdings' => :'Float', - :'updated_holdings' => :'Float' + :'updated_holdings' => :'Float', + :'environment' => :'WebhookEnvironmentValues' } end @@ -107,6 +111,10 @@ def initialize(attributes = {}) if attributes.key?(:'updated_holdings') self.updated_holdings = attributes[:'updated_holdings'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -133,6 +141,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "updated_holdings", updated_holdings cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -144,6 +156,7 @@ def valid? return false if @item_id.nil? return false if @new_holdings.nil? return false if @updated_holdings.nil? + return false if @environment.nil? true end @@ -157,7 +170,8 @@ def ==(o) item_id == o.item_id && error == o.error && new_holdings == o.new_holdings && - updated_holdings == o.updated_holdings + updated_holdings == o.updated_holdings && + environment == o.environment end # @see the `==` method @@ -169,7 +183,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, item_id, error, new_holdings, updated_holdings].hash + [webhook_type, webhook_code, item_id, error, new_holdings, updated_holdings, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/holdings_override.rb b/lib/plaid/models/holdings_override.rb index a2ec14309..9b1b17467 100644 --- a/lib/plaid/models/holdings_override.rb +++ b/lib/plaid/models/holdings_override.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/id_number_type.rb b/lib/plaid/models/id_number_type.rb index 6922a8f1b..541c7be52 100644 --- a/lib/plaid/models/id_number_type.rb +++ b/lib/plaid/models/id_number_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/identity_default_update_webhook.rb b/lib/plaid/models/identity_default_update_webhook.rb index bb8bcccb1..bf6177c6b 100644 --- a/lib/plaid/models/identity_default_update_webhook.rb +++ b/lib/plaid/models/identity_default_update_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -30,6 +30,8 @@ class IdentityDefaultUpdateWebhook attr_accessor :error + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -37,7 +39,8 @@ def self.attribute_map :'webhook_code' => :'webhook_code', :'item_id' => :'item_id', :'account_ids_with_updated_identity' => :'account_ids_with_updated_identity', - :'error' => :'error' + :'error' => :'error', + :'environment' => :'environment' } end @@ -53,14 +56,15 @@ def self.openapi_types :'webhook_code' => :'String', :'item_id' => :'String', :'account_ids_with_updated_identity' => :'Hash>', - :'error' => :'PlaidError' + :'error' => :'PlaidError', + :'environment' => :'WebhookEnvironmentValues' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'error' + :'error', ]) end @@ -100,6 +104,10 @@ def initialize(attributes = {}) if attributes.key?(:'error') self.error = attributes[:'error'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -122,6 +130,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "account_ids_with_updated_identity", account_ids_with_updated_identity cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -132,6 +144,7 @@ def valid? return false if @webhook_code.nil? return false if @item_id.nil? return false if @account_ids_with_updated_identity.nil? + return false if @environment.nil? true end @@ -144,7 +157,8 @@ def ==(o) webhook_code == o.webhook_code && item_id == o.item_id && account_ids_with_updated_identity == o.account_ids_with_updated_identity && - error == o.error + error == o.error && + environment == o.environment end # @see the `==` method @@ -156,7 +170,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, item_id, account_ids_with_updated_identity, error].hash + [webhook_type, webhook_code, item_id, account_ids_with_updated_identity, error, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/identity_get_request.rb b/lib/plaid/models/identity_get_request.rb index 54ce9663e..7c254b537 100644 --- a/lib/plaid/models/identity_get_request.rb +++ b/lib/plaid/models/identity_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/identity_get_request_options.rb b/lib/plaid/models/identity_get_request_options.rb index 472f380b1..eb0969148 100644 --- a/lib/plaid/models/identity_get_request_options.rb +++ b/lib/plaid/models/identity_get_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/identity_get_response.rb b/lib/plaid/models/identity_get_response.rb index 549eadc73..1e63d9ea5 100644 --- a/lib/plaid/models/identity_get_response.rb +++ b/lib/plaid/models/identity_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/identity_match_request.rb b/lib/plaid/models/identity_match_request.rb index b59c15404..d3d3e173c 100644 --- a/lib/plaid/models/identity_match_request.rb +++ b/lib/plaid/models/identity_match_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/identity_match_request_options.rb b/lib/plaid/models/identity_match_request_options.rb index 6f81f8078..ff8f98048 100644 --- a/lib/plaid/models/identity_match_request_options.rb +++ b/lib/plaid/models/identity_match_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/identity_match_response.rb b/lib/plaid/models/identity_match_response.rb index 7762398ce..51a00eb3b 100644 --- a/lib/plaid/models/identity_match_response.rb +++ b/lib/plaid/models/identity_match_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -16,12 +16,19 @@ module Plaid # IdentityMatchResponse defines the response schema for `/identity/match` class IdentityMatchResponse + # The accounts for which Identity match has been requested + attr_accessor :accounts + + attr_accessor :item + # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. attr_accessor :request_id # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'accounts' => :'accounts', + :'item' => :'item', :'request_id' => :'request_id' } end @@ -34,6 +41,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'accounts' => :'Array', + :'item' => :'Item', :'request_id' => :'String' } end @@ -59,6 +68,16 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'accounts') + if (value = attributes[:'accounts']).is_a?(Array) + self.accounts = value + end + end + + if attributes.key?(:'item') + self.item = attributes[:'item'] + end + if attributes.key?(:'request_id') self.request_id = attributes[:'request_id'] end @@ -68,12 +87,27 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @accounts.nil? + invalid_properties.push('invalid value for "accounts", accounts cannot be nil.') + end + + if @item.nil? + invalid_properties.push('invalid value for "item", item cannot be nil.') + end + + if @request_id.nil? + invalid_properties.push('invalid value for "request_id", request_id cannot be nil.') + end + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if @accounts.nil? + return false if @item.nil? + return false if @request_id.nil? true end @@ -82,6 +116,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + accounts == o.accounts && + item == o.item && request_id == o.request_id end @@ -94,7 +130,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [request_id].hash + [accounts, item, request_id].hash end # Builds the object from hash diff --git a/lib/plaid/models/identity_match_user.rb b/lib/plaid/models/identity_match_user.rb index c620e6bb7..5925e77e9 100644 --- a/lib/plaid/models/identity_match_user.rb +++ b/lib/plaid/models/identity_match_user.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/identity_update_types.rb b/lib/plaid/models/identity_update_types.rb index 624f21cdb..0116801fb 100644 --- a/lib/plaid/models/identity_update_types.rb +++ b/lib/plaid/models/identity_update_types.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/identity_verification.rb b/lib/plaid/models/identity_verification.rb index e07cda026..51fdaca1f 100644 --- a/lib/plaid/models/identity_verification.rb +++ b/lib/plaid/models/identity_verification.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -46,6 +46,7 @@ class IdentityVerification attr_accessor :kyc_check + # ID of the associated screening. attr_accessor :watchlist_screening_id # Attribute mapping from ruby-style variable name to JSON key. @@ -187,11 +188,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if @client_user_id !~ pattern - invalid_properties.push("invalid value for \"client_user_id\", must conform to the pattern #{pattern}.") - end - if @created_at.nil? invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') @@ -222,7 +218,6 @@ def valid? return false if @id.nil? return false if @client_user_id.nil? return false if @client_user_id.to_s.length < 1 - return false if @client_user_id !~ Regexp.new(/^\S+(\s+\S+)*$/) return false if @created_at.nil? return false if @template.nil? return false if @user.nil? @@ -242,11 +237,6 @@ def client_user_id=(client_user_id) fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if client_user_id !~ pattern - fail ArgumentError, "invalid value for \"client_user_id\", must conform to the pattern #{pattern}." - end - @client_user_id = client_user_id end diff --git a/lib/plaid/models/identity_verification_create_request.rb b/lib/plaid/models/identity_verification_create_request.rb index 0f5e3f17a..d614b8ab3 100644 --- a/lib/plaid/models/identity_verification_create_request.rb +++ b/lib/plaid/models/identity_verification_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/identity_verification_response.rb b/lib/plaid/models/identity_verification_create_response.rb similarity index 94% rename from lib/plaid/models/identity_verification_response.rb rename to lib/plaid/models/identity_verification_create_response.rb index 556b47d5f..62850dce3 100644 --- a/lib/plaid/models/identity_verification_response.rb +++ b/lib/plaid/models/identity_verification_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # A identity verification attempt represents a customer's attempt to verify their identity, reflecting the required steps for completing the session, the results for each step, and information collected in the process. - class IdentityVerificationResponse + class IdentityVerificationCreateResponse # ID of the associated Identity Verification attempt. attr_accessor :id @@ -46,6 +46,7 @@ class IdentityVerificationResponse attr_accessor :kyc_check + # ID of the associated screening. attr_accessor :watchlist_screening_id # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. @@ -112,13 +113,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::IdentityVerificationResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::IdentityVerificationCreateResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::IdentityVerificationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::IdentityVerificationCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -196,11 +197,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if @client_user_id !~ pattern - invalid_properties.push("invalid value for \"client_user_id\", must conform to the pattern #{pattern}.") - end - if @created_at.nil? invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') @@ -235,7 +231,6 @@ def valid? return false if @id.nil? return false if @client_user_id.nil? return false if @client_user_id.to_s.length < 1 - return false if @client_user_id !~ Regexp.new(/^\S+(\s+\S+)*$/) return false if @created_at.nil? return false if @template.nil? return false if @user.nil? @@ -256,11 +251,6 @@ def client_user_id=(client_user_id) fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if client_user_id !~ pattern - fail ArgumentError, "invalid value for \"client_user_id\", must conform to the pattern #{pattern}." - end - @client_user_id = client_user_id end diff --git a/lib/plaid/models/get_identity_verification_request.rb b/lib/plaid/models/identity_verification_get_request.rb similarity index 97% rename from lib/plaid/models/get_identity_verification_request.rb rename to lib/plaid/models/identity_verification_get_request.rb index f32e14379..d3c40d05f 100644 --- a/lib/plaid/models/get_identity_verification_request.rb +++ b/lib/plaid/models/identity_verification_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for fetching an identity verification - class GetIdentityVerificationRequest + class IdentityVerificationGetRequest # ID of the associated Identity Verification attempt. attr_accessor :identity_verification_id @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::GetIdentityVerificationRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::IdentityVerificationGetRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::GetIdentityVerificationRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::IdentityVerificationGetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/identity_verification_get_response.rb b/lib/plaid/models/identity_verification_get_response.rb new file mode 100644 index 000000000..092f88db2 --- /dev/null +++ b/lib/plaid/models/identity_verification_get_response.rb @@ -0,0 +1,411 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # A identity verification attempt represents a customer's attempt to verify their identity, reflecting the required steps for completing the session, the results for each step, and information collected in the process. + class IdentityVerificationGetResponse + # ID of the associated Identity Verification attempt. + attr_accessor :id + + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. + attr_accessor :client_user_id + + # An ISO8601 formatted timestamp. + attr_accessor :created_at + + # An ISO8601 formatted timestamp. + attr_accessor :completed_at + + # The ID for the Identity Verification preceding this session. This field will only be filled if the current Identity Verification is a retry of a previous attempt. + attr_accessor :previous_attempt_id + + # A shareable URL that can be sent directly to the user to complete verification + attr_accessor :shareable_url + + attr_accessor :template + + attr_accessor :user + + attr_accessor :status + + attr_accessor :steps + + attr_accessor :documentary_verification + + attr_accessor :kyc_check + + # ID of the associated screening. + attr_accessor :watchlist_screening_id + + # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. + attr_accessor :request_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'client_user_id' => :'client_user_id', + :'created_at' => :'created_at', + :'completed_at' => :'completed_at', + :'previous_attempt_id' => :'previous_attempt_id', + :'shareable_url' => :'shareable_url', + :'template' => :'template', + :'user' => :'user', + :'status' => :'status', + :'steps' => :'steps', + :'documentary_verification' => :'documentary_verification', + :'kyc_check' => :'kyc_check', + :'watchlist_screening_id' => :'watchlist_screening_id', + :'request_id' => :'request_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'client_user_id' => :'String', + :'created_at' => :'Time', + :'completed_at' => :'Time', + :'previous_attempt_id' => :'String', + :'shareable_url' => :'String', + :'template' => :'IdentityVerificationTemplateReference', + :'user' => :'IdentityVerificationUserData', + :'status' => :'IdentityVerificationStatus', + :'steps' => :'IdentityVerificationStepSummary', + :'documentary_verification' => :'DocumentaryVerification', + :'kyc_check' => :'KYCCheckDetails', + :'watchlist_screening_id' => :'String', + :'request_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'completed_at', + :'previous_attempt_id', + :'shareable_url', + :'documentary_verification', + :'kyc_check', + :'watchlist_screening_id', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::IdentityVerificationGetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::IdentityVerificationGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'client_user_id') + self.client_user_id = attributes[:'client_user_id'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'completed_at') + self.completed_at = attributes[:'completed_at'] + end + + if attributes.key?(:'previous_attempt_id') + self.previous_attempt_id = attributes[:'previous_attempt_id'] + end + + if attributes.key?(:'shareable_url') + self.shareable_url = attributes[:'shareable_url'] + end + + if attributes.key?(:'template') + self.template = attributes[:'template'] + end + + if attributes.key?(:'user') + self.user = attributes[:'user'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'steps') + self.steps = attributes[:'steps'] + end + + if attributes.key?(:'documentary_verification') + self.documentary_verification = attributes[:'documentary_verification'] + end + + if attributes.key?(:'kyc_check') + self.kyc_check = attributes[:'kyc_check'] + end + + if attributes.key?(:'watchlist_screening_id') + self.watchlist_screening_id = attributes[:'watchlist_screening_id'] + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @client_user_id.nil? + invalid_properties.push('invalid value for "client_user_id", client_user_id cannot be nil.') + end + + if @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @template.nil? + invalid_properties.push('invalid value for "template", template cannot be nil.') + end + + if @user.nil? + invalid_properties.push('invalid value for "user", user cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @steps.nil? + invalid_properties.push('invalid value for "steps", steps cannot be nil.') + end + + if @request_id.nil? + invalid_properties.push('invalid value for "request_id", request_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @client_user_id.nil? + return false if @client_user_id.to_s.length < 1 + return false if @created_at.nil? + return false if @template.nil? + return false if @user.nil? + return false if @status.nil? + return false if @steps.nil? + return false if @request_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if client_user_id.nil? + fail ArgumentError, 'client_user_id cannot be nil' + end + + if client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + client_user_id == o.client_user_id && + created_at == o.created_at && + completed_at == o.completed_at && + previous_attempt_id == o.previous_attempt_id && + shareable_url == o.shareable_url && + template == o.template && + user == o.user && + status == o.status && + steps == o.steps && + documentary_verification == o.documentary_verification && + kyc_check == o.kyc_check && + watchlist_screening_id == o.watchlist_screening_id && + request_id == o.request_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, client_user_id, created_at, completed_at, previous_attempt_id, shareable_url, template, user, status, steps, documentary_verification, kyc_check, watchlist_screening_id, request_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/list_identity_verification_request.rb b/lib/plaid/models/identity_verification_list_request.rb similarity index 92% rename from lib/plaid/models/list_identity_verification_request.rb rename to lib/plaid/models/identity_verification_list_request.rb index 362692836..83e7c599c 100644 --- a/lib/plaid/models/list_identity_verification_request.rb +++ b/lib/plaid/models/identity_verification_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for listing identity verifications - class ListIdentityVerificationRequest + class IdentityVerificationListRequest # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret @@ -69,13 +69,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ListIdentityVerificationRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::IdentityVerificationListRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ListIdentityVerificationRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::IdentityVerificationListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -117,11 +117,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if @client_user_id !~ pattern - invalid_properties.push("invalid value for \"client_user_id\", must conform to the pattern #{pattern}.") - end - invalid_properties end @@ -132,7 +127,6 @@ def valid? return false if @template_id.nil? return false if @client_user_id.nil? return false if @client_user_id.to_s.length < 1 - return false if @client_user_id !~ Regexp.new(/^\S+(\s+\S+)*$/) true end @@ -147,11 +141,6 @@ def client_user_id=(client_user_id) fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if client_user_id !~ pattern - fail ArgumentError, "invalid value for \"client_user_id\", must conform to the pattern #{pattern}." - end - @client_user_id = client_user_id end diff --git a/lib/plaid/models/paginated_identity_verification_list_response.rb b/lib/plaid/models/identity_verification_list_response.rb similarity index 95% rename from lib/plaid/models/paginated_identity_verification_list_response.rb rename to lib/plaid/models/identity_verification_list_response.rb index 8c9c05bf6..7789dafa0 100644 --- a/lib/plaid/models/paginated_identity_verification_list_response.rb +++ b/lib/plaid/models/identity_verification_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Paginated list of Plaid sessions. - class PaginatedIdentityVerificationListResponse + class IdentityVerificationListResponse # List of Plaid sessions attr_accessor :identity_verifications @@ -59,13 +59,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PaginatedIdentityVerificationListResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::IdentityVerificationListResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PaginatedIdentityVerificationListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::IdentityVerificationListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/identity_verification_request_user.rb b/lib/plaid/models/identity_verification_request_user.rb index 6a3baa4de..de9a07f55 100644 --- a/lib/plaid/models/identity_verification_request_user.rb +++ b/lib/plaid/models/identity_verification_request_user.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -19,6 +19,7 @@ class IdentityVerificationRequestUser # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. attr_accessor :client_user_id + # A valid email address. attr_accessor :email_address # A phone number in E.164 format. @@ -67,7 +68,6 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'email_address', :'phone_number', :'date_of_birth', :'name', @@ -132,17 +132,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if @client_user_id !~ pattern - invalid_properties.push("invalid value for \"client_user_id\", must conform to the pattern #{pattern}.") - end - - - pattern = Regexp.new(/^\+[1-9]\d{6,14}$/) - if !@phone_number.nil? && @phone_number !~ pattern - invalid_properties.push("invalid value for \"phone_number\", must conform to the pattern #{pattern}.") - end - invalid_properties end @@ -152,8 +141,6 @@ def list_invalid_properties def valid? return false if @client_user_id.nil? return false if @client_user_id.to_s.length < 1 - return false if @client_user_id !~ Regexp.new(/^\S+(\s+\S+)*$/) - return false if !@phone_number.nil? && @phone_number !~ Regexp.new(/^\+[1-9]\d{6,14}$/) true end @@ -168,27 +155,10 @@ def client_user_id=(client_user_id) fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if client_user_id !~ pattern - fail ArgumentError, "invalid value for \"client_user_id\", must conform to the pattern #{pattern}." - end - @client_user_id = client_user_id end - # Custom attribute writer method with validation - # @param [Object] phone_number Value to be assigned - def phone_number=(phone_number) - pattern = Regexp.new(/^\+[1-9]\d{6,14}$/) - if !phone_number.nil? && phone_number !~ pattern - fail ArgumentError, "invalid value for \"phone_number\", must conform to the pattern #{pattern}." - end - - - @phone_number = phone_number - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/plaid/models/identity_verification_retried_webhook.rb b/lib/plaid/models/identity_verification_retried_webhook.rb index bbf74084e..26d7cca74 100644 --- a/lib/plaid/models/identity_verification_retried_webhook.rb +++ b/lib/plaid/models/identity_verification_retried_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,12 +25,15 @@ class IdentityVerificationRetriedWebhook # The ID of the associated Identity Verification attempt. attr_accessor :identity_verification_id + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', - :'identity_verification_id' => :'identity_verification_id' + :'identity_verification_id' => :'identity_verification_id', + :'environment' => :'environment' } end @@ -44,14 +47,15 @@ def self.openapi_types { :'webhook_type' => :'String', :'webhook_code' => :'String', - :'identity_verification_id' => :'AnyType' + :'identity_verification_id' => :'AnyType', + :'environment' => :'WebhookEnvironmentValues' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'identity_verification_id' + :'identity_verification_id', ]) end @@ -81,6 +85,10 @@ def initialize(attributes = {}) if attributes.key?(:'identity_verification_id') self.identity_verification_id = attributes[:'identity_verification_id'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -95,6 +103,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "webhook_code", webhook_code cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -103,6 +115,7 @@ def list_invalid_properties def valid? return false if @webhook_type.nil? return false if @webhook_code.nil? + return false if @environment.nil? true end @@ -113,7 +126,8 @@ def ==(o) self.class == o.class && webhook_type == o.webhook_type && webhook_code == o.webhook_code && - identity_verification_id == o.identity_verification_id + identity_verification_id == o.identity_verification_id && + environment == o.environment end # @see the `==` method @@ -125,7 +139,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, identity_verification_id].hash + [webhook_type, webhook_code, identity_verification_id, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/identity_verification_retry_request.rb b/lib/plaid/models/identity_verification_retry_request.rb index 83e801980..7e8913531 100644 --- a/lib/plaid/models/identity_verification_retry_request.rb +++ b/lib/plaid/models/identity_verification_retry_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -120,11 +120,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if @client_user_id !~ pattern - invalid_properties.push("invalid value for \"client_user_id\", must conform to the pattern #{pattern}.") - end - if @template_id.nil? invalid_properties.push('invalid value for "template_id", template_id cannot be nil.') @@ -142,7 +137,6 @@ def list_invalid_properties def valid? return false if @client_user_id.nil? return false if @client_user_id.to_s.length < 1 - return false if @client_user_id !~ Regexp.new(/^\S+(\s+\S+)*$/) return false if @template_id.nil? return false if @strategy.nil? true @@ -159,11 +153,6 @@ def client_user_id=(client_user_id) fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if client_user_id !~ pattern - fail ArgumentError, "invalid value for \"client_user_id\", must conform to the pattern #{pattern}." - end - @client_user_id = client_user_id end diff --git a/lib/plaid/models/identity_verification_retry_request_steps_object.rb b/lib/plaid/models/identity_verification_retry_request_steps_object.rb index ebc0c70a8..c101f139c 100644 --- a/lib/plaid/models/identity_verification_retry_request_steps_object.rb +++ b/lib/plaid/models/identity_verification_retry_request_steps_object.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/identity_verification_retry_response.rb b/lib/plaid/models/identity_verification_retry_response.rb new file mode 100644 index 000000000..052ded876 --- /dev/null +++ b/lib/plaid/models/identity_verification_retry_response.rb @@ -0,0 +1,411 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # A identity verification attempt represents a customer's attempt to verify their identity, reflecting the required steps for completing the session, the results for each step, and information collected in the process. + class IdentityVerificationRetryResponse + # ID of the associated Identity Verification attempt. + attr_accessor :id + + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. + attr_accessor :client_user_id + + # An ISO8601 formatted timestamp. + attr_accessor :created_at + + # An ISO8601 formatted timestamp. + attr_accessor :completed_at + + # The ID for the Identity Verification preceding this session. This field will only be filled if the current Identity Verification is a retry of a previous attempt. + attr_accessor :previous_attempt_id + + # A shareable URL that can be sent directly to the user to complete verification + attr_accessor :shareable_url + + attr_accessor :template + + attr_accessor :user + + attr_accessor :status + + attr_accessor :steps + + attr_accessor :documentary_verification + + attr_accessor :kyc_check + + # ID of the associated screening. + attr_accessor :watchlist_screening_id + + # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. + attr_accessor :request_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'client_user_id' => :'client_user_id', + :'created_at' => :'created_at', + :'completed_at' => :'completed_at', + :'previous_attempt_id' => :'previous_attempt_id', + :'shareable_url' => :'shareable_url', + :'template' => :'template', + :'user' => :'user', + :'status' => :'status', + :'steps' => :'steps', + :'documentary_verification' => :'documentary_verification', + :'kyc_check' => :'kyc_check', + :'watchlist_screening_id' => :'watchlist_screening_id', + :'request_id' => :'request_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'client_user_id' => :'String', + :'created_at' => :'Time', + :'completed_at' => :'Time', + :'previous_attempt_id' => :'String', + :'shareable_url' => :'String', + :'template' => :'IdentityVerificationTemplateReference', + :'user' => :'IdentityVerificationUserData', + :'status' => :'IdentityVerificationStatus', + :'steps' => :'IdentityVerificationStepSummary', + :'documentary_verification' => :'DocumentaryVerification', + :'kyc_check' => :'KYCCheckDetails', + :'watchlist_screening_id' => :'String', + :'request_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'completed_at', + :'previous_attempt_id', + :'shareable_url', + :'documentary_verification', + :'kyc_check', + :'watchlist_screening_id', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::IdentityVerificationRetryResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::IdentityVerificationRetryResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'client_user_id') + self.client_user_id = attributes[:'client_user_id'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'completed_at') + self.completed_at = attributes[:'completed_at'] + end + + if attributes.key?(:'previous_attempt_id') + self.previous_attempt_id = attributes[:'previous_attempt_id'] + end + + if attributes.key?(:'shareable_url') + self.shareable_url = attributes[:'shareable_url'] + end + + if attributes.key?(:'template') + self.template = attributes[:'template'] + end + + if attributes.key?(:'user') + self.user = attributes[:'user'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'steps') + self.steps = attributes[:'steps'] + end + + if attributes.key?(:'documentary_verification') + self.documentary_verification = attributes[:'documentary_verification'] + end + + if attributes.key?(:'kyc_check') + self.kyc_check = attributes[:'kyc_check'] + end + + if attributes.key?(:'watchlist_screening_id') + self.watchlist_screening_id = attributes[:'watchlist_screening_id'] + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @client_user_id.nil? + invalid_properties.push('invalid value for "client_user_id", client_user_id cannot be nil.') + end + + if @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @template.nil? + invalid_properties.push('invalid value for "template", template cannot be nil.') + end + + if @user.nil? + invalid_properties.push('invalid value for "user", user cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @steps.nil? + invalid_properties.push('invalid value for "steps", steps cannot be nil.') + end + + if @request_id.nil? + invalid_properties.push('invalid value for "request_id", request_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @client_user_id.nil? + return false if @client_user_id.to_s.length < 1 + return false if @created_at.nil? + return false if @template.nil? + return false if @user.nil? + return false if @status.nil? + return false if @steps.nil? + return false if @request_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if client_user_id.nil? + fail ArgumentError, 'client_user_id cannot be nil' + end + + if client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + client_user_id == o.client_user_id && + created_at == o.created_at && + completed_at == o.completed_at && + previous_attempt_id == o.previous_attempt_id && + shareable_url == o.shareable_url && + template == o.template && + user == o.user && + status == o.status && + steps == o.steps && + documentary_verification == o.documentary_verification && + kyc_check == o.kyc_check && + watchlist_screening_id == o.watchlist_screening_id && + request_id == o.request_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, client_user_id, created_at, completed_at, previous_attempt_id, shareable_url, template, user, status, steps, documentary_verification, kyc_check, watchlist_screening_id, request_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/identity_verification_status.rb b/lib/plaid/models/identity_verification_status.rb index 682ebf043..2701f9e86 100644 --- a/lib/plaid/models/identity_verification_status.rb +++ b/lib/plaid/models/identity_verification_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/identity_verification_status_updated_webhook.rb b/lib/plaid/models/identity_verification_status_updated_webhook.rb index b8d4a132c..ce88bd270 100644 --- a/lib/plaid/models/identity_verification_status_updated_webhook.rb +++ b/lib/plaid/models/identity_verification_status_updated_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,12 +25,15 @@ class IdentityVerificationStatusUpdatedWebhook # The ID of the associated Identity Verification attempt. attr_accessor :identity_verification_id + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', - :'identity_verification_id' => :'identity_verification_id' + :'identity_verification_id' => :'identity_verification_id', + :'environment' => :'environment' } end @@ -44,14 +47,15 @@ def self.openapi_types { :'webhook_type' => :'String', :'webhook_code' => :'String', - :'identity_verification_id' => :'AnyType' + :'identity_verification_id' => :'AnyType', + :'environment' => :'WebhookEnvironmentValues' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'identity_verification_id' + :'identity_verification_id', ]) end @@ -81,6 +85,10 @@ def initialize(attributes = {}) if attributes.key?(:'identity_verification_id') self.identity_verification_id = attributes[:'identity_verification_id'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -95,6 +103,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "webhook_code", webhook_code cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -103,6 +115,7 @@ def list_invalid_properties def valid? return false if @webhook_type.nil? return false if @webhook_code.nil? + return false if @environment.nil? true end @@ -113,7 +126,8 @@ def ==(o) self.class == o.class && webhook_type == o.webhook_type && webhook_code == o.webhook_code && - identity_verification_id == o.identity_verification_id + identity_verification_id == o.identity_verification_id && + environment == o.environment end # @see the `==` method @@ -125,7 +139,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, identity_verification_id].hash + [webhook_type, webhook_code, identity_verification_id, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/identity_verification_step_status.rb b/lib/plaid/models/identity_verification_step_status.rb index f26d5bd8c..cc7d78ae2 100644 --- a/lib/plaid/models/identity_verification_step_status.rb +++ b/lib/plaid/models/identity_verification_step_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/identity_verification_step_summary.rb b/lib/plaid/models/identity_verification_step_summary.rb index cc164fe93..0de6543ab 100644 --- a/lib/plaid/models/identity_verification_step_summary.rb +++ b/lib/plaid/models/identity_verification_step_summary.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/identity_verification_step_updated_webhook.rb b/lib/plaid/models/identity_verification_step_updated_webhook.rb index 318b90f18..75890a7f0 100644 --- a/lib/plaid/models/identity_verification_step_updated_webhook.rb +++ b/lib/plaid/models/identity_verification_step_updated_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,12 +25,15 @@ class IdentityVerificationStepUpdatedWebhook # The ID of the associated Identity Verification attempt. attr_accessor :identity_verification_id + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', - :'identity_verification_id' => :'identity_verification_id' + :'identity_verification_id' => :'identity_verification_id', + :'environment' => :'environment' } end @@ -44,14 +47,15 @@ def self.openapi_types { :'webhook_type' => :'String', :'webhook_code' => :'String', - :'identity_verification_id' => :'AnyType' + :'identity_verification_id' => :'AnyType', + :'environment' => :'WebhookEnvironmentValues' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'identity_verification_id' + :'identity_verification_id', ]) end @@ -81,6 +85,10 @@ def initialize(attributes = {}) if attributes.key?(:'identity_verification_id') self.identity_verification_id = attributes[:'identity_verification_id'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -95,6 +103,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "webhook_code", webhook_code cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -103,6 +115,7 @@ def list_invalid_properties def valid? return false if @webhook_type.nil? return false if @webhook_code.nil? + return false if @environment.nil? true end @@ -113,7 +126,8 @@ def ==(o) self.class == o.class && webhook_type == o.webhook_type && webhook_code == o.webhook_code && - identity_verification_id == o.identity_verification_id + identity_verification_id == o.identity_verification_id && + environment == o.environment end # @see the `==` method @@ -125,7 +139,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, identity_verification_id].hash + [webhook_type, webhook_code, identity_verification_id, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/identity_verification_template_reference.rb b/lib/plaid/models/identity_verification_template_reference.rb index 831e717e3..4044cbca4 100644 --- a/lib/plaid/models/identity_verification_template_reference.rb +++ b/lib/plaid/models/identity_verification_template_reference.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/identity_verification_user_address.rb b/lib/plaid/models/identity_verification_user_address.rb index 717ce2c94..b6037898e 100644 --- a/lib/plaid/models/identity_verification_user_address.rb +++ b/lib/plaid/models/identity_verification_user_address.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,17 +14,21 @@ require 'time' module Plaid - # Even if an address has been collected, some fields may be null depending on the region's addressing system. For example: * Addresses from the United Kingdom will not include a region * Addresses from Hong Kong will not include postal code + # Even if an address has been collected, some fields may be null depending on the region's addressing system. For example: Addresses from the United Kingdom will not include a region Addresses from Hong Kong will not include postal code class IdentityVerificationUserAddress + # The primary street portion of an address. If the user has submitted their address, this field will always be filled. attr_accessor :street # Extra street information, like an apartment or suite number. attr_accessor :street2 + # City from the end user's address attr_accessor :city + # An ISO 3166-2 subdivision code. Related terms would be \"state\", \"province\", \"prefecture\", \"zone\", \"subdivision\", etc. attr_accessor :region + # The postal code for the associated address. Between 2 and 10 alphanumeric characters. For US-based addresses this must be 5 numeric digits. attr_accessor :postal_code # Valid, capitalized, two-letter ISO code representing the country of this object. Must be in ISO 3166-1 alpha-2 form. @@ -122,11 +126,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "country", the character length must be great than or equal to 2.') end - pattern = Regexp.new(/^[A-Z]{2}$/) - if @country !~ pattern - invalid_properties.push("invalid value for \"country\", must conform to the pattern #{pattern}.") - end - invalid_properties end @@ -136,7 +135,6 @@ def list_invalid_properties def valid? return false if @country.nil? return false if @country.to_s.length < 2 - return false if @country !~ Regexp.new(/^[A-Z]{2}$/) true end @@ -151,11 +149,6 @@ def country=(country) fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 2.' end - pattern = Regexp.new(/^[A-Z]{2}$/) - if country !~ pattern - fail ArgumentError, "invalid value for \"country\", must conform to the pattern #{pattern}." - end - @country = country end diff --git a/lib/plaid/models/identity_verification_user_data.rb b/lib/plaid/models/identity_verification_user_data.rb index de5ecd03a..d56e014e8 100644 --- a/lib/plaid/models/identity_verification_user_data.rb +++ b/lib/plaid/models/identity_verification_user_data.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,6 +25,7 @@ class IdentityVerificationUserData # An IPv4 or IPV6 address. attr_accessor :ip_address + # A valid email address. attr_accessor :email_address attr_accessor :name @@ -125,34 +126,15 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - pattern = Regexp.new(/^\+[1-9]\d{6,14}$/) - if @phone_number !~ pattern - invalid_properties.push("invalid value for \"phone_number\", must conform to the pattern #{pattern}.") - end - - invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @phone_number !~ Regexp.new(/^\+[1-9]\d{6,14}$/) true end - # Custom attribute writer method with validation - # @param [Object] phone_number Value to be assigned - def phone_number=(phone_number) - pattern = Regexp.new(/^\+[1-9]\d{6,14}$/) - if phone_number !~ pattern - fail ArgumentError, "invalid value for \"phone_number\", must conform to the pattern #{pattern}." - end - - - @phone_number = phone_number - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/plaid/models/image_quality.rb b/lib/plaid/models/image_quality.rb index d11436fd6..35f2d0a2a 100644 --- a/lib/plaid/models/image_quality.rb +++ b/lib/plaid/models/image_quality.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/incident_update.rb b/lib/plaid/models/incident_update.rb index 04d601441..b5fe26d1b 100644 --- a/lib/plaid/models/incident_update.rb +++ b/lib/plaid/models/incident_update.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_breakdown.rb b/lib/plaid/models/income_breakdown.rb index 18a4470e2..3b34c9daf 100644 --- a/lib/plaid/models/income_breakdown.rb +++ b/lib/plaid/models/income_breakdown.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_breakdown_type.rb b/lib/plaid/models/income_breakdown_type.rb index d208c4dc4..1bf14e4e9 100644 --- a/lib/plaid/models/income_breakdown_type.rb +++ b/lib/plaid/models/income_breakdown_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_override.rb b/lib/plaid/models/income_override.rb index 24aee2fcd..be22f55fd 100644 --- a/lib/plaid/models/income_override.rb +++ b/lib/plaid/models/income_override.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_summary.rb b/lib/plaid/models/income_summary.rb index b062f1da1..c9eb021ab 100644 --- a/lib/plaid/models/income_summary.rb +++ b/lib/plaid/models/income_summary.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_summary_field_number.rb b/lib/plaid/models/income_summary_field_number.rb index 7e1e354c3..b94b4b176 100644 --- a/lib/plaid/models/income_summary_field_number.rb +++ b/lib/plaid/models/income_summary_field_number.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_summary_field_string.rb b/lib/plaid/models/income_summary_field_string.rb index da5f7e9aa..91c1083ec 100644 --- a/lib/plaid/models/income_summary_field_string.rb +++ b/lib/plaid/models/income_summary_field_string.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_create_request.rb b/lib/plaid/models/income_verification_create_request.rb index dac436d51..8334a3c31 100644 --- a/lib/plaid/models/income_verification_create_request.rb +++ b/lib/plaid/models/income_verification_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_create_request_options.rb b/lib/plaid/models/income_verification_create_request_options.rb index 820f2f7e9..aa864eec3 100644 --- a/lib/plaid/models/income_verification_create_request_options.rb +++ b/lib/plaid/models/income_verification_create_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_create_response.rb b/lib/plaid/models/income_verification_create_response.rb index 772672ccb..e57fea8c1 100644 --- a/lib/plaid/models/income_verification_create_response.rb +++ b/lib/plaid/models/income_verification_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_documents_download_request.rb b/lib/plaid/models/income_verification_documents_download_request.rb index bc8bb65d4..5956d4385 100644 --- a/lib/plaid/models/income_verification_documents_download_request.rb +++ b/lib/plaid/models/income_verification_documents_download_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_payroll_flow_type.rb b/lib/plaid/models/income_verification_payroll_flow_type.rb index 2a9a90ef0..7fd7c97b7 100644 --- a/lib/plaid/models/income_verification_payroll_flow_type.rb +++ b/lib/plaid/models/income_verification_payroll_flow_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_paystubs_get_request.rb b/lib/plaid/models/income_verification_paystubs_get_request.rb index 0e7a20802..bc95bc540 100644 --- a/lib/plaid/models/income_verification_paystubs_get_request.rb +++ b/lib/plaid/models/income_verification_paystubs_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_paystubs_get_response.rb b/lib/plaid/models/income_verification_paystubs_get_response.rb index c60695806..00d88ac04 100644 --- a/lib/plaid/models/income_verification_paystubs_get_response.rb +++ b/lib/plaid/models/income_verification_paystubs_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_precheck_confidence.rb b/lib/plaid/models/income_verification_precheck_confidence.rb index 410546ccb..dc35ec394 100644 --- a/lib/plaid/models/income_verification_precheck_confidence.rb +++ b/lib/plaid/models/income_verification_precheck_confidence.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_precheck_employer.rb b/lib/plaid/models/income_verification_precheck_employer.rb index fa720fcdc..1fb9ab0aa 100644 --- a/lib/plaid/models/income_verification_precheck_employer.rb +++ b/lib/plaid/models/income_verification_precheck_employer.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_precheck_employer_address.rb b/lib/plaid/models/income_verification_precheck_employer_address.rb index 78cc340c0..124e20669 100644 --- a/lib/plaid/models/income_verification_precheck_employer_address.rb +++ b/lib/plaid/models/income_verification_precheck_employer_address.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_precheck_employer_address_data.rb b/lib/plaid/models/income_verification_precheck_employer_address_data.rb index 333e26770..61f1a665e 100644 --- a/lib/plaid/models/income_verification_precheck_employer_address_data.rb +++ b/lib/plaid/models/income_verification_precheck_employer_address_data.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_precheck_military_info.rb b/lib/plaid/models/income_verification_precheck_military_info.rb index 45ddb00b9..f4555dc61 100644 --- a/lib/plaid/models/income_verification_precheck_military_info.rb +++ b/lib/plaid/models/income_verification_precheck_military_info.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_precheck_payroll_institution.rb b/lib/plaid/models/income_verification_precheck_payroll_institution.rb new file mode 100644 index 000000000..ec68314aa --- /dev/null +++ b/lib/plaid/models/income_verification_precheck_payroll_institution.rb @@ -0,0 +1,221 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Information about the end user's payroll institution + class IncomeVerificationPrecheckPayrollInstitution + # The name of payroll institution + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'name' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::IncomeVerificationPrecheckPayrollInstitution` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::IncomeVerificationPrecheckPayrollInstitution`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/income_verification_precheck_request.rb b/lib/plaid/models/income_verification_precheck_request.rb index 1a9722187..092685412 100644 --- a/lib/plaid/models/income_verification_precheck_request.rb +++ b/lib/plaid/models/income_verification_precheck_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -26,6 +26,8 @@ class IncomeVerificationPrecheckRequest attr_accessor :employer + attr_accessor :payroll_institution + attr_accessor :transactions_access_token # An array of access tokens corresponding to Items belonging to the user whose eligibility is being checked. Note that if the Items specified here are not already initialized with `transactions`, providing them in this field will cause these Items to be initialized with (and billed for) the Transactions product. @@ -40,6 +42,7 @@ def self.attribute_map :'secret' => :'secret', :'user' => :'user', :'employer' => :'employer', + :'payroll_institution' => :'payroll_institution', :'transactions_access_token' => :'transactions_access_token', :'transactions_access_tokens' => :'transactions_access_tokens', :'us_military_info' => :'us_military_info' @@ -58,6 +61,7 @@ def self.openapi_types :'secret' => :'String', :'user' => :'IncomeVerificationPrecheckUser', :'employer' => :'IncomeVerificationPrecheckEmployer', + :'payroll_institution' => :'IncomeVerificationPrecheckPayrollInstitution', :'transactions_access_token' => :'String', :'transactions_access_tokens' => :'Array', :'us_military_info' => :'IncomeVerificationPrecheckMilitaryInfo' @@ -69,6 +73,7 @@ def self.openapi_nullable Set.new([ :'user', :'employer', + :'payroll_institution', :'us_military_info' ]) end @@ -104,6 +109,10 @@ def initialize(attributes = {}) self.employer = attributes[:'employer'] end + if attributes.key?(:'payroll_institution') + self.payroll_institution = attributes[:'payroll_institution'] + end + if attributes.key?(:'transactions_access_token') self.transactions_access_token = attributes[:'transactions_access_token'] end @@ -141,6 +150,7 @@ def ==(o) secret == o.secret && user == o.user && employer == o.employer && + payroll_institution == o.payroll_institution && transactions_access_token == o.transactions_access_token && transactions_access_tokens == o.transactions_access_tokens && us_military_info == o.us_military_info @@ -155,7 +165,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, secret, user, employer, transactions_access_token, transactions_access_tokens, us_military_info].hash + [client_id, secret, user, employer, payroll_institution, transactions_access_token, transactions_access_tokens, us_military_info].hash end # Builds the object from hash diff --git a/lib/plaid/models/income_verification_precheck_response.rb b/lib/plaid/models/income_verification_precheck_response.rb index c14e01c2d..57fd150a2 100644 --- a/lib/plaid/models/income_verification_precheck_response.rb +++ b/lib/plaid/models/income_verification_precheck_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_precheck_user.rb b/lib/plaid/models/income_verification_precheck_user.rb index efeb5a5e5..805cd12ed 100644 --- a/lib/plaid/models/income_verification_precheck_user.rb +++ b/lib/plaid/models/income_verification_precheck_user.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_refresh_request.rb b/lib/plaid/models/income_verification_refresh_request.rb index f7b714ac8..a691fc7eb 100644 --- a/lib/plaid/models/income_verification_refresh_request.rb +++ b/lib/plaid/models/income_verification_refresh_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_refresh_response.rb b/lib/plaid/models/income_verification_refresh_response.rb index f8a61c193..a9bcb7813 100644 --- a/lib/plaid/models/income_verification_refresh_response.rb +++ b/lib/plaid/models/income_verification_refresh_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_source_type.rb b/lib/plaid/models/income_verification_source_type.rb index d510c85a9..3290baf54 100644 --- a/lib/plaid/models/income_verification_source_type.rb +++ b/lib/plaid/models/income_verification_source_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_status_webhook.rb b/lib/plaid/models/income_verification_status_webhook.rb index 0174e626f..97e8d6f0f 100644 --- a/lib/plaid/models/income_verification_status_webhook.rb +++ b/lib/plaid/models/income_verification_status_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -31,6 +31,8 @@ class IncomeVerificationStatusWebhook # `VERIFICATION_STATUS_PROCESSING_COMPLETE`: The income verification status processing has completed. If the user uploaded multiple documents, this webhook will fire when all documents have finished processing. Call the `/income/verification/paystubs/get` endpoint and check the document metadata to see which documents were successfully parsed. `VERIFICATION_STATUS_PROCESSING_FAILED`: A failure occurred when attempting to process the verification documentation. `VERIFICATION_STATUS_PENDING_APPROVAL`: The income verification has been sent to the user for review. attr_accessor :verification_status + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -38,7 +40,8 @@ def self.attribute_map :'webhook_code' => :'webhook_code', :'item_id' => :'item_id', :'user_id' => :'user_id', - :'verification_status' => :'verification_status' + :'verification_status' => :'verification_status', + :'environment' => :'environment' } end @@ -54,7 +57,8 @@ def self.openapi_types :'webhook_code' => :'String', :'item_id' => :'String', :'user_id' => :'String', - :'verification_status' => :'String' + :'verification_status' => :'String', + :'environment' => :'WebhookEnvironmentValues' } end @@ -98,6 +102,10 @@ def initialize(attributes = {}) if attributes.key?(:'verification_status') self.verification_status = attributes[:'verification_status'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -120,6 +128,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "verification_status", verification_status cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -130,6 +142,7 @@ def valid? return false if @webhook_code.nil? return false if @item_id.nil? return false if @verification_status.nil? + return false if @environment.nil? true end @@ -142,7 +155,8 @@ def ==(o) webhook_code == o.webhook_code && item_id == o.item_id && user_id == o.user_id && - verification_status == o.verification_status + verification_status == o.verification_status && + environment == o.environment end # @see the `==` method @@ -154,7 +168,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, item_id, user_id, verification_status].hash + [webhook_type, webhook_code, item_id, user_id, verification_status, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/income_verification_taxforms_get_request.rb b/lib/plaid/models/income_verification_taxforms_get_request.rb index 8471a14b6..eaf558146 100644 --- a/lib/plaid/models/income_verification_taxforms_get_request.rb +++ b/lib/plaid/models/income_verification_taxforms_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_taxforms_get_response.rb b/lib/plaid/models/income_verification_taxforms_get_response.rb index c517288c7..55c2262bb 100644 --- a/lib/plaid/models/income_verification_taxforms_get_response.rb +++ b/lib/plaid/models/income_verification_taxforms_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_webhook_status.rb b/lib/plaid/models/income_verification_webhook_status.rb index d25b68255..e9f76b26a 100644 --- a/lib/plaid/models/income_verification_webhook_status.rb +++ b/lib/plaid/models/income_verification_webhook_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/individual_name.rb b/lib/plaid/models/individual_name.rb new file mode 100644 index 000000000..1b81e2e15 --- /dev/null +++ b/lib/plaid/models/individual_name.rb @@ -0,0 +1,240 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Parent container for name that allows for choice group between parsed and unparsed containers.Parent container for name that allows for choice group between parsed and unparsed containers. + class IndividualName + # The first name of the individual represented by the parent object. + attr_accessor :first_name + + # The last name of the individual represented by the parent object. + attr_accessor :last_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'first_name' => :'FirstName', + :'last_name' => :'LastName' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'first_name' => :'String', + :'last_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::IndividualName` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::IndividualName`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'first_name') + self.first_name = attributes[:'first_name'] + end + + if attributes.key?(:'last_name') + self.last_name = attributes[:'last_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @first_name.nil? + invalid_properties.push('invalid value for "first_name", first_name cannot be nil.') + end + + if @last_name.nil? + invalid_properties.push('invalid value for "last_name", last_name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @first_name.nil? + return false if @last_name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + first_name == o.first_name && + last_name == o.last_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [first_name, last_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/individual_screening_hit_names.rb b/lib/plaid/models/individual_screening_hit_names.rb index 30bf237e5..97749dcc1 100644 --- a/lib/plaid/models/individual_screening_hit_names.rb +++ b/lib/plaid/models/individual_screening_hit_names.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/individual_watchlist_code.rb b/lib/plaid/models/individual_watchlist_code.rb index a47ae04cc..ab90f1f6c 100644 --- a/lib/plaid/models/individual_watchlist_code.rb +++ b/lib/plaid/models/individual_watchlist_code.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/individual_watchlist_program.rb b/lib/plaid/models/individual_watchlist_program.rb index eb59965f2..d8666e4b7 100644 --- a/lib/plaid/models/individual_watchlist_program.rb +++ b/lib/plaid/models/individual_watchlist_program.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -156,11 +156,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if @name !~ pattern - invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.") - end - if @name_sensitivity.nil? invalid_properties.push('invalid value for "name_sensitivity", name_sensitivity cannot be nil.') @@ -186,7 +181,6 @@ def valid? return false if @lists_enabled.nil? return false if @name.nil? return false if @name.to_s.length < 1 - return false if @name !~ Regexp.new(/^\S+(\s+\S+)*$/) return false if @name_sensitivity.nil? return false if @audit_trail.nil? return false if @is_archived.nil? @@ -215,11 +209,6 @@ def name=(name) fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if name !~ pattern - fail ArgumentError, "invalid value for \"name\", must conform to the pattern #{pattern}." - end - @name = name end diff --git a/lib/plaid/models/inflow_model.rb b/lib/plaid/models/inflow_model.rb index 60f663ef8..4d317a9a7 100644 --- a/lib/plaid/models/inflow_model.rb +++ b/lib/plaid/models/inflow_model.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/initial_update_webhook.rb b/lib/plaid/models/initial_update_webhook.rb index d75b58fa7..ea7d0e74a 100644 --- a/lib/plaid/models/initial_update_webhook.rb +++ b/lib/plaid/models/initial_update_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -31,6 +31,8 @@ class InitialUpdateWebhook # The `item_id` of the Item associated with this webhook, warning, or error attr_accessor :item_id + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -38,7 +40,8 @@ def self.attribute_map :'webhook_code' => :'webhook_code', :'error' => :'error', :'new_transactions' => :'new_transactions', - :'item_id' => :'item_id' + :'item_id' => :'item_id', + :'environment' => :'environment' } end @@ -54,7 +57,8 @@ def self.openapi_types :'webhook_code' => :'String', :'error' => :'String', :'new_transactions' => :'Float', - :'item_id' => :'String' + :'item_id' => :'String', + :'environment' => :'WebhookEnvironmentValues' } end @@ -99,6 +103,10 @@ def initialize(attributes = {}) if attributes.key?(:'item_id') self.item_id = attributes[:'item_id'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -121,6 +129,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "item_id", item_id cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -131,6 +143,7 @@ def valid? return false if @webhook_code.nil? return false if @new_transactions.nil? return false if @item_id.nil? + return false if @environment.nil? true end @@ -143,7 +156,8 @@ def ==(o) webhook_code == o.webhook_code && error == o.error && new_transactions == o.new_transactions && - item_id == o.item_id + item_id == o.item_id && + environment == o.environment end # @see the `==` method @@ -155,7 +169,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, error, new_transactions, item_id].hash + [webhook_type, webhook_code, error, new_transactions, item_id, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/institution.rb b/lib/plaid/models/institution.rb index 6fff59fa7..54a23cf6c 100644 --- a/lib/plaid/models/institution.rb +++ b/lib/plaid/models/institution.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/institution_status.rb b/lib/plaid/models/institution_status.rb index 412bbc879..c6b99605c 100644 --- a/lib/plaid/models/institution_status.rb +++ b/lib/plaid/models/institution_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/institutions_get_by_id_request.rb b/lib/plaid/models/institutions_get_by_id_request.rb index 3044ebbcd..ec3f612d3 100644 --- a/lib/plaid/models/institutions_get_by_id_request.rb +++ b/lib/plaid/models/institutions_get_by_id_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/institutions_get_by_id_request_options.rb b/lib/plaid/models/institutions_get_by_id_request_options.rb index 75e100112..1cc2f1e6f 100644 --- a/lib/plaid/models/institutions_get_by_id_request_options.rb +++ b/lib/plaid/models/institutions_get_by_id_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/institutions_get_by_id_response.rb b/lib/plaid/models/institutions_get_by_id_response.rb index 254cb55fc..abbd86051 100644 --- a/lib/plaid/models/institutions_get_by_id_response.rb +++ b/lib/plaid/models/institutions_get_by_id_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/institutions_get_request.rb b/lib/plaid/models/institutions_get_request.rb index 495d4a7be..df81e2e62 100644 --- a/lib/plaid/models/institutions_get_request.rb +++ b/lib/plaid/models/institutions_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/institutions_get_request_options.rb b/lib/plaid/models/institutions_get_request_options.rb index 66d91f172..a34d904e3 100644 --- a/lib/plaid/models/institutions_get_request_options.rb +++ b/lib/plaid/models/institutions_get_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/institutions_get_response.rb b/lib/plaid/models/institutions_get_response.rb index a3a2151d5..4fee7a0c5 100644 --- a/lib/plaid/models/institutions_get_response.rb +++ b/lib/plaid/models/institutions_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/institutions_search_account_filter.rb b/lib/plaid/models/institutions_search_account_filter.rb index 066a2af83..4352018eb 100644 --- a/lib/plaid/models/institutions_search_account_filter.rb +++ b/lib/plaid/models/institutions_search_account_filter.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/institutions_search_payment_initiation_options.rb b/lib/plaid/models/institutions_search_payment_initiation_options.rb index d89d1476d..d66f647c6 100644 --- a/lib/plaid/models/institutions_search_payment_initiation_options.rb +++ b/lib/plaid/models/institutions_search_payment_initiation_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/institutions_search_request.rb b/lib/plaid/models/institutions_search_request.rb index 8a6c8a969..ea7924120 100644 --- a/lib/plaid/models/institutions_search_request.rb +++ b/lib/plaid/models/institutions_search_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/institutions_search_request_options.rb b/lib/plaid/models/institutions_search_request_options.rb index 534cbabf9..1e6f5e22f 100644 --- a/lib/plaid/models/institutions_search_request_options.rb +++ b/lib/plaid/models/institutions_search_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/institutions_search_response.rb b/lib/plaid/models/institutions_search_response.rb index 927044947..e0aeae65a 100644 --- a/lib/plaid/models/institutions_search_response.rb +++ b/lib/plaid/models/institutions_search_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/investment_account_subtype.rb b/lib/plaid/models/investment_account_subtype.rb index 63a4cabe7..e97cd0135 100644 --- a/lib/plaid/models/investment_account_subtype.rb +++ b/lib/plaid/models/investment_account_subtype.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/investment_filter.rb b/lib/plaid/models/investment_filter.rb index 12973b2f8..55f54bf77 100644 --- a/lib/plaid/models/investment_filter.rb +++ b/lib/plaid/models/investment_filter.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/investment_holdings_get_request_options.rb b/lib/plaid/models/investment_holdings_get_request_options.rb index f9accc8a1..d2b01609d 100644 --- a/lib/plaid/models/investment_holdings_get_request_options.rb +++ b/lib/plaid/models/investment_holdings_get_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/investment_transaction.rb b/lib/plaid/models/investment_transaction.rb index 1a2a4f999..55780f884 100644 --- a/lib/plaid/models/investment_transaction.rb +++ b/lib/plaid/models/investment_transaction.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/investment_transaction_subtype.rb b/lib/plaid/models/investment_transaction_subtype.rb index d723893dd..3933d7825 100644 --- a/lib/plaid/models/investment_transaction_subtype.rb +++ b/lib/plaid/models/investment_transaction_subtype.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/investment_transaction_type.rb b/lib/plaid/models/investment_transaction_type.rb index 9e626e0c4..ddd2c311f 100644 --- a/lib/plaid/models/investment_transaction_type.rb +++ b/lib/plaid/models/investment_transaction_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/investments_default_update_webhook.rb b/lib/plaid/models/investments_default_update_webhook.rb index cf0043528..fd936083d 100644 --- a/lib/plaid/models/investments_default_update_webhook.rb +++ b/lib/plaid/models/investments_default_update_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - # Fired when new or canceled transactions have been detected on an investment account. + # Fired when new transactions have been detected on an investment account. class InvestmentsDefaultUpdateWebhook # `INVESTMENTS_TRANSACTIONS` attr_accessor :webhook_type @@ -33,6 +33,8 @@ class InvestmentsDefaultUpdateWebhook # The number of canceled transactions reported since the last time this webhook was fired. attr_accessor :canceled_investments_transactions + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -41,7 +43,8 @@ def self.attribute_map :'item_id' => :'item_id', :'error' => :'error', :'new_investments_transactions' => :'new_investments_transactions', - :'canceled_investments_transactions' => :'canceled_investments_transactions' + :'canceled_investments_transactions' => :'canceled_investments_transactions', + :'environment' => :'environment' } end @@ -58,7 +61,8 @@ def self.openapi_types :'item_id' => :'String', :'error' => :'PlaidError', :'new_investments_transactions' => :'Float', - :'canceled_investments_transactions' => :'Float' + :'canceled_investments_transactions' => :'Float', + :'environment' => :'WebhookEnvironmentValues' } end @@ -107,6 +111,10 @@ def initialize(attributes = {}) if attributes.key?(:'canceled_investments_transactions') self.canceled_investments_transactions = attributes[:'canceled_investments_transactions'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -133,6 +141,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "canceled_investments_transactions", canceled_investments_transactions cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -144,6 +156,7 @@ def valid? return false if @item_id.nil? return false if @new_investments_transactions.nil? return false if @canceled_investments_transactions.nil? + return false if @environment.nil? true end @@ -157,7 +170,8 @@ def ==(o) item_id == o.item_id && error == o.error && new_investments_transactions == o.new_investments_transactions && - canceled_investments_transactions == o.canceled_investments_transactions + canceled_investments_transactions == o.canceled_investments_transactions && + environment == o.environment end # @see the `==` method @@ -169,7 +183,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, item_id, error, new_investments_transactions, canceled_investments_transactions].hash + [webhook_type, webhook_code, item_id, error, new_investments_transactions, canceled_investments_transactions, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/investments_holdings_get_request.rb b/lib/plaid/models/investments_holdings_get_request.rb index 3a81291ab..824baea04 100644 --- a/lib/plaid/models/investments_holdings_get_request.rb +++ b/lib/plaid/models/investments_holdings_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/investments_holdings_get_response.rb b/lib/plaid/models/investments_holdings_get_response.rb index 4bb41a76e..b9c6324ae 100644 --- a/lib/plaid/models/investments_holdings_get_response.rb +++ b/lib/plaid/models/investments_holdings_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/investments_transactions_get_request.rb b/lib/plaid/models/investments_transactions_get_request.rb index 255343af4..6f39f902d 100644 --- a/lib/plaid/models/investments_transactions_get_request.rb +++ b/lib/plaid/models/investments_transactions_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/investments_transactions_get_request_options.rb b/lib/plaid/models/investments_transactions_get_request_options.rb index 53ae6862e..59ee92136 100644 --- a/lib/plaid/models/investments_transactions_get_request_options.rb +++ b/lib/plaid/models/investments_transactions_get_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/investments_transactions_get_response.rb b/lib/plaid/models/investments_transactions_get_response.rb index 420c19df6..a08273ebd 100644 --- a/lib/plaid/models/investments_transactions_get_response.rb +++ b/lib/plaid/models/investments_transactions_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/investments_transactions_override.rb b/lib/plaid/models/investments_transactions_override.rb index 9c9fb4b06..c48a364c9 100644 --- a/lib/plaid/models/investments_transactions_override.rb +++ b/lib/plaid/models/investments_transactions_override.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/issuing_country.rb b/lib/plaid/models/issuing_country.rb index 9ecb55008..2ab3747e4 100644 --- a/lib/plaid/models/issuing_country.rb +++ b/lib/plaid/models/issuing_country.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item.rb b/lib/plaid/models/item.rb index bd8d49b7c..f67cbdd1e 100644 --- a/lib/plaid/models/item.rb +++ b/lib/plaid/models/item.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_access_token_invalidate_request.rb b/lib/plaid/models/item_access_token_invalidate_request.rb index 692fcde77..52abcb622 100644 --- a/lib/plaid/models/item_access_token_invalidate_request.rb +++ b/lib/plaid/models/item_access_token_invalidate_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_access_token_invalidate_response.rb b/lib/plaid/models/item_access_token_invalidate_response.rb index 58789c778..9cb9b75eb 100644 --- a/lib/plaid/models/item_access_token_invalidate_response.rb +++ b/lib/plaid/models/item_access_token_invalidate_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_application_list_request.rb b/lib/plaid/models/item_application_list_request.rb index 7564c288b..8f99eada0 100644 --- a/lib/plaid/models/item_application_list_request.rb +++ b/lib/plaid/models/item_application_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_application_list_response.rb b/lib/plaid/models/item_application_list_response.rb index 309e8f26c..6fd72ef53 100644 --- a/lib/plaid/models/item_application_list_response.rb +++ b/lib/plaid/models/item_application_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_application_list_user_auth.rb b/lib/plaid/models/item_application_list_user_auth.rb index 54f64d5de..9d0186eb2 100644 --- a/lib/plaid/models/item_application_list_user_auth.rb +++ b/lib/plaid/models/item_application_list_user_auth.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_application_scopes_update_request.rb b/lib/plaid/models/item_application_scopes_update_request.rb index 0eb035f2f..c62f41de3 100644 --- a/lib/plaid/models/item_application_scopes_update_request.rb +++ b/lib/plaid/models/item_application_scopes_update_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_application_scopes_update_response.rb b/lib/plaid/models/item_application_scopes_update_response.rb index 02fa79802..f5c0faceb 100644 --- a/lib/plaid/models/item_application_scopes_update_response.rb +++ b/lib/plaid/models/item_application_scopes_update_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_error_webhook.rb b/lib/plaid/models/item_error_webhook.rb index 4ef61a535..40cf2e477 100644 --- a/lib/plaid/models/item_error_webhook.rb +++ b/lib/plaid/models/item_error_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -27,13 +27,16 @@ class ItemErrorWebhook attr_accessor :error + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', :'item_id' => :'item_id', - :'error' => :'error' + :'error' => :'error', + :'environment' => :'environment' } end @@ -48,14 +51,15 @@ def self.openapi_types :'webhook_type' => :'String', :'webhook_code' => :'String', :'item_id' => :'String', - :'error' => :'PlaidError' + :'error' => :'PlaidError', + :'environment' => :'WebhookEnvironmentValues' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'error' + :'error', ]) end @@ -89,6 +93,10 @@ def initialize(attributes = {}) if attributes.key?(:'error') self.error = attributes[:'error'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -107,6 +115,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "item_id", item_id cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -116,6 +128,7 @@ def valid? return false if @webhook_type.nil? return false if @webhook_code.nil? return false if @item_id.nil? + return false if @environment.nil? true end @@ -127,7 +140,8 @@ def ==(o) webhook_type == o.webhook_type && webhook_code == o.webhook_code && item_id == o.item_id && - error == o.error + error == o.error && + environment == o.environment end # @see the `==` method @@ -139,7 +153,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, item_id, error].hash + [webhook_type, webhook_code, item_id, error, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/item_get_request.rb b/lib/plaid/models/item_get_request.rb index ec2a8193d..0cfe8f305 100644 --- a/lib/plaid/models/item_get_request.rb +++ b/lib/plaid/models/item_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_get_response.rb b/lib/plaid/models/item_get_response.rb index 26cc02d4e..6f7eea5cc 100644 --- a/lib/plaid/models/item_get_response.rb +++ b/lib/plaid/models/item_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_import_request.rb b/lib/plaid/models/item_import_request.rb index 68caaba30..8c7c03791 100644 --- a/lib/plaid/models/item_import_request.rb +++ b/lib/plaid/models/item_import_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_import_request_options.rb b/lib/plaid/models/item_import_request_options.rb index 274c5038a..72a24b32c 100644 --- a/lib/plaid/models/item_import_request_options.rb +++ b/lib/plaid/models/item_import_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_import_request_user_auth.rb b/lib/plaid/models/item_import_request_user_auth.rb index 60a7f05eb..c6c830aa4 100644 --- a/lib/plaid/models/item_import_request_user_auth.rb +++ b/lib/plaid/models/item_import_request_user_auth.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_import_response.rb b/lib/plaid/models/item_import_response.rb index 89c35066e..553d56f26 100644 --- a/lib/plaid/models/item_import_response.rb +++ b/lib/plaid/models/item_import_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_product_ready_webhook.rb b/lib/plaid/models/item_product_ready_webhook.rb index 17cc5755b..198844599 100644 --- a/lib/plaid/models/item_product_ready_webhook.rb +++ b/lib/plaid/models/item_product_ready_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -27,13 +27,16 @@ class ItemProductReadyWebhook attr_accessor :error + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', :'item_id' => :'item_id', - :'error' => :'error' + :'error' => :'error', + :'environment' => :'environment' } end @@ -48,14 +51,15 @@ def self.openapi_types :'webhook_type' => :'String', :'webhook_code' => :'String', :'item_id' => :'String', - :'error' => :'PlaidError' + :'error' => :'PlaidError', + :'environment' => :'WebhookEnvironmentValues' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'error' + :'error', ]) end @@ -89,6 +93,10 @@ def initialize(attributes = {}) if attributes.key?(:'error') self.error = attributes[:'error'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -107,6 +115,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "item_id", item_id cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -116,6 +128,7 @@ def valid? return false if @webhook_type.nil? return false if @webhook_code.nil? return false if @item_id.nil? + return false if @environment.nil? true end @@ -127,7 +140,8 @@ def ==(o) webhook_type == o.webhook_type && webhook_code == o.webhook_code && item_id == o.item_id && - error == o.error + error == o.error && + environment == o.environment end # @see the `==` method @@ -139,7 +153,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, item_id, error].hash + [webhook_type, webhook_code, item_id, error, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/item_public_token_create_request.rb b/lib/plaid/models/item_public_token_create_request.rb index 2658aa3b1..00501466e 100644 --- a/lib/plaid/models/item_public_token_create_request.rb +++ b/lib/plaid/models/item_public_token_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_public_token_create_response.rb b/lib/plaid/models/item_public_token_create_response.rb index 8fddb6609..1a7a3ac79 100644 --- a/lib/plaid/models/item_public_token_create_response.rb +++ b/lib/plaid/models/item_public_token_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_public_token_exchange_request.rb b/lib/plaid/models/item_public_token_exchange_request.rb index d9cbdbf84..0514badb2 100644 --- a/lib/plaid/models/item_public_token_exchange_request.rb +++ b/lib/plaid/models/item_public_token_exchange_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_public_token_exchange_response.rb b/lib/plaid/models/item_public_token_exchange_response.rb index ee29b1b4a..321b7c5f9 100644 --- a/lib/plaid/models/item_public_token_exchange_response.rb +++ b/lib/plaid/models/item_public_token_exchange_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_remove_request.rb b/lib/plaid/models/item_remove_request.rb index 13169be2d..9cb8a8311 100644 --- a/lib/plaid/models/item_remove_request.rb +++ b/lib/plaid/models/item_remove_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_remove_response.rb b/lib/plaid/models/item_remove_response.rb index f67ecc042..ffb962b8e 100644 --- a/lib/plaid/models/item_remove_response.rb +++ b/lib/plaid/models/item_remove_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_status.rb b/lib/plaid/models/item_status.rb index a578c5653..b5c4c3cbd 100644 --- a/lib/plaid/models/item_status.rb +++ b/lib/plaid/models/item_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_status_investments.rb b/lib/plaid/models/item_status_investments.rb index 18dfaedf9..5349d2260 100644 --- a/lib/plaid/models/item_status_investments.rb +++ b/lib/plaid/models/item_status_investments.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_status_last_webhook.rb b/lib/plaid/models/item_status_last_webhook.rb index 7de59a5ae..f2560ef12 100644 --- a/lib/plaid/models/item_status_last_webhook.rb +++ b/lib/plaid/models/item_status_last_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_status_nullable.rb b/lib/plaid/models/item_status_nullable.rb index cec1c7843..5f52ab4f6 100644 --- a/lib/plaid/models/item_status_nullable.rb +++ b/lib/plaid/models/item_status_nullable.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_status_transactions.rb b/lib/plaid/models/item_status_transactions.rb index 1fb4608de..463286cfc 100644 --- a/lib/plaid/models/item_status_transactions.rb +++ b/lib/plaid/models/item_status_transactions.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_webhook_update_request.rb b/lib/plaid/models/item_webhook_update_request.rb index ef7131828..4132378e1 100644 --- a/lib/plaid/models/item_webhook_update_request.rb +++ b/lib/plaid/models/item_webhook_update_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_webhook_update_response.rb b/lib/plaid/models/item_webhook_update_response.rb index f445b1643..a7b54a250 100644 --- a/lib/plaid/models/item_webhook_update_response.rb +++ b/lib/plaid/models/item_webhook_update_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/jwk_public_key.rb b/lib/plaid/models/jwk_public_key.rb index 6b59692f3..7e6b05fa8 100644 --- a/lib/plaid/models/jwk_public_key.rb +++ b/lib/plaid/models/jwk_public_key.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/jwt_header.rb b/lib/plaid/models/jwt_header.rb index d0509332f..75b662dfc 100644 --- a/lib/plaid/models/jwt_header.rb +++ b/lib/plaid/models/jwt_header.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/kyc_check_address_summary.rb b/lib/plaid/models/kyc_check_address_summary.rb index 56006a2bd..aeaf1d523 100644 --- a/lib/plaid/models/kyc_check_address_summary.rb +++ b/lib/plaid/models/kyc_check_address_summary.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/kyc_check_date_of_birth_summary.rb b/lib/plaid/models/kyc_check_date_of_birth_summary.rb index 595d6e513..8f274fd06 100644 --- a/lib/plaid/models/kyc_check_date_of_birth_summary.rb +++ b/lib/plaid/models/kyc_check_date_of_birth_summary.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/kyc_check_details.rb b/lib/plaid/models/kyc_check_details.rb index c17c1b1ee..fb7dba2c6 100644 --- a/lib/plaid/models/kyc_check_details.rb +++ b/lib/plaid/models/kyc_check_details.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - # The outcome of the `kyc_check` step. + # Additional information for the `kyc_check` step. This field will be `null` unless `steps.kyc_check` has reached a terminal state of either `success` or `failed`. class KYCCheckDetails # The outcome status for the associated Identity Verification attempt's `kyc_check` step. This field will always have the same value as `steps.kyc_check`. attr_accessor :status diff --git a/lib/plaid/models/kyc_check_id_number_summary.rb b/lib/plaid/models/kyc_check_id_number_summary.rb index 89848e9e1..5f98677c7 100644 --- a/lib/plaid/models/kyc_check_id_number_summary.rb +++ b/lib/plaid/models/kyc_check_id_number_summary.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/kyc_check_name_summary.rb b/lib/plaid/models/kyc_check_name_summary.rb index cb7c80bbd..017d7e361 100644 --- a/lib/plaid/models/kyc_check_name_summary.rb +++ b/lib/plaid/models/kyc_check_name_summary.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/kyc_check_phone_summary.rb b/lib/plaid/models/kyc_check_phone_summary.rb index 88caedaea..d1efd2cd6 100644 --- a/lib/plaid/models/kyc_check_phone_summary.rb +++ b/lib/plaid/models/kyc_check_phone_summary.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/liabilities_default_update_webhook.rb b/lib/plaid/models/liabilities_default_update_webhook.rb index 28f140f02..a08dd7661 100644 --- a/lib/plaid/models/liabilities_default_update_webhook.rb +++ b/lib/plaid/models/liabilities_default_update_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -30,9 +30,11 @@ class LiabilitiesDefaultUpdateWebhook # An array of `account_id`'s for accounts that contain new liabilities.' attr_accessor :account_ids_with_new_liabilities - # An object with keys of `account_id`'s that are mapped to their respective liabilities fields that changed. Example: `{ \"XMBvvyMGQ1UoLbKByoMqH3nXMj84ALSdE5B58\": [\"past_amount_due\"] }` + # An object with keys of `account_id`'s that are mapped to their respective liabilities fields that changed. Example: `{ \"XMBvvyMGQ1UoLbKByoMqH3nXMj84ALSdE5B58\": [\"past_amount_due\"] } attr_accessor :account_ids_with_updated_liabilities + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -41,7 +43,8 @@ def self.attribute_map :'item_id' => :'item_id', :'error' => :'error', :'account_ids_with_new_liabilities' => :'account_ids_with_new_liabilities', - :'account_ids_with_updated_liabilities' => :'account_ids_with_updated_liabilities' + :'account_ids_with_updated_liabilities' => :'account_ids_with_updated_liabilities', + :'environment' => :'environment' } end @@ -58,7 +61,8 @@ def self.openapi_types :'item_id' => :'String', :'error' => :'PlaidError', :'account_ids_with_new_liabilities' => :'Array', - :'account_ids_with_updated_liabilities' => :'Hash>' + :'account_ids_with_updated_liabilities' => :'Hash>', + :'environment' => :'WebhookEnvironmentValues' } end @@ -111,6 +115,10 @@ def initialize(attributes = {}) self.account_ids_with_updated_liabilities = value end end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -137,6 +145,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "account_ids_with_updated_liabilities", account_ids_with_updated_liabilities cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -148,6 +160,7 @@ def valid? return false if @item_id.nil? return false if @account_ids_with_new_liabilities.nil? return false if @account_ids_with_updated_liabilities.nil? + return false if @environment.nil? true end @@ -161,7 +174,8 @@ def ==(o) item_id == o.item_id && error == o.error && account_ids_with_new_liabilities == o.account_ids_with_new_liabilities && - account_ids_with_updated_liabilities == o.account_ids_with_updated_liabilities + account_ids_with_updated_liabilities == o.account_ids_with_updated_liabilities && + environment == o.environment end # @see the `==` method @@ -173,7 +187,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, item_id, error, account_ids_with_new_liabilities, account_ids_with_updated_liabilities].hash + [webhook_type, webhook_code, item_id, error, account_ids_with_new_liabilities, account_ids_with_updated_liabilities, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/liabilities_get_request.rb b/lib/plaid/models/liabilities_get_request.rb index b26de7347..2b8608c65 100644 --- a/lib/plaid/models/liabilities_get_request.rb +++ b/lib/plaid/models/liabilities_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/liabilities_get_request_options.rb b/lib/plaid/models/liabilities_get_request_options.rb index 1f31916f7..91a2bfa39 100644 --- a/lib/plaid/models/liabilities_get_request_options.rb +++ b/lib/plaid/models/liabilities_get_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/liabilities_get_response.rb b/lib/plaid/models/liabilities_get_response.rb index 42f73058e..b2bebf05b 100644 --- a/lib/plaid/models/liabilities_get_response.rb +++ b/lib/plaid/models/liabilities_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/liabilities_object.rb b/lib/plaid/models/liabilities_object.rb index aab7ced2f..e8da7c308 100644 --- a/lib/plaid/models/liabilities_object.rb +++ b/lib/plaid/models/liabilities_object.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/liability_override.rb b/lib/plaid/models/liability_override.rb index 202eb4634..d4271c0b6 100644 --- a/lib/plaid/models/liability_override.rb +++ b/lib/plaid/models/liability_override.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,7 +25,7 @@ class LiabilityOverride # The cash APR percentage value. Can only be set if `type` is `credit`. attr_accessor :cash_apr - # The balance transfer APR percentage value. Can only be set if `type` is `credit`. Can only be set if `type` is `credit`. + # The balance transfer APR percentage value. Can only be set if `type` is `credit`. attr_accessor :balance_transfer_apr # The special APR percentage value. Can only be set if `type` is `credit`. diff --git a/lib/plaid/models/asset_report_relay_refresh_request.rb b/lib/plaid/models/link_delivery_create_request.rb similarity index 76% rename from lib/plaid/models/asset_report_relay_refresh_request.rb rename to lib/plaid/models/link_delivery_create_request.rb index 20e07d9a7..84ca6cafd 100644 --- a/lib/plaid/models/asset_report_relay_refresh_request.rb +++ b/lib/plaid/models/link_delivery_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,26 +14,30 @@ require 'time' module Plaid - # AssetReportRelayRefreshRequest defines the request schema for `/asset_report/relay/refresh` - class AssetReportRelayRefreshRequest + # LinkDeliveryCreateRequest defines the request schema for `/link_delivery/create` + class LinkDeliveryCreateRequest # Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body. attr_accessor :client_id # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret - attr_accessor :asset_relay_token + # A `link_token` from a previous invocation of `/link/token/create` with Link Delivery enabled + attr_accessor :link_token - # The URL registered to receive webhooks when the Asset Report of a Relay Token has been refreshed. - attr_accessor :webhook + attr_accessor :delivery_method + + # The email or phone number to be used to delivery the URL of the Link Delivery session + attr_accessor :delivery_destination # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'client_id' => :'client_id', :'secret' => :'secret', - :'asset_relay_token' => :'asset_relay_token', - :'webhook' => :'webhook' + :'link_token' => :'link_token', + :'delivery_method' => :'delivery_method', + :'delivery_destination' => :'delivery_destination' } end @@ -47,15 +51,15 @@ def self.openapi_types { :'client_id' => :'String', :'secret' => :'String', - :'asset_relay_token' => :'String', - :'webhook' => :'String' + :'link_token' => :'String', + :'delivery_method' => :'LinkDeliveryDeliveryMethod', + :'delivery_destination' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'webhook' ]) end @@ -63,13 +67,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetReportRelayRefreshRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::LinkDeliveryCreateRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetReportRelayRefreshRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::LinkDeliveryCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -82,12 +86,16 @@ def initialize(attributes = {}) self.secret = attributes[:'secret'] end - if attributes.key?(:'asset_relay_token') - self.asset_relay_token = attributes[:'asset_relay_token'] + if attributes.key?(:'link_token') + self.link_token = attributes[:'link_token'] + end + + if attributes.key?(:'delivery_method') + self.delivery_method = attributes[:'delivery_method'] end - if attributes.key?(:'webhook') - self.webhook = attributes[:'webhook'] + if attributes.key?(:'delivery_destination') + self.delivery_destination = attributes[:'delivery_destination'] end end @@ -95,8 +103,16 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @asset_relay_token.nil? - invalid_properties.push('invalid value for "asset_relay_token", asset_relay_token cannot be nil.') + if @link_token.nil? + invalid_properties.push('invalid value for "link_token", link_token cannot be nil.') + end + + if @delivery_method.nil? + invalid_properties.push('invalid value for "delivery_method", delivery_method cannot be nil.') + end + + if @delivery_destination.nil? + invalid_properties.push('invalid value for "delivery_destination", delivery_destination cannot be nil.') end invalid_properties @@ -105,7 +121,9 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @asset_relay_token.nil? + return false if @link_token.nil? + return false if @delivery_method.nil? + return false if @delivery_destination.nil? true end @@ -116,8 +134,9 @@ def ==(o) self.class == o.class && client_id == o.client_id && secret == o.secret && - asset_relay_token == o.asset_relay_token && - webhook == o.webhook + link_token == o.link_token && + delivery_method == o.delivery_method && + delivery_destination == o.delivery_destination end # @see the `==` method @@ -129,7 +148,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, secret, asset_relay_token, webhook].hash + [client_id, secret, link_token, delivery_method, delivery_destination].hash end # Builds the object from hash diff --git a/lib/plaid/models/asset_report_relay_refresh_response.rb b/lib/plaid/models/link_delivery_create_response.rb similarity index 78% rename from lib/plaid/models/asset_report_relay_refresh_response.rb rename to lib/plaid/models/link_delivery_create_response.rb index 15950a3b5..e2e414079 100644 --- a/lib/plaid/models/asset_report_relay_refresh_response.rb +++ b/lib/plaid/models/link_delivery_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,12 +14,13 @@ require 'time' module Plaid - # AssetReportRelayRefreshResponse defines the response schema for `/asset_report/relay/refresh` - class AssetReportRelayRefreshResponse - attr_accessor :asset_relay_token + # LinkDeliveryCreateResponse defines the response schema for `/link_delivery/create` + class LinkDeliveryCreateResponse + # The URL to the Link Delivery session, which will be delivered by the specified delivery method. + attr_accessor :link_delivery_url - # A unique ID identifying an Asset Report. Like all Plaid identifiers, this ID is case sensitive. - attr_accessor :asset_report_id + # The ID for the link delivery session. Same as the link token string excluding the \"link-{env}-\" prefix + attr_accessor :link_delivery_session_id # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. attr_accessor :request_id @@ -27,8 +28,8 @@ class AssetReportRelayRefreshResponse # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'asset_relay_token' => :'asset_relay_token', - :'asset_report_id' => :'asset_report_id', + :'link_delivery_url' => :'link_delivery_url', + :'link_delivery_session_id' => :'link_delivery_session_id', :'request_id' => :'request_id' } end @@ -41,8 +42,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'asset_relay_token' => :'String', - :'asset_report_id' => :'String', + :'link_delivery_url' => :'String', + :'link_delivery_session_id' => :'String', :'request_id' => :'String' } end @@ -57,23 +58,23 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetReportRelayRefreshResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::LinkDeliveryCreateResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetReportRelayRefreshResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::LinkDeliveryCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'asset_relay_token') - self.asset_relay_token = attributes[:'asset_relay_token'] + if attributes.key?(:'link_delivery_url') + self.link_delivery_url = attributes[:'link_delivery_url'] end - if attributes.key?(:'asset_report_id') - self.asset_report_id = attributes[:'asset_report_id'] + if attributes.key?(:'link_delivery_session_id') + self.link_delivery_session_id = attributes[:'link_delivery_session_id'] end if attributes.key?(:'request_id') @@ -85,12 +86,12 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @asset_relay_token.nil? - invalid_properties.push('invalid value for "asset_relay_token", asset_relay_token cannot be nil.') + if @link_delivery_url.nil? + invalid_properties.push('invalid value for "link_delivery_url", link_delivery_url cannot be nil.') end - if @asset_report_id.nil? - invalid_properties.push('invalid value for "asset_report_id", asset_report_id cannot be nil.') + if @link_delivery_session_id.nil? + invalid_properties.push('invalid value for "link_delivery_session_id", link_delivery_session_id cannot be nil.') end if @request_id.nil? @@ -103,8 +104,8 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @asset_relay_token.nil? - return false if @asset_report_id.nil? + return false if @link_delivery_url.nil? + return false if @link_delivery_session_id.nil? return false if @request_id.nil? true end @@ -114,8 +115,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - asset_relay_token == o.asset_relay_token && - asset_report_id == o.asset_report_id && + link_delivery_url == o.link_delivery_url && + link_delivery_session_id == o.link_delivery_session_id && request_id == o.request_id end @@ -128,7 +129,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [asset_relay_token, asset_report_id, request_id].hash + [link_delivery_url, link_delivery_session_id, request_id].hash end # Builds the object from hash diff --git a/lib/plaid/models/link_delivery_delivery_method.rb b/lib/plaid/models/link_delivery_delivery_method.rb new file mode 100644 index 000000000..e4e3e875d --- /dev/null +++ b/lib/plaid/models/link_delivery_delivery_method.rb @@ -0,0 +1,39 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class LinkDeliveryDeliveryMethod + SMS = "SMS".freeze + EMAIL = "EMAIL".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/asset_report_relay_get_request.rb b/lib/plaid/models/link_delivery_get_request.rb similarity index 85% rename from lib/plaid/models/asset_report_relay_get_request.rb rename to lib/plaid/models/link_delivery_get_request.rb index 6eeb4df7e..6f54b7a7b 100644 --- a/lib/plaid/models/asset_report_relay_get_request.rb +++ b/lib/plaid/models/link_delivery_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,23 +14,23 @@ require 'time' module Plaid - # AssetReportRelayGetRequest defines the request schema for `/asset_report/relay/get` - class AssetReportRelayGetRequest + # LinkDeliveryGetRequest defines the request schema for `/link_delivery/get` + class LinkDeliveryGetRequest # Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body. attr_accessor :client_id # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret - # The `asset_relay_token` granting access to the Asset Report you would like to get. - attr_accessor :asset_relay_token + # The ID for the link delivery session from a previous invocation of `/link_delivery/create` + attr_accessor :link_delivery_session_id # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'client_id' => :'client_id', :'secret' => :'secret', - :'asset_relay_token' => :'asset_relay_token' + :'link_delivery_session_id' => :'link_delivery_session_id' } end @@ -44,7 +44,7 @@ def self.openapi_types { :'client_id' => :'String', :'secret' => :'String', - :'asset_relay_token' => :'String' + :'link_delivery_session_id' => :'String' } end @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetReportRelayGetRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::LinkDeliveryGetRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetReportRelayGetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::LinkDeliveryGetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -77,8 +77,8 @@ def initialize(attributes = {}) self.secret = attributes[:'secret'] end - if attributes.key?(:'asset_relay_token') - self.asset_relay_token = attributes[:'asset_relay_token'] + if attributes.key?(:'link_delivery_session_id') + self.link_delivery_session_id = attributes[:'link_delivery_session_id'] end end @@ -86,8 +86,8 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @asset_relay_token.nil? - invalid_properties.push('invalid value for "asset_relay_token", asset_relay_token cannot be nil.') + if @link_delivery_session_id.nil? + invalid_properties.push('invalid value for "link_delivery_session_id", link_delivery_session_id cannot be nil.') end invalid_properties @@ -96,7 +96,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @asset_relay_token.nil? + return false if @link_delivery_session_id.nil? true end @@ -107,7 +107,7 @@ def ==(o) self.class == o.class && client_id == o.client_id && secret == o.secret && - asset_relay_token == o.asset_relay_token + link_delivery_session_id == o.link_delivery_session_id end # @see the `==` method @@ -119,7 +119,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, secret, asset_relay_token].hash + [client_id, secret, link_delivery_session_id].hash end # Builds the object from hash diff --git a/lib/plaid/models/link_delivery_get_response.rb b/lib/plaid/models/link_delivery_get_response.rb new file mode 100644 index 000000000..bbaf57c9f --- /dev/null +++ b/lib/plaid/models/link_delivery_get_response.rb @@ -0,0 +1,277 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # LinkDeliveryGetRequest defines the response schema for `/link_delivery/get` + class LinkDeliveryGetResponse + attr_accessor :status + + # Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:mm:ssZ`) indicating the time the given Link Delivery Session was created at + attr_accessor :created_at + + # The public tokens returned by the Link session upon completion + attr_accessor :public_tokens + + # Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:mm:ssZ`) indicating the time the given Link Delivery Session was completed at + attr_accessor :completed_at + + # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. + attr_accessor :request_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'created_at' => :'created_at', + :'public_tokens' => :'public_tokens', + :'completed_at' => :'completed_at', + :'request_id' => :'request_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'LinkDeliverySessionStatus', + :'created_at' => :'Time', + :'public_tokens' => :'Array', + :'completed_at' => :'Time', + :'request_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'completed_at', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::LinkDeliveryGetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::LinkDeliveryGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'public_tokens') + if (value = attributes[:'public_tokens']).is_a?(Array) + self.public_tokens = value + end + end + + if attributes.key?(:'completed_at') + self.completed_at = attributes[:'completed_at'] + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @request_id.nil? + invalid_properties.push('invalid value for "request_id", request_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @status.nil? + return false if @created_at.nil? + return false if @request_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + created_at == o.created_at && + public_tokens == o.public_tokens && + completed_at == o.completed_at && + request_id == o.request_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, created_at, public_tokens, completed_at, request_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/link_delivery_session_status.rb b/lib/plaid/models/link_delivery_session_status.rb new file mode 100644 index 000000000..7a9639cba --- /dev/null +++ b/lib/plaid/models/link_delivery_session_status.rb @@ -0,0 +1,41 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class LinkDeliverySessionStatus + CREATED = "CREATED".freeze + OPENED = "OPENED".freeze + COMPLETED = "COMPLETED".freeze + EXPIRED = "EXPIRED".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/link_token_account_filters.rb b/lib/plaid/models/link_token_account_filters.rb index a94280ebb..6628df149 100644 --- a/lib/plaid/models/link_token_account_filters.rb +++ b/lib/plaid/models/link_token_account_filters.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_credit_filter.rb b/lib/plaid/models/link_token_create_credit_filter.rb index 702923e1c..c64ee96ad 100644 --- a/lib/plaid/models/link_token_create_credit_filter.rb +++ b/lib/plaid/models/link_token_create_credit_filter.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_depository_filter.rb b/lib/plaid/models/link_token_create_depository_filter.rb index c2760425a..1cd006c03 100644 --- a/lib/plaid/models/link_token_create_depository_filter.rb +++ b/lib/plaid/models/link_token_create_depository_filter.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_institution_data.rb b/lib/plaid/models/link_token_create_institution_data.rb index 7f3d21045..1eac4dcae 100644 --- a/lib/plaid/models/link_token_create_institution_data.rb +++ b/lib/plaid/models/link_token_create_institution_data.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_investment_filter.rb b/lib/plaid/models/link_token_create_investment_filter.rb index eda59b24c..bd7d885f0 100644 --- a/lib/plaid/models/link_token_create_investment_filter.rb +++ b/lib/plaid/models/link_token_create_investment_filter.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_loan_filter.rb b/lib/plaid/models/link_token_create_loan_filter.rb index f342fac9d..df36af3d8 100644 --- a/lib/plaid/models/link_token_create_loan_filter.rb +++ b/lib/plaid/models/link_token_create_loan_filter.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_request.rb b/lib/plaid/models/link_token_create_request.rb index 40f297dd8..d71fcdd7f 100644 --- a/lib/plaid/models/link_token_create_request.rb +++ b/lib/plaid/models/link_token_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -80,6 +80,8 @@ class LinkTokenCreateRequest # A user token generated using `/user/create`. Any item created during the link session will be associated with the user. attr_accessor :user_token + attr_accessor :investments + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -107,7 +109,8 @@ def self.attribute_map :'transfer' => :'transfer', :'update' => :'update', :'identity_verification' => :'identity_verification', - :'user_token' => :'user_token' + :'user_token' => :'user_token', + :'investments' => :'investments' } end @@ -143,7 +146,8 @@ def self.openapi_types :'transfer' => :'LinkTokenCreateRequestTransfer', :'update' => :'LinkTokenCreateRequestUpdate', :'identity_verification' => :'LinkTokenCreateRequestIdentityVerification', - :'user_token' => :'String' + :'user_token' => :'String', + :'investments' => :'LinkTokenInvestments' } end @@ -273,6 +277,10 @@ def initialize(attributes = {}) if attributes.key?(:'user_token') self.user_token = attributes[:'user_token'] end + + if attributes.key?(:'investments') + self.investments = attributes[:'investments'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -358,7 +366,8 @@ def ==(o) transfer == o.transfer && update == o.update && identity_verification == o.identity_verification && - user_token == o.user_token + user_token == o.user_token && + investments == o.investments end # @see the `==` method @@ -370,7 +379,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, secret, client_name, language, country_codes, user, products, additional_consented_products, webhook, access_token, link_customization_name, redirect_uri, android_package_name, institution_data, account_filters, eu_config, institution_id, payment_initiation, deposit_switch, income_verification, auth, transfer, update, identity_verification, user_token].hash + [client_id, secret, client_name, language, country_codes, user, products, additional_consented_products, webhook, access_token, link_customization_name, redirect_uri, android_package_name, institution_data, account_filters, eu_config, institution_id, payment_initiation, deposit_switch, income_verification, auth, transfer, update, identity_verification, user_token, investments].hash end # Builds the object from hash diff --git a/lib/plaid/models/link_token_create_request_account_subtypes.rb b/lib/plaid/models/link_token_create_request_account_subtypes.rb index da8c593cb..41df16ab2 100644 --- a/lib/plaid/models/link_token_create_request_account_subtypes.rb +++ b/lib/plaid/models/link_token_create_request_account_subtypes.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_request_auth.rb b/lib/plaid/models/link_token_create_request_auth.rb index d1fb575f2..dd9a96cfa 100644 --- a/lib/plaid/models/link_token_create_request_auth.rb +++ b/lib/plaid/models/link_token_create_request_auth.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_request_deposit_switch.rb b/lib/plaid/models/link_token_create_request_deposit_switch.rb index e6a2bb9b0..abe645721 100644 --- a/lib/plaid/models/link_token_create_request_deposit_switch.rb +++ b/lib/plaid/models/link_token_create_request_deposit_switch.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_request_identity_verification.rb b/lib/plaid/models/link_token_create_request_identity_verification.rb index 3a2349639..ac3d0bc3e 100644 --- a/lib/plaid/models/link_token_create_request_identity_verification.rb +++ b/lib/plaid/models/link_token_create_request_identity_verification.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_request_income_verification.rb b/lib/plaid/models/link_token_create_request_income_verification.rb index ca70c7722..12ccc1544 100644 --- a/lib/plaid/models/link_token_create_request_income_verification.rb +++ b/lib/plaid/models/link_token_create_request_income_verification.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - # Specifies options for initializing Link for use with the Income (beta) product. This field is required if `income_verification` is included in the `products` array. + # Specifies options for initializing Link for use with the Income product. This field is required if `income_verification` is included in the `products` array. class LinkTokenCreateRequestIncomeVerification # The `income_verification_id` of the verification instance, as provided by `/income/verification/create`. attr_accessor :income_verification_id diff --git a/lib/plaid/models/link_token_create_request_income_verification_bank_income.rb b/lib/plaid/models/link_token_create_request_income_verification_bank_income.rb index 770a36419..34529ab03 100644 --- a/lib/plaid/models/link_token_create_request_income_verification_bank_income.rb +++ b/lib/plaid/models/link_token_create_request_income_verification_bank_income.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_request_income_verification_payroll_income.rb b/lib/plaid/models/link_token_create_request_income_verification_payroll_income.rb index 6efb5a358..4b75273ab 100644 --- a/lib/plaid/models/link_token_create_request_income_verification_payroll_income.rb +++ b/lib/plaid/models/link_token_create_request_income_verification_payroll_income.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_request_payment_initiation.rb b/lib/plaid/models/link_token_create_request_payment_initiation.rb index 085e33cb9..fff93cd59 100644 --- a/lib/plaid/models/link_token_create_request_payment_initiation.rb +++ b/lib/plaid/models/link_token_create_request_payment_initiation.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_request_transfer.rb b/lib/plaid/models/link_token_create_request_transfer.rb index 616893a28..649870974 100644 --- a/lib/plaid/models/link_token_create_request_transfer.rb +++ b/lib/plaid/models/link_token_create_request_transfer.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_request_update.rb b/lib/plaid/models/link_token_create_request_update.rb index f74603cf8..81b026a89 100644 --- a/lib/plaid/models/link_token_create_request_update.rb +++ b/lib/plaid/models/link_token_create_request_update.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_request_user.rb b/lib/plaid/models/link_token_create_request_user.rb index 07bee99a6..b5a411998 100644 --- a/lib/plaid/models/link_token_create_request_user.rb +++ b/lib/plaid/models/link_token_create_request_user.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_request_user_stated_income_source.rb b/lib/plaid/models/link_token_create_request_user_stated_income_source.rb index fafdb7cd3..38cb71058 100644 --- a/lib/plaid/models/link_token_create_request_user_stated_income_source.rb +++ b/lib/plaid/models/link_token_create_request_user_stated_income_source.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_create_response.rb b/lib/plaid/models/link_token_create_response.rb index c5b257551..1426cc5fe 100644 --- a/lib/plaid/models/link_token_create_response.rb +++ b/lib/plaid/models/link_token_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_eu_config.rb b/lib/plaid/models/link_token_eu_config.rb index 6112268f3..d254e507e 100644 --- a/lib/plaid/models/link_token_eu_config.rb +++ b/lib/plaid/models/link_token_eu_config.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_get_metadata_response.rb b/lib/plaid/models/link_token_get_metadata_response.rb index 2b32c4faf..d3c17e2f9 100644 --- a/lib/plaid/models/link_token_get_metadata_response.rb +++ b/lib/plaid/models/link_token_get_metadata_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_get_request.rb b/lib/plaid/models/link_token_get_request.rb index 5aa49672c..27db29d9c 100644 --- a/lib/plaid/models/link_token_get_request.rb +++ b/lib/plaid/models/link_token_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_get_response.rb b/lib/plaid/models/link_token_get_response.rb index 8b4a54e90..395c58da2 100644 --- a/lib/plaid/models/link_token_get_response.rb +++ b/lib/plaid/models/link_token_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_investments.rb b/lib/plaid/models/link_token_investments.rb new file mode 100644 index 000000000..8ff7a9514 --- /dev/null +++ b/lib/plaid/models/link_token_investments.rb @@ -0,0 +1,220 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Configuration parameters for the Investments product + class LinkTokenInvestments + # If `true`, allow self-custody crypto wallets to be added without requiring signature verification. Defaults to `false`. + attr_accessor :allow_unverified_crypto_wallets + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'allow_unverified_crypto_wallets' => :'allow_unverified_crypto_wallets' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'allow_unverified_crypto_wallets' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::LinkTokenInvestments` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::LinkTokenInvestments`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'allow_unverified_crypto_wallets') + self.allow_unverified_crypto_wallets = attributes[:'allow_unverified_crypto_wallets'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + allow_unverified_crypto_wallets == o.allow_unverified_crypto_wallets + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [allow_unverified_crypto_wallets].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/loan.rb b/lib/plaid/models/loan.rb new file mode 100644 index 000000000..0c9a05074 --- /dev/null +++ b/lib/plaid/models/loan.rb @@ -0,0 +1,224 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Information specific to a mortgage loan agreement between one or more borrowers and a mortgage lender. + class Loan + attr_accessor :loan_identifiers + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'loan_identifiers' => :'LOAN_IDENTIFIERS' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'loan_identifiers' => :'LoanIdentifiers' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::Loan` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::Loan`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'loan_identifiers') + self.loan_identifiers = attributes[:'loan_identifiers'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @loan_identifiers.nil? + invalid_properties.push('invalid value for "loan_identifiers", loan_identifiers cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @loan_identifiers.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + loan_identifiers == o.loan_identifiers + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [loan_identifiers].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/loan_account_subtype.rb b/lib/plaid/models/loan_account_subtype.rb index 98249cf47..c9defa506 100644 --- a/lib/plaid/models/loan_account_subtype.rb +++ b/lib/plaid/models/loan_account_subtype.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/loan_filter.rb b/lib/plaid/models/loan_filter.rb index 108005501..1f482dab6 100644 --- a/lib/plaid/models/loan_filter.rb +++ b/lib/plaid/models/loan_filter.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/loan_identifier.rb b/lib/plaid/models/loan_identifier.rb new file mode 100644 index 000000000..096458800 --- /dev/null +++ b/lib/plaid/models/loan_identifier.rb @@ -0,0 +1,231 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The information used to identify this loan by various parties to the transaction or other organizations. + class LoanIdentifier + # The value of the identifier for the specified type. + attr_accessor :loan_identifier + + attr_accessor :loan_identifier_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'loan_identifier' => :'LoanIdentifier', + :'loan_identifier_type' => :'LoanIdentifierType' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'loan_identifier' => :'String', + :'loan_identifier_type' => :'LoanIdentifierType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'loan_identifier', + :'loan_identifier_type' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::LoanIdentifier` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::LoanIdentifier`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'loan_identifier') + self.loan_identifier = attributes[:'loan_identifier'] + end + + if attributes.key?(:'loan_identifier_type') + self.loan_identifier_type = attributes[:'loan_identifier_type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + loan_identifier == o.loan_identifier && + loan_identifier_type == o.loan_identifier_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [loan_identifier, loan_identifier_type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/loan_identifier_type.rb b/lib/plaid/models/loan_identifier_type.rb new file mode 100644 index 000000000..97724b986 --- /dev/null +++ b/lib/plaid/models/loan_identifier_type.rb @@ -0,0 +1,39 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class LoanIdentifierType + LENDER_LOAN = "LenderLoan".freeze + UNIVERSAL_LOAN = "UniversalLoan".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/loan_identifiers.rb b/lib/plaid/models/loan_identifiers.rb new file mode 100644 index 000000000..ae1299df3 --- /dev/null +++ b/lib/plaid/models/loan_identifiers.rb @@ -0,0 +1,224 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Collection of current and previous identifiers for this loan. + class LoanIdentifiers + attr_accessor :loan_identifier + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'loan_identifier' => :'LOAN_IDENTIFIER' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'loan_identifier' => :'LoanIdentifier' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::LoanIdentifiers` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::LoanIdentifiers`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'loan_identifier') + self.loan_identifier = attributes[:'loan_identifier'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @loan_identifier.nil? + invalid_properties.push('invalid value for "loan_identifier", loan_identifier cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @loan_identifier.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + loan_identifier == o.loan_identifier + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [loan_identifier].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/loans.rb b/lib/plaid/models/loans.rb new file mode 100644 index 000000000..9d81a5959 --- /dev/null +++ b/lib/plaid/models/loans.rb @@ -0,0 +1,224 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # A collection of loans that are part of a single deal. + class Loans + attr_accessor :loan + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'loan' => :'LOAN' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'loan' => :'Loan' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::Loans` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::Loans`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'loan') + self.loan = attributes[:'loan'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @loan.nil? + invalid_properties.push('invalid value for "loan", loan cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @loan.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + loan == o.loan + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [loan].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/location.rb b/lib/plaid/models/location.rb index cd1a41b8f..7d765ad19 100644 --- a/lib/plaid/models/location.rb +++ b/lib/plaid/models/location.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/match_summary.rb b/lib/plaid/models/match_summary.rb index 8627a39ba..7fdedc773 100644 --- a/lib/plaid/models/match_summary.rb +++ b/lib/plaid/models/match_summary.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/match_summary_code.rb b/lib/plaid/models/match_summary_code.rb index 96bd34f48..9680bb238 100644 --- a/lib/plaid/models/match_summary_code.rb +++ b/lib/plaid/models/match_summary_code.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/meta.rb b/lib/plaid/models/meta.rb index 8709edbcc..f5b4b3afd 100644 --- a/lib/plaid/models/meta.rb +++ b/lib/plaid/models/meta.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,12 +25,16 @@ class Meta # The account's limit attr_accessor :limit + # The account's mask. Should be a string of 2-4 alphanumeric characters. This allows you to model a mask which does not match the account number (such as with a virtual account number). + attr_accessor :mask + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'name' => :'name', :'official_name' => :'official_name', - :'limit' => :'limit' + :'limit' => :'limit', + :'mask' => :'mask' } end @@ -44,7 +48,8 @@ def self.openapi_types { :'name' => :'String', :'official_name' => :'String', - :'limit' => :'Float' + :'limit' => :'Float', + :'mask' => :'String' } end @@ -80,6 +85,10 @@ def initialize(attributes = {}) if attributes.key?(:'limit') self.limit = attributes[:'limit'] end + + if attributes.key?(:'mask') + self.mask = attributes[:'mask'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -98,6 +107,24 @@ def list_invalid_properties invalid_properties.push('invalid value for "limit", limit cannot be nil.') end + if @mask.nil? + invalid_properties.push('invalid value for "mask", mask cannot be nil.') + end + + if @mask.to_s.length > 4 + invalid_properties.push('invalid value for "mask", the character length must be smaller than or equal to 4.') + end + + if @mask.to_s.length < 2 + invalid_properties.push('invalid value for "mask", the character length must be great than or equal to 2.') + end + + pattern = Regexp.new(/^[A-Za-z0-9]{2,4}$/) + if @mask !~ pattern + invalid_properties.push("invalid value for \"mask\", must conform to the pattern #{pattern}.") + end + + invalid_properties end @@ -107,9 +134,37 @@ def valid? return false if @name.nil? return false if @official_name.nil? return false if @limit.nil? + return false if @mask.nil? + return false if @mask.to_s.length > 4 + return false if @mask.to_s.length < 2 + return false if @mask !~ Regexp.new(/^[A-Za-z0-9]{2,4}$/) true end + # Custom attribute writer method with validation + # @param [Object] mask Value to be assigned + def mask=(mask) + if mask.nil? + fail ArgumentError, 'mask cannot be nil' + end + + if mask.to_s.length > 4 + fail ArgumentError, 'invalid value for "mask", the character length must be smaller than or equal to 4.' + end + + if mask.to_s.length < 2 + fail ArgumentError, 'invalid value for "mask", the character length must be great than or equal to 2.' + end + + pattern = Regexp.new(/^[A-Za-z0-9]{2,4}$/) + if mask !~ pattern + fail ArgumentError, "invalid value for \"mask\", must conform to the pattern #{pattern}." + end + + + @mask = mask + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -117,7 +172,8 @@ def ==(o) self.class == o.class && name == o.name && official_name == o.official_name && - limit == o.limit + limit == o.limit && + mask == o.mask end # @see the `==` method @@ -129,7 +185,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, official_name, limit].hash + [name, official_name, limit, mask].hash end # Builds the object from hash diff --git a/lib/plaid/models/mfa.rb b/lib/plaid/models/mfa.rb index dfca85804..ba214bf0e 100644 --- a/lib/plaid/models/mfa.rb +++ b/lib/plaid/models/mfa.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/mortgage_interest_rate.rb b/lib/plaid/models/mortgage_interest_rate.rb index 18e4096ac..d1a761b7c 100644 --- a/lib/plaid/models/mortgage_interest_rate.rb +++ b/lib/plaid/models/mortgage_interest_rate.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/mortgage_liability.rb b/lib/plaid/models/mortgage_liability.rb index 89c829b10..12d41bc07 100644 --- a/lib/plaid/models/mortgage_liability.rb +++ b/lib/plaid/models/mortgage_liability.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/mortgage_property_address.rb b/lib/plaid/models/mortgage_property_address.rb index 4aa2ad279..ebd02c7e8 100644 --- a/lib/plaid/models/mortgage_property_address.rb +++ b/lib/plaid/models/mortgage_property_address.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/multi_document_risk_signal.rb b/lib/plaid/models/multi_document_risk_signal.rb index f370869f9..145deafb4 100644 --- a/lib/plaid/models/multi_document_risk_signal.rb +++ b/lib/plaid/models/multi_document_risk_signal.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/name_match_score.rb b/lib/plaid/models/name_match_score.rb new file mode 100644 index 000000000..3c231af4f --- /dev/null +++ b/lib/plaid/models/name_match_score.rb @@ -0,0 +1,254 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Score found by matching name provided by the API with the name on the account at the financial institution. If the account contains multiple owners, the maximum match score is filled. + class NameMatchScore + # Represents the match score for name. 100 is a perfect score, 85-99 means a strong match, 50-84 is a partial match, less than 50 is a weak match and 0 is a complete mismatch. If the name is missing from either the API or financial institution, this is empty. + attr_accessor :score + + # first or last name completely matched + attr_accessor :is_first_name_or_last_name_match + + # nickname matched, example Jennifer and Jenn. + attr_accessor :is_nickname_match + + # If the name on either of the names that was matched for the score was a business name, with corp, llc, ltd etc in the name. While this being true confirms business name, false means it was either not a business name or Plaid could not detect it as such, since a lot of business names match owner names and are hard to detect. + attr_accessor :is_business_name_detected + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'score' => :'score', + :'is_first_name_or_last_name_match' => :'is_first_name_or_last_name_match', + :'is_nickname_match' => :'is_nickname_match', + :'is_business_name_detected' => :'is_business_name_detected' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'score' => :'Integer', + :'is_first_name_or_last_name_match' => :'Boolean', + :'is_nickname_match' => :'Boolean', + :'is_business_name_detected' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'score', + :'is_first_name_or_last_name_match', + :'is_nickname_match', + :'is_business_name_detected' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::NameMatchScore` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::NameMatchScore`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'score') + self.score = attributes[:'score'] + end + + if attributes.key?(:'is_first_name_or_last_name_match') + self.is_first_name_or_last_name_match = attributes[:'is_first_name_or_last_name_match'] + end + + if attributes.key?(:'is_nickname_match') + self.is_nickname_match = attributes[:'is_nickname_match'] + end + + if attributes.key?(:'is_business_name_detected') + self.is_business_name_detected = attributes[:'is_business_name_detected'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + score == o.score && + is_first_name_or_last_name_match == o.is_first_name_or_last_name_match && + is_nickname_match == o.is_nickname_match && + is_business_name_detected == o.is_business_name_detected + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [score, is_first_name_or_last_name_match, is_nickname_match, is_business_name_detected].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/net_pay.rb b/lib/plaid/models/net_pay.rb index 5ca91f0c4..567e7719c 100644 --- a/lib/plaid/models/net_pay.rb +++ b/lib/plaid/models/net_pay.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/new_accounts_available_webhook.rb b/lib/plaid/models/new_accounts_available_webhook.rb index a7969858a..229e37ac4 100644 --- a/lib/plaid/models/new_accounts_available_webhook.rb +++ b/lib/plaid/models/new_accounts_available_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -27,13 +27,16 @@ class NewAccountsAvailableWebhook attr_accessor :error + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', :'item_id' => :'item_id', - :'error' => :'error' + :'error' => :'error', + :'environment' => :'environment' } end @@ -48,14 +51,15 @@ def self.openapi_types :'webhook_type' => :'String', :'webhook_code' => :'String', :'item_id' => :'String', - :'error' => :'PlaidError' + :'error' => :'PlaidError', + :'environment' => :'WebhookEnvironmentValues' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'error' + :'error', ]) end @@ -89,6 +93,10 @@ def initialize(attributes = {}) if attributes.key?(:'error') self.error = attributes[:'error'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -112,7 +120,8 @@ def ==(o) webhook_type == o.webhook_type && webhook_code == o.webhook_code && item_id == o.item_id && - error == o.error + error == o.error && + environment == o.environment end # @see the `==` method @@ -124,7 +133,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, item_id, error].hash + [webhook_type, webhook_code, item_id, error, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/numbers.rb b/lib/plaid/models/numbers.rb index c41757720..2afc80ff1 100644 --- a/lib/plaid/models/numbers.rb +++ b/lib/plaid/models/numbers.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/numbers_ach.rb b/lib/plaid/models/numbers_ach.rb index 105f43420..e25af96d1 100644 --- a/lib/plaid/models/numbers_ach.rb +++ b/lib/plaid/models/numbers_ach.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/numbers_ach_nullable.rb b/lib/plaid/models/numbers_ach_nullable.rb index 4e28176cc..0cfe8d7ff 100644 --- a/lib/plaid/models/numbers_ach_nullable.rb +++ b/lib/plaid/models/numbers_ach_nullable.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/numbers_bacs.rb b/lib/plaid/models/numbers_bacs.rb index afd0e6b9c..736369aa3 100644 --- a/lib/plaid/models/numbers_bacs.rb +++ b/lib/plaid/models/numbers_bacs.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/numbers_bacs_nullable.rb b/lib/plaid/models/numbers_bacs_nullable.rb index 468f80176..ea63b571d 100644 --- a/lib/plaid/models/numbers_bacs_nullable.rb +++ b/lib/plaid/models/numbers_bacs_nullable.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/numbers_eft.rb b/lib/plaid/models/numbers_eft.rb index d3f472ed0..877619f68 100644 --- a/lib/plaid/models/numbers_eft.rb +++ b/lib/plaid/models/numbers_eft.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/numbers_eft_nullable.rb b/lib/plaid/models/numbers_eft_nullable.rb index ace824c6e..2c32df0f0 100644 --- a/lib/plaid/models/numbers_eft_nullable.rb +++ b/lib/plaid/models/numbers_eft_nullable.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/numbers_iban_nullable.rb b/lib/plaid/models/numbers_iban_nullable.rb index c813d7c0b..3e67e1f7f 100644 --- a/lib/plaid/models/numbers_iban_nullable.rb +++ b/lib/plaid/models/numbers_iban_nullable.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/numbers_international.rb b/lib/plaid/models/numbers_international.rb index 4e1be0ce9..46b5687d1 100644 --- a/lib/plaid/models/numbers_international.rb +++ b/lib/plaid/models/numbers_international.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/numbers_international_iban.rb b/lib/plaid/models/numbers_international_iban.rb index 01a3dc403..3f4716c7b 100644 --- a/lib/plaid/models/numbers_international_iban.rb +++ b/lib/plaid/models/numbers_international_iban.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/numbers_international_nullable.rb b/lib/plaid/models/numbers_international_nullable.rb index 8890b9e59..8f5e2de21 100644 --- a/lib/plaid/models/numbers_international_nullable.rb +++ b/lib/plaid/models/numbers_international_nullable.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/override_account_type.rb b/lib/plaid/models/override_account_type.rb index fe4378c85..091932bc2 100644 --- a/lib/plaid/models/override_account_type.rb +++ b/lib/plaid/models/override_account_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/override_accounts.rb b/lib/plaid/models/override_accounts.rb index 02acf0e9f..1b28fb3bc 100644 --- a/lib/plaid/models/override_accounts.rb +++ b/lib/plaid/models/override_accounts.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/owner.rb b/lib/plaid/models/owner.rb index 8db2684a8..0439b9ace 100644 --- a/lib/plaid/models/owner.rb +++ b/lib/plaid/models/owner.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -16,7 +16,7 @@ module Plaid # Data returned from the financial institution about the owner or owners of an account. Only the `names` array must be non-empty. class Owner - # A list of names associated with the account by the financial institution. These should always be the names of individuals, even for business accounts. If the name of a business is reported, please contact Plaid Support. In the case of a joint account, Plaid will make a best effort to report the names of all account holders. If an Item contains multiple accounts with different owner names, some institutions will report all names associated with the Item in each account's `names` array. + # A list of names associated with the account by the financial institution. In the case of a joint account, Plaid will make a best effort to report the names of all account holders. If an Item contains multiple accounts with different owner names, some institutions will report all names associated with the Item in each account's `names` array. attr_accessor :names # A list of phone numbers associated with the account by the financial institution. May be an empty array if no relevant information is returned from the financial institution. diff --git a/lib/plaid/models/owner_override.rb b/lib/plaid/models/owner_override.rb index 4d0004593..f1d74f724 100644 --- a/lib/plaid/models/owner_override.rb +++ b/lib/plaid/models/owner_override.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/ownership_type.rb b/lib/plaid/models/ownership_type.rb new file mode 100644 index 000000000..80f563b98 --- /dev/null +++ b/lib/plaid/models/ownership_type.rb @@ -0,0 +1,42 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class OwnershipType + NULL = "null".freeze + INDIVIDUAL = "individual".freeze + JOINT = "joint".freeze + ASSOCIATION = "association".freeze + TRUST = "trust".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/parties.rb b/lib/plaid/models/parties.rb new file mode 100644 index 000000000..da58d32ff --- /dev/null +++ b/lib/plaid/models/parties.rb @@ -0,0 +1,226 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # A collection of objects that define specific parties to a deal. This includes the direct participating parties, such as borrower and seller and the indirect parties such as the credit report provider. + class Parties + attr_accessor :party + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'party' => :'PARTY' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'party' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::Parties` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::Parties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'party') + if (value = attributes[:'party']).is_a?(Array) + self.party = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @party.nil? + invalid_properties.push('invalid value for "party", party cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @party.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + party == o.party + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [party].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/partner_customers_create_request.rb b/lib/plaid/models/partner_customer_create_request.rb similarity index 66% rename from lib/plaid/models/partner_customers_create_request.rb rename to lib/plaid/models/partner_customer_create_request.rb index e6514be15..1c1569f07 100644 --- a/lib/plaid/models/partner_customers_create_request.rb +++ b/lib/plaid/models/partner_customer_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,8 +14,8 @@ require 'time' module Plaid - # Request schema for `/partner/v1/customers/create`. - class PartnerCustomersCreateRequest + # Request schema for `/partner/customer/create`. + class PartnerCustomerCreateRequest # Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body. attr_accessor :client_id @@ -28,12 +28,33 @@ class PartnerCustomersCreateRequest # Denotes whether or not the partner has completed attestation of diligence for the end customer to be created. attr_accessor :is_diligence_attested - # The products to be enabled on for the end customer. + # The products to be enabled for the end customer. attr_accessor :products - # If true, sets end customer's link customization to match partner's link customization. + # If true, the end customer's default Link customization will be set to match the partner's. attr_accessor :create_link_customization + # Base64-encoded representation of the end customer's logo. Defaults to the partner's logo if omitted. + attr_accessor :logo + + # The end customer's legal name. + attr_accessor :legal_entity_name + + # The end customer's website. + attr_accessor :website + + # The name of the end customer's application. + attr_accessor :application_name + + attr_accessor :technical_contact + + attr_accessor :billing_contact + + attr_accessor :address + + # Denotes whether the partner has forwarded the Plaid bank addendum to the end customer. + attr_accessor :is_bank_addendum_completed + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -42,7 +63,15 @@ def self.attribute_map :'company_name' => :'company_name', :'is_diligence_attested' => :'is_diligence_attested', :'products' => :'products', - :'create_link_customization' => :'create_link_customization' + :'create_link_customization' => :'create_link_customization', + :'logo' => :'logo', + :'legal_entity_name' => :'legal_entity_name', + :'website' => :'website', + :'application_name' => :'application_name', + :'technical_contact' => :'technical_contact', + :'billing_contact' => :'billing_contact', + :'address' => :'address', + :'is_bank_addendum_completed' => :'is_bank_addendum_completed' } end @@ -59,7 +88,15 @@ def self.openapi_types :'company_name' => :'String', :'is_diligence_attested' => :'Boolean', :'products' => :'Array', - :'create_link_customization' => :'Boolean' + :'create_link_customization' => :'Boolean', + :'logo' => :'String', + :'legal_entity_name' => :'String', + :'website' => :'String', + :'application_name' => :'String', + :'technical_contact' => :'PartnerEndCustomerTechnicalContact', + :'billing_contact' => :'PartnerEndCustomerBillingContact', + :'address' => :'PartnerEndCustomerAddress', + :'is_bank_addendum_completed' => :'Boolean' } end @@ -73,13 +110,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PartnerCustomersCreateRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PartnerCustomerCreateRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PartnerCustomersCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PartnerCustomerCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -109,6 +146,38 @@ def initialize(attributes = {}) if attributes.key?(:'create_link_customization') self.create_link_customization = attributes[:'create_link_customization'] end + + if attributes.key?(:'logo') + self.logo = attributes[:'logo'] + end + + if attributes.key?(:'legal_entity_name') + self.legal_entity_name = attributes[:'legal_entity_name'] + end + + if attributes.key?(:'website') + self.website = attributes[:'website'] + end + + if attributes.key?(:'application_name') + self.application_name = attributes[:'application_name'] + end + + if attributes.key?(:'technical_contact') + self.technical_contact = attributes[:'technical_contact'] + end + + if attributes.key?(:'billing_contact') + self.billing_contact = attributes[:'billing_contact'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'is_bank_addendum_completed') + self.is_bank_addendum_completed = attributes[:'is_bank_addendum_completed'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -127,6 +196,26 @@ def list_invalid_properties invalid_properties.push('invalid value for "products", products cannot be nil.') end + if @legal_entity_name.nil? + invalid_properties.push('invalid value for "legal_entity_name", legal_entity_name cannot be nil.') + end + + if @website.nil? + invalid_properties.push('invalid value for "website", website cannot be nil.') + end + + if @application_name.nil? + invalid_properties.push('invalid value for "application_name", application_name cannot be nil.') + end + + if @address.nil? + invalid_properties.push('invalid value for "address", address cannot be nil.') + end + + if @is_bank_addendum_completed.nil? + invalid_properties.push('invalid value for "is_bank_addendum_completed", is_bank_addendum_completed cannot be nil.') + end + invalid_properties end @@ -136,6 +225,11 @@ def valid? return false if @company_name.nil? return false if @is_diligence_attested.nil? return false if @products.nil? + return false if @legal_entity_name.nil? + return false if @website.nil? + return false if @application_name.nil? + return false if @address.nil? + return false if @is_bank_addendum_completed.nil? true end @@ -149,7 +243,15 @@ def ==(o) company_name == o.company_name && is_diligence_attested == o.is_diligence_attested && products == o.products && - create_link_customization == o.create_link_customization + create_link_customization == o.create_link_customization && + logo == o.logo && + legal_entity_name == o.legal_entity_name && + website == o.website && + application_name == o.application_name && + technical_contact == o.technical_contact && + billing_contact == o.billing_contact && + address == o.address && + is_bank_addendum_completed == o.is_bank_addendum_completed end # @see the `==` method @@ -161,7 +263,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, secret, company_name, is_diligence_attested, products, create_link_customization].hash + [client_id, secret, company_name, is_diligence_attested, products, create_link_customization, logo, legal_entity_name, website, application_name, technical_contact, billing_contact, address, is_bank_addendum_completed].hash end # Builds the object from hash diff --git a/lib/plaid/models/partner_customers_create_response.rb b/lib/plaid/models/partner_customer_create_response.rb similarity index 89% rename from lib/plaid/models/partner_customers_create_response.rb rename to lib/plaid/models/partner_customer_create_response.rb index fa21c8331..98f465c9c 100644 --- a/lib/plaid/models/partner_customers_create_response.rb +++ b/lib/plaid/models/partner_customer_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,12 +14,10 @@ require 'time' module Plaid - # Response schema for `/partner/v1/customers/create`. - class PartnerCustomersCreateResponse + # Response schema for `/partner/customer/create`. + class PartnerCustomerCreateResponse attr_accessor :end_customer - attr_accessor :production_secret - # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. attr_accessor :request_id @@ -27,7 +25,6 @@ class PartnerCustomersCreateResponse def self.attribute_map { :'end_customer' => :'end_customer', - :'production_secret' => :'production_secret', :'request_id' => :'request_id' } end @@ -40,8 +37,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'end_customer' => :'PartnerEndCustomerClient', - :'production_secret' => :'String', + :'end_customer' => :'PartnerEndCustomerWithSecrets', :'request_id' => :'String' } end @@ -56,13 +52,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PartnerCustomersCreateResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PartnerCustomerCreateResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PartnerCustomersCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PartnerCustomerCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -71,10 +67,6 @@ def initialize(attributes = {}) self.end_customer = attributes[:'end_customer'] end - if attributes.key?(:'production_secret') - self.production_secret = attributes[:'production_secret'] - end - if attributes.key?(:'request_id') self.request_id = attributes[:'request_id'] end @@ -99,7 +91,6 @@ def ==(o) return true if self.equal?(o) self.class == o.class && end_customer == o.end_customer && - production_secret == o.production_secret && request_id == o.request_id end @@ -112,7 +103,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [end_customer, production_secret, request_id].hash + [end_customer, request_id].hash end # Builds the object from hash diff --git a/lib/plaid/models/partner_customer_get_request.rb b/lib/plaid/models/partner_customer_get_request.rb new file mode 100644 index 000000000..2fb3b294e --- /dev/null +++ b/lib/plaid/models/partner_customer_get_request.rb @@ -0,0 +1,244 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request schema for `/partner/customer/get`. + class PartnerCustomerGetRequest + # Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body. + attr_accessor :client_id + + # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. + attr_accessor :secret + + attr_accessor :end_customer_client_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_id' => :'client_id', + :'secret' => :'secret', + :'end_customer_client_id' => :'end_customer_client_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'client_id' => :'String', + :'secret' => :'String', + :'end_customer_client_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PartnerCustomerGetRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PartnerCustomerGetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'end_customer_client_id') + self.end_customer_client_id = attributes[:'end_customer_client_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @end_customer_client_id.nil? + invalid_properties.push('invalid value for "end_customer_client_id", end_customer_client_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @end_customer_client_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + client_id == o.client_id && + secret == o.secret && + end_customer_client_id == o.end_customer_client_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [client_id, secret, end_customer_client_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/partner_customer_get_response.rb b/lib/plaid/models/partner_customer_get_response.rb new file mode 100644 index 000000000..b7718fd08 --- /dev/null +++ b/lib/plaid/models/partner_customer_get_response.rb @@ -0,0 +1,229 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Response schema for `/partner/customer/get`. + class PartnerCustomerGetResponse + attr_accessor :end_customer + + # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. + attr_accessor :request_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'end_customer' => :'end_customer', + :'request_id' => :'request_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'end_customer' => :'PartnerEndCustomer', + :'request_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PartnerCustomerGetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PartnerCustomerGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'end_customer') + self.end_customer = attributes[:'end_customer'] + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + end_customer == o.end_customer && + request_id == o.request_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [end_customer, request_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/partner_end_customer_client.rb b/lib/plaid/models/partner_end_customer.rb similarity index 89% rename from lib/plaid/models/partner_end_customer_client.rb rename to lib/plaid/models/partner_end_customer.rb index e758c9176..23401f030 100644 --- a/lib/plaid/models/partner_end_customer_client.rb +++ b/lib/plaid/models/partner_end_customer.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,18 +14,21 @@ require 'time' module Plaid - # The end customer details for the newly-created customer client. - class PartnerEndCustomerClient + # The details for an end customer. + class PartnerEndCustomer # Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body. attr_accessor :client_id attr_accessor :company_name + attr_accessor :status + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'client_id' => :'client_id', - :'company_name' => :'company_name' + :'company_name' => :'company_name', + :'status' => :'status' } end @@ -38,7 +41,8 @@ def self.acceptable_attributes def self.openapi_types { :'client_id' => :'String', - :'company_name' => :'String' + :'company_name' => :'String', + :'status' => :'PartnerEndCustomerStatus' } end @@ -52,13 +56,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PartnerEndCustomerClient` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PartnerEndCustomer` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PartnerEndCustomerClient`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PartnerEndCustomer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -70,6 +74,10 @@ def initialize(attributes = {}) if attributes.key?(:'company_name') self.company_name = attributes[:'company_name'] end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -91,7 +99,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && client_id == o.client_id && - company_name == o.company_name + company_name == o.company_name && + status == o.status end # @see the `==` method @@ -103,7 +112,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, company_name].hash + [client_id, company_name, status].hash end # Builds the object from hash diff --git a/lib/plaid/models/partner_end_customer_address.rb b/lib/plaid/models/partner_end_customer_address.rb new file mode 100644 index 000000000..e5c78958d --- /dev/null +++ b/lib/plaid/models/partner_end_customer_address.rb @@ -0,0 +1,256 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The end customer's address. + class PartnerEndCustomerAddress + attr_accessor :city + + attr_accessor :street + + attr_accessor :region + + attr_accessor :postal_code + + # ISO-3166-1 alpha-2 country code standard. + attr_accessor :country_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'city' => :'city', + :'street' => :'street', + :'region' => :'region', + :'postal_code' => :'postal_code', + :'country_code' => :'country_code' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'city' => :'String', + :'street' => :'String', + :'region' => :'String', + :'postal_code' => :'String', + :'country_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PartnerEndCustomerAddress` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PartnerEndCustomerAddress`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'city') + self.city = attributes[:'city'] + end + + if attributes.key?(:'street') + self.street = attributes[:'street'] + end + + if attributes.key?(:'region') + self.region = attributes[:'region'] + end + + if attributes.key?(:'postal_code') + self.postal_code = attributes[:'postal_code'] + end + + if attributes.key?(:'country_code') + self.country_code = attributes[:'country_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + city == o.city && + street == o.street && + region == o.region && + postal_code == o.postal_code && + country_code == o.country_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [city, street, region, postal_code, country_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/partner_end_customer_billing_contact.rb b/lib/plaid/models/partner_end_customer_billing_contact.rb new file mode 100644 index 000000000..36f365d7f --- /dev/null +++ b/lib/plaid/models/partner_end_customer_billing_contact.rb @@ -0,0 +1,237 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The billing contact for the end customer. Defaults to partner's technical contact if omitted. + class PartnerEndCustomerBillingContact + attr_accessor :given_name + + attr_accessor :family_name + + attr_accessor :email + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'given_name' => :'given_name', + :'family_name' => :'family_name', + :'email' => :'email' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'given_name' => :'String', + :'family_name' => :'String', + :'email' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PartnerEndCustomerBillingContact` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PartnerEndCustomerBillingContact`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'given_name') + self.given_name = attributes[:'given_name'] + end + + if attributes.key?(:'family_name') + self.family_name = attributes[:'family_name'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + given_name == o.given_name && + family_name == o.family_name && + email == o.email + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [given_name, family_name, email].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/partner_end_customer_secrets.rb b/lib/plaid/models/partner_end_customer_secrets.rb new file mode 100644 index 000000000..da47fa0cd --- /dev/null +++ b/lib/plaid/models/partner_end_customer_secrets.rb @@ -0,0 +1,240 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The secrets for the newly created end customer. + class PartnerEndCustomerSecrets + # The end customer's secret key for the Production environment. + attr_accessor :production + + # The end customer's secret key for the Sandbox environment. + attr_accessor :sandbox + + # The end customer's secret key for the Development environment. + attr_accessor :development + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'production' => :'production', + :'sandbox' => :'sandbox', + :'development' => :'development' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'production' => :'String', + :'sandbox' => :'String', + :'development' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PartnerEndCustomerSecrets` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PartnerEndCustomerSecrets`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'production') + self.production = attributes[:'production'] + end + + if attributes.key?(:'sandbox') + self.sandbox = attributes[:'sandbox'] + end + + if attributes.key?(:'development') + self.development = attributes[:'development'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + production == o.production && + sandbox == o.sandbox && + development == o.development + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [production, sandbox, development].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/partner_end_customer_status.rb b/lib/plaid/models/partner_end_customer_status.rb new file mode 100644 index 000000000..e275b2c3d --- /dev/null +++ b/lib/plaid/models/partner_end_customer_status.rb @@ -0,0 +1,40 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class PartnerEndCustomerStatus + UNDER_REVIEW = "UNDER REVIEW".freeze + ACTIVE = "ACTIVE".freeze + DENIED = "DENIED".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/partner_end_customer_technical_contact.rb b/lib/plaid/models/partner_end_customer_technical_contact.rb new file mode 100644 index 000000000..080dc7687 --- /dev/null +++ b/lib/plaid/models/partner_end_customer_technical_contact.rb @@ -0,0 +1,237 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The technical contact for the end customer. Defaults to partner's technical contact if omitted. + class PartnerEndCustomerTechnicalContact + attr_accessor :given_name + + attr_accessor :family_name + + attr_accessor :email + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'given_name' => :'given_name', + :'family_name' => :'family_name', + :'email' => :'email' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'given_name' => :'String', + :'family_name' => :'String', + :'email' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PartnerEndCustomerTechnicalContact` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PartnerEndCustomerTechnicalContact`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'given_name') + self.given_name = attributes[:'given_name'] + end + + if attributes.key?(:'family_name') + self.family_name = attributes[:'family_name'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + given_name == o.given_name && + family_name == o.family_name && + email == o.email + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [given_name, family_name, email].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/partner_end_customer_with_secrets.rb b/lib/plaid/models/partner_end_customer_with_secrets.rb new file mode 100644 index 000000000..6881a1c4b --- /dev/null +++ b/lib/plaid/models/partner_end_customer_with_secrets.rb @@ -0,0 +1,247 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The details for the newly created end customer, including secrets for all environments. + class PartnerEndCustomerWithSecrets + # Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body. + attr_accessor :client_id + + attr_accessor :company_name + + attr_accessor :status + + attr_accessor :secrets + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_id' => :'client_id', + :'company_name' => :'company_name', + :'status' => :'status', + :'secrets' => :'secrets' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'client_id' => :'String', + :'company_name' => :'String', + :'status' => :'PartnerEndCustomerStatus', + :'secrets' => :'PartnerEndCustomerSecrets' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PartnerEndCustomerWithSecrets` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PartnerEndCustomerWithSecrets`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'company_name') + self.company_name = attributes[:'company_name'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'secrets') + self.secrets = attributes[:'secrets'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + client_id == o.client_id && + company_name == o.company_name && + status == o.status && + secrets == o.secrets + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [client_id, company_name, status, secrets].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/party.rb b/lib/plaid/models/party.rb new file mode 100644 index 000000000..11e202fc7 --- /dev/null +++ b/lib/plaid/models/party.rb @@ -0,0 +1,252 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # A collection of information about a single party to a transaction. Included direct participants like the borrower and seller as well as indirect participants such as the flood certificate provider. + class Party + attr_accessor :individual + + attr_accessor :roles + + attr_accessor :taxpayer_identifiers + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'individual' => :'INDIVIDUAL', + :'roles' => :'ROLES', + :'taxpayer_identifiers' => :'TAXPAYER_IDENTIFIERS' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'individual' => :'PartyIndividual', + :'roles' => :'Roles', + :'taxpayer_identifiers' => :'TaxpayerIdentifiers' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::Party` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::Party`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'individual') + self.individual = attributes[:'individual'] + end + + if attributes.key?(:'roles') + self.roles = attributes[:'roles'] + end + + if attributes.key?(:'taxpayer_identifiers') + self.taxpayer_identifiers = attributes[:'taxpayer_identifiers'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @individual.nil? + invalid_properties.push('invalid value for "individual", individual cannot be nil.') + end + + if @roles.nil? + invalid_properties.push('invalid value for "roles", roles cannot be nil.') + end + + if @taxpayer_identifiers.nil? + invalid_properties.push('invalid value for "taxpayer_identifiers", taxpayer_identifiers cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @individual.nil? + return false if @roles.nil? + return false if @taxpayer_identifiers.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + individual == o.individual && + roles == o.roles && + taxpayer_identifiers == o.taxpayer_identifiers + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [individual, roles, taxpayer_identifiers].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/party_individual.rb b/lib/plaid/models/party_individual.rb new file mode 100644 index 000000000..fc9f2f1ed --- /dev/null +++ b/lib/plaid/models/party_individual.rb @@ -0,0 +1,224 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # No documentation available + class PartyIndividual + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'NAME' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'IndividualName' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PartyIndividual` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PartyIndividual`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/party_role_type.rb b/lib/plaid/models/party_role_type.rb new file mode 100644 index 000000000..32fe22ac6 --- /dev/null +++ b/lib/plaid/models/party_role_type.rb @@ -0,0 +1,38 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class PartyRoleType + BORROWER = "Borrower".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/pay.rb b/lib/plaid/models/pay.rb index ff94750b1..8e8feb775 100644 --- a/lib/plaid/models/pay.rb +++ b/lib/plaid/models/pay.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/pay_frequency.rb b/lib/plaid/models/pay_frequency.rb index 777122b5a..25ed1e989 100644 --- a/lib/plaid/models/pay_frequency.rb +++ b/lib/plaid/models/pay_frequency.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/pay_frequency_value.rb b/lib/plaid/models/pay_frequency_value.rb index 4197506c4..08063cd08 100644 --- a/lib/plaid/models/pay_frequency_value.rb +++ b/lib/plaid/models/pay_frequency_value.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/pay_period_details.rb b/lib/plaid/models/pay_period_details.rb index 40f49ba23..75c2abea9 100644 --- a/lib/plaid/models/pay_period_details.rb +++ b/lib/plaid/models/pay_period_details.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/pay_stub_deductions_breakdown.rb b/lib/plaid/models/pay_stub_deductions_breakdown.rb index fcdcbb8ac..c1f6350a1 100644 --- a/lib/plaid/models/pay_stub_deductions_breakdown.rb +++ b/lib/plaid/models/pay_stub_deductions_breakdown.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/pay_stub_deductions_total.rb b/lib/plaid/models/pay_stub_deductions_total.rb index bd6ce5d33..95cc8087b 100644 --- a/lib/plaid/models/pay_stub_deductions_total.rb +++ b/lib/plaid/models/pay_stub_deductions_total.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/pay_stub_distribution_breakdown.rb b/lib/plaid/models/pay_stub_distribution_breakdown.rb index 660759a30..3f2b38459 100644 --- a/lib/plaid/models/pay_stub_distribution_breakdown.rb +++ b/lib/plaid/models/pay_stub_distribution_breakdown.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/pay_stub_earnings_breakdown.rb b/lib/plaid/models/pay_stub_earnings_breakdown.rb index 12a6fa261..9e772234a 100644 --- a/lib/plaid/models/pay_stub_earnings_breakdown.rb +++ b/lib/plaid/models/pay_stub_earnings_breakdown.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/pay_stub_earnings_total.rb b/lib/plaid/models/pay_stub_earnings_total.rb index 3e2e75123..7bef2397c 100644 --- a/lib/plaid/models/pay_stub_earnings_total.rb +++ b/lib/plaid/models/pay_stub_earnings_total.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/pay_stub_pay_period_details.rb b/lib/plaid/models/pay_stub_pay_period_details.rb index e5b14b1f8..6d9f31604 100644 --- a/lib/plaid/models/pay_stub_pay_period_details.rb +++ b/lib/plaid/models/pay_stub_pay_period_details.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/pay_stub_taxpayer_id.rb b/lib/plaid/models/pay_stub_taxpayer_id.rb index a8667e043..c0beca9a6 100644 --- a/lib/plaid/models/pay_stub_taxpayer_id.rb +++ b/lib/plaid/models/pay_stub_taxpayer_id.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_amount.rb b/lib/plaid/models/payment_amount.rb index 51122490e..494822975 100644 --- a/lib/plaid/models/payment_amount.rb +++ b/lib/plaid/models/payment_amount.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_amount_currency.rb b/lib/plaid/models/payment_amount_currency.rb index 6186daa72..51f658a85 100644 --- a/lib/plaid/models/payment_amount_currency.rb +++ b/lib/plaid/models/payment_amount_currency.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -17,6 +17,12 @@ module Plaid class PaymentAmountCurrency GBP = "GBP".freeze EUR = "EUR".freeze + PLN = "PLN".freeze + SEK = "SEK".freeze + DKK = "DKK".freeze + NOK = "NOK".freeze + CHF = "CHF".freeze + CZK = "CZK".freeze # Builds the enum from string # @param [String] The enum value in the form of the string diff --git a/lib/plaid/models/payment_channel.rb b/lib/plaid/models/payment_channel.rb index 21bea5449..abfbaa109 100644 --- a/lib/plaid/models/payment_channel.rb +++ b/lib/plaid/models/payment_channel.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_consent_max_payment_amount.rb b/lib/plaid/models/payment_consent_max_payment_amount.rb index 77f151c4b..92f6fc01c 100644 --- a/lib/plaid/models/payment_consent_max_payment_amount.rb +++ b/lib/plaid/models/payment_consent_max_payment_amount.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_consent_periodic_alignment.rb b/lib/plaid/models/payment_consent_periodic_alignment.rb index 450e78a78..ce2ca2f48 100644 --- a/lib/plaid/models/payment_consent_periodic_alignment.rb +++ b/lib/plaid/models/payment_consent_periodic_alignment.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_consent_periodic_amount.rb b/lib/plaid/models/payment_consent_periodic_amount.rb index 906683852..e6e247cfc 100644 --- a/lib/plaid/models/payment_consent_periodic_amount.rb +++ b/lib/plaid/models/payment_consent_periodic_amount.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_consent_periodic_amount_amount.rb b/lib/plaid/models/payment_consent_periodic_amount_amount.rb index 207bd40cf..0ef8df048 100644 --- a/lib/plaid/models/payment_consent_periodic_amount_amount.rb +++ b/lib/plaid/models/payment_consent_periodic_amount_amount.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_consent_periodic_interval.rb b/lib/plaid/models/payment_consent_periodic_interval.rb index bec53f4fc..7dccf7441 100644 --- a/lib/plaid/models/payment_consent_periodic_interval.rb +++ b/lib/plaid/models/payment_consent_periodic_interval.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_consent_valid_date_time.rb b/lib/plaid/models/payment_consent_valid_date_time.rb index 6c296931b..e54272cd1 100644 --- a/lib/plaid/models/payment_consent_valid_date_time.rb +++ b/lib/plaid/models/payment_consent_valid_date_time.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_address.rb b/lib/plaid/models/payment_initiation_address.rb index d71cb7204..638b1c27f 100644 --- a/lib/plaid/models/payment_initiation_address.rb +++ b/lib/plaid/models/payment_initiation_address.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_consent.rb b/lib/plaid/models/payment_initiation_consent.rb index 74e612d7f..204fa1ed8 100644 --- a/lib/plaid/models/payment_initiation_consent.rb +++ b/lib/plaid/models/payment_initiation_consent.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_consent_constraints.rb b/lib/plaid/models/payment_initiation_consent_constraints.rb index 01f14d272..2114ec7b0 100644 --- a/lib/plaid/models/payment_initiation_consent_constraints.rb +++ b/lib/plaid/models/payment_initiation_consent_constraints.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_consent_create_request.rb b/lib/plaid/models/payment_initiation_consent_create_request.rb index 69c254722..80caa747d 100644 --- a/lib/plaid/models/payment_initiation_consent_create_request.rb +++ b/lib/plaid/models/payment_initiation_consent_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_consent_create_response.rb b/lib/plaid/models/payment_initiation_consent_create_response.rb index 2c02cffd3..88dc483d1 100644 --- a/lib/plaid/models/payment_initiation_consent_create_response.rb +++ b/lib/plaid/models/payment_initiation_consent_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_consent_get_request.rb b/lib/plaid/models/payment_initiation_consent_get_request.rb index 480ee7f45..9965efb83 100644 --- a/lib/plaid/models/payment_initiation_consent_get_request.rb +++ b/lib/plaid/models/payment_initiation_consent_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_consent_get_response.rb b/lib/plaid/models/payment_initiation_consent_get_response.rb index 81aad18ba..c8cc15591 100644 --- a/lib/plaid/models/payment_initiation_consent_get_response.rb +++ b/lib/plaid/models/payment_initiation_consent_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_consent_payment_execute_request.rb b/lib/plaid/models/payment_initiation_consent_payment_execute_request.rb index 0c214fec8..a3243bdc0 100644 --- a/lib/plaid/models/payment_initiation_consent_payment_execute_request.rb +++ b/lib/plaid/models/payment_initiation_consent_payment_execute_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_consent_payment_execute_response.rb b/lib/plaid/models/payment_initiation_consent_payment_execute_response.rb index dae929b5c..88196dd4c 100644 --- a/lib/plaid/models/payment_initiation_consent_payment_execute_response.rb +++ b/lib/plaid/models/payment_initiation_consent_payment_execute_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_consent_revoke_request.rb b/lib/plaid/models/payment_initiation_consent_revoke_request.rb index b5707a9ee..e0572d1b4 100644 --- a/lib/plaid/models/payment_initiation_consent_revoke_request.rb +++ b/lib/plaid/models/payment_initiation_consent_revoke_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_consent_revoke_response.rb b/lib/plaid/models/payment_initiation_consent_revoke_response.rb index f4ea6c0ef..5d5ebb4a6 100644 --- a/lib/plaid/models/payment_initiation_consent_revoke_response.rb +++ b/lib/plaid/models/payment_initiation_consent_revoke_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_consent_scope.rb b/lib/plaid/models/payment_initiation_consent_scope.rb index 5795e719b..bde7427d4 100644 --- a/lib/plaid/models/payment_initiation_consent_scope.rb +++ b/lib/plaid/models/payment_initiation_consent_scope.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_consent_status.rb b/lib/plaid/models/payment_initiation_consent_status.rb index c6e8b873c..223e1dd88 100644 --- a/lib/plaid/models/payment_initiation_consent_status.rb +++ b/lib/plaid/models/payment_initiation_consent_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_metadata.rb b/lib/plaid/models/payment_initiation_metadata.rb index c33811ea9..53cd4f415 100644 --- a/lib/plaid/models/payment_initiation_metadata.rb +++ b/lib/plaid/models/payment_initiation_metadata.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_optional_restriction_bacs.rb b/lib/plaid/models/payment_initiation_optional_restriction_bacs.rb index 38b566d0a..69968d99d 100644 --- a/lib/plaid/models/payment_initiation_optional_restriction_bacs.rb +++ b/lib/plaid/models/payment_initiation_optional_restriction_bacs.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_payment.rb b/lib/plaid/models/payment_initiation_payment.rb index 7fa422432..e5313a4ab 100644 --- a/lib/plaid/models/payment_initiation_payment.rb +++ b/lib/plaid/models/payment_initiation_payment.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -114,6 +114,7 @@ def self.openapi_nullable :'refund_details', :'bacs', :'iban', + :'refund_ids', :'wallet_id', :'scheme', :'adjusted_scheme', diff --git a/lib/plaid/models/payment_initiation_payment_create_request.rb b/lib/plaid/models/payment_initiation_payment_create_request.rb index 0176a1d1f..f84c92a96 100644 --- a/lib/plaid/models/payment_initiation_payment_create_request.rb +++ b/lib/plaid/models/payment_initiation_payment_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,7 +25,7 @@ class PaymentInitiationPaymentCreateRequest # The ID of the recipient the payment is for. attr_accessor :recipient_id - # A reference for the payment. This must be an alphanumeric string with at most 18 characters and must not contain any special characters (since not all institutions support them). + # A reference for the payment. This must be an alphanumeric string with at most 18 characters and must not contain any special characters (since not all institutions support them). In order to track settlement via Payment Confirmation, each payment must have a unique reference. If the reference provided through the API is not unique, Plaid will adjust it. Both the originally provided and automatically adjusted references (if any) can be found in the `reference` and `adjusted_reference` fields, respectively. attr_accessor :reference attr_accessor :amount diff --git a/lib/plaid/models/payment_initiation_payment_create_response.rb b/lib/plaid/models/payment_initiation_payment_create_response.rb index a9671e0a7..adddc9952 100644 --- a/lib/plaid/models/payment_initiation_payment_create_response.rb +++ b/lib/plaid/models/payment_initiation_payment_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_payment_create_status.rb b/lib/plaid/models/payment_initiation_payment_create_status.rb index 1b9cabfa4..2a91fbec9 100644 --- a/lib/plaid/models/payment_initiation_payment_create_status.rb +++ b/lib/plaid/models/payment_initiation_payment_create_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_payment_get_request.rb b/lib/plaid/models/payment_initiation_payment_get_request.rb index 1291b7b6d..1b9c56a05 100644 --- a/lib/plaid/models/payment_initiation_payment_get_request.rb +++ b/lib/plaid/models/payment_initiation_payment_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_payment_get_response.rb b/lib/plaid/models/payment_initiation_payment_get_response.rb index 61060cfc7..4c84de006 100644 --- a/lib/plaid/models/payment_initiation_payment_get_response.rb +++ b/lib/plaid/models/payment_initiation_payment_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -119,6 +119,7 @@ def self.openapi_nullable :'refund_details', :'bacs', :'iban', + :'refund_ids', :'wallet_id', :'scheme', :'adjusted_scheme', diff --git a/lib/plaid/models/payment_initiation_payment_list_request.rb b/lib/plaid/models/payment_initiation_payment_list_request.rb index a6fa4b69a..b475e77ba 100644 --- a/lib/plaid/models/payment_initiation_payment_list_request.rb +++ b/lib/plaid/models/payment_initiation_payment_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_payment_list_response.rb b/lib/plaid/models/payment_initiation_payment_list_response.rb index d4065f2a6..10ecb2b9d 100644 --- a/lib/plaid/models/payment_initiation_payment_list_response.rb +++ b/lib/plaid/models/payment_initiation_payment_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_payment_reverse_request.rb b/lib/plaid/models/payment_initiation_payment_reverse_request.rb index b1950d4eb..7f18c8809 100644 --- a/lib/plaid/models/payment_initiation_payment_reverse_request.rb +++ b/lib/plaid/models/payment_initiation_payment_reverse_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_payment_reverse_response.rb b/lib/plaid/models/payment_initiation_payment_reverse_response.rb index 1354b26b3..bf8e8d505 100644 --- a/lib/plaid/models/payment_initiation_payment_reverse_response.rb +++ b/lib/plaid/models/payment_initiation_payment_reverse_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -42,7 +42,7 @@ def self.acceptable_attributes def self.openapi_types { :'refund_id' => :'String', - :'status' => :'PaymentInitiationRefundStatus', + :'status' => :'WalletTransactionStatus', :'request_id' => :'String' } end diff --git a/lib/plaid/models/payment_initiation_payment_status.rb b/lib/plaid/models/payment_initiation_payment_status.rb index 09a146027..1d41de865 100644 --- a/lib/plaid/models/payment_initiation_payment_status.rb +++ b/lib/plaid/models/payment_initiation_payment_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -24,6 +24,7 @@ class PaymentInitiationPaymentStatus BLOCKED = "PAYMENT_STATUS_BLOCKED".freeze UNKNOWN = "PAYMENT_STATUS_UNKNOWN".freeze EXECUTED = "PAYMENT_STATUS_EXECUTED".freeze + SETTLED = "PAYMENT_STATUS_SETTLED".freeze AUTHORISING = "PAYMENT_STATUS_AUTHORISING".freeze CANCELLED = "PAYMENT_STATUS_CANCELLED".freeze ESTABLISHED = "PAYMENT_STATUS_ESTABLISHED".freeze diff --git a/lib/plaid/models/payment_initiation_payment_token_create_request.rb b/lib/plaid/models/payment_initiation_payment_token_create_request.rb index abaeafb7c..b0ee6f8a2 100644 --- a/lib/plaid/models/payment_initiation_payment_token_create_request.rb +++ b/lib/plaid/models/payment_initiation_payment_token_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_payment_token_create_response.rb b/lib/plaid/models/payment_initiation_payment_token_create_response.rb index d5dcb5794..cee5eb040 100644 --- a/lib/plaid/models/payment_initiation_payment_token_create_response.rb +++ b/lib/plaid/models/payment_initiation_payment_token_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_recipient.rb b/lib/plaid/models/payment_initiation_recipient.rb index 7ae4f23b7..c60d5b9f5 100644 --- a/lib/plaid/models/payment_initiation_recipient.rb +++ b/lib/plaid/models/payment_initiation_recipient.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_recipient_create_request.rb b/lib/plaid/models/payment_initiation_recipient_create_request.rb index 491faa812..8c01de52e 100644 --- a/lib/plaid/models/payment_initiation_recipient_create_request.rb +++ b/lib/plaid/models/payment_initiation_recipient_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_recipient_create_response.rb b/lib/plaid/models/payment_initiation_recipient_create_response.rb index a9a03d0a9..f8d48eeba 100644 --- a/lib/plaid/models/payment_initiation_recipient_create_response.rb +++ b/lib/plaid/models/payment_initiation_recipient_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_recipient_get_request.rb b/lib/plaid/models/payment_initiation_recipient_get_request.rb index d053aa188..ca62235ff 100644 --- a/lib/plaid/models/payment_initiation_recipient_get_request.rb +++ b/lib/plaid/models/payment_initiation_recipient_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_recipient_get_response.rb b/lib/plaid/models/payment_initiation_recipient_get_response.rb index 9461f6124..623b5af6b 100644 --- a/lib/plaid/models/payment_initiation_recipient_get_response.rb +++ b/lib/plaid/models/payment_initiation_recipient_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_recipient_get_response_all_of.rb b/lib/plaid/models/payment_initiation_recipient_get_response_all_of.rb index ff39a2822..4c786ff5b 100644 --- a/lib/plaid/models/payment_initiation_recipient_get_response_all_of.rb +++ b/lib/plaid/models/payment_initiation_recipient_get_response_all_of.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_recipient_list_request.rb b/lib/plaid/models/payment_initiation_recipient_list_request.rb index c84696225..8556f634f 100644 --- a/lib/plaid/models/payment_initiation_recipient_list_request.rb +++ b/lib/plaid/models/payment_initiation_recipient_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_recipient_list_response.rb b/lib/plaid/models/payment_initiation_recipient_list_response.rb index 82217c9e9..5589ba4bf 100644 --- a/lib/plaid/models/payment_initiation_recipient_list_response.rb +++ b/lib/plaid/models/payment_initiation_recipient_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_standing_order_metadata.rb b/lib/plaid/models/payment_initiation_standing_order_metadata.rb index c093e5d3d..0b54b343e 100644 --- a/lib/plaid/models/payment_initiation_standing_order_metadata.rb +++ b/lib/plaid/models/payment_initiation_standing_order_metadata.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_meta.rb b/lib/plaid/models/payment_meta.rb index 54c65945c..5ab09ae44 100644 --- a/lib/plaid/models/payment_meta.rb +++ b/lib/plaid/models/payment_meta.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_profile_create_request.rb b/lib/plaid/models/payment_profile_create_request.rb index df9fe952d..3cc8623d2 100644 --- a/lib/plaid/models/payment_profile_create_request.rb +++ b/lib/plaid/models/payment_profile_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_profile_create_response.rb b/lib/plaid/models/payment_profile_create_response.rb index 37e12b901..5cf6d147a 100644 --- a/lib/plaid/models/payment_profile_create_response.rb +++ b/lib/plaid/models/payment_profile_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_profile_get_request.rb b/lib/plaid/models/payment_profile_get_request.rb index 07882e2ed..f387a2ada 100644 --- a/lib/plaid/models/payment_profile_get_request.rb +++ b/lib/plaid/models/payment_profile_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_profile_get_response.rb b/lib/plaid/models/payment_profile_get_response.rb index fbcfeea38..12c13c4e9 100644 --- a/lib/plaid/models/payment_profile_get_response.rb +++ b/lib/plaid/models/payment_profile_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_profile_remove_request.rb b/lib/plaid/models/payment_profile_remove_request.rb index b0a7851a4..a844dd4ef 100644 --- a/lib/plaid/models/payment_profile_remove_request.rb +++ b/lib/plaid/models/payment_profile_remove_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_profile_remove_response.rb b/lib/plaid/models/payment_profile_remove_response.rb index b6b8fcbe7..bd7c0b4b9 100644 --- a/lib/plaid/models/payment_profile_remove_response.rb +++ b/lib/plaid/models/payment_profile_remove_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_profile_status.rb b/lib/plaid/models/payment_profile_status.rb index 5936c118b..c02e9bb06 100644 --- a/lib/plaid/models/payment_profile_status.rb +++ b/lib/plaid/models/payment_profile_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_schedule_interval.rb b/lib/plaid/models/payment_schedule_interval.rb index 91da8b194..9b545586d 100644 --- a/lib/plaid/models/payment_schedule_interval.rb +++ b/lib/plaid/models/payment_schedule_interval.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_scheme.rb b/lib/plaid/models/payment_scheme.rb index 20f7f26c3..3f20863d4 100644 --- a/lib/plaid/models/payment_scheme.rb +++ b/lib/plaid/models/payment_scheme.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_status_update_webhook.rb b/lib/plaid/models/payment_status_update_webhook.rb index 53606fc5a..75f74fa2b 100644 --- a/lib/plaid/models/payment_status_update_webhook.rb +++ b/lib/plaid/models/payment_status_update_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -46,6 +46,8 @@ class PaymentStatusUpdateWebhook attr_accessor :error + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -59,7 +61,8 @@ def self.attribute_map :'original_start_date' => :'original_start_date', :'adjusted_start_date' => :'adjusted_start_date', :'timestamp' => :'timestamp', - :'error' => :'error' + :'error' => :'error', + :'environment' => :'environment' } end @@ -81,7 +84,8 @@ def self.openapi_types :'original_start_date' => :'Date', :'adjusted_start_date' => :'Date', :'timestamp' => :'Time', - :'error' => :'PlaidError' + :'error' => :'PlaidError', + :'environment' => :'WebhookEnvironmentValues' } end @@ -92,7 +96,7 @@ def self.openapi_nullable :'adjusted_reference', :'original_start_date', :'adjusted_start_date', - :'error' + :'error', ]) end @@ -154,6 +158,10 @@ def initialize(attributes = {}) if attributes.key?(:'error') self.error = attributes[:'error'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -184,6 +192,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -196,6 +208,7 @@ def valid? return false if @new_payment_status.nil? return false if @old_payment_status.nil? return false if @timestamp.nil? + return false if @environment.nil? true end @@ -214,7 +227,8 @@ def ==(o) original_start_date == o.original_start_date && adjusted_start_date == o.adjusted_start_date && timestamp == o.timestamp && - error == o.error + error == o.error && + environment == o.environment end # @see the `==` method @@ -226,7 +240,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, payment_id, new_payment_status, old_payment_status, original_reference, adjusted_reference, original_start_date, adjusted_start_date, timestamp, error].hash + [webhook_type, webhook_code, payment_id, new_payment_status, old_payment_status, original_reference, adjusted_reference, original_start_date, adjusted_start_date, timestamp, error, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/payroll_income_account_data.rb b/lib/plaid/models/payroll_income_account_data.rb index 6d914f410..d6d3f6f9d 100644 --- a/lib/plaid/models/payroll_income_account_data.rb +++ b/lib/plaid/models/payroll_income_account_data.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payroll_income_object.rb b/lib/plaid/models/payroll_income_object.rb index f57322a66..72a3ed1e8 100644 --- a/lib/plaid/models/payroll_income_object.rb +++ b/lib/plaid/models/payroll_income_object.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payroll_income_rate_of_pay.rb b/lib/plaid/models/payroll_income_rate_of_pay.rb index e83387f1f..a37f9ae5c 100644 --- a/lib/plaid/models/payroll_income_rate_of_pay.rb +++ b/lib/plaid/models/payroll_income_rate_of_pay.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payroll_item.rb b/lib/plaid/models/payroll_item.rb index 7606103f8..de99fd373 100644 --- a/lib/plaid/models/payroll_item.rb +++ b/lib/plaid/models/payroll_item.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,8 +25,8 @@ class PayrollItem attr_accessor :status - # A reference id to reference what payroll data was returned from this endpoint - attr_accessor :pull_id + # Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DDTHH:mm:ssZ) indicating the last time that the Item was updated. + attr_accessor :updated_at # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map @@ -35,7 +35,7 @@ def self.attribute_map :'accounts' => :'accounts', :'payroll_income' => :'payroll_income', :'status' => :'status', - :'pull_id' => :'pull_id' + :'updated_at' => :'updated_at' } end @@ -51,7 +51,7 @@ def self.openapi_types :'accounts' => :'Array', :'payroll_income' => :'Array', :'status' => :'PayrollItemStatus', - :'pull_id' => :'String' + :'updated_at' => :'Time' } end @@ -59,6 +59,7 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'status', + :'updated_at' ]) end @@ -97,8 +98,8 @@ def initialize(attributes = {}) self.status = attributes[:'status'] end - if attributes.key?(:'pull_id') - self.pull_id = attributes[:'pull_id'] + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] end end @@ -118,10 +119,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "payroll_income", payroll_income cannot be nil.') end - if @pull_id.nil? - invalid_properties.push('invalid value for "pull_id", pull_id cannot be nil.') - end - invalid_properties end @@ -131,7 +128,6 @@ def valid? return false if @item_id.nil? return false if @accounts.nil? return false if @payroll_income.nil? - return false if @pull_id.nil? true end @@ -144,7 +140,7 @@ def ==(o) accounts == o.accounts && payroll_income == o.payroll_income && status == o.status && - pull_id == o.pull_id + updated_at == o.updated_at end # @see the `==` method @@ -156,7 +152,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [item_id, accounts, payroll_income, status, pull_id].hash + [item_id, accounts, payroll_income, status, updated_at].hash end # Builds the object from hash diff --git a/lib/plaid/models/payroll_item_status.rb b/lib/plaid/models/payroll_item_status.rb index 4c1d124c7..a2e79a782 100644 --- a/lib/plaid/models/payroll_item_status.rb +++ b/lib/plaid/models/payroll_item_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payroll_risk_signals_item.rb b/lib/plaid/models/payroll_risk_signals_item.rb index 0a1364acc..534213bcf 100644 --- a/lib/plaid/models/payroll_risk_signals_item.rb +++ b/lib/plaid/models/payroll_risk_signals_item.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/paystub.rb b/lib/plaid/models/paystub.rb index b9fad00e0..eadd2d39f 100644 --- a/lib/plaid/models/paystub.rb +++ b/lib/plaid/models/paystub.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -39,8 +39,6 @@ class Paystub attr_accessor :ytd_earnings - attr_accessor :verification - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -54,8 +52,7 @@ def self.attribute_map :'pay_period_details' => :'pay_period_details', :'paystub_details' => :'paystub_details', :'income_breakdown' => :'income_breakdown', - :'ytd_earnings' => :'ytd_earnings', - :'verification' => :'verification' + :'ytd_earnings' => :'ytd_earnings' } end @@ -77,15 +74,13 @@ def self.openapi_types :'pay_period_details' => :'PayPeriodDetails', :'paystub_details' => :'PaystubDetails', :'income_breakdown' => :'Array', - :'ytd_earnings' => :'PaystubYTDDetails', - :'verification' => :'PaystubVerification' + :'ytd_earnings' => :'PaystubYTDDetails' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'verification' ]) end @@ -149,10 +144,6 @@ def initialize(attributes = {}) if attributes.key?(:'ytd_earnings') self.ytd_earnings = attributes[:'ytd_earnings'] end - - if attributes.key?(:'verification') - self.verification = attributes[:'verification'] - end end # Show invalid properties with the reasons. Usually used together with valid? @@ -218,8 +209,7 @@ def ==(o) pay_period_details == o.pay_period_details && paystub_details == o.paystub_details && income_breakdown == o.income_breakdown && - ytd_earnings == o.ytd_earnings && - verification == o.verification + ytd_earnings == o.ytd_earnings end # @see the `==` method @@ -231,7 +221,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [deductions, doc_id, earnings, employee, employer, employment_details, net_pay, pay_period_details, paystub_details, income_breakdown, ytd_earnings, verification].hash + [deductions, doc_id, earnings, employee, employer, employment_details, net_pay, pay_period_details, paystub_details, income_breakdown, ytd_earnings].hash end # Builds the object from hash diff --git a/lib/plaid/models/paystub_address.rb b/lib/plaid/models/paystub_address.rb index 7e7c94f25..876e2a8de 100644 --- a/lib/plaid/models/paystub_address.rb +++ b/lib/plaid/models/paystub_address.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/paystub_deduction.rb b/lib/plaid/models/paystub_deduction.rb index 90cc27453..f58ac4fb9 100644 --- a/lib/plaid/models/paystub_deduction.rb +++ b/lib/plaid/models/paystub_deduction.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/paystub_details.rb b/lib/plaid/models/paystub_details.rb index 2c8b22964..d74322705 100644 --- a/lib/plaid/models/paystub_details.rb +++ b/lib/plaid/models/paystub_details.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/paystub_employer.rb b/lib/plaid/models/paystub_employer.rb index 5ef49af8f..dab39ac3c 100644 --- a/lib/plaid/models/paystub_employer.rb +++ b/lib/plaid/models/paystub_employer.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/paystub_override.rb b/lib/plaid/models/paystub_override.rb index d1c4bae31..1f1288550 100644 --- a/lib/plaid/models/paystub_override.rb +++ b/lib/plaid/models/paystub_override.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/paystub_override_employee.rb b/lib/plaid/models/paystub_override_employee.rb index 1503fe130..e3f47c3de 100644 --- a/lib/plaid/models/paystub_override_employee.rb +++ b/lib/plaid/models/paystub_override_employee.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/paystub_override_employee_address.rb b/lib/plaid/models/paystub_override_employee_address.rb index ea00d3308..9de50795a 100644 --- a/lib/plaid/models/paystub_override_employee_address.rb +++ b/lib/plaid/models/paystub_override_employee_address.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/paystub_override_employer.rb b/lib/plaid/models/paystub_override_employer.rb index c178f00c3..3bd8915b4 100644 --- a/lib/plaid/models/paystub_override_employer.rb +++ b/lib/plaid/models/paystub_override_employer.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/paystub_pay_frequency.rb b/lib/plaid/models/paystub_pay_frequency.rb index c3f8eb802..a0979ee37 100644 --- a/lib/plaid/models/paystub_pay_frequency.rb +++ b/lib/plaid/models/paystub_pay_frequency.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/paystub_verification_status.rb b/lib/plaid/models/paystub_verification_status.rb deleted file mode 100644 index 73eb25a15..000000000 --- a/lib/plaid/models/paystub_verification_status.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#The Plaid API - -#The Plaid REST API. Please see https://plaid.com/docs/api for more details. - -The version of the OpenAPI document: 2020-09-14_1.161.5 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.1.1 - -=end - -require 'date' -require 'time' - -module Plaid - class PaystubVerificationStatus - PAYSTUB_VERIFICATION_STATUS_UNKNOWN = "PAYSTUB_VERIFICATION_STATUS_UNKNOWN".freeze - PAYSTUB_VERIFICATION_STATUS_VERIFIED = "PAYSTUB_VERIFICATION_STATUS_VERIFIED".freeze - PAYSTUB_VERIFICATION_STATUS_FRAUDULENT = "PAYSTUB_VERIFICATION_STATUS_FRAUDULENT".freeze - NULL = "null".freeze - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - # We do not validate that the value is one of the enums set in the OpenAPI - # file because we want to be able to add to our list of enums without - # breaking this client library. - value - end - end - -end diff --git a/lib/plaid/models/paystub_ytd_details.rb b/lib/plaid/models/paystub_ytd_details.rb index 57e166020..c18a20c61 100644 --- a/lib/plaid/models/paystub_ytd_details.rb +++ b/lib/plaid/models/paystub_ytd_details.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/pending_expiration_webhook.rb b/lib/plaid/models/pending_expiration_webhook.rb index 5dbba9910..77ad59a4d 100644 --- a/lib/plaid/models/pending_expiration_webhook.rb +++ b/lib/plaid/models/pending_expiration_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -28,13 +28,16 @@ class PendingExpirationWebhook # The date and time at which the Item's access consent will expire, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format attr_accessor :consent_expiration_time + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', :'item_id' => :'item_id', - :'consent_expiration_time' => :'consent_expiration_time' + :'consent_expiration_time' => :'consent_expiration_time', + :'environment' => :'environment' } end @@ -49,7 +52,8 @@ def self.openapi_types :'webhook_type' => :'String', :'webhook_code' => :'String', :'item_id' => :'String', - :'consent_expiration_time' => :'Time' + :'consent_expiration_time' => :'Time', + :'environment' => :'WebhookEnvironmentValues' } end @@ -89,6 +93,10 @@ def initialize(attributes = {}) if attributes.key?(:'consent_expiration_time') self.consent_expiration_time = attributes[:'consent_expiration_time'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -111,6 +119,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "consent_expiration_time", consent_expiration_time cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -121,6 +133,7 @@ def valid? return false if @webhook_code.nil? return false if @item_id.nil? return false if @consent_expiration_time.nil? + return false if @environment.nil? true end @@ -132,7 +145,8 @@ def ==(o) webhook_type == o.webhook_type && webhook_code == o.webhook_code && item_id == o.item_id && - consent_expiration_time == o.consent_expiration_time + consent_expiration_time == o.consent_expiration_time && + environment == o.environment end # @see the `==` method @@ -144,7 +158,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, item_id, consent_expiration_time].hash + [webhook_type, webhook_code, item_id, consent_expiration_time, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/personal_finance_category.rb b/lib/plaid/models/personal_finance_category.rb index b4e021824..ef6092457 100644 --- a/lib/plaid/models/personal_finance_category.rb +++ b/lib/plaid/models/personal_finance_category.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/phone_number.rb b/lib/plaid/models/phone_number.rb index b106f2160..d7443150a 100644 --- a/lib/plaid/models/phone_number.rb +++ b/lib/plaid/models/phone_number.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/phone_number_match_score.rb b/lib/plaid/models/phone_number_match_score.rb new file mode 100644 index 000000000..4fd18205e --- /dev/null +++ b/lib/plaid/models/phone_number_match_score.rb @@ -0,0 +1,221 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Score found by matching phone number provided by the API with the phone number on the account at the financial institution. If the account contains multiple owners, the maximum match score is filled. + class PhoneNumberMatchScore + # Match score for normalized phone number. 100 is a perfect match and 0 is a no match. If the phone number is missing from either the API or financial institution, this is empty. + attr_accessor :scores + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'scores' => :'scores' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'scores' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'scores' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PhoneNumberMatchScore` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PhoneNumberMatchScore`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'scores') + self.scores = attributes[:'scores'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + scores == o.scores + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [scores].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/phone_type.rb b/lib/plaid/models/phone_type.rb index 32d230e8d..9b6f2a994 100644 --- a/lib/plaid/models/phone_type.rb +++ b/lib/plaid/models/phone_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/physical_document_category.rb b/lib/plaid/models/physical_document_category.rb index 70bf7bed0..3c2ea7a56 100644 --- a/lib/plaid/models/physical_document_category.rb +++ b/lib/plaid/models/physical_document_category.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/physical_document_extracted_data.rb b/lib/plaid/models/physical_document_extracted_data.rb index 17408b6da..7cf289e3f 100644 --- a/lib/plaid/models/physical_document_extracted_data.rb +++ b/lib/plaid/models/physical_document_extracted_data.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -21,18 +21,23 @@ class PhysicalDocumentExtractedData attr_accessor :category + # A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). attr_accessor :expiration_date # Valid, capitalized, two-letter ISO code representing the country of this object. Must be in ISO 3166-1 alpha-2 form. attr_accessor :issuing_country + # An ISO 3166-2 subdivision code. Related terms would be \"state\", \"province\", \"prefecture\", \"zone\", \"subdivision\", etc. + attr_accessor :issuing_region + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'id_number' => :'id_number', :'category' => :'category', :'expiration_date' => :'expiration_date', - :'issuing_country' => :'issuing_country' + :'issuing_country' => :'issuing_country', + :'issuing_region' => :'issuing_region' } end @@ -47,7 +52,8 @@ def self.openapi_types :'id_number' => :'String', :'category' => :'PhysicalDocumentCategory', :'expiration_date' => :'Date', - :'issuing_country' => :'String' + :'issuing_country' => :'String', + :'issuing_region' => :'String' } end @@ -56,6 +62,7 @@ def self.openapi_nullable Set.new([ :'id_number', :'expiration_date', + :'issuing_region' ]) end @@ -89,18 +96,16 @@ def initialize(attributes = {}) if attributes.key?(:'issuing_country') self.issuing_country = attributes[:'issuing_country'] end + + if attributes.key?(:'issuing_region') + self.issuing_region = attributes[:'issuing_region'] + end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - pattern = Regexp.new(/^[A-Z0-9]+$/) - if @id_number !~ pattern - invalid_properties.push("invalid value for \"id_number\", must conform to the pattern #{pattern}.") - end - - if @category.nil? invalid_properties.push('invalid value for "category", category cannot be nil.') end @@ -113,11 +118,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "issuing_country", the character length must be great than or equal to 2.') end - pattern = Regexp.new(/^[A-Z]{2}$/) - if @issuing_country !~ pattern - invalid_properties.push("invalid value for \"issuing_country\", must conform to the pattern #{pattern}.") - end - invalid_properties end @@ -125,26 +125,12 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @id_number !~ Regexp.new(/^[A-Z0-9]+$/) return false if @category.nil? return false if @issuing_country.nil? return false if @issuing_country.to_s.length < 2 - return false if @issuing_country !~ Regexp.new(/^[A-Z]{2}$/) true end - # Custom attribute writer method with validation - # @param [Object] id_number Value to be assigned - def id_number=(id_number) - pattern = Regexp.new(/^[A-Z0-9]+$/) - if id_number !~ pattern - fail ArgumentError, "invalid value for \"id_number\", must conform to the pattern #{pattern}." - end - - - @id_number = id_number - end - # Custom attribute writer method with validation # @param [Object] issuing_country Value to be assigned def issuing_country=(issuing_country) @@ -156,11 +142,6 @@ def issuing_country=(issuing_country) fail ArgumentError, 'invalid value for "issuing_country", the character length must be great than or equal to 2.' end - pattern = Regexp.new(/^[A-Z]{2}$/) - if issuing_country !~ pattern - fail ArgumentError, "invalid value for \"issuing_country\", must conform to the pattern #{pattern}." - end - @issuing_country = issuing_country end @@ -173,7 +154,8 @@ def ==(o) id_number == o.id_number && category == o.category && expiration_date == o.expiration_date && - issuing_country == o.issuing_country + issuing_country == o.issuing_country && + issuing_region == o.issuing_region end # @see the `==` method @@ -185,7 +167,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id_number, category, expiration_date, issuing_country].hash + [id_number, category, expiration_date, issuing_country, issuing_region].hash end # Builds the object from hash diff --git a/lib/plaid/models/physical_document_extracted_data_analysis.rb b/lib/plaid/models/physical_document_extracted_data_analysis.rb index a76e08ab1..aa6047007 100644 --- a/lib/plaid/models/physical_document_extracted_data_analysis.rb +++ b/lib/plaid/models/physical_document_extracted_data_analysis.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/physical_document_images.rb b/lib/plaid/models/physical_document_images.rb index 70ac77d69..f10aeb743 100644 --- a/lib/plaid/models/physical_document_images.rb +++ b/lib/plaid/models/physical_document_images.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/plaid_error.rb b/lib/plaid/models/plaid_error.rb index 8197e88be..07704354e 100644 --- a/lib/plaid/models/plaid_error.rb +++ b/lib/plaid/models/plaid_error.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - # We use standard HTTP response codes for success and failure notifications, and our errors are further classified by `error_type`. In general, 200 HTTP codes correspond to success, 40X codes are for developer- or user-related failures, and 50X codes are for Plaid-related issues. Error fields will be `null` if no error has occurred. + # We use standard HTTP response codes for success and failure notifications, and our errors are further classified by `error_type`. In general, 200 HTTP codes correspond to success, 40X codes are for developer- or user-related failures, and 50X codes are for Plaid-related issues. An Item with a non-`null` error object will only be part of an API response when calling `/item/get` to view Item status. Otherwise, error fields will be `null` if no error has occurred; if an error has occurred, an error code will be returned instead. class PlaidError # A broad categorization of the error. Safe for programmatic use. attr_accessor :error_type @@ -193,7 +193,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @error_type.nil? - error_type_validator = EnumAttributeValidator.new('String', ["INVALID_REQUEST", "INVALID_RESULT", "INVALID_INPUT", "INSTITUTION_ERROR", "RATE_LIMIT_EXCEEDED", "API_ERROR", "ITEM_ERROR", "ASSET_REPORT_ERROR", "RECAPTCHA_ERROR", "OAUTH_ERROR", "PAYMENT_ERROR", "BANK_TRANSFER_ERROR", "INCOME_VERIFICATION_ERROR"]) + error_type_validator = EnumAttributeValidator.new('String', ["INVALID_REQUEST", "INVALID_RESULT", "INVALID_INPUT", "INSTITUTION_ERROR", "RATE_LIMIT_EXCEEDED", "API_ERROR", "ITEM_ERROR", "ASSET_REPORT_ERROR", "RECAPTCHA_ERROR", "OAUTH_ERROR", "PAYMENT_ERROR", "BANK_TRANSFER_ERROR", "INCOME_VERIFICATION_ERROR", "MICRODEPOSITS_ERROR"]) return false unless error_type_validator.valid?(@error_type) return false if @error_code.nil? return false if @error_message.nil? @@ -203,7 +203,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] error_type Object to be assigned def error_type=(error_type) - validator = EnumAttributeValidator.new('String', ["INVALID_REQUEST", "INVALID_RESULT", "INVALID_INPUT", "INSTITUTION_ERROR", "RATE_LIMIT_EXCEEDED", "API_ERROR", "ITEM_ERROR", "ASSET_REPORT_ERROR", "RECAPTCHA_ERROR", "OAUTH_ERROR", "PAYMENT_ERROR", "BANK_TRANSFER_ERROR", "INCOME_VERIFICATION_ERROR"]) + validator = EnumAttributeValidator.new('String', ["INVALID_REQUEST", "INVALID_RESULT", "INVALID_INPUT", "INSTITUTION_ERROR", "RATE_LIMIT_EXCEEDED", "API_ERROR", "ITEM_ERROR", "ASSET_REPORT_ERROR", "RECAPTCHA_ERROR", "OAUTH_ERROR", "PAYMENT_ERROR", "BANK_TRANSFER_ERROR", "INCOME_VERIFICATION_ERROR", "MICRODEPOSITS_ERROR"]) unless validator.valid?(error_type) fail ArgumentError, "invalid value for \"error_type\", must be one of #{validator.allowable_values}." end diff --git a/lib/plaid/models/platform_ids.rb b/lib/plaid/models/platform_ids.rb index 0316aa27d..ca349448f 100644 --- a/lib/plaid/models/platform_ids.rb +++ b/lib/plaid/models/platform_ids.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/po_box_status.rb b/lib/plaid/models/po_box_status.rb index 303bf8be3..ec5fb10c5 100644 --- a/lib/plaid/models/po_box_status.rb +++ b/lib/plaid/models/po_box_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/processor_apex_processor_token_create_request.rb b/lib/plaid/models/processor_apex_processor_token_create_request.rb index 86a9cc964..5734e7999 100644 --- a/lib/plaid/models/processor_apex_processor_token_create_request.rb +++ b/lib/plaid/models/processor_apex_processor_token_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/processor_auth_get_request.rb b/lib/plaid/models/processor_auth_get_request.rb index 747bde834..7542d9e80 100644 --- a/lib/plaid/models/processor_auth_get_request.rb +++ b/lib/plaid/models/processor_auth_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/processor_auth_get_response.rb b/lib/plaid/models/processor_auth_get_response.rb index 5b9a382fb..2f8eedda3 100644 --- a/lib/plaid/models/processor_auth_get_response.rb +++ b/lib/plaid/models/processor_auth_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/processor_balance_get_request.rb b/lib/plaid/models/processor_balance_get_request.rb index 221960de8..053c2b36e 100644 --- a/lib/plaid/models/processor_balance_get_request.rb +++ b/lib/plaid/models/processor_balance_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/processor_balance_get_request_options.rb b/lib/plaid/models/processor_balance_get_request_options.rb index ffddd726a..674d408ad 100644 --- a/lib/plaid/models/processor_balance_get_request_options.rb +++ b/lib/plaid/models/processor_balance_get_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/processor_balance_get_response.rb b/lib/plaid/models/processor_balance_get_response.rb index 2492d56f0..c583e548f 100644 --- a/lib/plaid/models/processor_balance_get_response.rb +++ b/lib/plaid/models/processor_balance_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/processor_bank_transfer_create_request.rb b/lib/plaid/models/processor_bank_transfer_create_request.rb index f49a15ca4..88ebf79e3 100644 --- a/lib/plaid/models/processor_bank_transfer_create_request.rb +++ b/lib/plaid/models/processor_bank_transfer_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/processor_bank_transfer_create_response.rb b/lib/plaid/models/processor_bank_transfer_create_response.rb index 17b656d6f..e1707046f 100644 --- a/lib/plaid/models/processor_bank_transfer_create_response.rb +++ b/lib/plaid/models/processor_bank_transfer_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/processor_identity_get_request.rb b/lib/plaid/models/processor_identity_get_request.rb index b7e695fa0..e22001797 100644 --- a/lib/plaid/models/processor_identity_get_request.rb +++ b/lib/plaid/models/processor_identity_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/processor_identity_get_response.rb b/lib/plaid/models/processor_identity_get_response.rb index f9fe3dfb0..c8c9d4fa4 100644 --- a/lib/plaid/models/processor_identity_get_response.rb +++ b/lib/plaid/models/processor_identity_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/processor_number.rb b/lib/plaid/models/processor_number.rb index abb4f8df6..996fcecf9 100644 --- a/lib/plaid/models/processor_number.rb +++ b/lib/plaid/models/processor_number.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/processor_stripe_bank_account_token_create_request.rb b/lib/plaid/models/processor_stripe_bank_account_token_create_request.rb index 1651a0e23..83dbe811a 100644 --- a/lib/plaid/models/processor_stripe_bank_account_token_create_request.rb +++ b/lib/plaid/models/processor_stripe_bank_account_token_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/processor_stripe_bank_account_token_create_response.rb b/lib/plaid/models/processor_stripe_bank_account_token_create_response.rb index 8f4a01585..06fc54e17 100644 --- a/lib/plaid/models/processor_stripe_bank_account_token_create_response.rb +++ b/lib/plaid/models/processor_stripe_bank_account_token_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/processor_token_create_request.rb b/lib/plaid/models/processor_token_create_request.rb index f600ab89e..65a90e38a 100644 --- a/lib/plaid/models/processor_token_create_request.rb +++ b/lib/plaid/models/processor_token_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -147,7 +147,7 @@ def valid? return false if @access_token.nil? return false if @account_id.nil? return false if @processor.nil? - processor_validator = EnumAttributeValidator.new('String', ["dwolla", "galileo", "modern_treasury", "ocrolus", "prime_trust", "vesta", "drivewealth", "vopay", "achq", "check", "checkbook", "circle", "sila_money", "rize", "svb_api", "unit", "wyre", "lithic", "alpaca", "astra", "moov", "treasury_prime", "marqeta", "checkout", "solid", "highnote", "apex_clearing", "gusto"]) + processor_validator = EnumAttributeValidator.new('String', ["dwolla", "galileo", "modern_treasury", "ocrolus", "prime_trust", "vesta", "drivewealth", "vopay", "achq", "check", "checkbook", "circle", "sila_money", "rize", "svb_api", "unit", "wyre", "lithic", "alpaca", "astra", "moov", "treasury_prime", "marqeta", "checkout", "solid", "highnote", "apex_clearing", "gusto", "adyen"]) return false unless processor_validator.valid?(@processor) true end @@ -155,7 +155,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] processor Object to be assigned def processor=(processor) - validator = EnumAttributeValidator.new('String', ["dwolla", "galileo", "modern_treasury", "ocrolus", "prime_trust", "vesta", "drivewealth", "vopay", "achq", "check", "checkbook", "circle", "sila_money", "rize", "svb_api", "unit", "wyre", "lithic", "alpaca", "astra", "moov", "treasury_prime", "marqeta", "checkout", "solid", "highnote", "apex_clearing", "gusto"]) + validator = EnumAttributeValidator.new('String', ["dwolla", "galileo", "modern_treasury", "ocrolus", "prime_trust", "vesta", "drivewealth", "vopay", "achq", "check", "checkbook", "circle", "sila_money", "rize", "svb_api", "unit", "wyre", "lithic", "alpaca", "astra", "moov", "treasury_prime", "marqeta", "checkout", "solid", "highnote", "apex_clearing", "gusto", "adyen"]) unless validator.valid?(processor) fail ArgumentError, "invalid value for \"processor\", must be one of #{validator.allowable_values}." end diff --git a/lib/plaid/models/processor_token_create_response.rb b/lib/plaid/models/processor_token_create_response.rb index 84ae8043c..17268038b 100644 --- a/lib/plaid/models/processor_token_create_response.rb +++ b/lib/plaid/models/processor_token_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/product_access.rb b/lib/plaid/models/product_access.rb index 65ce4dec4..b5a3fb493 100644 --- a/lib/plaid/models/product_access.rb +++ b/lib/plaid/models/product_access.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/product_status.rb b/lib/plaid/models/product_status.rb index 09d23f808..2935bc59d 100644 --- a/lib/plaid/models/product_status.rb +++ b/lib/plaid/models/product_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/product_status_breakdown.rb b/lib/plaid/models/product_status_breakdown.rb index b6c1145ee..c1f64234a 100644 --- a/lib/plaid/models/product_status_breakdown.rb +++ b/lib/plaid/models/product_status_breakdown.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - # A detailed breakdown of the institution's performance for a request type. The values for `success`, `error_plaid`, and `error_institution` sum to 1. + # A detailed breakdown of the institution's performance for a request type. The values for `success`, `error_plaid`, and `error_institution` sum to 1. The time range used for calculating the breakdown may range from the most recent few minutes to the past six hours. In general, smaller institutions will show status that was calculated over a longer period of time. For Investment updates, which are refreshed less frequently, the period assessed may be 24 hours or more. For more details, see [Institution status details](https://plaid.com/docs/account/activity/#institution-status-details). class ProductStatusBreakdown # The percentage of login attempts that are successful, expressed as a decimal. attr_accessor :success diff --git a/lib/plaid/models/products.rb b/lib/plaid/models/products.rb index e2ccad672..851ef2561 100644 --- a/lib/plaid/models/products.rb +++ b/lib/plaid/models/products.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/program_name_sensitivity.rb b/lib/plaid/models/program_name_sensitivity.rb index 9ab59a6f8..786594839 100644 --- a/lib/plaid/models/program_name_sensitivity.rb +++ b/lib/plaid/models/program_name_sensitivity.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/projected_income_summary_field_number.rb b/lib/plaid/models/projected_income_summary_field_number.rb index 331f00e76..1d7d926d3 100644 --- a/lib/plaid/models/projected_income_summary_field_number.rb +++ b/lib/plaid/models/projected_income_summary_field_number.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/pslf_status.rb b/lib/plaid/models/pslf_status.rb index 3fdb5b5b6..4c8a192a6 100644 --- a/lib/plaid/models/pslf_status.rb +++ b/lib/plaid/models/pslf_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - # Information about the student's eligibility in the Public Service Loan Forgiveness program. This is only returned if the institution is Fedloan (`ins_116527`). + # Information about the student's eligibility in the Public Service Loan Forgiveness program. This is only returned if the institution is FedLoan (`ins_116527`). class PSLFStatus # The estimated date borrower will have completed 120 qualifying monthly payments. Returned in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD). attr_accessor :estimated_eligibility_date diff --git a/lib/plaid/models/recaptcha_required_error.rb b/lib/plaid/models/recaptcha_required_error.rb index 5cf122379..3facf2598 100644 --- a/lib/plaid/models/recaptcha_required_error.rb +++ b/lib/plaid/models/recaptcha_required_error.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/recipient_bacs.rb b/lib/plaid/models/recipient_bacs.rb index 7ba73622b..534ad2178 100644 --- a/lib/plaid/models/recipient_bacs.rb +++ b/lib/plaid/models/recipient_bacs.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/recipient_bacs_nullable.rb b/lib/plaid/models/recipient_bacs_nullable.rb index f058eeeb1..517c06d66 100644 --- a/lib/plaid/models/recipient_bacs_nullable.rb +++ b/lib/plaid/models/recipient_bacs_nullable.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/recurring_transaction_frequency.rb b/lib/plaid/models/recurring_transaction_frequency.rb index 93a2903ee..38083ad70 100644 --- a/lib/plaid/models/recurring_transaction_frequency.rb +++ b/lib/plaid/models/recurring_transaction_frequency.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/recurring_transactions_update_webhook.rb b/lib/plaid/models/recurring_transactions_update_webhook.rb index 90ea9814c..ef5b9a495 100644 --- a/lib/plaid/models/recurring_transactions_update_webhook.rb +++ b/lib/plaid/models/recurring_transactions_update_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -28,13 +28,16 @@ class RecurringTransactionsUpdateWebhook # A list of `account_ids` for accounts that have new or updated recurring transactions data. attr_accessor :account_ids + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', :'item_id' => :'item_id', - :'account_ids' => :'account_ids' + :'account_ids' => :'account_ids', + :'environment' => :'environment' } end @@ -49,7 +52,8 @@ def self.openapi_types :'webhook_type' => :'String', :'webhook_code' => :'String', :'item_id' => :'String', - :'account_ids' => :'Array' + :'account_ids' => :'Array', + :'environment' => :'WebhookEnvironmentValues' } end @@ -91,6 +95,10 @@ def initialize(attributes = {}) self.account_ids = value end end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -113,6 +121,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "account_ids", account_ids cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -123,6 +135,7 @@ def valid? return false if @webhook_code.nil? return false if @item_id.nil? return false if @account_ids.nil? + return false if @environment.nil? true end @@ -134,7 +147,8 @@ def ==(o) webhook_type == o.webhook_type && webhook_code == o.webhook_code && item_id == o.item_id && - account_ids == o.account_ids + account_ids == o.account_ids && + environment == o.environment end # @see the `==` method @@ -146,7 +160,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, item_id, account_ids].hash + [webhook_type, webhook_code, item_id, account_ids, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/removed_transaction.rb b/lib/plaid/models/removed_transaction.rb index fbcbeb3b2..3a600fb03 100644 --- a/lib/plaid/models/removed_transaction.rb +++ b/lib/plaid/models/removed_transaction.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/report_type.rb b/lib/plaid/models/report_type.rb index f23be97b4..16be2ba60 100644 --- a/lib/plaid/models/report_type.rb +++ b/lib/plaid/models/report_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/reporting_information.rb b/lib/plaid/models/reporting_information.rb new file mode 100644 index 000000000..e9ed7aea7 --- /dev/null +++ b/lib/plaid/models/reporting_information.rb @@ -0,0 +1,225 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Information about an report identifier and a report name. + class ReportingInformation + # No documentation available + attr_accessor :reporting_information_identifier + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reporting_information_identifier' => :'ReportingInformationIdentifier' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'reporting_information_identifier' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ReportingInformation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ReportingInformation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'reporting_information_identifier') + self.reporting_information_identifier = attributes[:'reporting_information_identifier'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @reporting_information_identifier.nil? + invalid_properties.push('invalid value for "reporting_information_identifier", reporting_information_identifier cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @reporting_information_identifier.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reporting_information_identifier == o.reporting_information_identifier + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [reporting_information_identifier].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/risk_signal_document_reference.rb b/lib/plaid/models/risk_signal_document_reference.rb index 7d37f2cfc..90bf71433 100644 --- a/lib/plaid/models/risk_signal_document_reference.rb +++ b/lib/plaid/models/risk_signal_document_reference.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/role.rb b/lib/plaid/models/role.rb new file mode 100644 index 000000000..617a774d7 --- /dev/null +++ b/lib/plaid/models/role.rb @@ -0,0 +1,224 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # ANo documentation available + class Role + attr_accessor :role_detail + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'role_detail' => :'ROLE_DETAIL' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'role_detail' => :'RoleDetail' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::Role` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::Role`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'role_detail') + self.role_detail = attributes[:'role_detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @role_detail.nil? + invalid_properties.push('invalid value for "role_detail", role_detail cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @role_detail.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + role_detail == o.role_detail + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [role_detail].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/role_detail.rb b/lib/plaid/models/role_detail.rb new file mode 100644 index 000000000..99ef34e85 --- /dev/null +++ b/lib/plaid/models/role_detail.rb @@ -0,0 +1,224 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # No documentation available + class RoleDetail + attr_accessor :party_role_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'party_role_type' => :'PartyRoleType' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'party_role_type' => :'PartyRoleType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::RoleDetail` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::RoleDetail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'party_role_type') + self.party_role_type = attributes[:'party_role_type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @party_role_type.nil? + invalid_properties.push('invalid value for "party_role_type", party_role_type cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @party_role_type.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + party_role_type == o.party_role_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [party_role_type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/roles.rb b/lib/plaid/models/roles.rb new file mode 100644 index 000000000..2eb66d08c --- /dev/null +++ b/lib/plaid/models/roles.rb @@ -0,0 +1,224 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # No documentation available + class Roles + attr_accessor :role + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'role' => :'ROLE' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'role' => :'Role' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::Roles` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::Roles`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'role') + self.role = attributes[:'role'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @role.nil? + invalid_properties.push('invalid value for "role", role cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @role.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + role == o.role + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [role].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/sandbox_bank_transfer_fire_webhook_request.rb b/lib/plaid/models/sandbox_bank_transfer_fire_webhook_request.rb index 873b68591..9f4b8b0f4 100644 --- a/lib/plaid/models/sandbox_bank_transfer_fire_webhook_request.rb +++ b/lib/plaid/models/sandbox_bank_transfer_fire_webhook_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_bank_transfer_fire_webhook_response.rb b/lib/plaid/models/sandbox_bank_transfer_fire_webhook_response.rb index 05e8d71cd..ebd37c0c3 100644 --- a/lib/plaid/models/sandbox_bank_transfer_fire_webhook_response.rb +++ b/lib/plaid/models/sandbox_bank_transfer_fire_webhook_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_bank_transfer_simulate_request.rb b/lib/plaid/models/sandbox_bank_transfer_simulate_request.rb index 4e1c2415b..5f21aa46f 100644 --- a/lib/plaid/models/sandbox_bank_transfer_simulate_request.rb +++ b/lib/plaid/models/sandbox_bank_transfer_simulate_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_bank_transfer_simulate_response.rb b/lib/plaid/models/sandbox_bank_transfer_simulate_response.rb index 38e7b35f9..cbc946feb 100644 --- a/lib/plaid/models/sandbox_bank_transfer_simulate_response.rb +++ b/lib/plaid/models/sandbox_bank_transfer_simulate_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_income_fire_webhook_request.rb b/lib/plaid/models/sandbox_income_fire_webhook_request.rb index 4a437bf6a..8a0a6fca0 100644 --- a/lib/plaid/models/sandbox_income_fire_webhook_request.rb +++ b/lib/plaid/models/sandbox_income_fire_webhook_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_income_fire_webhook_response.rb b/lib/plaid/models/sandbox_income_fire_webhook_response.rb index e79f0953b..448cc0237 100644 --- a/lib/plaid/models/sandbox_income_fire_webhook_response.rb +++ b/lib/plaid/models/sandbox_income_fire_webhook_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_item_fire_webhook_request.rb b/lib/plaid/models/sandbox_item_fire_webhook_request.rb index 4ba59956b..e313ceafb 100644 --- a/lib/plaid/models/sandbox_item_fire_webhook_request.rb +++ b/lib/plaid/models/sandbox_item_fire_webhook_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_item_fire_webhook_response.rb b/lib/plaid/models/sandbox_item_fire_webhook_response.rb index ee5d0c7aa..db5109f57 100644 --- a/lib/plaid/models/sandbox_item_fire_webhook_response.rb +++ b/lib/plaid/models/sandbox_item_fire_webhook_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_item_reset_login_request.rb b/lib/plaid/models/sandbox_item_reset_login_request.rb index 7de90ca46..ffdcb45b9 100644 --- a/lib/plaid/models/sandbox_item_reset_login_request.rb +++ b/lib/plaid/models/sandbox_item_reset_login_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_item_reset_login_response.rb b/lib/plaid/models/sandbox_item_reset_login_response.rb index 26c414552..ed6a85edd 100644 --- a/lib/plaid/models/sandbox_item_reset_login_response.rb +++ b/lib/plaid/models/sandbox_item_reset_login_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_item_set_verification_status_request.rb b/lib/plaid/models/sandbox_item_set_verification_status_request.rb index a5e90ebf8..7c1bf6afa 100644 --- a/lib/plaid/models/sandbox_item_set_verification_status_request.rb +++ b/lib/plaid/models/sandbox_item_set_verification_status_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_item_set_verification_status_response.rb b/lib/plaid/models/sandbox_item_set_verification_status_response.rb index e8bfeb0e1..4a4c15e10 100644 --- a/lib/plaid/models/sandbox_item_set_verification_status_response.rb +++ b/lib/plaid/models/sandbox_item_set_verification_status_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_oauth_select_accounts_request.rb b/lib/plaid/models/sandbox_oauth_select_accounts_request.rb index c19845809..79a38f36f 100644 --- a/lib/plaid/models/sandbox_oauth_select_accounts_request.rb +++ b/lib/plaid/models/sandbox_oauth_select_accounts_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_processor_token_create_request.rb b/lib/plaid/models/sandbox_processor_token_create_request.rb index 0ac599ff8..776fc5f25 100644 --- a/lib/plaid/models/sandbox_processor_token_create_request.rb +++ b/lib/plaid/models/sandbox_processor_token_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_processor_token_create_request_options.rb b/lib/plaid/models/sandbox_processor_token_create_request_options.rb index b3516e3ca..f32614679 100644 --- a/lib/plaid/models/sandbox_processor_token_create_request_options.rb +++ b/lib/plaid/models/sandbox_processor_token_create_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_processor_token_create_response.rb b/lib/plaid/models/sandbox_processor_token_create_response.rb index 14291f429..b365fbe5c 100644 --- a/lib/plaid/models/sandbox_processor_token_create_response.rb +++ b/lib/plaid/models/sandbox_processor_token_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_public_token_create_request.rb b/lib/plaid/models/sandbox_public_token_create_request.rb index d27424330..eef7f25cb 100644 --- a/lib/plaid/models/sandbox_public_token_create_request.rb +++ b/lib/plaid/models/sandbox_public_token_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_public_token_create_request_options.rb b/lib/plaid/models/sandbox_public_token_create_request_options.rb index 5acbb9854..a7002cf65 100644 --- a/lib/plaid/models/sandbox_public_token_create_request_options.rb +++ b/lib/plaid/models/sandbox_public_token_create_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_public_token_create_request_options_transactions.rb b/lib/plaid/models/sandbox_public_token_create_request_options_transactions.rb index 5d0710aaa..cf29de016 100644 --- a/lib/plaid/models/sandbox_public_token_create_request_options_transactions.rb +++ b/lib/plaid/models/sandbox_public_token_create_request_options_transactions.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_public_token_create_response.rb b/lib/plaid/models/sandbox_public_token_create_response.rb index af8391ff8..9a3b9accd 100644 --- a/lib/plaid/models/sandbox_public_token_create_response.rb +++ b/lib/plaid/models/sandbox_public_token_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_transfer_fire_webhook_request.rb b/lib/plaid/models/sandbox_transfer_fire_webhook_request.rb index 6604ba135..8d25d5c8e 100644 --- a/lib/plaid/models/sandbox_transfer_fire_webhook_request.rb +++ b/lib/plaid/models/sandbox_transfer_fire_webhook_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_transfer_fire_webhook_response.rb b/lib/plaid/models/sandbox_transfer_fire_webhook_response.rb index 586c10341..9cee0d370 100644 --- a/lib/plaid/models/sandbox_transfer_fire_webhook_response.rb +++ b/lib/plaid/models/sandbox_transfer_fire_webhook_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_transfer_repayment_simulate_request.rb b/lib/plaid/models/sandbox_transfer_repayment_simulate_request.rb index 8e9e35633..8669a5b84 100644 --- a/lib/plaid/models/sandbox_transfer_repayment_simulate_request.rb +++ b/lib/plaid/models/sandbox_transfer_repayment_simulate_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_transfer_repayment_simulate_response.rb b/lib/plaid/models/sandbox_transfer_repayment_simulate_response.rb index ab33d07de..79633e76b 100644 --- a/lib/plaid/models/sandbox_transfer_repayment_simulate_response.rb +++ b/lib/plaid/models/sandbox_transfer_repayment_simulate_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_transfer_simulate_request.rb b/lib/plaid/models/sandbox_transfer_simulate_request.rb index 7a503ecde..86c7c8913 100644 --- a/lib/plaid/models/sandbox_transfer_simulate_request.rb +++ b/lib/plaid/models/sandbox_transfer_simulate_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,7 +25,7 @@ class SandboxTransferSimulateRequest # Plaid’s unique identifier for a transfer. attr_accessor :transfer_id - # The asynchronous event to be simulated. May be: `posted`, `failed`, or `returned`. An error will be returned if the event type is incompatible with the current transfer status. Compatible status --> event type transitions include: `pending` --> `failed` `pending` --> `posted` `posted` --> `returned` + # The asynchronous event to be simulated. May be: `posted`, `settled`, `failed`, or `returned`. An error will be returned if the event type is incompatible with the current transfer status. Compatible status --> event type transitions include: `pending` --> `failed` `pending` --> `posted` `posted` --> `returned` `posted` --> `settled` attr_accessor :event_type attr_accessor :failure_reason diff --git a/lib/plaid/models/sandbox_transfer_simulate_response.rb b/lib/plaid/models/sandbox_transfer_simulate_response.rb index c82f43691..ee961ec79 100644 --- a/lib/plaid/models/sandbox_transfer_simulate_response.rb +++ b/lib/plaid/models/sandbox_transfer_simulate_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_transfer_sweep_simulate_request.rb b/lib/plaid/models/sandbox_transfer_sweep_simulate_request.rb index 6b57b4a50..9b96c1b04 100644 --- a/lib/plaid/models/sandbox_transfer_sweep_simulate_request.rb +++ b/lib/plaid/models/sandbox_transfer_sweep_simulate_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_transfer_sweep_simulate_response.rb b/lib/plaid/models/sandbox_transfer_sweep_simulate_response.rb index bf069ad98..ead6470fc 100644 --- a/lib/plaid/models/sandbox_transfer_sweep_simulate_response.rb +++ b/lib/plaid/models/sandbox_transfer_sweep_simulate_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/scopes.rb b/lib/plaid/models/scopes.rb index 86cbb2c65..b03dd88ae 100644 --- a/lib/plaid/models/scopes.rb +++ b/lib/plaid/models/scopes.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/scopes_context.rb b/lib/plaid/models/scopes_context.rb index cf7d40feb..d8308e64c 100644 --- a/lib/plaid/models/scopes_context.rb +++ b/lib/plaid/models/scopes_context.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/scopes_nullable.rb b/lib/plaid/models/scopes_nullable.rb index b56ca241d..b01ce156e 100644 --- a/lib/plaid/models/scopes_nullable.rb +++ b/lib/plaid/models/scopes_nullable.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/screening_hit_analysis.rb b/lib/plaid/models/screening_hit_analysis.rb index 468162f8d..8abf24144 100644 --- a/lib/plaid/models/screening_hit_analysis.rb +++ b/lib/plaid/models/screening_hit_analysis.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/screening_hit_data.rb b/lib/plaid/models/screening_hit_data.rb index 69b3a1048..55245b884 100644 --- a/lib/plaid/models/screening_hit_data.rb +++ b/lib/plaid/models/screening_hit_data.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/screening_hit_date_of_birth_item.rb b/lib/plaid/models/screening_hit_date_of_birth_item.rb index d8e6abb89..02a76c034 100644 --- a/lib/plaid/models/screening_hit_date_of_birth_item.rb +++ b/lib/plaid/models/screening_hit_date_of_birth_item.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/screening_hit_documents_items.rb b/lib/plaid/models/screening_hit_documents_items.rb index d41be9dab..33ddf8a5e 100644 --- a/lib/plaid/models/screening_hit_documents_items.rb +++ b/lib/plaid/models/screening_hit_documents_items.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/screening_hit_names_items.rb b/lib/plaid/models/screening_hit_names_items.rb index cac9172b6..cc469759f 100644 --- a/lib/plaid/models/screening_hit_names_items.rb +++ b/lib/plaid/models/screening_hit_names_items.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/screening_status_updated_webhook.rb b/lib/plaid/models/screening_status_updated_webhook.rb index 7f672cd6b..b074fc4aa 100644 --- a/lib/plaid/models/screening_status_updated_webhook.rb +++ b/lib/plaid/models/screening_status_updated_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,12 +25,15 @@ class ScreeningStatusUpdatedWebhook # The ID of the associated screening. attr_accessor :screening_id + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', - :'screening_id' => :'screening_id' + :'screening_id' => :'screening_id', + :'environment' => :'environment' } end @@ -44,14 +47,15 @@ def self.openapi_types { :'webhook_type' => :'String', :'webhook_code' => :'String', - :'screening_id' => :'AnyType' + :'screening_id' => :'AnyType', + :'environment' => :'WebhookEnvironmentValues' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'screening_id' + :'screening_id', ]) end @@ -81,6 +85,10 @@ def initialize(attributes = {}) if attributes.key?(:'screening_id') self.screening_id = attributes[:'screening_id'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -95,6 +103,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "webhook_code", webhook_code cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -103,6 +115,7 @@ def list_invalid_properties def valid? return false if @webhook_type.nil? return false if @webhook_code.nil? + return false if @environment.nil? true end @@ -113,7 +126,8 @@ def ==(o) self.class == o.class && webhook_type == o.webhook_type && webhook_code == o.webhook_code && - screening_id == o.screening_id + screening_id == o.screening_id && + environment == o.environment end # @see the `==` method @@ -125,7 +139,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, screening_id].hash + [webhook_type, webhook_code, screening_id, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/security.rb b/lib/plaid/models/security.rb index 723d0ebb8..4ea81fb49 100644 --- a/lib/plaid/models/security.rb +++ b/lib/plaid/models/security.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -49,7 +49,7 @@ class Security # The security type of the holding. Valid security types are: `cash`: Cash, currency, and money market funds `cryptocurrency`: Digital or virtual currencies `derivative`: Options, warrants, and other derivative instruments `equity`: Domestic and foreign equities `etf`: Multi-asset exchange-traded investment funds `fixed income`: Bonds and certificates of deposit (CDs) `loan`: Loans and loan receivables `mutual fund`: Open- and closed-end vehicles pooling funds of multiple investors `other`: Unknown or other investment types attr_accessor :type - # Price of the security at the close of the previous trading session. Null for non-public securities. If the security is a foreign currency this field will be updated daily and will be priced in USD. If the security is a cryptocurrency, this field will be updated multiple times a day. As crypto prices can fluctuate quickly and data may become stale sooner than other asset classes, please refer to update_datetime with the time when the price was last updated. + # Price of the security at the close of the previous trading session. Null for non-public securities. If the security is a foreign currency this field will be updated daily and will be priced in USD. If the security is a cryptocurrency, this field will be updated multiple times a day. As crypto prices can fluctuate quickly and data may become stale sooner than other asset classes, please refer to update_datetime with the time when the price was last updated. attr_accessor :close_price # Date for which `close_price` is accurate. Always `null` if `close_price` is `null`. diff --git a/lib/plaid/models/security_override.rb b/lib/plaid/models/security_override.rb index fcdd303c6..81076ec5f 100644 --- a/lib/plaid/models/security_override.rb +++ b/lib/plaid/models/security_override.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sender_bacs_nullable.rb b/lib/plaid/models/sender_bacs_nullable.rb index 3b0a3c32d..f5f155795 100644 --- a/lib/plaid/models/sender_bacs_nullable.rb +++ b/lib/plaid/models/sender_bacs_nullable.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/service.rb b/lib/plaid/models/service.rb new file mode 100644 index 000000000..af9d23575 --- /dev/null +++ b/lib/plaid/models/service.rb @@ -0,0 +1,238 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # A collection of details related to a fulfillment service or product in terms of request, process and result. + class Service + attr_accessor :verification_of_asset + + attr_accessor :statuses + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'verification_of_asset' => :'VERIFICATION_OF_ASSET', + :'statuses' => :'STATUSES' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'verification_of_asset' => :'VerificationOfAsset', + :'statuses' => :'Statuses' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::Service` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::Service`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'verification_of_asset') + self.verification_of_asset = attributes[:'verification_of_asset'] + end + + if attributes.key?(:'statuses') + self.statuses = attributes[:'statuses'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @verification_of_asset.nil? + invalid_properties.push('invalid value for "verification_of_asset", verification_of_asset cannot be nil.') + end + + if @statuses.nil? + invalid_properties.push('invalid value for "statuses", statuses cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @verification_of_asset.nil? + return false if @statuses.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + verification_of_asset == o.verification_of_asset && + statuses == o.statuses + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [verification_of_asset, statuses].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/service_product_fulfillment.rb b/lib/plaid/models/service_product_fulfillment.rb new file mode 100644 index 000000000..2d3a8616a --- /dev/null +++ b/lib/plaid/models/service_product_fulfillment.rb @@ -0,0 +1,224 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # A collection of details related to a fulfillment service or product in terms of request, process and result. + class ServiceProductFulfillment + attr_accessor :service_product_fulfillment_detail + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'service_product_fulfillment_detail' => :'SERVICE_PRODUCT_FULFILLMENT_DETAIL' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'service_product_fulfillment_detail' => :'ServiceProductFulfillmentDetail' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ServiceProductFulfillment` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ServiceProductFulfillment`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'service_product_fulfillment_detail') + self.service_product_fulfillment_detail = attributes[:'service_product_fulfillment_detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @service_product_fulfillment_detail.nil? + invalid_properties.push('invalid value for "service_product_fulfillment_detail", service_product_fulfillment_detail cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @service_product_fulfillment_detail.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + service_product_fulfillment_detail == o.service_product_fulfillment_detail + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [service_product_fulfillment_detail].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/service_product_fulfillment_detail.rb b/lib/plaid/models/service_product_fulfillment_detail.rb new file mode 100644 index 000000000..54ba094b1 --- /dev/null +++ b/lib/plaid/models/service_product_fulfillment_detail.rb @@ -0,0 +1,235 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # No documentation available + class ServiceProductFulfillmentDetail + # A string that uniquely identifies a type of order Verification of Asset. + attr_accessor :vendor_order_identifier + + attr_accessor :service_product_fulfillment_identifier + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'vendor_order_identifier' => :'VendorOrderIdentifier', + :'service_product_fulfillment_identifier' => :'ServiceProductFulfillmentIdentifier' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'vendor_order_identifier' => :'String', + :'service_product_fulfillment_identifier' => :'ServiceProductFulfillmentIdentifier' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'vendor_order_identifier', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ServiceProductFulfillmentDetail` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ServiceProductFulfillmentDetail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'vendor_order_identifier') + self.vendor_order_identifier = attributes[:'vendor_order_identifier'] + end + + if attributes.key?(:'service_product_fulfillment_identifier') + self.service_product_fulfillment_identifier = attributes[:'service_product_fulfillment_identifier'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @service_product_fulfillment_identifier.nil? + invalid_properties.push('invalid value for "service_product_fulfillment_identifier", service_product_fulfillment_identifier cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @service_product_fulfillment_identifier.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + vendor_order_identifier == o.vendor_order_identifier && + service_product_fulfillment_identifier == o.service_product_fulfillment_identifier + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [vendor_order_identifier, service_product_fulfillment_identifier].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/service_product_fulfillment_identifier.rb b/lib/plaid/models/service_product_fulfillment_identifier.rb new file mode 100644 index 000000000..8b2a61815 --- /dev/null +++ b/lib/plaid/models/service_product_fulfillment_identifier.rb @@ -0,0 +1,38 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class ServiceProductFulfillmentIdentifier + VOA = "VOA".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/servicer_address_data.rb b/lib/plaid/models/servicer_address_data.rb index fc45c2c49..cd631825d 100644 --- a/lib/plaid/models/servicer_address_data.rb +++ b/lib/plaid/models/servicer_address_data.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/services.rb b/lib/plaid/models/services.rb new file mode 100644 index 000000000..a4c5dd0fa --- /dev/null +++ b/lib/plaid/models/services.rb @@ -0,0 +1,224 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # A collection of objects that describe requests and responses for services. + class Services + attr_accessor :service + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'service' => :'SERVICE' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'service' => :'Service' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::Services` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::Services`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @service.nil? + invalid_properties.push('invalid value for "service", service cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @service.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + service == o.service + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [service].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/signal_address_data.rb b/lib/plaid/models/signal_address_data.rb index 2a6be0594..643b71671 100644 --- a/lib/plaid/models/signal_address_data.rb +++ b/lib/plaid/models/signal_address_data.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/signal_decision_report_request.rb b/lib/plaid/models/signal_decision_report_request.rb index cf1f02d8e..5038c2eee 100644 --- a/lib/plaid/models/signal_decision_report_request.rb +++ b/lib/plaid/models/signal_decision_report_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/signal_decision_report_response.rb b/lib/plaid/models/signal_decision_report_response.rb index 260375b5c..c5400e792 100644 --- a/lib/plaid/models/signal_decision_report_response.rb +++ b/lib/plaid/models/signal_decision_report_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/signal_device.rb b/lib/plaid/models/signal_device.rb index 9cb01d706..ab936c81c 100644 --- a/lib/plaid/models/signal_device.rb +++ b/lib/plaid/models/signal_device.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/signal_evaluate_core_attributes.rb b/lib/plaid/models/signal_evaluate_core_attributes.rb index d4cfe5d11..3b79e9d9c 100644 --- a/lib/plaid/models/signal_evaluate_core_attributes.rb +++ b/lib/plaid/models/signal_evaluate_core_attributes.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -368,6 +368,7 @@ def self.openapi_nullable :'plaid_connections_count_7d', :'plaid_connections_count_30d', :'total_plaid_connections_count', + :'is_savings_or_money_market_account', :'total_credit_transactions_amount_10d', :'total_debit_transactions_amount_10d', :'p50_credit_transactions_amount_28d', diff --git a/lib/plaid/models/signal_evaluate_request.rb b/lib/plaid/models/signal_evaluate_request.rb index 40fd9d178..6f7a3cfa1 100644 --- a/lib/plaid/models/signal_evaluate_request.rb +++ b/lib/plaid/models/signal_evaluate_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/signal_evaluate_response.rb b/lib/plaid/models/signal_evaluate_response.rb index 6c12768e7..24135a653 100644 --- a/lib/plaid/models/signal_evaluate_response.rb +++ b/lib/plaid/models/signal_evaluate_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/signal_person_name.rb b/lib/plaid/models/signal_person_name.rb index e7fc32e49..2666e8f75 100644 --- a/lib/plaid/models/signal_person_name.rb +++ b/lib/plaid/models/signal_person_name.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/signal_prepare_request.rb b/lib/plaid/models/signal_prepare_request.rb index b9b8aab9a..8e444453d 100644 --- a/lib/plaid/models/signal_prepare_request.rb +++ b/lib/plaid/models/signal_prepare_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/signal_prepare_response.rb b/lib/plaid/models/signal_prepare_response.rb index 8e62aa9e5..0a1b6e527 100644 --- a/lib/plaid/models/signal_prepare_response.rb +++ b/lib/plaid/models/signal_prepare_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/signal_return_report_request.rb b/lib/plaid/models/signal_return_report_request.rb index 28542adc0..9bc290404 100644 --- a/lib/plaid/models/signal_return_report_request.rb +++ b/lib/plaid/models/signal_return_report_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/signal_return_report_response.rb b/lib/plaid/models/signal_return_report_response.rb index 27ec90360..575ed7bd3 100644 --- a/lib/plaid/models/signal_return_report_response.rb +++ b/lib/plaid/models/signal_return_report_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/signal_scores.rb b/lib/plaid/models/signal_scores.rb index c456df233..ff12811a6 100644 --- a/lib/plaid/models/signal_scores.rb +++ b/lib/plaid/models/signal_scores.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/signal_user.rb b/lib/plaid/models/signal_user.rb index 7791fe3d6..622ab5075 100644 --- a/lib/plaid/models/signal_user.rb +++ b/lib/plaid/models/signal_user.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/simulated_transfer_sweep.rb b/lib/plaid/models/simulated_transfer_sweep.rb index 006cda907..37cae6a5a 100644 --- a/lib/plaid/models/simulated_transfer_sweep.rb +++ b/lib/plaid/models/simulated_transfer_sweep.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -28,13 +28,17 @@ class SimulatedTransferSweep # The currency of the sweep, e.g. \"USD\". attr_accessor :iso_currency_code + # The date when the sweep settled, in the YYYY-MM-DD format. + attr_accessor :settled + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'id' => :'id', :'created' => :'created', :'amount' => :'amount', - :'iso_currency_code' => :'iso_currency_code' + :'iso_currency_code' => :'iso_currency_code', + :'settled' => :'settled' } end @@ -49,13 +53,15 @@ def self.openapi_types :'id' => :'String', :'created' => :'Time', :'amount' => :'String', - :'iso_currency_code' => :'String' + :'iso_currency_code' => :'String', + :'settled' => :'Date' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'settled' ]) end @@ -96,6 +102,10 @@ def initialize(attributes = {}) if attributes.key?(:'iso_currency_code') self.iso_currency_code = attributes[:'iso_currency_code'] end + + if attributes.key?(:'settled') + self.settled = attributes[:'settled'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -139,7 +149,8 @@ def ==(o) id == o.id && created == o.created && amount == o.amount && - iso_currency_code == o.iso_currency_code + iso_currency_code == o.iso_currency_code && + settled == o.settled end # @see the `==` method @@ -151,7 +162,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created, amount, iso_currency_code].hash + [id, created, amount, iso_currency_code, settled].hash end # Builds the object from hash diff --git a/lib/plaid/models/single_document_risk_signal.rb b/lib/plaid/models/single_document_risk_signal.rb index e033c9b12..5f0cace4d 100644 --- a/lib/plaid/models/single_document_risk_signal.rb +++ b/lib/plaid/models/single_document_risk_signal.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/source.rb b/lib/plaid/models/source.rb index 11ab2e618..ddbd33f03 100644 --- a/lib/plaid/models/source.rb +++ b/lib/plaid/models/source.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/standalone_account_type.rb b/lib/plaid/models/standalone_account_type.rb index 5fd47d3eb..4422c6eb3 100644 --- a/lib/plaid/models/standalone_account_type.rb +++ b/lib/plaid/models/standalone_account_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/standalone_currency_code_list.rb b/lib/plaid/models/standalone_currency_code_list.rb index d423a0d40..619b13322 100644 --- a/lib/plaid/models/standalone_currency_code_list.rb +++ b/lib/plaid/models/standalone_currency_code_list.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/standalone_investment_transaction_type.rb b/lib/plaid/models/standalone_investment_transaction_type.rb index 45b6d6fe5..f7fe3d25a 100644 --- a/lib/plaid/models/standalone_investment_transaction_type.rb +++ b/lib/plaid/models/standalone_investment_transaction_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/status.rb b/lib/plaid/models/status.rb new file mode 100644 index 000000000..635763053 --- /dev/null +++ b/lib/plaid/models/status.rb @@ -0,0 +1,232 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # No documentation available + class Status + # Satus Code. + attr_accessor :status_code + + # Status Description. + attr_accessor :status_description + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status_code' => :'StatusCode', + :'status_description' => :'StatusDescription' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status_code' => :'String', + :'status_description' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'status_code', + :'status_description' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::Status` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::Status`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status_code') + self.status_code = attributes[:'status_code'] + end + + if attributes.key?(:'status_description') + self.status_description = attributes[:'status_description'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status_code == o.status_code && + status_description == o.status_description + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status_code, status_description].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/statuses.rb b/lib/plaid/models/statuses.rb new file mode 100644 index 000000000..70ca09598 --- /dev/null +++ b/lib/plaid/models/statuses.rb @@ -0,0 +1,224 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # A collection of STATUS containers. + class Statuses + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'STATUS' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'Status' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::Statuses` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::Statuses`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @status.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/strategy.rb b/lib/plaid/models/strategy.rb index 43eb430cb..9b77d619a 100644 --- a/lib/plaid/models/strategy.rb +++ b/lib/plaid/models/strategy.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/student_loan.rb b/lib/plaid/models/student_loan.rb index 36d8a8898..6c7e43a80 100644 --- a/lib/plaid/models/student_loan.rb +++ b/lib/plaid/models/student_loan.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/student_loan_repayment_model.rb b/lib/plaid/models/student_loan_repayment_model.rb index 11fdb815e..6de06164f 100644 --- a/lib/plaid/models/student_loan_repayment_model.rb +++ b/lib/plaid/models/student_loan_repayment_model.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/student_loan_status.rb b/lib/plaid/models/student_loan_status.rb index 24b882f6a..2ddc56169 100644 --- a/lib/plaid/models/student_loan_status.rb +++ b/lib/plaid/models/student_loan_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/student_repayment_plan.rb b/lib/plaid/models/student_repayment_plan.rb index a5e6add3f..049b8de86 100644 --- a/lib/plaid/models/student_repayment_plan.rb +++ b/lib/plaid/models/student_repayment_plan.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sync_updates_available_webhook.rb b/lib/plaid/models/sync_updates_available_webhook.rb index 1aca2a222..b378bcdd9 100644 --- a/lib/plaid/models/sync_updates_available_webhook.rb +++ b/lib/plaid/models/sync_updates_available_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -31,6 +31,8 @@ class SyncUpdatesAvailableWebhook # Indicates if historical pull information is available. attr_accessor :historical_update_complete + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -38,7 +40,8 @@ def self.attribute_map :'webhook_code' => :'webhook_code', :'item_id' => :'item_id', :'initial_update_complete' => :'initial_update_complete', - :'historical_update_complete' => :'historical_update_complete' + :'historical_update_complete' => :'historical_update_complete', + :'environment' => :'environment' } end @@ -54,7 +57,8 @@ def self.openapi_types :'webhook_code' => :'String', :'item_id' => :'String', :'initial_update_complete' => :'Boolean', - :'historical_update_complete' => :'Boolean' + :'historical_update_complete' => :'Boolean', + :'environment' => :'WebhookEnvironmentValues' } end @@ -98,6 +102,10 @@ def initialize(attributes = {}) if attributes.key?(:'historical_update_complete') self.historical_update_complete = attributes[:'historical_update_complete'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -124,6 +132,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "historical_update_complete", historical_update_complete cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -135,6 +147,7 @@ def valid? return false if @item_id.nil? return false if @initial_update_complete.nil? return false if @historical_update_complete.nil? + return false if @environment.nil? true end @@ -147,7 +160,8 @@ def ==(o) webhook_code == o.webhook_code && item_id == o.item_id && initial_update_complete == o.initial_update_complete && - historical_update_complete == o.historical_update_complete + historical_update_complete == o.historical_update_complete && + environment == o.environment end # @see the `==` method @@ -159,7 +173,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, item_id, initial_update_complete, historical_update_complete].hash + [webhook_type, webhook_code, item_id, initial_update_complete, historical_update_complete, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/taxform.rb b/lib/plaid/models/taxform.rb index 8e19e99bb..085611296 100644 --- a/lib/plaid/models/taxform.rb +++ b/lib/plaid/models/taxform.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/taxpayer_id.rb b/lib/plaid/models/taxpayer_id.rb index d6eab1414..368327a76 100644 --- a/lib/plaid/models/taxpayer_id.rb +++ b/lib/plaid/models/taxpayer_id.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/taxpayer_identifier.rb b/lib/plaid/models/taxpayer_identifier.rb new file mode 100644 index 000000000..748d24fdf --- /dev/null +++ b/lib/plaid/models/taxpayer_identifier.rb @@ -0,0 +1,231 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Information about the Taxpayer identification values assigned to the individual or legal entity.Information about the Taxpayer identification values assigned to the individual or legal entity. + class TaxpayerIdentifier + attr_accessor :taxpayer_identifier_type + + # The value of the taxpayer identifier as assigned by the IRS to the individual or legal entity. + attr_accessor :taxpayer_identifier_value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'taxpayer_identifier_type' => :'TaxpayerIdentifierType', + :'taxpayer_identifier_value' => :'TaxpayerIdentifierValue' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'taxpayer_identifier_type' => :'TaxpayerIdentifierType', + :'taxpayer_identifier_value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'taxpayer_identifier_type', + :'taxpayer_identifier_value' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::TaxpayerIdentifier` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::TaxpayerIdentifier`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'taxpayer_identifier_type') + self.taxpayer_identifier_type = attributes[:'taxpayer_identifier_type'] + end + + if attributes.key?(:'taxpayer_identifier_value') + self.taxpayer_identifier_value = attributes[:'taxpayer_identifier_value'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + taxpayer_identifier_type == o.taxpayer_identifier_type && + taxpayer_identifier_value == o.taxpayer_identifier_value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [taxpayer_identifier_type, taxpayer_identifier_value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/taxpayer_identifier_type.rb b/lib/plaid/models/taxpayer_identifier_type.rb new file mode 100644 index 000000000..48d7b5004 --- /dev/null +++ b/lib/plaid/models/taxpayer_identifier_type.rb @@ -0,0 +1,39 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class TaxpayerIdentifierType + INDIVIDUAL_TAXPAYER_IDENTIFICATION_NUMBER = "IndividualTaxpayerIdentificationNumber".freeze + SOCIAL_SECURITY_NUMBER = "SocialSecurityNumber".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/taxpayer_identifiers.rb b/lib/plaid/models/taxpayer_identifiers.rb new file mode 100644 index 000000000..0f31d426b --- /dev/null +++ b/lib/plaid/models/taxpayer_identifiers.rb @@ -0,0 +1,224 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The collection of TAXPAYER_IDENTIFICATION elements + class TaxpayerIdentifiers + attr_accessor :taxpayer_identifier + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'taxpayer_identifier' => :'TAXPAYER_IDENTIFIER' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'taxpayer_identifier' => :'TaxpayerIdentifier' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::TaxpayerIdentifiers` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::TaxpayerIdentifiers`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'taxpayer_identifier') + self.taxpayer_identifier = attributes[:'taxpayer_identifier'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @taxpayer_identifier.nil? + invalid_properties.push('invalid value for "taxpayer_identifier", taxpayer_identifier cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @taxpayer_identifier.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + taxpayer_identifier == o.taxpayer_identifier + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [taxpayer_identifier].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/total.rb b/lib/plaid/models/total.rb index 5a795376b..60ef20000 100644 --- a/lib/plaid/models/total.rb +++ b/lib/plaid/models/total.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/total_canonical_description.rb b/lib/plaid/models/total_canonical_description.rb index c51d9239e..fbd634d9b 100644 --- a/lib/plaid/models/total_canonical_description.rb +++ b/lib/plaid/models/total_canonical_description.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transaction.rb b/lib/plaid/models/transaction.rb index 2bc56a5b3..58cb01e79 100644 --- a/lib/plaid/models/transaction.rb +++ b/lib/plaid/models/transaction.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transaction_all_of.rb b/lib/plaid/models/transaction_all_of.rb index 375657e62..76b8e297f 100644 --- a/lib/plaid/models/transaction_all_of.rb +++ b/lib/plaid/models/transaction_all_of.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transaction_base.rb b/lib/plaid/models/transaction_base.rb index 70f035508..0d898c2b2 100644 --- a/lib/plaid/models/transaction_base.rb +++ b/lib/plaid/models/transaction_base.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transaction_code.rb b/lib/plaid/models/transaction_code.rb index 21fbe9d95..e80100a9c 100644 --- a/lib/plaid/models/transaction_code.rb +++ b/lib/plaid/models/transaction_code.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transaction_data.rb b/lib/plaid/models/transaction_data.rb index 5990412f3..c937860b2 100644 --- a/lib/plaid/models/transaction_data.rb +++ b/lib/plaid/models/transaction_data.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transaction_override.rb b/lib/plaid/models/transaction_override.rb index 71adf6c39..b96a183cb 100644 --- a/lib/plaid/models/transaction_override.rb +++ b/lib/plaid/models/transaction_override.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transaction_stream.rb b/lib/plaid/models/transaction_stream.rb index 7be470fbb..942013733 100644 --- a/lib/plaid/models/transaction_stream.rb +++ b/lib/plaid/models/transaction_stream.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transaction_stream_amount.rb b/lib/plaid/models/transaction_stream_amount.rb index 610d0d7ec..5a198d233 100644 --- a/lib/plaid/models/transaction_stream_amount.rb +++ b/lib/plaid/models/transaction_stream_amount.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transaction_stream_status.rb b/lib/plaid/models/transaction_stream_status.rb index 9c40aa7a4..fd8c9d27d 100644 --- a/lib/plaid/models/transaction_stream_status.rb +++ b/lib/plaid/models/transaction_stream_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_category_rule.rb b/lib/plaid/models/transactions_category_rule.rb index e3ad6da39..522bd003a 100644 --- a/lib/plaid/models/transactions_category_rule.rb +++ b/lib/plaid/models/transactions_category_rule.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_enhance_get_request.rb b/lib/plaid/models/transactions_enhance_get_request.rb index 845291903..cf326eb0b 100644 --- a/lib/plaid/models/transactions_enhance_get_request.rb +++ b/lib/plaid/models/transactions_enhance_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_enhance_get_response.rb b/lib/plaid/models/transactions_enhance_get_response.rb index 614d97b11..f5c094699 100644 --- a/lib/plaid/models/transactions_enhance_get_response.rb +++ b/lib/plaid/models/transactions_enhance_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_get_request.rb b/lib/plaid/models/transactions_get_request.rb index 7a7e0acda..2c3b043ca 100644 --- a/lib/plaid/models/transactions_get_request.rb +++ b/lib/plaid/models/transactions_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_get_request_options.rb b/lib/plaid/models/transactions_get_request_options.rb index e2495f296..3aa8a4283 100644 --- a/lib/plaid/models/transactions_get_request_options.rb +++ b/lib/plaid/models/transactions_get_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_get_response.rb b/lib/plaid/models/transactions_get_response.rb index 075ad28c5..ae4c35b9d 100644 --- a/lib/plaid/models/transactions_get_response.rb +++ b/lib/plaid/models/transactions_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_recurring_get_request.rb b/lib/plaid/models/transactions_recurring_get_request.rb index b31e01acd..825dd7a62 100644 --- a/lib/plaid/models/transactions_recurring_get_request.rb +++ b/lib/plaid/models/transactions_recurring_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_recurring_get_request_options.rb b/lib/plaid/models/transactions_recurring_get_request_options.rb index d94150a37..6e153c388 100644 --- a/lib/plaid/models/transactions_recurring_get_request_options.rb +++ b/lib/plaid/models/transactions_recurring_get_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_recurring_get_response.rb b/lib/plaid/models/transactions_recurring_get_response.rb index 21d69f492..7b72d826d 100644 --- a/lib/plaid/models/transactions_recurring_get_response.rb +++ b/lib/plaid/models/transactions_recurring_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_refresh_request.rb b/lib/plaid/models/transactions_refresh_request.rb index 43d09d554..1a8304485 100644 --- a/lib/plaid/models/transactions_refresh_request.rb +++ b/lib/plaid/models/transactions_refresh_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_refresh_response.rb b/lib/plaid/models/transactions_refresh_response.rb index 3f803d938..f6d7d65df 100644 --- a/lib/plaid/models/transactions_refresh_response.rb +++ b/lib/plaid/models/transactions_refresh_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_removed_webhook.rb b/lib/plaid/models/transactions_removed_webhook.rb index bcc51307e..3307f08ea 100644 --- a/lib/plaid/models/transactions_removed_webhook.rb +++ b/lib/plaid/models/transactions_removed_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -30,6 +30,8 @@ class TransactionsRemovedWebhook # The `item_id` of the Item associated with this webhook, warning, or error attr_accessor :item_id + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -37,7 +39,8 @@ def self.attribute_map :'webhook_code' => :'webhook_code', :'error' => :'error', :'removed_transactions' => :'removed_transactions', - :'item_id' => :'item_id' + :'item_id' => :'item_id', + :'environment' => :'environment' } end @@ -53,7 +56,8 @@ def self.openapi_types :'webhook_code' => :'String', :'error' => :'PlaidError', :'removed_transactions' => :'Array', - :'item_id' => :'String' + :'item_id' => :'String', + :'environment' => :'WebhookEnvironmentValues' } end @@ -100,6 +104,10 @@ def initialize(attributes = {}) if attributes.key?(:'item_id') self.item_id = attributes[:'item_id'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -122,6 +130,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "item_id", item_id cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -132,6 +144,7 @@ def valid? return false if @webhook_code.nil? return false if @removed_transactions.nil? return false if @item_id.nil? + return false if @environment.nil? true end @@ -144,7 +157,8 @@ def ==(o) webhook_code == o.webhook_code && error == o.error && removed_transactions == o.removed_transactions && - item_id == o.item_id + item_id == o.item_id && + environment == o.environment end # @see the `==` method @@ -156,7 +170,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, error, removed_transactions, item_id].hash + [webhook_type, webhook_code, error, removed_transactions, item_id, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/transactions_rule_details.rb b/lib/plaid/models/transactions_rule_details.rb index 222c0ce59..8c27967ef 100644 --- a/lib/plaid/models/transactions_rule_details.rb +++ b/lib/plaid/models/transactions_rule_details.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_rule_field.rb b/lib/plaid/models/transactions_rule_field.rb index 1c9897e60..c38d812e1 100644 --- a/lib/plaid/models/transactions_rule_field.rb +++ b/lib/plaid/models/transactions_rule_field.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_rule_type.rb b/lib/plaid/models/transactions_rule_type.rb index 117665cb2..4add0db66 100644 --- a/lib/plaid/models/transactions_rule_type.rb +++ b/lib/plaid/models/transactions_rule_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_rules_create_request.rb b/lib/plaid/models/transactions_rules_create_request.rb index 7d4762300..c5dd02677 100644 --- a/lib/plaid/models/transactions_rules_create_request.rb +++ b/lib/plaid/models/transactions_rules_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -103,18 +103,10 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @client_id.nil? - invalid_properties.push('invalid value for "client_id", client_id cannot be nil.') - end - if @access_token.nil? invalid_properties.push('invalid value for "access_token", access_token cannot be nil.') end - if @secret.nil? - invalid_properties.push('invalid value for "secret", secret cannot be nil.') - end - if @personal_finance_category.nil? invalid_properties.push('invalid value for "personal_finance_category", personal_finance_category cannot be nil.') end @@ -129,9 +121,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @client_id.nil? return false if @access_token.nil? - return false if @secret.nil? return false if @personal_finance_category.nil? return false if @rule_details.nil? true diff --git a/lib/plaid/models/transactions_rules_create_response.rb b/lib/plaid/models/transactions_rules_create_response.rb index e80b898f1..bad1cf7bd 100644 --- a/lib/plaid/models/transactions_rules_create_response.rb +++ b/lib/plaid/models/transactions_rules_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_rules_list_request.rb b/lib/plaid/models/transactions_rules_list_request.rb index 8b3e4d3f5..cede1dbe0 100644 --- a/lib/plaid/models/transactions_rules_list_request.rb +++ b/lib/plaid/models/transactions_rules_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -86,27 +86,17 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @client_id.nil? - invalid_properties.push('invalid value for "client_id", client_id cannot be nil.') - end - if @access_token.nil? invalid_properties.push('invalid value for "access_token", access_token cannot be nil.') end - if @secret.nil? - invalid_properties.push('invalid value for "secret", secret cannot be nil.') - end - invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @client_id.nil? return false if @access_token.nil? - return false if @secret.nil? true end diff --git a/lib/plaid/models/transactions_rules_list_response.rb b/lib/plaid/models/transactions_rules_list_response.rb index 2759af3cc..1e861e347 100644 --- a/lib/plaid/models/transactions_rules_list_response.rb +++ b/lib/plaid/models/transactions_rules_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_rules_remove_request.rb b/lib/plaid/models/transactions_rules_remove_request.rb index 15a6d2c39..eb309ad4f 100644 --- a/lib/plaid/models/transactions_rules_remove_request.rb +++ b/lib/plaid/models/transactions_rules_remove_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -95,18 +95,10 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @client_id.nil? - invalid_properties.push('invalid value for "client_id", client_id cannot be nil.') - end - if @access_token.nil? invalid_properties.push('invalid value for "access_token", access_token cannot be nil.') end - if @secret.nil? - invalid_properties.push('invalid value for "secret", secret cannot be nil.') - end - if @rule_id.nil? invalid_properties.push('invalid value for "rule_id", rule_id cannot be nil.') end @@ -117,9 +109,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @client_id.nil? return false if @access_token.nil? - return false if @secret.nil? return false if @rule_id.nil? true end diff --git a/lib/plaid/models/transactions_rules_remove_response.rb b/lib/plaid/models/transactions_rules_remove_response.rb index cfaabd4a8..da6175a56 100644 --- a/lib/plaid/models/transactions_rules_remove_response.rb +++ b/lib/plaid/models/transactions_rules_remove_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_sync_request.rb b/lib/plaid/models/transactions_sync_request.rb index 477db77e2..29d30450b 100644 --- a/lib/plaid/models/transactions_sync_request.rb +++ b/lib/plaid/models/transactions_sync_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_sync_request_options.rb b/lib/plaid/models/transactions_sync_request_options.rb index 549f12aeb..ae6ed5a05 100644 --- a/lib/plaid/models/transactions_sync_request_options.rb +++ b/lib/plaid/models/transactions_sync_request_options.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_sync_response.rb b/lib/plaid/models/transactions_sync_response.rb index d123c4e72..8ed356d3d 100644 --- a/lib/plaid/models/transactions_sync_response.rb +++ b/lib/plaid/models/transactions_sync_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer.rb b/lib/plaid/models/transfer.rb index a043ad386..89b17b970 100644 --- a/lib/plaid/models/transfer.rb +++ b/lib/plaid/models/transfer.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -61,6 +61,12 @@ class Transfer # The currency of the transfer amount, e.g. \"USD\" attr_accessor :iso_currency_code + # The date 3 business days from settlement date indicating the following ACH returns can no longer happen: R01, R02, R03, R29. This will be of the form YYYY-MM-DD. + attr_accessor :standard_return_window + + # The date 61 business days from settlement date indicating the following ACH returns can no longer happen: R05, R07, R10, R11, R51, R33, R37, R38, R51, R52, R53. This will be of the form YYYY-MM-DD. + attr_accessor :unauthorized_return_window + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -81,7 +87,9 @@ def self.attribute_map :'origination_account_id' => :'origination_account_id', :'guarantee_decision' => :'guarantee_decision', :'guarantee_decision_rationale' => :'guarantee_decision_rationale', - :'iso_currency_code' => :'iso_currency_code' + :'iso_currency_code' => :'iso_currency_code', + :'standard_return_window' => :'standard_return_window', + :'unauthorized_return_window' => :'unauthorized_return_window' } end @@ -110,7 +118,9 @@ def self.openapi_types :'origination_account_id' => :'String', :'guarantee_decision' => :'TransferAuthorizationGuaranteeDecision', :'guarantee_decision_rationale' => :'TransferAuthorizationGuaranteeDecisionRationale', - :'iso_currency_code' => :'String' + :'iso_currency_code' => :'String', + :'standard_return_window' => :'Date', + :'unauthorized_return_window' => :'Date' } end @@ -122,6 +132,8 @@ def self.openapi_nullable :'metadata', :'guarantee_decision', :'guarantee_decision_rationale', + :'standard_return_window', + :'unauthorized_return_window' ]) end @@ -213,6 +225,14 @@ def initialize(attributes = {}) if attributes.key?(:'iso_currency_code') self.iso_currency_code = attributes[:'iso_currency_code'] end + + if attributes.key?(:'standard_return_window') + self.standard_return_window = attributes[:'standard_return_window'] + end + + if attributes.key?(:'unauthorized_return_window') + self.unauthorized_return_window = attributes[:'unauthorized_return_window'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -324,7 +344,9 @@ def ==(o) origination_account_id == o.origination_account_id && guarantee_decision == o.guarantee_decision && guarantee_decision_rationale == o.guarantee_decision_rationale && - iso_currency_code == o.iso_currency_code + iso_currency_code == o.iso_currency_code && + standard_return_window == o.standard_return_window && + unauthorized_return_window == o.unauthorized_return_window end # @see the `==` method @@ -336,7 +358,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, ach_class, account_id, type, user, amount, description, created, status, sweep_status, network, cancellable, failure_reason, metadata, origination_account_id, guarantee_decision, guarantee_decision_rationale, iso_currency_code].hash + [id, ach_class, account_id, type, user, amount, description, created, status, sweep_status, network, cancellable, failure_reason, metadata, origination_account_id, guarantee_decision, guarantee_decision_rationale, iso_currency_code, standard_return_window, unauthorized_return_window].hash end # Builds the object from hash diff --git a/lib/plaid/models/transfer_authorization.rb b/lib/plaid/models/transfer_authorization.rb index e5c9dd9f5..cf5b54b67 100644 --- a/lib/plaid/models/transfer_authorization.rb +++ b/lib/plaid/models/transfer_authorization.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_authorization_create_request.rb b/lib/plaid/models/transfer_authorization_create_request.rb index eb0a9cdcc..53befb0a5 100644 --- a/lib/plaid/models/transfer_authorization_create_request.rb +++ b/lib/plaid/models/transfer_authorization_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,6 +25,9 @@ class TransferAuthorizationCreateRequest # The Plaid `access_token` for the account that will be debited or credited. attr_accessor :access_token + # A random key provided by the client, per unique authorization. Maximum of 50 characters. The API supports idempotency for safely retrying requests without accidentally performing the same operation twice. For example, if a request to create an authorization fails due to a network connection error, you can retry the request with the same idempotency key to guarantee that only a single authorization is created. Failure to provide this key may result in duplicate charges. Required for guaranteed ACH customers. + attr_accessor :idempotency_key + # The Plaid `account_id` for the account that will be debited or credited. attr_accessor :account_id @@ -47,9 +50,12 @@ class TransferAuthorizationCreateRequest # The currency of the transfer amount. The default value is \"USD\". attr_accessor :iso_currency_code - # Required for guaranteed ACH customers. If the end user is initiating the specific transfer themselves via an interactive UI, this should be `true`; for automatic recurring payments where the end user is not actually initiating each individual transfer, it should be `false`. + # Required for Guarantee. If the end user is initiating the specific transfer themselves via an interactive UI, this should be `true`; for automatic recurring payments where the end user is not actually initiating each individual transfer, it should be `false`. attr_accessor :user_present + # If set to `false`, Plaid will not offer a `guarantee_decision` for this request(Guarantee customers only). + attr_accessor :with_guarantee + # Plaid’s unique identifier for a payment profile. attr_accessor :payment_profile_id @@ -59,6 +65,7 @@ def self.attribute_map :'client_id' => :'client_id', :'secret' => :'secret', :'access_token' => :'access_token', + :'idempotency_key' => :'idempotency_key', :'account_id' => :'account_id', :'type' => :'type', :'network' => :'network', @@ -69,6 +76,7 @@ def self.attribute_map :'origination_account_id' => :'origination_account_id', :'iso_currency_code' => :'iso_currency_code', :'user_present' => :'user_present', + :'with_guarantee' => :'with_guarantee', :'payment_profile_id' => :'payment_profile_id' } end @@ -84,6 +92,7 @@ def self.openapi_types :'client_id' => :'String', :'secret' => :'String', :'access_token' => :'String', + :'idempotency_key' => :'String', :'account_id' => :'String', :'type' => :'TransferType', :'network' => :'TransferNetwork', @@ -94,6 +103,7 @@ def self.openapi_types :'origination_account_id' => :'String', :'iso_currency_code' => :'String', :'user_present' => :'Boolean', + :'with_guarantee' => :'Boolean', :'payment_profile_id' => :'String' } end @@ -101,7 +111,9 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'idempotency_key', :'user_present', + :'with_guarantee', ]) end @@ -132,6 +144,10 @@ def initialize(attributes = {}) self.access_token = attributes[:'access_token'] end + if attributes.key?(:'idempotency_key') + self.idempotency_key = attributes[:'idempotency_key'] + end + if attributes.key?(:'account_id') self.account_id = attributes[:'account_id'] end @@ -172,6 +188,12 @@ def initialize(attributes = {}) self.user_present = attributes[:'user_present'] end + if attributes.key?(:'with_guarantee') + self.with_guarantee = attributes[:'with_guarantee'] + else + self.with_guarantee = true + end + if attributes.key?(:'payment_profile_id') self.payment_profile_id = attributes[:'payment_profile_id'] end @@ -181,6 +203,11 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if !@idempotency_key.nil? && @idempotency_key.to_s.length > 50 + invalid_properties.push('invalid value for "idempotency_key", the character length must be smaller than or equal to 50.') + end + + if @type.nil? invalid_properties.push('invalid value for "type", type cannot be nil.') end @@ -207,6 +234,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if !@idempotency_key.nil? && @idempotency_key.to_s.length > 50 return false if @type.nil? return false if @network.nil? return false if @amount.nil? @@ -215,6 +243,17 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] idempotency_key Value to be assigned + def idempotency_key=(idempotency_key) + if !idempotency_key.nil? && idempotency_key.to_s.length > 50 + fail ArgumentError, 'invalid value for "idempotency_key", the character length must be smaller than or equal to 50.' + end + + + @idempotency_key = idempotency_key + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -223,6 +262,7 @@ def ==(o) client_id == o.client_id && secret == o.secret && access_token == o.access_token && + idempotency_key == o.idempotency_key && account_id == o.account_id && type == o.type && network == o.network && @@ -233,6 +273,7 @@ def ==(o) origination_account_id == o.origination_account_id && iso_currency_code == o.iso_currency_code && user_present == o.user_present && + with_guarantee == o.with_guarantee && payment_profile_id == o.payment_profile_id end @@ -245,7 +286,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, secret, access_token, account_id, type, network, amount, ach_class, user, device, origination_account_id, iso_currency_code, user_present, payment_profile_id].hash + [client_id, secret, access_token, idempotency_key, account_id, type, network, amount, ach_class, user, device, origination_account_id, iso_currency_code, user_present, with_guarantee, payment_profile_id].hash end # Builds the object from hash diff --git a/lib/plaid/models/transfer_authorization_create_response.rb b/lib/plaid/models/transfer_authorization_create_response.rb index ef4158e76..5271399db 100644 --- a/lib/plaid/models/transfer_authorization_create_response.rb +++ b/lib/plaid/models/transfer_authorization_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_authorization_decision.rb b/lib/plaid/models/transfer_authorization_decision.rb index 77f26c889..db1d49bd3 100644 --- a/lib/plaid/models/transfer_authorization_decision.rb +++ b/lib/plaid/models/transfer_authorization_decision.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_authorization_decision_rationale.rb b/lib/plaid/models/transfer_authorization_decision_rationale.rb index 0ca557e16..8a9d510a8 100644 --- a/lib/plaid/models/transfer_authorization_decision_rationale.rb +++ b/lib/plaid/models/transfer_authorization_decision_rationale.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_authorization_decision_rationale_code.rb b/lib/plaid/models/transfer_authorization_decision_rationale_code.rb index b6df83bab..237d13b33 100644 --- a/lib/plaid/models/transfer_authorization_decision_rationale_code.rb +++ b/lib/plaid/models/transfer_authorization_decision_rationale_code.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -21,6 +21,7 @@ class TransferAuthorizationDecisionRationaleCode MANUALLY_VERIFIED_ITEM = "MANUALLY_VERIFIED_ITEM".freeze LOGIN_REQUIRED = "LOGIN_REQUIRED".freeze ERROR = "ERROR".freeze + MIGRATED_ACCOUNT_ITEM = "MIGRATED_ACCOUNT_ITEM".freeze # Builds the enum from string # @param [String] The enum value in the form of the string diff --git a/lib/plaid/models/transfer_authorization_device.rb b/lib/plaid/models/transfer_authorization_device.rb index eb713482b..2cd828b8e 100644 --- a/lib/plaid/models/transfer_authorization_device.rb +++ b/lib/plaid/models/transfer_authorization_device.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -16,10 +16,10 @@ module Plaid # Information about the device being used to initiate the authorization. class TransferAuthorizationDevice - # The IP address of the device being used to initiate the authorization. Required for guaranteed ACH customers. + # The IP address of the device being used to initiate the authorization. Required for Guarantee. attr_accessor :ip_address - # The user agent of the device being used to initiate the authorization. Required for guaranteed ACH customers. + # The user agent of the device being used to initiate the authorization. Required for Guarantee. attr_accessor :user_agent # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/plaid/models/transfer_authorization_guarantee_decision.rb b/lib/plaid/models/transfer_authorization_guarantee_decision.rb index 00adc21ed..5eed3d27a 100644 --- a/lib/plaid/models/transfer_authorization_guarantee_decision.rb +++ b/lib/plaid/models/transfer_authorization_guarantee_decision.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_authorization_guarantee_decision_rationale.rb b/lib/plaid/models/transfer_authorization_guarantee_decision_rationale.rb index dc67f9dbf..d97d05111 100644 --- a/lib/plaid/models/transfer_authorization_guarantee_decision_rationale.rb +++ b/lib/plaid/models/transfer_authorization_guarantee_decision_rationale.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_authorization_guarantee_decision_rationale_code.rb b/lib/plaid/models/transfer_authorization_guarantee_decision_rationale_code.rb index ae1e113d3..912135eb6 100644 --- a/lib/plaid/models/transfer_authorization_guarantee_decision_rationale_code.rb +++ b/lib/plaid/models/transfer_authorization_guarantee_decision_rationale_code.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_authorization_proposed_transfer.rb b/lib/plaid/models/transfer_authorization_proposed_transfer.rb index 8bd4cb0d4..4fad903aa 100644 --- a/lib/plaid/models/transfer_authorization_proposed_transfer.rb +++ b/lib/plaid/models/transfer_authorization_proposed_transfer.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_authorization_user_in_request.rb b/lib/plaid/models/transfer_authorization_user_in_request.rb index d0c06e352..3a0a2437f 100644 --- a/lib/plaid/models/transfer_authorization_user_in_request.rb +++ b/lib/plaid/models/transfer_authorization_user_in_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_cancel_request.rb b/lib/plaid/models/transfer_cancel_request.rb index 6474a3d42..7e413b6d3 100644 --- a/lib/plaid/models/transfer_cancel_request.rb +++ b/lib/plaid/models/transfer_cancel_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_cancel_response.rb b/lib/plaid/models/transfer_cancel_response.rb index 2b44ad7cc..8c2fcd07d 100644 --- a/lib/plaid/models/transfer_cancel_response.rb +++ b/lib/plaid/models/transfer_cancel_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_create_request.rb b/lib/plaid/models/transfer_create_request.rb index 4257b5f41..bb946a392 100644 --- a/lib/plaid/models/transfer_create_request.rb +++ b/lib/plaid/models/transfer_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -101,7 +101,7 @@ def self.openapi_types :'amount' => :'String', :'description' => :'String', :'ach_class' => :'ACHClass', - :'user' => :'TransferUserInRequest', + :'user' => :'TransferUserInRequestDeprecated', :'metadata' => :'Hash', :'origination_account_id' => :'String', :'iso_currency_code' => :'String', @@ -212,18 +212,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "authorization_id", authorization_id cannot be nil.') end - if @type.nil? - invalid_properties.push('invalid value for "type", type cannot be nil.') - end - - if @network.nil? - invalid_properties.push('invalid value for "network", network cannot be nil.') - end - - if @amount.nil? - invalid_properties.push('invalid value for "amount", amount cannot be nil.') - end - if @description.nil? invalid_properties.push('invalid value for "description", description cannot be nil.') end @@ -233,14 +221,6 @@ def list_invalid_properties end - if @ach_class.nil? - invalid_properties.push('invalid value for "ach_class", ach_class cannot be nil.') - end - - if @user.nil? - invalid_properties.push('invalid value for "user", user cannot be nil.') - end - invalid_properties end @@ -250,13 +230,8 @@ def list_invalid_properties def valid? return false if !@idempotency_key.nil? && @idempotency_key.to_s.length > 50 return false if @authorization_id.nil? - return false if @type.nil? - return false if @network.nil? - return false if @amount.nil? return false if @description.nil? return false if @description.to_s.length > 10 - return false if @ach_class.nil? - return false if @user.nil? return false if !@metadata.nil? && @metadata.length > 50 true end diff --git a/lib/plaid/models/transfer_create_response.rb b/lib/plaid/models/transfer_create_response.rb index 10303e5cc..75cf7fd81 100644 --- a/lib/plaid/models/transfer_create_response.rb +++ b/lib/plaid/models/transfer_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_event.rb b/lib/plaid/models/transfer_event.rb index 4e0b060bd..9aba78a3c 100644 --- a/lib/plaid/models/transfer_event.rb +++ b/lib/plaid/models/transfer_event.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_event_list_request.rb b/lib/plaid/models/transfer_event_list_request.rb index b2111092f..cdadde166 100644 --- a/lib/plaid/models/transfer_event_list_request.rb +++ b/lib/plaid/models/transfer_event_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -45,7 +45,7 @@ class TransferEventListRequest # The maximum number of transfer events to return. If the number of events matching the above parameters is greater than `count`, the most recent events will be returned. attr_accessor :count - # The offset into the list of transfer events. When `count`=25 and `offset`=0, the first 25 events will be returned. When `count`=25 and `offset`=25, the next 25 bank transfer events will be returned. + # The offset into the list of transfer events. When `count`=25 and `offset`=0, the first 25 events will be returned. When `count`=25 and `offset`=25, the next 25 events will be returned. attr_accessor :offset # The origination account ID to get events for transfers from a specific origination account. diff --git a/lib/plaid/models/transfer_event_list_response.rb b/lib/plaid/models/transfer_event_list_response.rb index 7a420967e..fb4b07ed2 100644 --- a/lib/plaid/models/transfer_event_list_response.rb +++ b/lib/plaid/models/transfer_event_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_event_list_transfer_type.rb b/lib/plaid/models/transfer_event_list_transfer_type.rb index ace50e786..0e3a9792c 100644 --- a/lib/plaid/models/transfer_event_list_transfer_type.rb +++ b/lib/plaid/models/transfer_event_list_transfer_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_event_sync_request.rb b/lib/plaid/models/transfer_event_sync_request.rb index c0dee353f..f9e697e25 100644 --- a/lib/plaid/models/transfer_event_sync_request.rb +++ b/lib/plaid/models/transfer_event_sync_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_event_sync_response.rb b/lib/plaid/models/transfer_event_sync_response.rb index 7ddde9d9c..598471d51 100644 --- a/lib/plaid/models/transfer_event_sync_response.rb +++ b/lib/plaid/models/transfer_event_sync_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_event_type.rb b/lib/plaid/models/transfer_event_type.rb index 0a255b1e9..5b33184b0 100644 --- a/lib/plaid/models/transfer_event_type.rb +++ b/lib/plaid/models/transfer_event_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -19,9 +19,10 @@ class TransferEventType CANCELLED = "cancelled".freeze FAILED = "failed".freeze POSTED = "posted".freeze + SETTLED = "settled".freeze RETURNED = "returned".freeze SWEPT = "swept".freeze - REVERSE_SWEPT = "reverse_swept".freeze + SWEPT_SETTLED = "swept_settled".freeze RETURN_SWEPT = "return_swept".freeze # Builds the enum from string diff --git a/lib/plaid/models/transfer_events_update_webhook.rb b/lib/plaid/models/transfer_events_update_webhook.rb index 199adcd43..059f5b888 100644 --- a/lib/plaid/models/transfer_events_update_webhook.rb +++ b/lib/plaid/models/transfer_events_update_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -22,11 +22,14 @@ class TransferEventsUpdateWebhook # `TRANSFER_EVENTS_UPDATE` attr_accessor :webhook_code + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', - :'webhook_code' => :'webhook_code' + :'webhook_code' => :'webhook_code', + :'environment' => :'environment' } end @@ -39,7 +42,8 @@ def self.acceptable_attributes def self.openapi_types { :'webhook_type' => :'String', - :'webhook_code' => :'String' + :'webhook_code' => :'String', + :'environment' => :'WebhookEnvironmentValues' } end @@ -71,6 +75,10 @@ def initialize(attributes = {}) if attributes.key?(:'webhook_code') self.webhook_code = attributes[:'webhook_code'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -85,6 +93,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "webhook_code", webhook_code cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -93,6 +105,7 @@ def list_invalid_properties def valid? return false if @webhook_type.nil? return false if @webhook_code.nil? + return false if @environment.nil? true end @@ -102,7 +115,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && webhook_type == o.webhook_type && - webhook_code == o.webhook_code + webhook_code == o.webhook_code && + environment == o.environment end # @see the `==` method @@ -114,7 +128,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code].hash + [webhook_type, webhook_code, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/transfer_failure.rb b/lib/plaid/models/transfer_failure.rb index 13206d5a8..cdf2f77fb 100644 --- a/lib/plaid/models/transfer_failure.rb +++ b/lib/plaid/models/transfer_failure.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_get_request.rb b/lib/plaid/models/transfer_get_request.rb index 117a86ccb..bdf3ce23c 100644 --- a/lib/plaid/models/transfer_get_request.rb +++ b/lib/plaid/models/transfer_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_get_response.rb b/lib/plaid/models/transfer_get_response.rb index 6870180b8..43bbc0988 100644 --- a/lib/plaid/models/transfer_get_response.rb +++ b/lib/plaid/models/transfer_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_intent_authorization_decision.rb b/lib/plaid/models/transfer_intent_authorization_decision.rb index ca41f23be..f35bd67f7 100644 --- a/lib/plaid/models/transfer_intent_authorization_decision.rb +++ b/lib/plaid/models/transfer_intent_authorization_decision.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_intent_create.rb b/lib/plaid/models/transfer_intent_create.rb index 07f3b38c5..f15a4ac79 100644 --- a/lib/plaid/models/transfer_intent_create.rb +++ b/lib/plaid/models/transfer_intent_create.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -48,7 +48,7 @@ class TransferIntentCreate # The currency of the transfer amount, e.g. \"USD\" attr_accessor :iso_currency_code - # When `true`, the transfer requires a `GUARANTEED` decision by Plaid to proceed (Guaranteed ACH customers only). + # When `true`, the transfer requires a `GUARANTEED` decision by Plaid to proceed (Guarantee customers only). attr_accessor :require_guarantee # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/plaid/models/transfer_intent_create_mode.rb b/lib/plaid/models/transfer_intent_create_mode.rb index 674497dc0..307a4aaff 100644 --- a/lib/plaid/models/transfer_intent_create_mode.rb +++ b/lib/plaid/models/transfer_intent_create_mode.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_intent_create_request.rb b/lib/plaid/models/transfer_intent_create_request.rb index e886e7442..75e416adc 100644 --- a/lib/plaid/models/transfer_intent_create_request.rb +++ b/lib/plaid/models/transfer_intent_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -46,7 +46,7 @@ class TransferIntentCreateRequest # The currency of the transfer amount, e.g. \"USD\" attr_accessor :iso_currency_code - # When `true`, the transfer requires a `GUARANTEED` decision by Plaid to proceed (Guaranteed ACH customers only). + # When `true`, the transfer requires a `GUARANTEED` decision by Plaid to proceed (Guarantee customers only). attr_accessor :require_guarantee # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/plaid/models/transfer_intent_create_response.rb b/lib/plaid/models/transfer_intent_create_response.rb index 7f82c6b91..28403f8f0 100644 --- a/lib/plaid/models/transfer_intent_create_response.rb +++ b/lib/plaid/models/transfer_intent_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_intent_get.rb b/lib/plaid/models/transfer_intent_get.rb index 06e3ddfd8..f33617ecd 100644 --- a/lib/plaid/models/transfer_intent_get.rb +++ b/lib/plaid/models/transfer_intent_get.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -57,7 +57,7 @@ class TransferIntentGet # The currency of the transfer amount, e.g. \"USD\" attr_accessor :iso_currency_code - # When `true`, the transfer requires a `GUARANTEED` decision by Plaid to proceed (Guaranteed ACH customers only). + # When `true`, the transfer requires a `GUARANTEED` decision by Plaid to proceed (Guarantee customers only). attr_accessor :require_guarantee attr_accessor :guarantee_decision diff --git a/lib/plaid/models/transfer_intent_get_failure_reason.rb b/lib/plaid/models/transfer_intent_get_failure_reason.rb index 693257a0d..aa541146e 100644 --- a/lib/plaid/models/transfer_intent_get_failure_reason.rb +++ b/lib/plaid/models/transfer_intent_get_failure_reason.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -19,7 +19,7 @@ class TransferIntentGetFailureReason # A broad categorization of the error. attr_accessor :error_type - # A code representing the reason for a failed transfer intent (i.e., an API error or the authorization being declined). For a full listing of bank transfer errors, see [Bank Transfers errors](https://plaid.com/docs/errors/bank-transfers/). + # A code representing the reason for a failed transfer intent (i.e., an API error or the authorization being declined). attr_accessor :error_code # A human-readable description of the code associated with a failed transfer intent. diff --git a/lib/plaid/models/transfer_intent_get_request.rb b/lib/plaid/models/transfer_intent_get_request.rb index 7d4c395fa..752b7c90b 100644 --- a/lib/plaid/models/transfer_intent_get_request.rb +++ b/lib/plaid/models/transfer_intent_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_intent_get_response.rb b/lib/plaid/models/transfer_intent_get_response.rb index 6d5fc4597..0d3b5d1f9 100644 --- a/lib/plaid/models/transfer_intent_get_response.rb +++ b/lib/plaid/models/transfer_intent_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_intent_status.rb b/lib/plaid/models/transfer_intent_status.rb index 41deda3bd..c7cac9e36 100644 --- a/lib/plaid/models/transfer_intent_status.rb +++ b/lib/plaid/models/transfer_intent_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_list_request.rb b/lib/plaid/models/transfer_list_request.rb index 0c9ffa11a..55ace329d 100644 --- a/lib/plaid/models/transfer_list_request.rb +++ b/lib/plaid/models/transfer_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_list_response.rb b/lib/plaid/models/transfer_list_response.rb index c1f60d059..75aef00a5 100644 --- a/lib/plaid/models/transfer_list_response.rb +++ b/lib/plaid/models/transfer_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_migrate_account_request.rb b/lib/plaid/models/transfer_migrate_account_request.rb index 02b7587e3..3ee8e4642 100644 --- a/lib/plaid/models/transfer_migrate_account_request.rb +++ b/lib/plaid/models/transfer_migrate_account_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_migrate_account_response.rb b/lib/plaid/models/transfer_migrate_account_response.rb index 031fbdbd7..5b87b27b9 100644 --- a/lib/plaid/models/transfer_migrate_account_response.rb +++ b/lib/plaid/models/transfer_migrate_account_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_network.rb b/lib/plaid/models/transfer_network.rb index ca01c2027..51fa09463 100644 --- a/lib/plaid/models/transfer_network.rb +++ b/lib/plaid/models/transfer_network.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_repayment.rb b/lib/plaid/models/transfer_repayment.rb index 3bee35a6f..f542cbaa6 100644 --- a/lib/plaid/models/transfer_repayment.rb +++ b/lib/plaid/models/transfer_repayment.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_repayment_list_request.rb b/lib/plaid/models/transfer_repayment_list_request.rb index 2e662c416..bd2506eab 100644 --- a/lib/plaid/models/transfer_repayment_list_request.rb +++ b/lib/plaid/models/transfer_repayment_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_repayment_list_response.rb b/lib/plaid/models/transfer_repayment_list_response.rb index cb38fcfa5..3cfba34c0 100644 --- a/lib/plaid/models/transfer_repayment_list_response.rb +++ b/lib/plaid/models/transfer_repayment_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_repayment_return.rb b/lib/plaid/models/transfer_repayment_return.rb index 37b67e9a9..4efae4103 100644 --- a/lib/plaid/models/transfer_repayment_return.rb +++ b/lib/plaid/models/transfer_repayment_return.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_repayment_return_list_request.rb b/lib/plaid/models/transfer_repayment_return_list_request.rb index 7e0161d6e..0d7b6a27a 100644 --- a/lib/plaid/models/transfer_repayment_return_list_request.rb +++ b/lib/plaid/models/transfer_repayment_return_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_repayment_return_list_response.rb b/lib/plaid/models/transfer_repayment_return_list_response.rb index d1799b206..85114604e 100644 --- a/lib/plaid/models/transfer_repayment_return_list_response.rb +++ b/lib/plaid/models/transfer_repayment_return_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_status.rb b/lib/plaid/models/transfer_status.rb index e044f75c9..7c074338d 100644 --- a/lib/plaid/models/transfer_status.rb +++ b/lib/plaid/models/transfer_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -17,6 +17,7 @@ module Plaid class TransferStatus PENDING = "pending".freeze POSTED = "posted".freeze + SETTLED = "settled".freeze CANCELLED = "cancelled".freeze FAILED = "failed".freeze RETURNED = "returned".freeze diff --git a/lib/plaid/models/transfer_sweep.rb b/lib/plaid/models/transfer_sweep.rb index f0e008778..697d0b806 100644 --- a/lib/plaid/models/transfer_sweep.rb +++ b/lib/plaid/models/transfer_sweep.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -28,13 +28,17 @@ class TransferSweep # The currency of the sweep, e.g. \"USD\". attr_accessor :iso_currency_code + # The date when the sweep settled, in the YYYY-MM-DD format. + attr_accessor :settled + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'id' => :'id', :'created' => :'created', :'amount' => :'amount', - :'iso_currency_code' => :'iso_currency_code' + :'iso_currency_code' => :'iso_currency_code', + :'settled' => :'settled' } end @@ -49,13 +53,15 @@ def self.openapi_types :'id' => :'String', :'created' => :'Time', :'amount' => :'String', - :'iso_currency_code' => :'String' + :'iso_currency_code' => :'String', + :'settled' => :'Date' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'settled' ]) end @@ -89,6 +95,10 @@ def initialize(attributes = {}) if attributes.key?(:'iso_currency_code') self.iso_currency_code = attributes[:'iso_currency_code'] end + + if attributes.key?(:'settled') + self.settled = attributes[:'settled'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -132,7 +142,8 @@ def ==(o) id == o.id && created == o.created && amount == o.amount && - iso_currency_code == o.iso_currency_code + iso_currency_code == o.iso_currency_code && + settled == o.settled end # @see the `==` method @@ -144,7 +155,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created, amount, iso_currency_code].hash + [id, created, amount, iso_currency_code, settled].hash end # Builds the object from hash diff --git a/lib/plaid/models/transfer_sweep_get_request.rb b/lib/plaid/models/transfer_sweep_get_request.rb index 40a6150f4..630e5289f 100644 --- a/lib/plaid/models/transfer_sweep_get_request.rb +++ b/lib/plaid/models/transfer_sweep_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_sweep_get_response.rb b/lib/plaid/models/transfer_sweep_get_response.rb index 9981ae332..28452a70f 100644 --- a/lib/plaid/models/transfer_sweep_get_response.rb +++ b/lib/plaid/models/transfer_sweep_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_sweep_list_request.rb b/lib/plaid/models/transfer_sweep_list_request.rb index 9e4d4119c..0769c1381 100644 --- a/lib/plaid/models/transfer_sweep_list_request.rb +++ b/lib/plaid/models/transfer_sweep_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_sweep_list_response.rb b/lib/plaid/models/transfer_sweep_list_response.rb index 934ca4b26..858c83f05 100644 --- a/lib/plaid/models/transfer_sweep_list_response.rb +++ b/lib/plaid/models/transfer_sweep_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_sweep_status.rb b/lib/plaid/models/transfer_sweep_status.rb index fb00fc661..a14921dfc 100644 --- a/lib/plaid/models/transfer_sweep_status.rb +++ b/lib/plaid/models/transfer_sweep_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -18,7 +18,7 @@ class TransferSweepStatus NULL = "null".freeze UNSWEPT = "unswept".freeze SWEPT = "swept".freeze - REVERSE_SWEPT = "reverse_swept".freeze + SWEPT_SETTLED = "swept_settled".freeze RETURN_SWEPT = "return_swept".freeze # Builds the enum from string diff --git a/lib/plaid/models/transfer_type.rb b/lib/plaid/models/transfer_type.rb index 5d752866f..05e3caf00 100644 --- a/lib/plaid/models/transfer_type.rb +++ b/lib/plaid/models/transfer_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_user_address_in_request.rb b/lib/plaid/models/transfer_user_address_in_request.rb index b9b811cde..8226f234d 100644 --- a/lib/plaid/models/transfer_user_address_in_request.rb +++ b/lib/plaid/models/transfer_user_address_in_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_user_address_in_response.rb b/lib/plaid/models/transfer_user_address_in_response.rb index 6410b555b..1cae40daa 100644 --- a/lib/plaid/models/transfer_user_address_in_response.rb +++ b/lib/plaid/models/transfer_user_address_in_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_user_in_request.rb b/lib/plaid/models/transfer_user_in_request.rb index 4fadfc082..cf44cac28 100644 --- a/lib/plaid/models/transfer_user_in_request.rb +++ b/lib/plaid/models/transfer_user_in_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_user_in_request_deprecated.rb b/lib/plaid/models/transfer_user_in_request_deprecated.rb new file mode 100644 index 000000000..25aa1bedc --- /dev/null +++ b/lib/plaid/models/transfer_user_in_request_deprecated.rb @@ -0,0 +1,261 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The legal name and other information for the account holder. + class TransferUserInRequestDeprecated + # The user's legal name. + attr_accessor :legal_name + + # The user's phone number. + attr_accessor :phone_number + + # The user's email address. + attr_accessor :email_address + + attr_accessor :address + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'legal_name' => :'legal_name', + :'phone_number' => :'phone_number', + :'email_address' => :'email_address', + :'address' => :'address' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'legal_name' => :'String', + :'phone_number' => :'String', + :'email_address' => :'String', + :'address' => :'TransferUserAddressInRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'TransferUserInRequest' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::TransferUserInRequestDeprecated` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::TransferUserInRequestDeprecated`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'legal_name') + self.legal_name = attributes[:'legal_name'] + end + + if attributes.key?(:'phone_number') + self.phone_number = attributes[:'phone_number'] + end + + if attributes.key?(:'email_address') + self.email_address = attributes[:'email_address'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @legal_name.nil? + invalid_properties.push('invalid value for "legal_name", legal_name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @legal_name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + legal_name == o.legal_name && + phone_number == o.phone_number && + email_address == o.email_address && + address == o.address + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [legal_name, phone_number, email_address, address].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/transfer_user_in_response.rb b/lib/plaid/models/transfer_user_in_response.rb index 59274b728..a75ef0451 100644 --- a/lib/plaid/models/transfer_user_in_response.rb +++ b/lib/plaid/models/transfer_user_in_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/update_entity_screening_request_search_terms.rb b/lib/plaid/models/update_entity_screening_request_search_terms.rb index 20c5f9366..b62ac01ba 100644 --- a/lib/plaid/models/update_entity_screening_request_search_terms.rb +++ b/lib/plaid/models/update_entity_screening_request_search_terms.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -19,16 +19,22 @@ class UpdateEntityScreeningRequestSearchTerms # ID of the associated entity program. attr_accessor :entity_watchlist_program_id + # The name of the organization being screened. attr_accessor :legal_name + # The numeric or alphanumeric identifier associated with this document. attr_accessor :document_number + # A valid email address. attr_accessor :email_address + # Valid, capitalized, two-letter ISO code representing the country of this object. Must be in ISO 3166-1 alpha-2 form. attr_accessor :country + # A phone number in E.164 format. attr_accessor :phone_number + # An 'http' or 'https' URL (must begin with either of those). attr_accessor :url # Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body. @@ -75,12 +81,6 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'legal_name', - :'document_number', - :'email_address', - :'country', - :'phone_number', - :'url', ]) end @@ -144,6 +144,21 @@ def list_invalid_properties invalid_properties.push('invalid value for "entity_watchlist_program_id", entity_watchlist_program_id cannot be nil.') end + if !@legal_name.nil? && @legal_name.to_s.length < 1 + invalid_properties.push('invalid value for "legal_name", the character length must be great than or equal to 1.') + end + + + if !@document_number.nil? && @document_number.to_s.length < 4 + invalid_properties.push('invalid value for "document_number", the character length must be great than or equal to 4.') + end + + + if !@country.nil? && @country.to_s.length < 2 + invalid_properties.push('invalid value for "country", the character length must be great than or equal to 2.') + end + + if @client_id.nil? invalid_properties.push('invalid value for "client_id", client_id cannot be nil.') end @@ -159,11 +174,47 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @entity_watchlist_program_id.nil? + return false if !@legal_name.nil? && @legal_name.to_s.length < 1 + return false if !@document_number.nil? && @document_number.to_s.length < 4 + return false if !@country.nil? && @country.to_s.length < 2 return false if @client_id.nil? return false if @secret.nil? true end + # Custom attribute writer method with validation + # @param [Object] legal_name Value to be assigned + def legal_name=(legal_name) + if !legal_name.nil? && legal_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "legal_name", the character length must be great than or equal to 1.' + end + + + @legal_name = legal_name + end + + # Custom attribute writer method with validation + # @param [Object] document_number Value to be assigned + def document_number=(document_number) + if !document_number.nil? && document_number.to_s.length < 4 + fail ArgumentError, 'invalid value for "document_number", the character length must be great than or equal to 4.' + end + + + @document_number = document_number + end + + # Custom attribute writer method with validation + # @param [Object] country Value to be assigned + def country=(country) + if !country.nil? && country.to_s.length < 2 + fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 2.' + end + + + @country = country + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/plaid/models/update_individual_screening_request_search_terms.rb b/lib/plaid/models/update_individual_screening_request_search_terms.rb index b2aad491c..a59200673 100644 --- a/lib/plaid/models/update_individual_screening_request_search_terms.rb +++ b/lib/plaid/models/update_individual_screening_request_search_terms.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -16,14 +16,19 @@ module Plaid # Search terms for editing an individual watchlist screening class UpdateIndividualScreeningRequestSearchTerms + # ID of the associated program. attr_accessor :watchlist_program_id + # The legal name of the individual being screened. attr_accessor :legal_name + # A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). attr_accessor :date_of_birth + # The numeric or alphanumeric identifier associated with this document. attr_accessor :document_number + # Valid, capitalized, two-letter ISO code representing the country of this object. Must be in ISO 3166-1 alpha-2 form. attr_accessor :country # Attribute mapping from ruby-style variable name to JSON key. @@ -56,11 +61,6 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'watchlist_program_id', - :'legal_name', - :'date_of_birth', - :'document_number', - :'country' ]) end @@ -104,15 +104,66 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if !@legal_name.nil? && @legal_name.to_s.length < 1 + invalid_properties.push('invalid value for "legal_name", the character length must be great than or equal to 1.') + end + + + if !@document_number.nil? && @document_number.to_s.length < 4 + invalid_properties.push('invalid value for "document_number", the character length must be great than or equal to 4.') + end + + + if !@country.nil? && @country.to_s.length < 2 + invalid_properties.push('invalid value for "country", the character length must be great than or equal to 2.') + end + + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if !@legal_name.nil? && @legal_name.to_s.length < 1 + return false if !@document_number.nil? && @document_number.to_s.length < 4 + return false if !@country.nil? && @country.to_s.length < 2 true end + # Custom attribute writer method with validation + # @param [Object] legal_name Value to be assigned + def legal_name=(legal_name) + if !legal_name.nil? && legal_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "legal_name", the character length must be great than or equal to 1.' + end + + + @legal_name = legal_name + end + + # Custom attribute writer method with validation + # @param [Object] document_number Value to be assigned + def document_number=(document_number) + if !document_number.nil? && document_number.to_s.length < 4 + fail ArgumentError, 'invalid value for "document_number", the character length must be great than or equal to 4.' + end + + + @document_number = document_number + end + + # Custom attribute writer method with validation + # @param [Object] country Value to be assigned + def country=(country) + if !country.nil? && country.to_s.length < 2 + fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 2.' + end + + + @country = country + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/plaid/models/user_address.rb b/lib/plaid/models/user_address.rb index 0ac8889a4..a6eed7b51 100644 --- a/lib/plaid/models/user_address.rb +++ b/lib/plaid/models/user_address.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -28,7 +28,7 @@ class UserAddress # An ISO 3166-2 subdivision code. Related terms would be \"state\", \"province\", \"prefecture\", \"zone\", \"subdivision\", etc. attr_accessor :region - # The postal code for the associated address. Between 2 and 10 alphanumeric characters. + # The postal code for the associated address. Between 2 and 10 alphanumeric characters. For US-based addresses this must be 5 numeric digits. attr_accessor :postal_code # Valid, capitalized, two-letter ISO code representing the country of this object. Must be in ISO 3166-1 alpha-2 form. @@ -138,11 +138,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "country", the character length must be great than or equal to 2.') end - pattern = Regexp.new(/^[A-Z]{2}$/) - if @country !~ pattern - invalid_properties.push("invalid value for \"country\", must conform to the pattern #{pattern}.") - end - invalid_properties end @@ -156,7 +151,6 @@ def valid? return false if @postal_code.nil? return false if @country.nil? return false if @country.to_s.length < 2 - return false if @country !~ Regexp.new(/^[A-Z]{2}$/) true end @@ -171,11 +165,6 @@ def country=(country) fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 2.' end - pattern = Regexp.new(/^[A-Z]{2}$/) - if country !~ pattern - fail ArgumentError, "invalid value for \"country\", must conform to the pattern #{pattern}." - end - @country = country end diff --git a/lib/plaid/models/user_create_request.rb b/lib/plaid/models/user_create_request.rb index 2e68359e0..cf58db6e2 100644 --- a/lib/plaid/models/user_create_request.rb +++ b/lib/plaid/models/user_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/user_create_response.rb b/lib/plaid/models/user_create_response.rb index 53a6a6bff..29ebb6ecd 100644 --- a/lib/plaid/models/user_create_response.rb +++ b/lib/plaid/models/user_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/user_custom_password.rb b/lib/plaid/models/user_custom_password.rb index c18f4ad8d..6c5f3e90d 100644 --- a/lib/plaid/models/user_custom_password.rb +++ b/lib/plaid/models/user_custom_password.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/user_id_number.rb b/lib/plaid/models/user_id_number.rb index a8dbb64fc..12e356bc3 100644 --- a/lib/plaid/models/user_id_number.rb +++ b/lib/plaid/models/user_id_number.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/user_name.rb b/lib/plaid/models/user_name.rb index d3bb7e62e..0ef344cb8 100644 --- a/lib/plaid/models/user_name.rb +++ b/lib/plaid/models/user_name.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/user_permission_revoked_webhook.rb b/lib/plaid/models/user_permission_revoked_webhook.rb index 1690ec818..2eee0b35c 100644 --- a/lib/plaid/models/user_permission_revoked_webhook.rb +++ b/lib/plaid/models/user_permission_revoked_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -27,13 +27,16 @@ class UserPermissionRevokedWebhook attr_accessor :error + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', :'item_id' => :'item_id', - :'error' => :'error' + :'error' => :'error', + :'environment' => :'environment' } end @@ -48,14 +51,15 @@ def self.openapi_types :'webhook_type' => :'String', :'webhook_code' => :'String', :'item_id' => :'String', - :'error' => :'PlaidError' + :'error' => :'PlaidError', + :'environment' => :'WebhookEnvironmentValues' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'error' + :'error', ]) end @@ -89,6 +93,10 @@ def initialize(attributes = {}) if attributes.key?(:'error') self.error = attributes[:'error'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -107,6 +115,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "item_id", item_id cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -116,6 +128,7 @@ def valid? return false if @webhook_type.nil? return false if @webhook_code.nil? return false if @item_id.nil? + return false if @environment.nil? true end @@ -127,7 +140,8 @@ def ==(o) webhook_type == o.webhook_type && webhook_code == o.webhook_code && item_id == o.item_id && - error == o.error + error == o.error && + environment == o.environment end # @see the `==` method @@ -139,7 +153,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, item_id, error].hash + [webhook_type, webhook_code, item_id, error, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/user_stated_income_source_category.rb b/lib/plaid/models/user_stated_income_source_category.rb index 5d7d2e45b..68eb17150 100644 --- a/lib/plaid/models/user_stated_income_source_category.rb +++ b/lib/plaid/models/user_stated_income_source_category.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/user_stated_income_source_frequency.rb b/lib/plaid/models/user_stated_income_source_frequency.rb index d8ab01af4..71892c179 100644 --- a/lib/plaid/models/user_stated_income_source_frequency.rb +++ b/lib/plaid/models/user_stated_income_source_frequency.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/user_stated_income_source_pay_type.rb b/lib/plaid/models/user_stated_income_source_pay_type.rb index 8182daaa8..6e4d6e45c 100644 --- a/lib/plaid/models/user_stated_income_source_pay_type.rb +++ b/lib/plaid/models/user_stated_income_source_pay_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/validation_source.rb b/lib/plaid/models/validation_source.rb new file mode 100644 index 000000000..b62960fa1 --- /dev/null +++ b/lib/plaid/models/validation_source.rb @@ -0,0 +1,232 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # No documentation available. + class ValidationSource + # No documentation available. + attr_accessor :validation_source_name + + # No documentation available. + attr_accessor :validation_source_reference_identifier + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'validation_source_name' => :'ValidationSourceName', + :'validation_source_reference_identifier' => :'ValidationSourceReferenceIdentifier' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'validation_source_name' => :'String', + :'validation_source_reference_identifier' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'validation_source_name', + :'validation_source_reference_identifier' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ValidationSource` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ValidationSource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'validation_source_name') + self.validation_source_name = attributes[:'validation_source_name'] + end + + if attributes.key?(:'validation_source_reference_identifier') + self.validation_source_reference_identifier = attributes[:'validation_source_reference_identifier'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + validation_source_name == o.validation_source_name && + validation_source_reference_identifier == o.validation_source_reference_identifier + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [validation_source_name, validation_source_reference_identifier].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/validation_sources.rb b/lib/plaid/models/validation_sources.rb new file mode 100644 index 000000000..f1d3147d6 --- /dev/null +++ b/lib/plaid/models/validation_sources.rb @@ -0,0 +1,227 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # No documentation available. + class ValidationSources + # No documentation available. + attr_accessor :validation_source + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'validation_source' => :'VALIDATION_SOURCE' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'validation_source' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ValidationSources` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ValidationSources`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'validation_source') + if (value = attributes[:'validation_source']).is_a?(Array) + self.validation_source = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @validation_source.nil? + invalid_properties.push('invalid value for "validation_source", validation_source cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @validation_source.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + validation_source == o.validation_source + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [validation_source].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/verification_expired_webhook.rb b/lib/plaid/models/verification_expired_webhook.rb index d52ef2a42..4ab24cd74 100644 --- a/lib/plaid/models/verification_expired_webhook.rb +++ b/lib/plaid/models/verification_expired_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -28,13 +28,16 @@ class VerificationExpiredWebhook # The `account_id` of the account associated with the webhook attr_accessor :account_id + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', :'item_id' => :'item_id', - :'account_id' => :'account_id' + :'account_id' => :'account_id', + :'environment' => :'environment' } end @@ -49,7 +52,8 @@ def self.openapi_types :'webhook_type' => :'String', :'webhook_code' => :'String', :'item_id' => :'String', - :'account_id' => :'String' + :'account_id' => :'String', + :'environment' => :'WebhookEnvironmentValues' } end @@ -89,6 +93,10 @@ def initialize(attributes = {}) if attributes.key?(:'account_id') self.account_id = attributes[:'account_id'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -111,6 +119,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -121,6 +133,7 @@ def valid? return false if @webhook_code.nil? return false if @item_id.nil? return false if @account_id.nil? + return false if @environment.nil? true end @@ -132,7 +145,8 @@ def ==(o) webhook_type == o.webhook_type && webhook_code == o.webhook_code && item_id == o.item_id && - account_id == o.account_id + account_id == o.account_id && + environment == o.environment end # @see the `==` method @@ -144,7 +158,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, item_id, account_id].hash + [webhook_type, webhook_code, item_id, account_id, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/paystub_verification.rb b/lib/plaid/models/verification_of_asset.rb similarity index 73% rename from lib/plaid/models/paystub_verification.rb rename to lib/plaid/models/verification_of_asset.rb index 980b543be..ad80bc659 100644 --- a/lib/plaid/models/paystub_verification.rb +++ b/lib/plaid/models/verification_of_asset.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,17 +14,20 @@ require 'time' module Plaid - # An object containing details on the paystub's verification status. This object will only be populated if the [`income_verification.access_tokens`](/docs/api/tokens/#link-token-create-request-income-verification-access-tokens) parameter was provided during the `/link/token/create` call or if a problem was detected with the information supplied by the user; otherwise it will be `null`. - class PaystubVerification - attr_accessor :verification_status + # No documentation available + class VerificationOfAsset + attr_accessor :reporting_information - attr_accessor :verification_attributes + attr_accessor :service_product_fulfillment + + attr_accessor :verification_of_asset_response # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'verification_status' => :'verification_status', - :'verification_attributes' => :'verification_attributes' + :'reporting_information' => :'REPORTING_INFORMATION', + :'service_product_fulfillment' => :'SERVICE_PRODUCT_FULFILLMENT', + :'verification_of_asset_response' => :'VERIFICATION_OF_ASSET_RESPONSE' } end @@ -36,15 +39,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'verification_status' => :'PaystubVerificationStatus', - :'verification_attributes' => :'Array' + :'reporting_information' => :'ReportingInformation', + :'service_product_fulfillment' => :'ServiceProductFulfillment', + :'verification_of_asset_response' => :'VerificationOfAssetResponse' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'verification_status', ]) end @@ -52,25 +55,27 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PaystubVerification` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::VerificationOfAsset` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PaystubVerification`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::VerificationOfAsset`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'verification_status') - self.verification_status = attributes[:'verification_status'] + if attributes.key?(:'reporting_information') + self.reporting_information = attributes[:'reporting_information'] end - if attributes.key?(:'verification_attributes') - if (value = attributes[:'verification_attributes']).is_a?(Array) - self.verification_attributes = value - end + if attributes.key?(:'service_product_fulfillment') + self.service_product_fulfillment = attributes[:'service_product_fulfillment'] + end + + if attributes.key?(:'verification_of_asset_response') + self.verification_of_asset_response = attributes[:'verification_of_asset_response'] end end @@ -78,8 +83,16 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @verification_attributes.nil? - invalid_properties.push('invalid value for "verification_attributes", verification_attributes cannot be nil.') + if @reporting_information.nil? + invalid_properties.push('invalid value for "reporting_information", reporting_information cannot be nil.') + end + + if @service_product_fulfillment.nil? + invalid_properties.push('invalid value for "service_product_fulfillment", service_product_fulfillment cannot be nil.') + end + + if @verification_of_asset_response.nil? + invalid_properties.push('invalid value for "verification_of_asset_response", verification_of_asset_response cannot be nil.') end invalid_properties @@ -88,7 +101,9 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @verification_attributes.nil? + return false if @reporting_information.nil? + return false if @service_product_fulfillment.nil? + return false if @verification_of_asset_response.nil? true end @@ -97,8 +112,9 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - verification_status == o.verification_status && - verification_attributes == o.verification_attributes + reporting_information == o.reporting_information && + service_product_fulfillment == o.service_product_fulfillment && + verification_of_asset_response == o.verification_of_asset_response end # @see the `==` method @@ -110,7 +126,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [verification_status, verification_attributes].hash + [reporting_information, service_product_fulfillment, verification_of_asset_response].hash end # Builds the object from hash diff --git a/lib/plaid/models/verification_of_asset_response.rb b/lib/plaid/models/verification_of_asset_response.rb new file mode 100644 index 000000000..45c730078 --- /dev/null +++ b/lib/plaid/models/verification_of_asset_response.rb @@ -0,0 +1,224 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # No documentation available + class VerificationOfAssetResponse + attr_accessor :assets + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'assets' => :'ASSETS' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'assets' => :'Assets' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::VerificationOfAssetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::VerificationOfAssetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'assets') + self.assets = attributes[:'assets'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @assets.nil? + invalid_properties.push('invalid value for "assets", assets cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @assets.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + assets == o.assets + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [assets].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/verification_refresh_status.rb b/lib/plaid/models/verification_refresh_status.rb index 4bcc9599a..240266789 100644 --- a/lib/plaid/models/verification_refresh_status.rb +++ b/lib/plaid/models/verification_refresh_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/verification_status.rb b/lib/plaid/models/verification_status.rb index d9e19f919..04e5b8249 100644 --- a/lib/plaid/models/verification_status.rb +++ b/lib/plaid/models/verification_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/w2.rb b/lib/plaid/models/w2.rb index e767b14f5..bcc800eb0 100644 --- a/lib/plaid/models/w2.rb +++ b/lib/plaid/models/w2.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/w2_box12.rb b/lib/plaid/models/w2_box12.rb index 80dd14cf4..7c3f2e41c 100644 --- a/lib/plaid/models/w2_box12.rb +++ b/lib/plaid/models/w2_box12.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/w2_state_and_local_wages.rb b/lib/plaid/models/w2_state_and_local_wages.rb index c44b1948f..49a552b4f 100644 --- a/lib/plaid/models/w2_state_and_local_wages.rb +++ b/lib/plaid/models/w2_state_and_local_wages.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet.rb b/lib/plaid/models/wallet.rb index 05a0a2b6d..baf7389d8 100644 --- a/lib/plaid/models/wallet.rb +++ b/lib/plaid/models/wallet.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -23,12 +23,16 @@ class Wallet attr_accessor :numbers + # The ID of the recipient that corresponds to the e-wallet account numbers + attr_accessor :recipient_id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'wallet_id' => :'wallet_id', :'balance' => :'balance', - :'numbers' => :'numbers' + :'numbers' => :'numbers', + :'recipient_id' => :'recipient_id' } end @@ -42,7 +46,8 @@ def self.openapi_types { :'wallet_id' => :'String', :'balance' => :'WalletBalance', - :'numbers' => :'WalletNumbers' + :'numbers' => :'WalletNumbers', + :'recipient_id' => :'String' } end @@ -78,6 +83,10 @@ def initialize(attributes = {}) if attributes.key?(:'numbers') self.numbers = attributes[:'numbers'] end + + if attributes.key?(:'recipient_id') + self.recipient_id = attributes[:'recipient_id'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -115,7 +124,8 @@ def ==(o) self.class == o.class && wallet_id == o.wallet_id && balance == o.balance && - numbers == o.numbers + numbers == o.numbers && + recipient_id == o.recipient_id end # @see the `==` method @@ -127,7 +137,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [wallet_id, balance, numbers].hash + [wallet_id, balance, numbers, recipient_id].hash end # Builds the object from hash diff --git a/lib/plaid/models/wallet_balance.rb b/lib/plaid/models/wallet_balance.rb index e7198701f..9b6528c63 100644 --- a/lib/plaid/models/wallet_balance.rb +++ b/lib/plaid/models/wallet_balance.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_create_request.rb b/lib/plaid/models/wallet_create_request.rb index 8ca643592..8ca4d5928 100644 --- a/lib/plaid/models/wallet_create_request.rb +++ b/lib/plaid/models/wallet_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_create_response.rb b/lib/plaid/models/wallet_create_response.rb index 357ac9b49..7787a37a5 100644 --- a/lib/plaid/models/wallet_create_response.rb +++ b/lib/plaid/models/wallet_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -23,6 +23,9 @@ class WalletCreateResponse attr_accessor :numbers + # The ID of the recipient that corresponds to the e-wallet account numbers + attr_accessor :recipient_id + # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. attr_accessor :request_id @@ -32,6 +35,7 @@ def self.attribute_map :'wallet_id' => :'wallet_id', :'balance' => :'balance', :'numbers' => :'numbers', + :'recipient_id' => :'recipient_id', :'request_id' => :'request_id' } end @@ -47,6 +51,7 @@ def self.openapi_types :'wallet_id' => :'String', :'balance' => :'WalletBalance', :'numbers' => :'WalletNumbers', + :'recipient_id' => :'String', :'request_id' => :'String' } end @@ -92,6 +97,10 @@ def initialize(attributes = {}) self.numbers = attributes[:'numbers'] end + if attributes.key?(:'recipient_id') + self.recipient_id = attributes[:'recipient_id'] + end + if attributes.key?(:'request_id') self.request_id = attributes[:'request_id'] end @@ -138,6 +147,7 @@ def ==(o) wallet_id == o.wallet_id && balance == o.balance && numbers == o.numbers && + recipient_id == o.recipient_id && request_id == o.request_id end @@ -150,7 +160,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [wallet_id, balance, numbers, request_id].hash + [wallet_id, balance, numbers, recipient_id, request_id].hash end # Builds the object from hash diff --git a/lib/plaid/models/wallet_get_request.rb b/lib/plaid/models/wallet_get_request.rb index e2eabf5ed..8197ca63d 100644 --- a/lib/plaid/models/wallet_get_request.rb +++ b/lib/plaid/models/wallet_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_get_response.rb b/lib/plaid/models/wallet_get_response.rb index 2df339b19..7f52493ea 100644 --- a/lib/plaid/models/wallet_get_response.rb +++ b/lib/plaid/models/wallet_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -23,6 +23,9 @@ class WalletGetResponse attr_accessor :numbers + # The ID of the recipient that corresponds to the e-wallet account numbers + attr_accessor :recipient_id + # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. attr_accessor :request_id @@ -32,6 +35,7 @@ def self.attribute_map :'wallet_id' => :'wallet_id', :'balance' => :'balance', :'numbers' => :'numbers', + :'recipient_id' => :'recipient_id', :'request_id' => :'request_id' } end @@ -47,6 +51,7 @@ def self.openapi_types :'wallet_id' => :'String', :'balance' => :'WalletBalance', :'numbers' => :'WalletNumbers', + :'recipient_id' => :'String', :'request_id' => :'String' } end @@ -92,6 +97,10 @@ def initialize(attributes = {}) self.numbers = attributes[:'numbers'] end + if attributes.key?(:'recipient_id') + self.recipient_id = attributes[:'recipient_id'] + end + if attributes.key?(:'request_id') self.request_id = attributes[:'request_id'] end @@ -138,6 +147,7 @@ def ==(o) wallet_id == o.wallet_id && balance == o.balance && numbers == o.numbers && + recipient_id == o.recipient_id && request_id == o.request_id end @@ -150,7 +160,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [wallet_id, balance, numbers, request_id].hash + [wallet_id, balance, numbers, recipient_id, request_id].hash end # Builds the object from hash diff --git a/lib/plaid/models/wallet_iso_currency_code.rb b/lib/plaid/models/wallet_iso_currency_code.rb index 50e7e6262..7f0e25649 100644 --- a/lib/plaid/models/wallet_iso_currency_code.rb +++ b/lib/plaid/models/wallet_iso_currency_code.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_list_request.rb b/lib/plaid/models/wallet_list_request.rb index f70285d0c..a3b76fbe7 100644 --- a/lib/plaid/models/wallet_list_request.rb +++ b/lib/plaid/models/wallet_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_list_response.rb b/lib/plaid/models/wallet_list_response.rb index 5d765744f..5ffb1654f 100644 --- a/lib/plaid/models/wallet_list_response.rb +++ b/lib/plaid/models/wallet_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_numbers.rb b/lib/plaid/models/wallet_numbers.rb index 5b41b09ec..78d14a065 100644 --- a/lib/plaid/models/wallet_numbers.rb +++ b/lib/plaid/models/wallet_numbers.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_transaction.rb b/lib/plaid/models/wallet_transaction.rb index 3c0615527..e1f5e56e8 100644 --- a/lib/plaid/models/wallet_transaction.rb +++ b/lib/plaid/models/wallet_transaction.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_transaction_amount.rb b/lib/plaid/models/wallet_transaction_amount.rb index 1a56cdb06..ec8a7dfeb 100644 --- a/lib/plaid/models/wallet_transaction_amount.rb +++ b/lib/plaid/models/wallet_transaction_amount.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_transaction_counterparty.rb b/lib/plaid/models/wallet_transaction_counterparty.rb index d33a3da82..c11d76ce6 100644 --- a/lib/plaid/models/wallet_transaction_counterparty.rb +++ b/lib/plaid/models/wallet_transaction_counterparty.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_transaction_counterparty_bacs.rb b/lib/plaid/models/wallet_transaction_counterparty_bacs.rb index abc3e8e55..5fdb38550 100644 --- a/lib/plaid/models/wallet_transaction_counterparty_bacs.rb +++ b/lib/plaid/models/wallet_transaction_counterparty_bacs.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_transaction_counterparty_international.rb b/lib/plaid/models/wallet_transaction_counterparty_international.rb index 250d8a2a2..341df7cf5 100644 --- a/lib/plaid/models/wallet_transaction_counterparty_international.rb +++ b/lib/plaid/models/wallet_transaction_counterparty_international.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_transaction_counterparty_numbers.rb b/lib/plaid/models/wallet_transaction_counterparty_numbers.rb index 2a2440c95..ed9d10359 100644 --- a/lib/plaid/models/wallet_transaction_counterparty_numbers.rb +++ b/lib/plaid/models/wallet_transaction_counterparty_numbers.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_transaction_execute_request.rb b/lib/plaid/models/wallet_transaction_execute_request.rb index c983f7091..30fa049bd 100644 --- a/lib/plaid/models/wallet_transaction_execute_request.rb +++ b/lib/plaid/models/wallet_transaction_execute_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -32,7 +32,7 @@ class WalletTransactionExecuteRequest attr_accessor :amount - # A reference for the transaction. This must be an alphanumeric string with at most 18 characters and must not contain any special characters or spaces. + # A reference for the transaction. This must be an alphanumeric string with at most 18 characters and must not contain any special characters or spaces. Ensure that the `reference` field is unique for each transaction. attr_accessor :reference # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/plaid/models/wallet_transaction_execute_response.rb b/lib/plaid/models/wallet_transaction_execute_response.rb index 96ae58d44..9717fac37 100644 --- a/lib/plaid/models/wallet_transaction_execute_response.rb +++ b/lib/plaid/models/wallet_transaction_execute_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_transaction_get_request.rb b/lib/plaid/models/wallet_transaction_get_request.rb index 34837e970..cb1a3c8cc 100644 --- a/lib/plaid/models/wallet_transaction_get_request.rb +++ b/lib/plaid/models/wallet_transaction_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_transaction_get_response.rb b/lib/plaid/models/wallet_transaction_get_response.rb index 5fd1fc2a6..99391e5ac 100644 --- a/lib/plaid/models/wallet_transaction_get_response.rb +++ b/lib/plaid/models/wallet_transaction_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_transaction_status.rb b/lib/plaid/models/wallet_transaction_status.rb index 5bbb5dde6..74c4e7843 100644 --- a/lib/plaid/models/wallet_transaction_status.rb +++ b/lib/plaid/models/wallet_transaction_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,8 +15,10 @@ module Plaid class WalletTransactionStatus + AUTHORISING = "AUTHORISING".freeze INITIATED = "INITIATED".freeze EXECUTED = "EXECUTED".freeze + SETTLED = "SETTLED".freeze BLOCKED = "BLOCKED".freeze FAILED = "FAILED".freeze diff --git a/lib/plaid/models/assets_relay_webhook.rb b/lib/plaid/models/wallet_transaction_status_update_webhook.rb similarity index 70% rename from lib/plaid/models/assets_relay_webhook.rb rename to lib/plaid/models/wallet_transaction_status_update_webhook.rb index 5b0e4be1d..4a2850b24 100644 --- a/lib/plaid/models/assets_relay_webhook.rb +++ b/lib/plaid/models/wallet_transaction_status_update_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,34 +14,36 @@ require 'time' module Plaid - # Fired when the Secondary Client successfully retrieves an Asset Report by calling `asset_report/relay/get`. - class AssetsRelayWebhook - # `ASSETS` + # Fired when the status of a wallet transaction has changed. + class WalletTransactionStatusUpdateWebhook + # `WALLET` attr_accessor :webhook_type - # `RELAY_EVENT` + # `WALLET_TRANSACTION_STATUS_UPDATE` attr_accessor :webhook_code - attr_accessor :relay_event + # The `transaction_id` for the wallet transaction being updated + attr_accessor :transaction_id - # The id of the client with whom the Asset Report is being shared. - attr_accessor :secondary_client_id + attr_accessor :new_status - # The `asset_relay_token` that was created by calling `/asset_report/relay/create. - attr_accessor :asset_relay_token + attr_accessor :old_status - # The `asset_report_id` that can be provided to `/asset_report/relay/get` to retrieve the Asset Report. - attr_accessor :asset_report_id + # The timestamp of the update, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format, e.g. `\"2017-09-14T14:42:19.350Z\"` + attr_accessor :timestamp + + attr_accessor :environment # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', - :'relay_event' => :'relay_event', - :'secondary_client_id' => :'secondary_client_id', - :'asset_relay_token' => :'asset_relay_token', - :'asset_report_id' => :'asset_report_id' + :'transaction_id' => :'transaction_id', + :'new_status' => :'new_status', + :'old_status' => :'old_status', + :'timestamp' => :'timestamp', + :'environment' => :'environment' } end @@ -55,10 +57,11 @@ def self.openapi_types { :'webhook_type' => :'String', :'webhook_code' => :'String', - :'relay_event' => :'RelayEvent', - :'secondary_client_id' => :'String', - :'asset_relay_token' => :'String', - :'asset_report_id' => :'String' + :'transaction_id' => :'String', + :'new_status' => :'WalletTransactionStatus', + :'old_status' => :'WalletTransactionStatus', + :'timestamp' => :'Time', + :'environment' => :'WebhookEnvironmentValues' } end @@ -72,13 +75,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::AssetsRelayWebhook` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WalletTransactionStatusUpdateWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::AssetsRelayWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WalletTransactionStatusUpdateWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -91,20 +94,24 @@ def initialize(attributes = {}) self.webhook_code = attributes[:'webhook_code'] end - if attributes.key?(:'relay_event') - self.relay_event = attributes[:'relay_event'] + if attributes.key?(:'transaction_id') + self.transaction_id = attributes[:'transaction_id'] + end + + if attributes.key?(:'new_status') + self.new_status = attributes[:'new_status'] end - if attributes.key?(:'secondary_client_id') - self.secondary_client_id = attributes[:'secondary_client_id'] + if attributes.key?(:'old_status') + self.old_status = attributes[:'old_status'] end - if attributes.key?(:'asset_relay_token') - self.asset_relay_token = attributes[:'asset_relay_token'] + if attributes.key?(:'timestamp') + self.timestamp = attributes[:'timestamp'] end - if attributes.key?(:'asset_report_id') - self.asset_report_id = attributes[:'asset_report_id'] + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] end end @@ -120,20 +127,24 @@ def list_invalid_properties invalid_properties.push('invalid value for "webhook_code", webhook_code cannot be nil.') end - if @relay_event.nil? - invalid_properties.push('invalid value for "relay_event", relay_event cannot be nil.') + if @transaction_id.nil? + invalid_properties.push('invalid value for "transaction_id", transaction_id cannot be nil.') + end + + if @new_status.nil? + invalid_properties.push('invalid value for "new_status", new_status cannot be nil.') end - if @secondary_client_id.nil? - invalid_properties.push('invalid value for "secondary_client_id", secondary_client_id cannot be nil.') + if @old_status.nil? + invalid_properties.push('invalid value for "old_status", old_status cannot be nil.') end - if @asset_relay_token.nil? - invalid_properties.push('invalid value for "asset_relay_token", asset_relay_token cannot be nil.') + if @timestamp.nil? + invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.') end - if @asset_report_id.nil? - invalid_properties.push('invalid value for "asset_report_id", asset_report_id cannot be nil.') + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') end invalid_properties @@ -144,10 +155,11 @@ def list_invalid_properties def valid? return false if @webhook_type.nil? return false if @webhook_code.nil? - return false if @relay_event.nil? - return false if @secondary_client_id.nil? - return false if @asset_relay_token.nil? - return false if @asset_report_id.nil? + return false if @transaction_id.nil? + return false if @new_status.nil? + return false if @old_status.nil? + return false if @timestamp.nil? + return false if @environment.nil? true end @@ -158,10 +170,11 @@ def ==(o) self.class == o.class && webhook_type == o.webhook_type && webhook_code == o.webhook_code && - relay_event == o.relay_event && - secondary_client_id == o.secondary_client_id && - asset_relay_token == o.asset_relay_token && - asset_report_id == o.asset_report_id + transaction_id == o.transaction_id && + new_status == o.new_status && + old_status == o.old_status && + timestamp == o.timestamp && + environment == o.environment end # @see the `==` method @@ -173,7 +186,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, relay_event, secondary_client_id, asset_relay_token, asset_report_id].hash + [webhook_type, webhook_code, transaction_id, new_status, old_status, timestamp, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/wallet_transactions_list_request.rb b/lib/plaid/models/wallet_transactions_list_request.rb index 6c2d7793e..d338f21cc 100644 --- a/lib/plaid/models/wallet_transactions_list_request.rb +++ b/lib/plaid/models/wallet_transactions_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_transactions_list_response.rb b/lib/plaid/models/wallet_transactions_list_response.rb index 5e564e8e5..0dd81579d 100644 --- a/lib/plaid/models/wallet_transactions_list_response.rb +++ b/lib/plaid/models/wallet_transactions_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/warning.rb b/lib/plaid/models/warning.rb index 962571aef..3ef38f9b4 100644 --- a/lib/plaid/models/warning.rb +++ b/lib/plaid/models/warning.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/watchlist_screening_audit_trail.rb b/lib/plaid/models/watchlist_screening_audit_trail.rb index f5663922f..e8753f709 100644 --- a/lib/plaid/models/watchlist_screening_audit_trail.rb +++ b/lib/plaid/models/watchlist_screening_audit_trail.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -18,6 +18,7 @@ module Plaid class WatchlistScreeningAuditTrail attr_accessor :source + # ID of the associated user. attr_accessor :dashboard_user_id # An ISO8601 formatted timestamp. diff --git a/lib/plaid/models/watchlist_screening_document.rb b/lib/plaid/models/watchlist_screening_document.rb index 6d55b7b68..d6f3b8be2 100644 --- a/lib/plaid/models/watchlist_screening_document.rb +++ b/lib/plaid/models/watchlist_screening_document.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -88,11 +88,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "number", the character length must be great than or equal to 4.') end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if @number !~ pattern - invalid_properties.push("invalid value for \"number\", must conform to the pattern #{pattern}.") - end - invalid_properties end @@ -103,7 +98,6 @@ def valid? return false if @type.nil? return false if @number.nil? return false if @number.to_s.length < 4 - return false if @number !~ Regexp.new(/^\S+(\s+\S+)*$/) true end @@ -118,11 +112,6 @@ def number=(number) fail ArgumentError, 'invalid value for "number", the character length must be great than or equal to 4.' end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if number !~ pattern - fail ArgumentError, "invalid value for \"number\", must conform to the pattern #{pattern}." - end - @number = number end diff --git a/lib/plaid/models/watchlist_screening_document_type.rb b/lib/plaid/models/watchlist_screening_document_type.rb index c75ca22ef..983588cc1 100644 --- a/lib/plaid/models/watchlist_screening_document_type.rb +++ b/lib/plaid/models/watchlist_screening_document_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/create_entity_screening_request.rb b/lib/plaid/models/watchlist_screening_entity_create_request.rb similarity index 86% rename from lib/plaid/models/create_entity_screening_request.rb rename to lib/plaid/models/watchlist_screening_entity_create_request.rb index 705daabae..efe585369 100644 --- a/lib/plaid/models/create_entity_screening_request.rb +++ b/lib/plaid/models/watchlist_screening_entity_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,9 +15,10 @@ module Plaid # Request input for creating an entity screening review - class CreateEntityScreeningRequest + class WatchlistScreeningEntityCreateRequest attr_accessor :search_terms + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. attr_accessor :client_user_id # Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body. @@ -54,7 +55,6 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'client_user_id', ]) end @@ -62,13 +62,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::CreateEntityScreeningRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityCreateRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::CreateEntityScreeningRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -98,6 +98,11 @@ def list_invalid_properties invalid_properties.push('invalid value for "search_terms", search_terms cannot be nil.') end + if !@client_user_id.nil? && @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + invalid_properties end @@ -105,9 +110,21 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @search_terms.nil? + return false if !@client_user_id.nil? && @client_user_id.to_s.length < 1 true end + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if !client_user_id.nil? && client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/plaid/models/watchlist_screening_entity_create_response.rb b/lib/plaid/models/watchlist_screening_entity_create_response.rb new file mode 100644 index 000000000..63c222e04 --- /dev/null +++ b/lib/plaid/models/watchlist_screening_entity_create_response.rb @@ -0,0 +1,321 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The entity screening object allows you to represent an entity in your system, update its profile, and search for it on various watchlists. Note: Rejected entity screenings will not receive new hits, regardless of entity program configuration. + class WatchlistScreeningEntityCreateResponse + # ID of the associated entity screening. + attr_accessor :id + + attr_accessor :search_terms + + # ID of the associated user. + attr_accessor :assignee + + attr_accessor :status + + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. + attr_accessor :client_user_id + + attr_accessor :audit_trail + + # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. + attr_accessor :request_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'search_terms' => :'search_terms', + :'assignee' => :'assignee', + :'status' => :'status', + :'client_user_id' => :'client_user_id', + :'audit_trail' => :'audit_trail', + :'request_id' => :'request_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'search_terms' => :'EntityWatchlistScreeningSearchTerms', + :'assignee' => :'String', + :'status' => :'WatchlistScreeningStatus', + :'client_user_id' => :'String', + :'audit_trail' => :'WatchlistScreeningAuditTrail', + :'request_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'assignee', + :'client_user_id', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityCreateResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'search_terms') + self.search_terms = attributes[:'search_terms'] + end + + if attributes.key?(:'assignee') + self.assignee = attributes[:'assignee'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'client_user_id') + self.client_user_id = attributes[:'client_user_id'] + end + + if attributes.key?(:'audit_trail') + self.audit_trail = attributes[:'audit_trail'] + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @search_terms.nil? + invalid_properties.push('invalid value for "search_terms", search_terms cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + + if @audit_trail.nil? + invalid_properties.push('invalid value for "audit_trail", audit_trail cannot be nil.') + end + + if @request_id.nil? + invalid_properties.push('invalid value for "request_id", request_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @search_terms.nil? + return false if @status.nil? + return false if @client_user_id.to_s.length < 1 + return false if @audit_trail.nil? + return false if @request_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + search_terms == o.search_terms && + assignee == o.assignee && + status == o.status && + client_user_id == o.client_user_id && + audit_trail == o.audit_trail && + request_id == o.request_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, search_terms, assignee, status, client_user_id, audit_trail, request_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/get_entity_watchlist_screening_request.rb b/lib/plaid/models/watchlist_screening_entity_get_request.rb similarity index 97% rename from lib/plaid/models/get_entity_watchlist_screening_request.rb rename to lib/plaid/models/watchlist_screening_entity_get_request.rb index f21b0ce31..eebe49d40 100644 --- a/lib/plaid/models/get_entity_watchlist_screening_request.rb +++ b/lib/plaid/models/watchlist_screening_entity_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for fetching an entity watchlist screening - class GetEntityWatchlistScreeningRequest + class WatchlistScreeningEntityGetRequest # ID of the associated entity screening. attr_accessor :entity_watchlist_screening_id @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::GetEntityWatchlistScreeningRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityGetRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::GetEntityWatchlistScreeningRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityGetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/entity_watchlist_screening_response.rb b/lib/plaid/models/watchlist_screening_entity_get_response.rb similarity index 89% rename from lib/plaid/models/entity_watchlist_screening_response.rb rename to lib/plaid/models/watchlist_screening_entity_get_response.rb index faa226f64..aa82bae51 100644 --- a/lib/plaid/models/entity_watchlist_screening_response.rb +++ b/lib/plaid/models/watchlist_screening_entity_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,16 +15,18 @@ module Plaid # The entity screening object allows you to represent an entity in your system, update its profile, and search for it on various watchlists. Note: Rejected entity screenings will not receive new hits, regardless of entity program configuration. - class EntityWatchlistScreeningResponse + class WatchlistScreeningEntityGetResponse # ID of the associated entity screening. attr_accessor :id attr_accessor :search_terms + # ID of the associated user. attr_accessor :assignee attr_accessor :status + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. attr_accessor :client_user_id attr_accessor :audit_trail @@ -75,13 +77,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::EntityWatchlistScreeningResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityGetResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::EntityWatchlistScreeningResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -131,6 +133,11 @@ def list_invalid_properties invalid_properties.push('invalid value for "status", status cannot be nil.') end + if @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + if @audit_trail.nil? invalid_properties.push('invalid value for "audit_trail", audit_trail cannot be nil.') end @@ -148,11 +155,23 @@ def valid? return false if @id.nil? return false if @search_terms.nil? return false if @status.nil? + return false if @client_user_id.to_s.length < 1 return false if @audit_trail.nil? return false if @request_id.nil? true end + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/plaid/models/list_watchlist_screening_entity_history_request.rb b/lib/plaid/models/watchlist_screening_entity_history_list_request.rb similarity index 97% rename from lib/plaid/models/list_watchlist_screening_entity_history_request.rb rename to lib/plaid/models/watchlist_screening_entity_history_list_request.rb index f67c05ffe..a71c42d0b 100644 --- a/lib/plaid/models/list_watchlist_screening_entity_history_request.rb +++ b/lib/plaid/models/watchlist_screening_entity_history_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for listing changes to entity watchlist screenings - class ListWatchlistScreeningEntityHistoryRequest + class WatchlistScreeningEntityHistoryListRequest # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret @@ -64,13 +64,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ListWatchlistScreeningEntityHistoryRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityHistoryListRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ListWatchlistScreeningEntityHistoryRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityHistoryListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/paginated_entity_watchlist_screening_list_response.rb b/lib/plaid/models/watchlist_screening_entity_history_list_response.rb similarity index 95% rename from lib/plaid/models/paginated_entity_watchlist_screening_list_response.rb rename to lib/plaid/models/watchlist_screening_entity_history_list_response.rb index 7ca8f882b..bc74408c0 100644 --- a/lib/plaid/models/paginated_entity_watchlist_screening_list_response.rb +++ b/lib/plaid/models/watchlist_screening_entity_history_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Paginated list of entity watchlist screenings - class PaginatedEntityWatchlistScreeningListResponse + class WatchlistScreeningEntityHistoryListResponse # List of entity watchlist screening attr_accessor :entity_watchlist_screenings @@ -59,13 +59,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PaginatedEntityWatchlistScreeningListResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityHistoryListResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PaginatedEntityWatchlistScreeningListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityHistoryListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/list_watchlist_screening_entity_hit_request.rb b/lib/plaid/models/watchlist_screening_entity_hit_list_request.rb similarity index 97% rename from lib/plaid/models/list_watchlist_screening_entity_hit_request.rb rename to lib/plaid/models/watchlist_screening_entity_hit_list_request.rb index d3233e1db..cc547fb7d 100644 --- a/lib/plaid/models/list_watchlist_screening_entity_hit_request.rb +++ b/lib/plaid/models/watchlist_screening_entity_hit_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for listing hits for an entity watchlist screening - class ListWatchlistScreeningEntityHitRequest + class WatchlistScreeningEntityHitListRequest # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret @@ -64,13 +64,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ListWatchlistScreeningEntityHitRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityHitListRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ListWatchlistScreeningEntityHitRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityHitListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/paginated_entity_watchlist_screening_hit_list_response.rb b/lib/plaid/models/watchlist_screening_entity_hit_list_response.rb similarity index 95% rename from lib/plaid/models/paginated_entity_watchlist_screening_hit_list_response.rb rename to lib/plaid/models/watchlist_screening_entity_hit_list_response.rb index 58841b2b2..26de88975 100644 --- a/lib/plaid/models/paginated_entity_watchlist_screening_hit_list_response.rb +++ b/lib/plaid/models/watchlist_screening_entity_hit_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Paginated list of entity watchlist screening hits - class PaginatedEntityWatchlistScreeningHitListResponse + class WatchlistScreeningEntityHitListResponse # List of entity watchlist screening hits attr_accessor :entity_watchlist_screening_hits @@ -59,13 +59,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PaginatedEntityWatchlistScreeningHitListResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityHitListResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PaginatedEntityWatchlistScreeningHitListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityHitListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/list_entity_watchlist_screening_request.rb b/lib/plaid/models/watchlist_screening_entity_list_request.rb similarity index 88% rename from lib/plaid/models/list_entity_watchlist_screening_request.rb rename to lib/plaid/models/watchlist_screening_entity_list_request.rb index 1d6773206..1d949e6b0 100644 --- a/lib/plaid/models/list_entity_watchlist_screening_request.rb +++ b/lib/plaid/models/watchlist_screening_entity_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for listing entity watchlist screenings - class ListEntityWatchlistScreeningRequest + class WatchlistScreeningEntityListRequest # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret @@ -25,10 +25,12 @@ class ListEntityWatchlistScreeningRequest # ID of the associated entity program. attr_accessor :entity_watchlist_program_id + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. attr_accessor :client_user_id attr_accessor :status + # ID of the associated user. attr_accessor :assignee # An identifier that determines which page of results you receive. @@ -68,9 +70,6 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'client_user_id', - :'status', - :'assignee', :'cursor' ]) end @@ -79,13 +78,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ListEntityWatchlistScreeningRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityListRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ListEntityWatchlistScreeningRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -127,6 +126,11 @@ def list_invalid_properties invalid_properties.push('invalid value for "entity_watchlist_program_id", entity_watchlist_program_id cannot be nil.') end + if !@client_user_id.nil? && @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + invalid_properties end @@ -134,9 +138,21 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @entity_watchlist_program_id.nil? + return false if !@client_user_id.nil? && @client_user_id.to_s.length < 1 true end + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if !client_user_id.nil? && client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/plaid/models/watchlist_screening_entity_list_response.rb b/lib/plaid/models/watchlist_screening_entity_list_response.rb new file mode 100644 index 000000000..8784b2ab4 --- /dev/null +++ b/lib/plaid/models/watchlist_screening_entity_list_response.rb @@ -0,0 +1,253 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Paginated list of entity watchlist screenings + class WatchlistScreeningEntityListResponse + # List of entity watchlist screening + attr_accessor :entity_watchlist_screenings + + # An identifier that determines which page of results you receive. + attr_accessor :next_cursor + + # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. + attr_accessor :request_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'entity_watchlist_screenings' => :'entity_watchlist_screenings', + :'next_cursor' => :'next_cursor', + :'request_id' => :'request_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'entity_watchlist_screenings' => :'Array', + :'next_cursor' => :'String', + :'request_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_cursor', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityListResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'entity_watchlist_screenings') + if (value = attributes[:'entity_watchlist_screenings']).is_a?(Array) + self.entity_watchlist_screenings = value + end + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @entity_watchlist_screenings.nil? + invalid_properties.push('invalid value for "entity_watchlist_screenings", entity_watchlist_screenings cannot be nil.') + end + + if @request_id.nil? + invalid_properties.push('invalid value for "request_id", request_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @entity_watchlist_screenings.nil? + return false if @request_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + entity_watchlist_screenings == o.entity_watchlist_screenings && + next_cursor == o.next_cursor && + request_id == o.request_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [entity_watchlist_screenings, next_cursor, request_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/get_watchlist_screening_entity_program_request.rb b/lib/plaid/models/watchlist_screening_entity_program_get_request.rb similarity index 97% rename from lib/plaid/models/get_watchlist_screening_entity_program_request.rb rename to lib/plaid/models/watchlist_screening_entity_program_get_request.rb index df28cc7d1..05d72c234 100644 --- a/lib/plaid/models/get_watchlist_screening_entity_program_request.rb +++ b/lib/plaid/models/watchlist_screening_entity_program_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for fetching an entity watchlist program - class GetWatchlistScreeningEntityProgramRequest + class WatchlistScreeningEntityProgramGetRequest # ID of the associated entity program. attr_accessor :entity_watchlist_program_id @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::GetWatchlistScreeningEntityProgramRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityProgramGetRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::GetWatchlistScreeningEntityProgramRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityProgramGetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/entity_watchlist_program_response.rb b/lib/plaid/models/watchlist_screening_entity_program_get_response.rb similarity index 93% rename from lib/plaid/models/entity_watchlist_program_response.rb rename to lib/plaid/models/watchlist_screening_entity_program_get_response.rb index b68e2c1fe..50d3484af 100644 --- a/lib/plaid/models/entity_watchlist_program_response.rb +++ b/lib/plaid/models/watchlist_screening_entity_program_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # A program that configures the active lists, search parameters, and other behavior for initial and ongoing screening of entities. - class EntityWatchlistProgramResponse + class WatchlistScreeningEntityProgramGetResponse # ID of the associated entity program. attr_accessor :id @@ -86,13 +86,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::EntityWatchlistProgramResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityProgramGetResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::EntityWatchlistProgramResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityProgramGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -165,11 +165,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if @name !~ pattern - invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.") - end - if @name_sensitivity.nil? invalid_properties.push('invalid value for "name_sensitivity", name_sensitivity cannot be nil.') @@ -199,7 +194,6 @@ def valid? return false if @lists_enabled.nil? return false if @name.nil? return false if @name.to_s.length < 1 - return false if @name !~ Regexp.new(/^\S+(\s+\S+)*$/) return false if @name_sensitivity.nil? return false if @audit_trail.nil? return false if @is_archived.nil? @@ -229,11 +223,6 @@ def name=(name) fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if name !~ pattern - fail ArgumentError, "invalid value for \"name\", must conform to the pattern #{pattern}." - end - @name = name end diff --git a/lib/plaid/models/list_watchlist_screening_entity_programs_request.rb b/lib/plaid/models/watchlist_screening_entity_program_list_request.rb similarity index 95% rename from lib/plaid/models/list_watchlist_screening_entity_programs_request.rb rename to lib/plaid/models/watchlist_screening_entity_program_list_request.rb index c5017f2a5..68c5ddfba 100644 --- a/lib/plaid/models/list_watchlist_screening_entity_programs_request.rb +++ b/lib/plaid/models/watchlist_screening_entity_program_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for listing entity watchlist screening programs - class ListWatchlistScreeningEntityProgramsRequest + class WatchlistScreeningEntityProgramListRequest # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret @@ -59,13 +59,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ListWatchlistScreeningEntityProgramsRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityProgramListRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ListWatchlistScreeningEntityProgramsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityProgramListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/paginated_entity_watchlist_program_list_response.rb b/lib/plaid/models/watchlist_screening_entity_program_list_response.rb similarity index 97% rename from lib/plaid/models/paginated_entity_watchlist_program_list_response.rb rename to lib/plaid/models/watchlist_screening_entity_program_list_response.rb index 6f716ecf8..79a3c6259 100644 --- a/lib/plaid/models/paginated_entity_watchlist_program_list_response.rb +++ b/lib/plaid/models/watchlist_screening_entity_program_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Paginated list of entity watchlist screening programs - class PaginatedEntityWatchlistProgramListResponse + class WatchlistScreeningEntityProgramListResponse # List of entity watchlist screening programs attr_accessor :entity_watchlist_programs @@ -59,13 +59,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PaginatedEntityWatchlistProgramListResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityProgramListResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PaginatedEntityWatchlistProgramListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityProgramListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/create_entity_watchlist_screening_review_request.rb b/lib/plaid/models/watchlist_screening_entity_review_create_request.rb similarity index 97% rename from lib/plaid/models/create_entity_watchlist_screening_review_request.rb rename to lib/plaid/models/watchlist_screening_entity_review_create_request.rb index e65f51c9b..a7d24f24c 100644 --- a/lib/plaid/models/create_entity_watchlist_screening_review_request.rb +++ b/lib/plaid/models/watchlist_screening_entity_review_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for creating a review for an entity screening - class CreateEntityWatchlistScreeningReviewRequest + class WatchlistScreeningEntityReviewCreateRequest # Hits to mark as a true positive after thorough manual review. These hits will never recur or be updated once dismissed. In most cases, confirmed hits indicate that the customer should be rejected. attr_accessor :confirmed_hits @@ -74,13 +74,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::CreateEntityWatchlistScreeningReviewRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityReviewCreateRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::CreateEntityWatchlistScreeningReviewRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityReviewCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/entity_watchlist_screening_review_response.rb b/lib/plaid/models/watchlist_screening_entity_review_create_response.rb similarity index 96% rename from lib/plaid/models/entity_watchlist_screening_review_response.rb rename to lib/plaid/models/watchlist_screening_entity_review_create_response.rb index 2b9f8d264..f822e719c 100644 --- a/lib/plaid/models/entity_watchlist_screening_review_response.rb +++ b/lib/plaid/models/watchlist_screening_entity_review_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # A review submitted by a team member for an entity watchlist screening. A review can be either a comment on the current screening state, actions taken against hits attached to the watchlist screening, or both. - class EntityWatchlistScreeningReviewResponse + class WatchlistScreeningEntityReviewCreateResponse # ID of the associated entity review. attr_accessor :id @@ -73,13 +73,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::EntityWatchlistScreeningReviewResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityReviewCreateResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::EntityWatchlistScreeningReviewResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityReviewCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/list_watchlist_screening_entity_reviews_request.rb b/lib/plaid/models/watchlist_screening_entity_review_list_request.rb similarity index 95% rename from lib/plaid/models/list_watchlist_screening_entity_reviews_request.rb rename to lib/plaid/models/watchlist_screening_entity_review_list_request.rb index 3addf8ca3..1760f0bb4 100644 --- a/lib/plaid/models/list_watchlist_screening_entity_reviews_request.rb +++ b/lib/plaid/models/watchlist_screening_entity_review_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for listing reviews for an entity watchlist screening - class ListWatchlistScreeningEntityReviewsRequest + class WatchlistScreeningEntityReviewListRequest # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret @@ -64,13 +64,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ListWatchlistScreeningEntityReviewsRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityReviewListRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ListWatchlistScreeningEntityReviewsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityReviewListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/paginated_entity_watchlist_screening_review_list_response.rb b/lib/plaid/models/watchlist_screening_entity_review_list_response.rb similarity index 95% rename from lib/plaid/models/paginated_entity_watchlist_screening_review_list_response.rb rename to lib/plaid/models/watchlist_screening_entity_review_list_response.rb index 812341a4f..2dcecd5b2 100644 --- a/lib/plaid/models/paginated_entity_watchlist_screening_review_list_response.rb +++ b/lib/plaid/models/watchlist_screening_entity_review_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Paginated list of entity watchlist screening reviews - class PaginatedEntityWatchlistScreeningReviewListResponse + class WatchlistScreeningEntityReviewListResponse # List of entity watchlist screening reviews attr_accessor :entity_watchlist_screening_reviews @@ -59,13 +59,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PaginatedEntityWatchlistScreeningReviewListResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityReviewListResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PaginatedEntityWatchlistScreeningReviewListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityReviewListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/update_entity_screening_request.rb b/lib/plaid/models/watchlist_screening_entity_update_request.rb similarity index 87% rename from lib/plaid/models/update_entity_screening_request.rb rename to lib/plaid/models/watchlist_screening_entity_update_request.rb index c0da434c8..73f8a98e6 100644 --- a/lib/plaid/models/update_entity_screening_request.rb +++ b/lib/plaid/models/watchlist_screening_entity_update_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,16 +15,18 @@ module Plaid # Request input for editing an entity watchlist screening - class UpdateEntityScreeningRequest + class WatchlistScreeningEntityUpdateRequest # ID of the associated entity screening. attr_accessor :entity_watchlist_screening_id attr_accessor :search_terms + # ID of the associated user. attr_accessor :assignee attr_accessor :status + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. attr_accessor :client_user_id # Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body. @@ -65,7 +67,7 @@ def self.openapi_types :'client_user_id' => :'String', :'client_id' => :'String', :'secret' => :'String', - :'reset_fields' => :'Array' + :'reset_fields' => :'Array' } end @@ -73,9 +75,6 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'search_terms', - :'assignee', - :'status', - :'client_user_id', :'reset_fields' ]) end @@ -84,13 +83,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::UpdateEntityScreeningRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityUpdateRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::UpdateEntityScreeningRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -138,6 +137,11 @@ def list_invalid_properties invalid_properties.push('invalid value for "entity_watchlist_screening_id", entity_watchlist_screening_id cannot be nil.') end + if !@client_user_id.nil? && @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + invalid_properties end @@ -145,9 +149,21 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @entity_watchlist_screening_id.nil? + return false if !@client_user_id.nil? && @client_user_id.to_s.length < 1 true end + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if !client_user_id.nil? && client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/plaid/models/update_individual_screening_request_resettable_field.rb b/lib/plaid/models/watchlist_screening_entity_update_request_resettable_field.rb similarity index 88% rename from lib/plaid/models/update_individual_screening_request_resettable_field.rb rename to lib/plaid/models/watchlist_screening_entity_update_request_resettable_field.rb index 15c39395b..9b5b4b063 100644 --- a/lib/plaid/models/update_individual_screening_request_resettable_field.rb +++ b/lib/plaid/models/watchlist_screening_entity_update_request_resettable_field.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - class UpdateIndividualScreeningRequestResettableField + class WatchlistScreeningEntityUpdateRequestResettableField ASSIGNEE = "assignee".freeze # Builds the enum from string diff --git a/lib/plaid/models/watchlist_screening_entity_update_response.rb b/lib/plaid/models/watchlist_screening_entity_update_response.rb new file mode 100644 index 000000000..cd3d31a86 --- /dev/null +++ b/lib/plaid/models/watchlist_screening_entity_update_response.rb @@ -0,0 +1,321 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The entity screening object allows you to represent an entity in your system, update its profile, and search for it on various watchlists. Note: Rejected entity screenings will not receive new hits, regardless of entity program configuration. + class WatchlistScreeningEntityUpdateResponse + # ID of the associated entity screening. + attr_accessor :id + + attr_accessor :search_terms + + # ID of the associated user. + attr_accessor :assignee + + attr_accessor :status + + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. + attr_accessor :client_user_id + + attr_accessor :audit_trail + + # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. + attr_accessor :request_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'search_terms' => :'search_terms', + :'assignee' => :'assignee', + :'status' => :'status', + :'client_user_id' => :'client_user_id', + :'audit_trail' => :'audit_trail', + :'request_id' => :'request_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'search_terms' => :'EntityWatchlistScreeningSearchTerms', + :'assignee' => :'String', + :'status' => :'WatchlistScreeningStatus', + :'client_user_id' => :'String', + :'audit_trail' => :'WatchlistScreeningAuditTrail', + :'request_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'assignee', + :'client_user_id', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningEntityUpdateResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningEntityUpdateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'search_terms') + self.search_terms = attributes[:'search_terms'] + end + + if attributes.key?(:'assignee') + self.assignee = attributes[:'assignee'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'client_user_id') + self.client_user_id = attributes[:'client_user_id'] + end + + if attributes.key?(:'audit_trail') + self.audit_trail = attributes[:'audit_trail'] + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @search_terms.nil? + invalid_properties.push('invalid value for "search_terms", search_terms cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + + if @audit_trail.nil? + invalid_properties.push('invalid value for "audit_trail", audit_trail cannot be nil.') + end + + if @request_id.nil? + invalid_properties.push('invalid value for "request_id", request_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @search_terms.nil? + return false if @status.nil? + return false if @client_user_id.to_s.length < 1 + return false if @audit_trail.nil? + return false if @request_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + search_terms == o.search_terms && + assignee == o.assignee && + status == o.status && + client_user_id == o.client_user_id && + audit_trail == o.audit_trail && + request_id == o.request_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, search_terms, assignee, status, client_user_id, audit_trail, request_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/watchlist_screening_hit.rb b/lib/plaid/models/watchlist_screening_hit.rb index af997b1fe..949737289 100644 --- a/lib/plaid/models/watchlist_screening_hit.rb +++ b/lib/plaid/models/watchlist_screening_hit.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/watchlist_screening_hit_locations.rb b/lib/plaid/models/watchlist_screening_hit_locations.rb index 605f7c177..5bd867f7d 100644 --- a/lib/plaid/models/watchlist_screening_hit_locations.rb +++ b/lib/plaid/models/watchlist_screening_hit_locations.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -89,11 +89,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "country", the character length must be great than or equal to 2.') end - pattern = Regexp.new(/^[A-Z]{2}$/) - if @country !~ pattern - invalid_properties.push("invalid value for \"country\", must conform to the pattern #{pattern}.") - end - invalid_properties end @@ -104,7 +99,6 @@ def valid? return false if @full.nil? return false if @country.nil? return false if @country.to_s.length < 2 - return false if @country !~ Regexp.new(/^[A-Z]{2}$/) true end @@ -119,11 +113,6 @@ def country=(country) fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 2.' end - pattern = Regexp.new(/^[A-Z]{2}$/) - if country !~ pattern - fail ArgumentError, "invalid value for \"country\", must conform to the pattern #{pattern}." - end - @country = country end diff --git a/lib/plaid/models/watchlist_screening_hit_status.rb b/lib/plaid/models/watchlist_screening_hit_status.rb index 46df116ca..f6c556634 100644 --- a/lib/plaid/models/watchlist_screening_hit_status.rb +++ b/lib/plaid/models/watchlist_screening_hit_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/watchlist_screening_individual.rb b/lib/plaid/models/watchlist_screening_individual.rb index 414641790..d8b93786e 100644 --- a/lib/plaid/models/watchlist_screening_individual.rb +++ b/lib/plaid/models/watchlist_screening_individual.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -21,10 +21,12 @@ class WatchlistScreeningIndividual attr_accessor :search_terms + # ID of the associated user. attr_accessor :assignee attr_accessor :status + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. attr_accessor :client_user_id attr_accessor :audit_trail @@ -122,6 +124,11 @@ def list_invalid_properties invalid_properties.push('invalid value for "status", status cannot be nil.') end + if @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + if @audit_trail.nil? invalid_properties.push('invalid value for "audit_trail", audit_trail cannot be nil.') end @@ -135,10 +142,22 @@ def valid? return false if @id.nil? return false if @search_terms.nil? return false if @status.nil? + return false if @client_user_id.to_s.length < 1 return false if @audit_trail.nil? true end + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/plaid/models/watchlist_screening_create_request.rb b/lib/plaid/models/watchlist_screening_individual_create_request.rb similarity index 86% rename from lib/plaid/models/watchlist_screening_create_request.rb rename to lib/plaid/models/watchlist_screening_individual_create_request.rb index 1da343a7d..e467c15bd 100644 --- a/lib/plaid/models/watchlist_screening_create_request.rb +++ b/lib/plaid/models/watchlist_screening_individual_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,9 +15,10 @@ module Plaid # Request input for creating an individual watchlist screening - class WatchlistScreeningCreateRequest + class WatchlistScreeningIndividualCreateRequest attr_accessor :search_terms + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. attr_accessor :client_user_id # Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body. @@ -54,7 +55,6 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'client_user_id', ]) end @@ -62,13 +62,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningCreateRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualCreateRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -98,6 +98,11 @@ def list_invalid_properties invalid_properties.push('invalid value for "search_terms", search_terms cannot be nil.') end + if !@client_user_id.nil? && @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + invalid_properties end @@ -105,9 +110,21 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @search_terms.nil? + return false if !@client_user_id.nil? && @client_user_id.to_s.length < 1 true end + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if !client_user_id.nil? && client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/plaid/models/watchlist_screening_individual_create_response.rb b/lib/plaid/models/watchlist_screening_individual_create_response.rb new file mode 100644 index 000000000..bb62eb56c --- /dev/null +++ b/lib/plaid/models/watchlist_screening_individual_create_response.rb @@ -0,0 +1,321 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The screening object allows you to represent a customer in your system, update their profile, and search for them on various watchlists. Note: Rejected customers will not receive new hits, regardless of program configuration. + class WatchlistScreeningIndividualCreateResponse + # ID of the associated screening. + attr_accessor :id + + attr_accessor :search_terms + + # ID of the associated user. + attr_accessor :assignee + + attr_accessor :status + + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. + attr_accessor :client_user_id + + attr_accessor :audit_trail + + # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. + attr_accessor :request_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'search_terms' => :'search_terms', + :'assignee' => :'assignee', + :'status' => :'status', + :'client_user_id' => :'client_user_id', + :'audit_trail' => :'audit_trail', + :'request_id' => :'request_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'search_terms' => :'WatchlistScreeningSearchTerms', + :'assignee' => :'String', + :'status' => :'WatchlistScreeningStatus', + :'client_user_id' => :'String', + :'audit_trail' => :'WatchlistScreeningAuditTrail', + :'request_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'assignee', + :'client_user_id', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualCreateResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'search_terms') + self.search_terms = attributes[:'search_terms'] + end + + if attributes.key?(:'assignee') + self.assignee = attributes[:'assignee'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'client_user_id') + self.client_user_id = attributes[:'client_user_id'] + end + + if attributes.key?(:'audit_trail') + self.audit_trail = attributes[:'audit_trail'] + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @search_terms.nil? + invalid_properties.push('invalid value for "search_terms", search_terms cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + + if @audit_trail.nil? + invalid_properties.push('invalid value for "audit_trail", audit_trail cannot be nil.') + end + + if @request_id.nil? + invalid_properties.push('invalid value for "request_id", request_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @search_terms.nil? + return false if @status.nil? + return false if @client_user_id.to_s.length < 1 + return false if @audit_trail.nil? + return false if @request_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + search_terms == o.search_terms && + assignee == o.assignee && + status == o.status && + client_user_id == o.client_user_id && + audit_trail == o.audit_trail && + request_id == o.request_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, search_terms, assignee, status, client_user_id, audit_trail, request_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/get_individual_watchlist_screening_request.rb b/lib/plaid/models/watchlist_screening_individual_get_request.rb similarity index 97% rename from lib/plaid/models/get_individual_watchlist_screening_request.rb rename to lib/plaid/models/watchlist_screening_individual_get_request.rb index 0604f4190..902ebb251 100644 --- a/lib/plaid/models/get_individual_watchlist_screening_request.rb +++ b/lib/plaid/models/watchlist_screening_individual_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for fetching an individual watchlist screening - class GetIndividualWatchlistScreeningRequest + class WatchlistScreeningIndividualGetRequest # ID of the associated screening. attr_accessor :watchlist_screening_id @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::GetIndividualWatchlistScreeningRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualGetRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::GetIndividualWatchlistScreeningRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualGetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/watchlist_screening_individual_response.rb b/lib/plaid/models/watchlist_screening_individual_get_response.rb similarity index 88% rename from lib/plaid/models/watchlist_screening_individual_response.rb rename to lib/plaid/models/watchlist_screening_individual_get_response.rb index c38a29b6b..31c2b95de 100644 --- a/lib/plaid/models/watchlist_screening_individual_response.rb +++ b/lib/plaid/models/watchlist_screening_individual_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,16 +15,18 @@ module Plaid # The screening object allows you to represent a customer in your system, update their profile, and search for them on various watchlists. Note: Rejected customers will not receive new hits, regardless of program configuration. - class WatchlistScreeningIndividualResponse + class WatchlistScreeningIndividualGetResponse # ID of the associated screening. attr_accessor :id attr_accessor :search_terms + # ID of the associated user. attr_accessor :assignee attr_accessor :status + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. attr_accessor :client_user_id attr_accessor :audit_trail @@ -75,13 +77,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualGetResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -131,6 +133,11 @@ def list_invalid_properties invalid_properties.push('invalid value for "status", status cannot be nil.') end + if @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + if @audit_trail.nil? invalid_properties.push('invalid value for "audit_trail", audit_trail cannot be nil.') end @@ -148,11 +155,23 @@ def valid? return false if @id.nil? return false if @search_terms.nil? return false if @status.nil? + return false if @client_user_id.to_s.length < 1 return false if @audit_trail.nil? return false if @request_id.nil? true end + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/plaid/models/list_watchlist_screening_individual_history_request.rb b/lib/plaid/models/watchlist_screening_individual_history_list_request.rb similarity index 97% rename from lib/plaid/models/list_watchlist_screening_individual_history_request.rb rename to lib/plaid/models/watchlist_screening_individual_history_list_request.rb index 815f5cfba..86e5e2e28 100644 --- a/lib/plaid/models/list_watchlist_screening_individual_history_request.rb +++ b/lib/plaid/models/watchlist_screening_individual_history_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for listing changes to watchlist screenings for individuals - class ListWatchlistScreeningIndividualHistoryRequest + class WatchlistScreeningIndividualHistoryListRequest # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret @@ -64,13 +64,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ListWatchlistScreeningIndividualHistoryRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualHistoryListRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ListWatchlistScreeningIndividualHistoryRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualHistoryListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/paginated_individual_watchlist_screening_list_response.rb b/lib/plaid/models/watchlist_screening_individual_history_list_response.rb similarity index 95% rename from lib/plaid/models/paginated_individual_watchlist_screening_list_response.rb rename to lib/plaid/models/watchlist_screening_individual_history_list_response.rb index f0e7884dd..5776a3e31 100644 --- a/lib/plaid/models/paginated_individual_watchlist_screening_list_response.rb +++ b/lib/plaid/models/watchlist_screening_individual_history_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Paginated list of individual watchlist screenings. - class PaginatedIndividualWatchlistScreeningListResponse + class WatchlistScreeningIndividualHistoryListResponse # List of individual watchlist screenings attr_accessor :watchlist_screenings @@ -59,13 +59,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PaginatedIndividualWatchlistScreeningListResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualHistoryListResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PaginatedIndividualWatchlistScreeningListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualHistoryListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/list_watchlist_screening_individual_hit_request.rb b/lib/plaid/models/watchlist_screening_individual_hit_list_request.rb similarity index 97% rename from lib/plaid/models/list_watchlist_screening_individual_hit_request.rb rename to lib/plaid/models/watchlist_screening_individual_hit_list_request.rb index 2d5759da1..e32c3ccd3 100644 --- a/lib/plaid/models/list_watchlist_screening_individual_hit_request.rb +++ b/lib/plaid/models/watchlist_screening_individual_hit_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for listing hits for an individual watchlist screening - class ListWatchlistScreeningIndividualHitRequest + class WatchlistScreeningIndividualHitListRequest # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret @@ -64,13 +64,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ListWatchlistScreeningIndividualHitRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualHitListRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ListWatchlistScreeningIndividualHitRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualHitListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/paginated_individual_watchlist_screening_hit_list_response.rb b/lib/plaid/models/watchlist_screening_individual_hit_list_response.rb similarity index 95% rename from lib/plaid/models/paginated_individual_watchlist_screening_hit_list_response.rb rename to lib/plaid/models/watchlist_screening_individual_hit_list_response.rb index 7a2152191..16f7265c7 100644 --- a/lib/plaid/models/paginated_individual_watchlist_screening_hit_list_response.rb +++ b/lib/plaid/models/watchlist_screening_individual_hit_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Paginated list of individual watchlist screening hits - class PaginatedIndividualWatchlistScreeningHitListResponse + class WatchlistScreeningIndividualHitListResponse # List of individual watchlist screening hits attr_accessor :watchlist_screening_hits @@ -59,13 +59,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PaginatedIndividualWatchlistScreeningHitListResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualHitListResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PaginatedIndividualWatchlistScreeningHitListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualHitListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/list_individual_watchlist_screening_request.rb b/lib/plaid/models/watchlist_screening_individual_list_request.rb similarity index 88% rename from lib/plaid/models/list_individual_watchlist_screening_request.rb rename to lib/plaid/models/watchlist_screening_individual_list_request.rb index fe2aaeb92..3e4308959 100644 --- a/lib/plaid/models/list_individual_watchlist_screening_request.rb +++ b/lib/plaid/models/watchlist_screening_individual_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for listinging watchlist screenings for individuals - class ListIndividualWatchlistScreeningRequest + class WatchlistScreeningIndividualListRequest # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret @@ -25,10 +25,12 @@ class ListIndividualWatchlistScreeningRequest # ID of the associated program. attr_accessor :watchlist_program_id + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. attr_accessor :client_user_id attr_accessor :status + # ID of the associated user. attr_accessor :assignee # An identifier that determines which page of results you receive. @@ -68,9 +70,6 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'client_user_id', - :'status', - :'assignee', :'cursor' ]) end @@ -79,13 +78,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ListIndividualWatchlistScreeningRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualListRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ListIndividualWatchlistScreeningRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -127,6 +126,11 @@ def list_invalid_properties invalid_properties.push('invalid value for "watchlist_program_id", watchlist_program_id cannot be nil.') end + if !@client_user_id.nil? && @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + invalid_properties end @@ -134,9 +138,21 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @watchlist_program_id.nil? + return false if !@client_user_id.nil? && @client_user_id.to_s.length < 1 true end + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if !client_user_id.nil? && client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/plaid/models/watchlist_screening_individual_list_response.rb b/lib/plaid/models/watchlist_screening_individual_list_response.rb new file mode 100644 index 000000000..736e8530d --- /dev/null +++ b/lib/plaid/models/watchlist_screening_individual_list_response.rb @@ -0,0 +1,253 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Paginated list of individual watchlist screenings. + class WatchlistScreeningIndividualListResponse + # List of individual watchlist screenings + attr_accessor :watchlist_screenings + + # An identifier that determines which page of results you receive. + attr_accessor :next_cursor + + # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. + attr_accessor :request_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'watchlist_screenings' => :'watchlist_screenings', + :'next_cursor' => :'next_cursor', + :'request_id' => :'request_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'watchlist_screenings' => :'Array', + :'next_cursor' => :'String', + :'request_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_cursor', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualListResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'watchlist_screenings') + if (value = attributes[:'watchlist_screenings']).is_a?(Array) + self.watchlist_screenings = value + end + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @watchlist_screenings.nil? + invalid_properties.push('invalid value for "watchlist_screenings", watchlist_screenings cannot be nil.') + end + + if @request_id.nil? + invalid_properties.push('invalid value for "request_id", request_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @watchlist_screenings.nil? + return false if @request_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + watchlist_screenings == o.watchlist_screenings && + next_cursor == o.next_cursor && + request_id == o.request_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [watchlist_screenings, next_cursor, request_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/get_watchlist_screening_individual_program_request.rb b/lib/plaid/models/watchlist_screening_individual_program_get_request.rb similarity index 96% rename from lib/plaid/models/get_watchlist_screening_individual_program_request.rb rename to lib/plaid/models/watchlist_screening_individual_program_get_request.rb index 8607faa3a..6e4369d97 100644 --- a/lib/plaid/models/get_watchlist_screening_individual_program_request.rb +++ b/lib/plaid/models/watchlist_screening_individual_program_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for fetching an individual watchlist program - class GetWatchlistScreeningIndividualProgramRequest + class WatchlistScreeningIndividualProgramGetRequest # ID of the associated program. attr_accessor :watchlist_program_id @@ -58,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::GetWatchlistScreeningIndividualProgramRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualProgramGetRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::GetWatchlistScreeningIndividualProgramRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualProgramGetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/individual_watchlist_program_response.rb b/lib/plaid/models/watchlist_screening_individual_program_get_response.rb similarity index 93% rename from lib/plaid/models/individual_watchlist_program_response.rb rename to lib/plaid/models/watchlist_screening_individual_program_get_response.rb index 4b72b6c4f..73dcfb7cf 100644 --- a/lib/plaid/models/individual_watchlist_program_response.rb +++ b/lib/plaid/models/watchlist_screening_individual_program_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # A program that configures the active lists, search parameters, and other behavior for initial and ongoing screening of individuals. - class IndividualWatchlistProgramResponse + class WatchlistScreeningIndividualProgramGetResponse # ID of the associated program. attr_accessor :id @@ -86,13 +86,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::IndividualWatchlistProgramResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualProgramGetResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::IndividualWatchlistProgramResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualProgramGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -165,11 +165,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if @name !~ pattern - invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.") - end - if @name_sensitivity.nil? invalid_properties.push('invalid value for "name_sensitivity", name_sensitivity cannot be nil.') @@ -199,7 +194,6 @@ def valid? return false if @lists_enabled.nil? return false if @name.nil? return false if @name.to_s.length < 1 - return false if @name !~ Regexp.new(/^\S+(\s+\S+)*$/) return false if @name_sensitivity.nil? return false if @audit_trail.nil? return false if @is_archived.nil? @@ -229,11 +223,6 @@ def name=(name) fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if name !~ pattern - fail ArgumentError, "invalid value for \"name\", must conform to the pattern #{pattern}." - end - @name = name end diff --git a/lib/plaid/models/list_watchlist_screening_individual_programs_request.rb b/lib/plaid/models/watchlist_screening_individual_program_list_request.rb similarity index 94% rename from lib/plaid/models/list_watchlist_screening_individual_programs_request.rb rename to lib/plaid/models/watchlist_screening_individual_program_list_request.rb index 7739d99a0..7b3afb805 100644 --- a/lib/plaid/models/list_watchlist_screening_individual_programs_request.rb +++ b/lib/plaid/models/watchlist_screening_individual_program_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for listing watchlist screening programs for individuals - class ListWatchlistScreeningIndividualProgramsRequest + class WatchlistScreeningIndividualProgramListRequest # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret @@ -59,13 +59,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ListWatchlistScreeningIndividualProgramsRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualProgramListRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ListWatchlistScreeningIndividualProgramsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualProgramListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/paginated_individual_watchlist_program_list_response.rb b/lib/plaid/models/watchlist_screening_individual_program_list_response.rb similarity index 96% rename from lib/plaid/models/paginated_individual_watchlist_program_list_response.rb rename to lib/plaid/models/watchlist_screening_individual_program_list_response.rb index 83a18645b..6f4f1ae48 100644 --- a/lib/plaid/models/paginated_individual_watchlist_program_list_response.rb +++ b/lib/plaid/models/watchlist_screening_individual_program_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Paginated list of individual watchlist screening programs - class PaginatedIndividualWatchlistProgramListResponse + class WatchlistScreeningIndividualProgramListResponse # List of individual watchlist screening programs attr_accessor :watchlist_programs @@ -59,13 +59,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PaginatedIndividualWatchlistProgramListResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualProgramListResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PaginatedIndividualWatchlistProgramListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualProgramListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/create_individual_watchlist_screening_review_request.rb b/lib/plaid/models/watchlist_screening_individual_review_create_request.rb similarity index 97% rename from lib/plaid/models/create_individual_watchlist_screening_review_request.rb rename to lib/plaid/models/watchlist_screening_individual_review_create_request.rb index 218d69455..5d59fdcd6 100644 --- a/lib/plaid/models/create_individual_watchlist_screening_review_request.rb +++ b/lib/plaid/models/watchlist_screening_individual_review_create_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for creating a screening review - class CreateIndividualWatchlistScreeningReviewRequest + class WatchlistScreeningIndividualReviewCreateRequest # Hits to mark as a true positive after thorough manual review. These hits will never recur or be updated once dismissed. In most cases, confirmed hits indicate that the customer should be rejected. attr_accessor :confirmed_hits @@ -74,13 +74,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::CreateIndividualWatchlistScreeningReviewRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualReviewCreateRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::CreateIndividualWatchlistScreeningReviewRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualReviewCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/watchlist_screening_review_response.rb b/lib/plaid/models/watchlist_screening_individual_review_create_response.rb similarity index 96% rename from lib/plaid/models/watchlist_screening_review_response.rb rename to lib/plaid/models/watchlist_screening_individual_review_create_response.rb index 07e6b54e1..638f99080 100644 --- a/lib/plaid/models/watchlist_screening_review_response.rb +++ b/lib/plaid/models/watchlist_screening_individual_review_create_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # A review submitted by a team member for an individual watchlist screening. A review can be either a comment on the current screening state, actions taken against hits attached to the watchlist screening, or both. - class WatchlistScreeningReviewResponse + class WatchlistScreeningIndividualReviewCreateResponse # ID of the associated review. attr_accessor :id @@ -73,13 +73,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningReviewResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualReviewCreateResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningReviewResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualReviewCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/list_watchlist_screening_individual_reviews_request.rb b/lib/plaid/models/watchlist_screening_individual_review_list_request.rb similarity index 95% rename from lib/plaid/models/list_watchlist_screening_individual_reviews_request.rb rename to lib/plaid/models/watchlist_screening_individual_review_list_request.rb index 6f55bbb6b..c145c9fa2 100644 --- a/lib/plaid/models/list_watchlist_screening_individual_reviews_request.rb +++ b/lib/plaid/models/watchlist_screening_individual_review_list_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Request input for listing reviews for an individual watchlist screening - class ListWatchlistScreeningIndividualReviewsRequest + class WatchlistScreeningIndividualReviewListRequest # Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body. attr_accessor :secret @@ -64,13 +64,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::ListWatchlistScreeningIndividualReviewsRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualReviewListRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::ListWatchlistScreeningIndividualReviewsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualReviewListRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/paginated_individual_watchlist_screening_review_list_response.rb b/lib/plaid/models/watchlist_screening_individual_review_list_response.rb similarity index 95% rename from lib/plaid/models/paginated_individual_watchlist_screening_review_list_response.rb rename to lib/plaid/models/watchlist_screening_individual_review_list_response.rb index f8e3503e4..03129fa7e 100644 --- a/lib/plaid/models/paginated_individual_watchlist_screening_review_list_response.rb +++ b/lib/plaid/models/watchlist_screening_individual_review_list_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,7 +15,7 @@ module Plaid # Paginated list of screening reviews - class PaginatedIndividualWatchlistScreeningReviewListResponse + class WatchlistScreeningIndividualReviewListResponse # List of screening reviews attr_accessor :watchlist_screening_reviews @@ -59,13 +59,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::PaginatedIndividualWatchlistScreeningReviewListResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualReviewListResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::PaginatedIndividualWatchlistScreeningReviewListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualReviewListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/plaid/models/update_individual_screening_request.rb b/lib/plaid/models/watchlist_screening_individual_update_request.rb similarity index 87% rename from lib/plaid/models/update_individual_screening_request.rb rename to lib/plaid/models/watchlist_screening_individual_update_request.rb index 804286d56..b781f578f 100644 --- a/lib/plaid/models/update_individual_screening_request.rb +++ b/lib/plaid/models/watchlist_screening_individual_update_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,16 +15,18 @@ module Plaid # Request input for editing an individual watchlist screening - class UpdateIndividualScreeningRequest + class WatchlistScreeningIndividualUpdateRequest # ID of the associated screening. attr_accessor :watchlist_screening_id attr_accessor :search_terms + # ID of the associated user. attr_accessor :assignee attr_accessor :status + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. attr_accessor :client_user_id # Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body. @@ -65,7 +67,7 @@ def self.openapi_types :'client_user_id' => :'String', :'client_id' => :'String', :'secret' => :'String', - :'reset_fields' => :'Array' + :'reset_fields' => :'Array' } end @@ -73,9 +75,6 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'search_terms', - :'assignee', - :'status', - :'client_user_id', :'reset_fields' ]) end @@ -84,13 +83,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::UpdateIndividualScreeningRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualUpdateRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::UpdateIndividualScreeningRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -138,6 +137,11 @@ def list_invalid_properties invalid_properties.push('invalid value for "watchlist_screening_id", watchlist_screening_id cannot be nil.') end + if !@client_user_id.nil? && @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + invalid_properties end @@ -145,9 +149,21 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @watchlist_screening_id.nil? + return false if !@client_user_id.nil? && @client_user_id.to_s.length < 1 true end + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if !client_user_id.nil? && client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/plaid/models/update_entity_screening_request_resettable_field.rb b/lib/plaid/models/watchlist_screening_individual_update_request_resettable_field.rb similarity index 87% rename from lib/plaid/models/update_entity_screening_request_resettable_field.rb rename to lib/plaid/models/watchlist_screening_individual_update_request_resettable_field.rb index 2cb00fa10..78d422380 100644 --- a/lib/plaid/models/update_entity_screening_request_resettable_field.rb +++ b/lib/plaid/models/watchlist_screening_individual_update_request_resettable_field.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - class UpdateEntityScreeningRequestResettableField + class WatchlistScreeningIndividualUpdateRequestResettableField ASSIGNEE = "assignee".freeze # Builds the enum from string diff --git a/lib/plaid/models/watchlist_screening_individual_update_response.rb b/lib/plaid/models/watchlist_screening_individual_update_response.rb new file mode 100644 index 000000000..2c43ad83c --- /dev/null +++ b/lib/plaid/models/watchlist_screening_individual_update_response.rb @@ -0,0 +1,321 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The screening object allows you to represent a customer in your system, update their profile, and search for them on various watchlists. Note: Rejected customers will not receive new hits, regardless of program configuration. + class WatchlistScreeningIndividualUpdateResponse + # ID of the associated screening. + attr_accessor :id + + attr_accessor :search_terms + + # ID of the associated user. + attr_accessor :assignee + + attr_accessor :status + + # An identifier to help you connect this object to your internal systems. For example, your database ID corresponding to this object. + attr_accessor :client_user_id + + attr_accessor :audit_trail + + # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. + attr_accessor :request_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'search_terms' => :'search_terms', + :'assignee' => :'assignee', + :'status' => :'status', + :'client_user_id' => :'client_user_id', + :'audit_trail' => :'audit_trail', + :'request_id' => :'request_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'search_terms' => :'WatchlistScreeningSearchTerms', + :'assignee' => :'String', + :'status' => :'WatchlistScreeningStatus', + :'client_user_id' => :'String', + :'audit_trail' => :'WatchlistScreeningAuditTrail', + :'request_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'assignee', + :'client_user_id', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::WatchlistScreeningIndividualUpdateResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::WatchlistScreeningIndividualUpdateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'search_terms') + self.search_terms = attributes[:'search_terms'] + end + + if attributes.key?(:'assignee') + self.assignee = attributes[:'assignee'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'client_user_id') + self.client_user_id = attributes[:'client_user_id'] + end + + if attributes.key?(:'audit_trail') + self.audit_trail = attributes[:'audit_trail'] + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @search_terms.nil? + invalid_properties.push('invalid value for "search_terms", search_terms cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @client_user_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_user_id", the character length must be great than or equal to 1.') + end + + + if @audit_trail.nil? + invalid_properties.push('invalid value for "audit_trail", audit_trail cannot be nil.') + end + + if @request_id.nil? + invalid_properties.push('invalid value for "request_id", request_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @search_terms.nil? + return false if @status.nil? + return false if @client_user_id.to_s.length < 1 + return false if @audit_trail.nil? + return false if @request_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] client_user_id Value to be assigned + def client_user_id=(client_user_id) + if client_user_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_user_id", the character length must be great than or equal to 1.' + end + + + @client_user_id = client_user_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + search_terms == o.search_terms && + assignee == o.assignee && + status == o.status && + client_user_id == o.client_user_id && + audit_trail == o.audit_trail && + request_id == o.request_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, search_terms, assignee, status, client_user_id, audit_trail, request_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Plaid.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/plaid/models/watchlist_screening_request_search_terms.rb b/lib/plaid/models/watchlist_screening_request_search_terms.rb index 14fb3af08..d097715d8 100644 --- a/lib/plaid/models/watchlist_screening_request_search_terms.rb +++ b/lib/plaid/models/watchlist_screening_request_search_terms.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -22,10 +22,13 @@ class WatchlistScreeningRequestSearchTerms # The legal name of the individual being screened. attr_accessor :legal_name + # A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). attr_accessor :date_of_birth + # The numeric or alphanumeric identifier associated with this document. attr_accessor :document_number + # Valid, capitalized, two-letter ISO code representing the country of this object. Must be in ISO 3166-1 alpha-2 form. attr_accessor :country # Attribute mapping from ruby-style variable name to JSON key. @@ -58,9 +61,6 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'date_of_birth', - :'document_number', - :'country' ]) end @@ -116,9 +116,14 @@ def list_invalid_properties invalid_properties.push('invalid value for "legal_name", the character length must be great than or equal to 1.') end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if @legal_name !~ pattern - invalid_properties.push("invalid value for \"legal_name\", must conform to the pattern #{pattern}.") + + if !@document_number.nil? && @document_number.to_s.length < 4 + invalid_properties.push('invalid value for "document_number", the character length must be great than or equal to 4.') + end + + + if !@country.nil? && @country.to_s.length < 2 + invalid_properties.push('invalid value for "country", the character length must be great than or equal to 2.') end @@ -131,7 +136,8 @@ def valid? return false if @watchlist_program_id.nil? return false if @legal_name.nil? return false if @legal_name.to_s.length < 1 - return false if @legal_name !~ Regexp.new(/^\S+(\s+\S+)*$/) + return false if !@document_number.nil? && @document_number.to_s.length < 4 + return false if !@country.nil? && @country.to_s.length < 2 true end @@ -146,13 +152,30 @@ def legal_name=(legal_name) fail ArgumentError, 'invalid value for "legal_name", the character length must be great than or equal to 1.' end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if legal_name !~ pattern - fail ArgumentError, "invalid value for \"legal_name\", must conform to the pattern #{pattern}." + + @legal_name = legal_name + end + + # Custom attribute writer method with validation + # @param [Object] document_number Value to be assigned + def document_number=(document_number) + if !document_number.nil? && document_number.to_s.length < 4 + fail ArgumentError, 'invalid value for "document_number", the character length must be great than or equal to 4.' + end + + + @document_number = document_number + end + + # Custom attribute writer method with validation + # @param [Object] country Value to be assigned + def country=(country) + if !country.nil? && country.to_s.length < 2 + fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 2.' end - @legal_name = legal_name + @country = country end # Checks equality by comparing each attribute. diff --git a/lib/plaid/models/watchlist_screening_review.rb b/lib/plaid/models/watchlist_screening_review.rb index 6d837083f..eefd89924 100644 --- a/lib/plaid/models/watchlist_screening_review.rb +++ b/lib/plaid/models/watchlist_screening_review.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/watchlist_screening_search_terms.rb b/lib/plaid/models/watchlist_screening_search_terms.rb index c11edbddf..40e449daa 100644 --- a/lib/plaid/models/watchlist_screening_search_terms.rb +++ b/lib/plaid/models/watchlist_screening_search_terms.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -22,10 +22,13 @@ class WatchlistScreeningSearchTerms # The legal name of the individual being screened. attr_accessor :legal_name + # A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). attr_accessor :date_of_birth + # The numeric or alphanumeric identifier associated with this document. attr_accessor :document_number + # Valid, capitalized, two-letter ISO code representing the country of this object. Must be in ISO 3166-1 alpha-2 form. attr_accessor :country # The current version of the search terms. Starts at `1` and increments with each edit to `search_terms`. @@ -125,9 +128,14 @@ def list_invalid_properties invalid_properties.push('invalid value for "legal_name", the character length must be great than or equal to 1.') end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if @legal_name !~ pattern - invalid_properties.push("invalid value for \"legal_name\", must conform to the pattern #{pattern}.") + + if @document_number.to_s.length < 4 + invalid_properties.push('invalid value for "document_number", the character length must be great than or equal to 4.') + end + + + if @country.to_s.length < 2 + invalid_properties.push('invalid value for "country", the character length must be great than or equal to 2.') end @@ -144,7 +152,8 @@ def valid? return false if @watchlist_program_id.nil? return false if @legal_name.nil? return false if @legal_name.to_s.length < 1 - return false if @legal_name !~ Regexp.new(/^\S+(\s+\S+)*$/) + return false if @document_number.to_s.length < 4 + return false if @country.to_s.length < 2 return false if @version.nil? true end @@ -160,13 +169,30 @@ def legal_name=(legal_name) fail ArgumentError, 'invalid value for "legal_name", the character length must be great than or equal to 1.' end - pattern = Regexp.new(/^\S+(\s+\S+)*$/) - if legal_name !~ pattern - fail ArgumentError, "invalid value for \"legal_name\", must conform to the pattern #{pattern}." + + @legal_name = legal_name + end + + # Custom attribute writer method with validation + # @param [Object] document_number Value to be assigned + def document_number=(document_number) + if document_number.to_s.length < 4 + fail ArgumentError, 'invalid value for "document_number", the character length must be great than or equal to 4.' + end + + + @document_number = document_number + end + + # Custom attribute writer method with validation + # @param [Object] country Value to be assigned + def country=(country) + if country.to_s.length < 2 + fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 2.' end - @legal_name = legal_name + @country = country end # Checks equality by comparing each attribute. diff --git a/lib/plaid/models/watchlist_screening_status.rb b/lib/plaid/models/watchlist_screening_status.rb index 82f8cb9b0..fc7d51966 100644 --- a/lib/plaid/models/watchlist_screening_status.rb +++ b/lib/plaid/models/watchlist_screening_status.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/weak_alias_determination.rb b/lib/plaid/models/weak_alias_determination.rb index 205303f3a..1445cc156 100644 --- a/lib/plaid/models/weak_alias_determination.rb +++ b/lib/plaid/models/weak_alias_determination.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/webhook_environment_values.rb b/lib/plaid/models/webhook_environment_values.rb new file mode 100644 index 000000000..f97e2a9f4 --- /dev/null +++ b/lib/plaid/models/webhook_environment_values.rb @@ -0,0 +1,40 @@ +=begin +#The Plaid API + +#The Plaid REST API. Please see https://plaid.com/docs/api for more details. + +The version of the OpenAPI document: 2020-09-14_1.181.1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class WebhookEnvironmentValues + DEVELOPMENT = "development".freeze + SANDBOX = "sandbox".freeze + PRODUCTION = "production".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # We do not validate that the value is one of the enums set in the OpenAPI + # file because we want to be able to add to our list of enums without + # breaking this client library. + value + end + end + +end diff --git a/lib/plaid/models/webhook_type.rb b/lib/plaid/models/webhook_type.rb index 953880bee..791f432d5 100644 --- a/lib/plaid/models/webhook_type.rb +++ b/lib/plaid/models/webhook_type.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/webhook_update_acknowledged_webhook.rb b/lib/plaid/models/webhook_update_acknowledged_webhook.rb index 155a0f3b4..7c44fc424 100644 --- a/lib/plaid/models/webhook_update_acknowledged_webhook.rb +++ b/lib/plaid/models/webhook_update_acknowledged_webhook.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -30,6 +30,8 @@ class WebhookUpdateAcknowledgedWebhook attr_accessor :error + attr_accessor :environment + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -37,7 +39,8 @@ def self.attribute_map :'webhook_code' => :'webhook_code', :'item_id' => :'item_id', :'new_webhook_url' => :'new_webhook_url', - :'error' => :'error' + :'error' => :'error', + :'environment' => :'environment' } end @@ -53,14 +56,15 @@ def self.openapi_types :'webhook_code' => :'String', :'item_id' => :'String', :'new_webhook_url' => :'String', - :'error' => :'PlaidError' + :'error' => :'PlaidError', + :'environment' => :'WebhookEnvironmentValues' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'error' + :'error', ]) end @@ -98,6 +102,10 @@ def initialize(attributes = {}) if attributes.key?(:'error') self.error = attributes[:'error'] end + + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -120,6 +128,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "new_webhook_url", new_webhook_url cannot be nil.') end + if @environment.nil? + invalid_properties.push('invalid value for "environment", environment cannot be nil.') + end + invalid_properties end @@ -130,6 +142,7 @@ def valid? return false if @webhook_code.nil? return false if @item_id.nil? return false if @new_webhook_url.nil? + return false if @environment.nil? true end @@ -142,7 +155,8 @@ def ==(o) webhook_code == o.webhook_code && item_id == o.item_id && new_webhook_url == o.new_webhook_url && - error == o.error + error == o.error && + environment == o.environment end # @see the `==` method @@ -154,7 +168,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, item_id, new_webhook_url, error].hash + [webhook_type, webhook_code, item_id, new_webhook_url, error, environment].hash end # Builds the object from hash diff --git a/lib/plaid/models/webhook_verification_key_get_request.rb b/lib/plaid/models/webhook_verification_key_get_request.rb index af247bac3..f4e814314 100644 --- a/lib/plaid/models/webhook_verification_key_get_request.rb +++ b/lib/plaid/models/webhook_verification_key_get_request.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/webhook_verification_key_get_response.rb b/lib/plaid/models/webhook_verification_key_get_response.rb index 535fe2fc4..e2fe63263 100644 --- a/lib/plaid/models/webhook_verification_key_get_response.rb +++ b/lib/plaid/models/webhook_verification_key_get_response.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/ytd_gross_income_summary_field_number.rb b/lib/plaid/models/ytd_gross_income_summary_field_number.rb index 230968ad8..729c7f710 100644 --- a/lib/plaid/models/ytd_gross_income_summary_field_number.rb +++ b/lib/plaid/models/ytd_gross_income_summary_field_number.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/ytd_net_income_summary_field_number.rb b/lib/plaid/models/ytd_net_income_summary_field_number.rb index 95509f043..105019d3b 100644 --- a/lib/plaid/models/ytd_net_income_summary_field_number.rb +++ b/lib/plaid/models/ytd_net_income_summary_field_number.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/version.rb b/lib/plaid/version.rb index 8bfe700db..7c56b447e 100644 --- a/lib/plaid/version.rb +++ b/lib/plaid/version.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -11,5 +11,5 @@ =end module Plaid - VERSION = '15.11.0' + VERSION = '16.0.0' end diff --git a/plaid.gemspec b/plaid.gemspec index 5c3e0679d..d9467faf8 100644 --- a/plaid.gemspec +++ b/plaid.gemspec @@ -5,7 +5,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.161.5 +The version of the OpenAPI document: 2020-09-14_1.181.1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/test/test_identity_verification.rb b/test/test_identity_verification.rb new file mode 100644 index 000000000..66f46ee1c --- /dev/null +++ b/test/test_identity_verification.rb @@ -0,0 +1,51 @@ +require_relative 'test_helper' + +# Internal: The test for Plaid::IdentityVerification. + +TEMPLATE_ID = "flwtmp_aWogUuKsL6NEHU" +CLIENT_USER_ID = "idv-user-" + Time.now.to_i.to_s +class PlaidIdentityVerificationTest < PlaidTest + def test_all_routes + user = Plaid::IdentityVerificationRequestUser.new({ + :client_user_id => CLIENT_USER_ID, + :email_address => CLIENT_USER_ID + "@example.com", + }) + identity_verification_create_request = Plaid::IdentityVerificationCreateRequest.new({ + :is_shareable => true, + :template_id => TEMPLATE_ID, + :gave_consent => true, + :user => user, + }) + response = client.identity_verification_create(identity_verification_create_request) + assert_kind_of(Plaid::IdentityVerificationCreateResponse, response) + refute_nil(response.shareable_url) + assert_equal("active", response.status) + + identity_verification_retry_request = Plaid::IdentityVerificationRetryRequest.new({ + :template_id => TEMPLATE_ID, + :client_user_id => CLIENT_USER_ID, + :strategy => Plaid::Strategy::RESET, + }) + response = client.identity_verification_retry(identity_verification_retry_request) + assert_kind_of(Plaid::IdentityVerificationRetryResponse, response) + refute_nil(response.shareable_url) + assert_equal("active", response.status) + + identity_verification_list_request = Plaid::IdentityVerificationListRequest.new({ + :template_id => TEMPLATE_ID, + :client_user_id => CLIENT_USER_ID, + }) + response = client.identity_verification_list(identity_verification_list_request) + assert_kind_of(Plaid::IdentityVerificationListResponse, response) + refute_nil(response.identity_verifications[0]) + assert_equal(CLIENT_USER_ID, response.identity_verifications[0].client_user_id) + + identity_verification_id = response.identity_verifications[0].id + identity_verification_get_request = Plaid::IdentityVerificationGetRequest.new({ + :identity_verification_id => identity_verification_id, + }) + response = client.identity_verification_get(identity_verification_get_request) + assert_kind_of(Plaid::IdentityVerificationGetResponse, response) + assert_equal(identity_verification_id, response.id) + end +end \ No newline at end of file diff --git a/test/test_institutions.rb b/test/test_institutions.rb index 8d65b2ddd..5bec7815b 100644 --- a/test/test_institutions.rb +++ b/test/test_institutions.rb @@ -5,7 +5,7 @@ class PlaidInstitutionsTest < PlaidTest def test_get institutions_get_request = Plaid::InstitutionsGetRequest.new({ :count => 3, - :offset => 1, + :offset => 4, :country_codes => ["US"], }) @@ -16,7 +16,7 @@ def test_get def test_get_with_options institutions_get_request = Plaid::InstitutionsGetRequest.new({ :count => 3, - :offset => 1, + :offset => 4, :country_codes => ["US"], :options => { products: ["transactions"], diff --git a/test/test_monitor.rb b/test/test_monitor.rb new file mode 100644 index 000000000..35216a85b --- /dev/null +++ b/test/test_monitor.rb @@ -0,0 +1,55 @@ +require "date" + +require_relative 'test_helper' + +# Internal: The test for Plaid::WatchlistScreening. + +WATCHLIST_PROGRAM_ID = "prg_egdF5fGjY8fWqk" +LEGAL_NAME = "Domingo Huang" +CLIENT_USER_ID = "monitor-user-" + Time.now.to_i.to_s +DOCUMENT_NUMBER = "123456789" +class PlaidMonitorTest < PlaidTest + def test_screening_individual + date_of_birth = Time.now.to_date + search_terms = Plaid::WatchlistScreeningRequestSearchTerms.new({ + :watchlist_program_id => WATCHLIST_PROGRAM_ID, + :legal_name => LEGAL_NAME, + :country => Plaid::CountryCode::US, + :date_of_birth => date_of_birth, + :document_number => DOCUMENT_NUMBER, + }) + monitor_create_request = Plaid::WatchlistScreeningIndividualCreateRequest.new({ + :client_user_id => CLIENT_USER_ID, + :search_terms => search_terms, + }) + response = client.watchlist_screening_individual_create(monitor_create_request) + assert_kind_of(Plaid::WatchlistScreeningIndividualCreateResponse, response) + assert_equal(LEGAL_NAME, response.search_terms.legal_name) + assert_equal(DOCUMENT_NUMBER, response.search_terms.document_number) + assert_equal(date_of_birth, response.search_terms.date_of_birth) + assert_equal(Plaid::CountryCode::US, response.search_terms.country) + + monitor_update_request = Plaid::WatchlistScreeningIndividualUpdateRequest.new({ + :watchlist_screening_id => response.id, + :status => Plaid::WatchlistScreeningStatus::PENDING_REVIEW, + }) + response = client.watchlist_screening_individual_update(monitor_update_request) + assert_kind_of(Plaid::WatchlistScreeningIndividualUpdateResponse, response) + assert_equal(Plaid::WatchlistScreeningStatus::PENDING_REVIEW, response.status) + + monitor_list_request = Plaid::WatchlistScreeningIndividualListRequest.new({ + :watchlist_program_id => WATCHLIST_PROGRAM_ID, + :client_user_id => CLIENT_USER_ID, + }) + response = client.watchlist_screening_individual_list(monitor_list_request) + assert_kind_of(Plaid::WatchlistScreeningIndividualListResponse, response) + assert_equal(1, response.watchlist_screenings.length) + + monitor_get_request = Plaid::WatchlistScreeningIndividualGetRequest.new({ + :watchlist_screening_id => response.watchlist_screenings[0].id, + }) + response = client.watchlist_screening_individual_get(monitor_get_request) + assert_kind_of(Plaid::WatchlistScreeningIndividualGetResponse, response) + assert_equal(LEGAL_NAME, response.search_terms.legal_name) + end +end \ No newline at end of file