From 07de79c7915215c6965c1811a2a816c410f62b26 Mon Sep 17 00:00:00 2001 From: Andrew Chen Date: Thu, 19 May 2022 11:22:45 -0700 Subject: [PATCH] OpenAPI generated code at 2022-05-19T05:29:18Z (#426) Co-authored-by: Andrew Chen --- .openapi-generator/FILES | 316 +- CHANGELOG.md | 110 + Makefile | 2 +- README.md | 37 +- lib/plaid.rb | 160 +- lib/plaid/api/plaid_api.rb | 5161 +++++++++++------ lib/plaid/api_client.rb | 8 +- lib/plaid/api_error.rb | 2 +- lib/plaid/configuration.rb | 2 +- lib/plaid/models/account_access.rb | 2 +- lib/plaid/models/account_assets.rb | 2 +- lib/plaid/models/account_assets_all_of.rb | 2 +- lib/plaid/models/account_balance.rb | 2 +- lib/plaid/models/account_base.rb | 2 +- lib/plaid/models/account_filter.rb | 2 +- lib/plaid/models/account_filters_response.rb | 2 +- lib/plaid/models/account_identity.rb | 2 +- lib/plaid/models/account_identity_all_of.rb | 2 +- lib/plaid/models/account_product_access.rb | 2 +- .../models/account_product_access_nullable.rb | 2 +- .../models/account_selection_cardinality.rb | 2 +- lib/plaid/models/account_subtype.rb | 2 +- lib/plaid/models/account_type.rb | 2 +- .../models/accounts_balance_get_request.rb | 2 +- .../accounts_balance_get_request_options.rb | 2 +- lib/plaid/models/accounts_get_request.rb | 2 +- .../models/accounts_get_request_options.rb | 2 +- lib/plaid/models/accounts_get_response.rb | 2 +- lib/plaid/models/ach_class.rb | 13 +- lib/plaid/models/address.rb | 2 +- lib/plaid/models/address_data.rb | 2 +- lib/plaid/models/address_data_nullable.rb | 2 +- lib/plaid/models/address_nullable.rb | 2 +- lib/plaid/models/address_purpose_label.rb | 40 + lib/plaid/models/application.rb | 19 +- lib/plaid/models/application_get_request.rb | 2 +- lib/plaid/models/application_get_response.rb | 2 +- lib/plaid/models/apr.rb | 2 +- lib/plaid/models/asset_report.rb | 2 +- .../asset_report_audit_copy_create_request.rb | 2 +- ...asset_report_audit_copy_create_response.rb | 2 +- .../asset_report_audit_copy_get_request.rb | 2 +- .../asset_report_audit_copy_remove_request.rb | 2 +- ...asset_report_audit_copy_remove_response.rb | 2 +- .../models/asset_report_create_request.rb | 4 +- .../asset_report_create_request_options.rb | 2 +- .../models/asset_report_create_response.rb | 2 +- .../models/asset_report_filter_request.rb | 2 +- .../models/asset_report_filter_response.rb | 2 +- lib/plaid/models/asset_report_get_request.rb | 2 +- lib/plaid/models/asset_report_get_response.rb | 2 +- lib/plaid/models/asset_report_item.rb | 2 +- .../models/asset_report_pdf_get_request.rb | 2 +- .../models/asset_report_refresh_request.rb | 2 +- .../asset_report_refresh_request_options.rb | 2 +- .../models/asset_report_refresh_response.rb | 2 +- .../asset_report_relay_create_request.rb | 2 +- .../asset_report_relay_create_response.rb | 2 +- .../models/asset_report_relay_get_request.rb | 2 +- .../asset_report_relay_refresh_request.rb | 2 +- .../asset_report_relay_refresh_response.rb | 2 +- .../asset_report_relay_remove_request.rb | 2 +- .../asset_report_relay_remove_response.rb | 2 +- .../models/asset_report_remove_request.rb | 2 +- .../models/asset_report_remove_response.rb | 2 +- lib/plaid/models/asset_report_transaction.rb | 2 +- .../models/asset_report_transaction_all_of.rb | 2 +- lib/plaid/models/asset_report_user.rb | 2 +- lib/plaid/models/assets_error_webhook.rb | 2 +- .../models/assets_product_ready_webhook.rb | 2 +- lib/plaid/models/assets_relay_webhook.rb | 2 +- lib/plaid/models/auth_get_numbers.rb | 2 +- lib/plaid/models/auth_get_request.rb | 2 +- lib/plaid/models/auth_get_request_options.rb | 2 +- lib/plaid/models/auth_get_response.rb | 2 +- lib/plaid/models/auth_metadata.rb | 2 +- lib/plaid/models/auth_supported_methods.rb | 2 +- .../models/automatically_verified_webhook.rb | 2 +- .../models/bank_initiated_return_risk.rb | 2 +- lib/plaid/models/bank_transfer.rb | 2 +- lib/plaid/models/bank_transfer_balance.rb | 2 +- .../bank_transfer_balance_get_request.rb | 2 +- .../bank_transfer_balance_get_response.rb | 2 +- .../models/bank_transfer_cancel_request.rb | 2 +- .../models/bank_transfer_cancel_response.rb | 2 +- .../models/bank_transfer_create_request.rb | 2 +- .../models/bank_transfer_create_response.rb | 2 +- lib/plaid/models/bank_transfer_direction.rb | 2 +- lib/plaid/models/bank_transfer_event.rb | 2 +- ..._transfer_event_list_bank_transfer_type.rb | 2 +- .../bank_transfer_event_list_direction.rb | 2 +- .../bank_transfer_event_list_request.rb | 2 +- .../bank_transfer_event_list_response.rb | 2 +- .../bank_transfer_event_sync_request.rb | 2 +- .../bank_transfer_event_sync_response.rb | 2 +- lib/plaid/models/bank_transfer_event_type.rb | 2 +- lib/plaid/models/bank_transfer_failure.rb | 2 +- lib/plaid/models/bank_transfer_get_request.rb | 2 +- .../models/bank_transfer_get_response.rb | 2 +- .../models/bank_transfer_list_request.rb | 2 +- .../models/bank_transfer_list_response.rb | 2 +- .../bank_transfer_migrate_account_request.rb | 2 +- .../bank_transfer_migrate_account_response.rb | 2 +- lib/plaid/models/bank_transfer_network.rb | 2 +- lib/plaid/models/bank_transfer_status.rb | 2 +- lib/plaid/models/bank_transfer_sweep.rb | 2 +- .../models/bank_transfer_sweep_get_request.rb | 2 +- .../bank_transfer_sweep_get_response.rb | 2 +- .../bank_transfer_sweep_list_request.rb | 2 +- .../bank_transfer_sweep_list_response.rb | 2 +- lib/plaid/models/bank_transfer_type.rb | 2 +- lib/plaid/models/bank_transfer_user.rb | 2 +- .../bank_transfers_events_update_webhook.rb | 2 +- lib/plaid/models/categories_get_response.rb | 2 +- lib/plaid/models/category.rb | 2 +- lib/plaid/models/cause.rb | 3 +- lib/plaid/models/cause_all_of.rb | 2 +- .../client_provided_enhanced_transaction.rb | 2 +- .../models/client_provided_raw_transaction.rb | 2 +- lib/plaid/models/connected_application.rb | 15 +- lib/plaid/models/country_code.rb | 2 +- ....rb => create_entity_screening_request.rb} | 57 +- ...tity_watchlist_screening_review_request.rb | 307 + ...dual_watchlist_screening_review_request.rb | 307 + lib/plaid/models/credit_account_subtype.rb | 2 +- lib/plaid/models/credit_bank_income.rb | 2 +- .../models/credit_bank_income_account.rb | 2 +- .../models/credit_bank_income_account_type.rb | 2 +- .../models/credit_bank_income_category.rb | 2 +- lib/plaid/models/credit_bank_income_cause.rb | 2 +- .../models/credit_bank_income_error_type.rb | 2 +- .../models/credit_bank_income_get_request.rb | 2 +- .../credit_bank_income_get_request_options.rb | 2 +- .../models/credit_bank_income_get_response.rb | 2 +- .../credit_bank_income_historical_summary.rb | 2 +- lib/plaid/models/credit_bank_income_item.rb | 16 +- .../credit_bank_income_pay_frequency.rb | 2 +- .../credit_bank_income_refresh_request.rb | 2 +- ...dit_bank_income_refresh_request_options.rb | 2 +- .../credit_bank_income_refresh_response.rb | 2 +- lib/plaid/models/credit_bank_income_source.rb | 2 +- .../models/credit_bank_income_summary.rb | 2 +- .../models/credit_bank_income_transaction.rb | 2 +- .../models/credit_bank_income_warning.rb | 2 +- .../models/credit_bank_income_warning_code.rb | 2 +- .../models/credit_bank_income_warning_type.rb | 2 +- lib/plaid/models/credit_card_liability.rb | 2 +- lib/plaid/models/credit_document_metadata.rb | 2 +- .../models/credit_employer_verification.rb | 2 +- .../models/credit_employment_get_request.rb | 2 +- .../models/credit_employment_get_response.rb | 2 +- lib/plaid/models/credit_employment_item.rb | 2 +- .../models/credit_employment_verification.rb | 2 +- lib/plaid/models/credit_filter.rb | 2 +- lib/plaid/models/credit_pay_stub.rb | 2 +- lib/plaid/models/credit_pay_stub_address.rb | 2 +- .../models/credit_pay_stub_deductions.rb | 2 +- lib/plaid/models/credit_pay_stub_earnings.rb | 2 +- lib/plaid/models/credit_pay_stub_employee.rb | 2 +- lib/plaid/models/credit_pay_stub_employer.rb | 2 +- lib/plaid/models/credit_pay_stub_net_pay.rb | 2 +- .../models/credit_pay_stub_verification.rb | 2 +- .../credit_payroll_income_get_request.rb | 2 +- .../credit_payroll_income_get_response.rb | 25 +- .../credit_payroll_income_precheck_request.rb | 2 +- ...credit_payroll_income_precheck_response.rb | 2 +- .../credit_payroll_income_refresh_request.rb | 2 +- .../credit_payroll_income_refresh_response.rb | 2 +- ...payroll_income_risk_signals_get_request.rb | 240 + ...ayroll_income_risk_signals_get_response.rb | 251 + lib/plaid/models/credit_platform_ids.rb | 2 +- lib/plaid/models/credit_w2.rb | 2 +- .../models/customer_initiated_return_risk.rb | 2 +- lib/plaid/models/dashboard_user.rb | 269 + lib/plaid/models/dashboard_user_list.rb | 242 + lib/plaid/models/dashboard_user_status.rb | 40 + lib/plaid/models/date_range.rb | 240 + lib/plaid/models/deductions.rb | 2 +- lib/plaid/models/deductions_breakdown.rb | 2 +- lib/plaid/models/deductions_total.rb | 2 +- lib/plaid/models/default_update_webhook.rb | 2 +- .../models/deposit_switch_address_data.rb | 2 +- .../deposit_switch_alt_create_request.rb | 2 +- .../deposit_switch_alt_create_response.rb | 2 +- .../models/deposit_switch_create_request.rb | 2 +- .../deposit_switch_create_request_options.rb | 2 +- .../models/deposit_switch_create_response.rb | 2 +- .../models/deposit_switch_get_request.rb | 2 +- .../models/deposit_switch_get_response.rb | 2 +- .../deposit_switch_state_update_webhook.rb | 2 +- .../models/deposit_switch_target_account.rb | 2 +- .../models/deposit_switch_target_user.rb | 2 +- .../deposit_switch_token_create_request.rb | 2 +- .../deposit_switch_token_create_response.rb | 2 +- .../models/depository_account_subtype.rb | 2 +- lib/plaid/models/depository_filter.rb | 2 +- lib/plaid/models/distribution_breakdown.rb | 2 +- lib/plaid/models/doc_type.rb | 2 +- lib/plaid/models/document_analysis.rb | 248 + .../document_authenticity_match_code.rb | 41 + .../document_date_of_birth_match_code.rb | 40 + lib/plaid/models/document_metadata.rb | 2 +- lib/plaid/models/document_name_match_code.rb | 40 + lib/plaid/models/document_risk_signal.rb | 274 + ...ument_risk_signal_institution_metadata.rb} | 32 +- .../models/document_risk_signals_object.rb | 255 + lib/plaid/models/document_status.rb | 40 + ..._refund.rb => documentary_verification.rb} | 66 +- .../documentary_verification_document.rb | 277 + lib/plaid/models/earnings.rb | 2 +- lib/plaid/models/earnings_breakdown.rb | 2 +- ...arnings_breakdown_canonical_description.rb | 2 +- lib/plaid/models/earnings_total.rb | 2 +- lib/plaid/models/email.rb | 2 +- lib/plaid/models/employee.rb | 2 +- .../employee_income_summary_field_string.rb | 2 +- lib/plaid/models/employer.rb | 2 +- .../employer_income_summary_field_string.rb | 2 +- lib/plaid/models/employer_verification.rb | 2 +- lib/plaid/models/employers_search_request.rb | 2 +- lib/plaid/models/employers_search_response.rb | 2 +- lib/plaid/models/employment_details.rb | 2 +- lib/plaid/models/employment_verification.rb | 2 +- .../employment_verification_get_request.rb | 2 +- .../employment_verification_get_response.rb | 2 +- .../models/employment_verification_status.rb | 2 +- lib/plaid/models/enhancements.rb | 2 +- lib/plaid/models/entity_document.rb | 271 + lib/plaid/models/entity_document_type.rb | 43 + .../models/entity_screening_hit_analysis.rb | 279 + lib/plaid/models/entity_screening_hit_data.rb | 282 + .../entity_screening_hit_documents_items.rb | 228 + .../models/entity_screening_hit_emails.rb | 225 + .../entity_screening_hit_emails_items.rb | 228 + .../models/entity_screening_hit_names.rb | 254 + .../entity_screening_hit_names_items.rb | 228 + .../entity_screening_hit_phone_numbers.rb | 262 + lib/plaid/models/entity_screening_hit_urls.rb | 225 + .../models/entity_screening_hit_urls_items.rb | 228 + ...ntity_screening_hits_phone_number_items.rb | 228 + ...entity_screening_status_updated_webhook.rb | 251 + lib/plaid/models/entity_watchlist_code.rb | 50 + lib/plaid/models/entity_watchlist_program.rb | 374 ++ .../models/entity_watchlist_screening.rb | 287 + .../models/entity_watchlist_screening_hit.rb | 349 ++ .../entity_watchlist_screening_hit_list.rb | 242 + .../models/entity_watchlist_screening_list.rb | 242 + ...entity_watchlist_screening_program_list.rb | 242 + .../entity_watchlist_screening_review.rb | 301 + ...entity_watchlist_screening_search_terms.rb | 337 ++ .../models/entity_watchlist_search_terms.rb | 322 + lib/plaid/models/error.rb | 3 +- lib/plaid/models/expiration_date.rb | 40 + ...rnal_payment_initiation_consent_options.rb | 59 +- lib/plaid/models/external_payment_options.rb | 2 +- .../models/external_payment_refund_details.rb | 2 +- .../models/external_payment_schedule_base.rb | 2 +- .../models/external_payment_schedule_get.rb | 2 +- .../external_payment_schedule_request.rb | 2 +- .../generic_screening_hit_location_items.rb | 228 + .../models/get_dashboard_user_request.rb | 245 + .../get_entity_watchlist_screening_request.rb | 245 + .../get_identity_verification_request.rb | 245 + ..._individual_watchlist_screening_request.rb | 245 + ...chlist_screening_entity_program_request.rb | 245 + ...st_screening_individual_program_request.rb | 245 + lib/plaid/models/health_incident.rb | 2 +- lib/plaid/models/historical_balance.rb | 2 +- lib/plaid/models/historical_update_webhook.rb | 2 +- lib/plaid/models/holding.rb | 2 +- .../models/holdings_default_update_webhook.rb | 2 +- lib/plaid/models/holdings_override.rb | 2 +- lib/plaid/models/id_number_type.rb | 72 + .../models/identity_default_update_webhook.rb | 2 +- lib/plaid/models/identity_get_request.rb | 2 +- .../models/identity_get_request_options.rb | 2 +- lib/plaid/models/identity_get_response.rb | 2 +- lib/plaid/models/identity_update_types.rb | 2 +- lib/plaid/models/identity_verification.rb | 420 ++ .../identity_verification_create_request.rb | 302 + .../models/identity_verification_list.rb | 242 + .../identity_verification_request_user.rb | 338 ++ .../identity_verification_retried_webhook.rb | 251 + .../identity_verification_retry_request.rb | 316 + ...verification_retry_request_steps_object.rb | 270 + .../models/identity_verification_status.rb | 43 + ...ity_verification_status_updated_webhook.rb | 251 + .../identity_verification_step_status.rb | 48 + .../identity_verification_step_summary.rb | 308 + ...ntity_verification_step_updated_webhook.rb | 251 + ...dentity_verification_template_reference.rb | 240 + .../identity_verification_user_address.rb | 308 + .../models/identity_verification_user_data.rb | 302 + lib/plaid/models/image_quality.rb | 40 + lib/plaid/models/incident_update.rb | 2 +- lib/plaid/models/income_breakdown.rb | 2 +- lib/plaid/models/income_breakdown_type.rb | 2 +- lib/plaid/models/income_override.rb | 2 +- lib/plaid/models/income_summary.rb | 2 +- .../models/income_summary_field_number.rb | 2 +- .../models/income_summary_field_string.rb | 2 +- .../income_verification_create_request.rb | 2 +- ...ome_verification_create_request_options.rb | 2 +- .../income_verification_create_response.rb | 2 +- ...verification_documents_download_request.rb | 2 +- .../income_verification_payroll_flow_type.rb | 2 +- ...ncome_verification_paystubs_get_request.rb | 2 +- ...come_verification_paystubs_get_response.rb | 2 +- ...income_verification_precheck_confidence.rb | 2 +- .../income_verification_precheck_employer.rb | 2 +- ..._verification_precheck_employer_address.rb | 2 +- ...fication_precheck_employer_address_data.rb | 2 +- ...ome_verification_precheck_military_info.rb | 2 +- .../income_verification_precheck_request.rb | 2 +- .../income_verification_precheck_response.rb | 2 +- .../income_verification_precheck_user.rb | 2 +- .../income_verification_refresh_request.rb | 2 +- .../income_verification_refresh_response.rb | 2 +- .../models/income_verification_source_type.rb | 2 +- .../income_verification_status_webhook.rb | 14 +- ...ncome_verification_taxforms_get_request.rb | 2 +- ...come_verification_taxforms_get_response.rb | 2 +- .../income_verification_webhook_status.rb | 2 +- .../models/individual_screening_hit_names.rb | 254 + lib/plaid/models/individual_watchlist_code.rb | 59 + .../models/individual_watchlist_program.rb | 374 ++ .../individual_watchlist_program_list.rb | 227 + lib/plaid/models/inflow_model.rb | 2 +- lib/plaid/models/initial_update_webhook.rb | 2 +- lib/plaid/models/institution.rb | 2 +- lib/plaid/models/institution_status.rb | 2 +- .../models/institutions_get_by_id_request.rb | 2 +- .../institutions_get_by_id_request_options.rb | 2 +- .../models/institutions_get_by_id_response.rb | 2 +- lib/plaid/models/institutions_get_request.rb | 2 +- .../institutions_get_request_options.rb | 2 +- lib/plaid/models/institutions_get_response.rb | 2 +- .../institutions_search_account_filter.rb | 2 +- ...tions_search_payment_initiation_options.rb | 2 +- .../models/institutions_search_request.rb | 2 +- .../institutions_search_request_options.rb | 2 +- .../models/institutions_search_response.rb | 2 +- .../models/investment_account_subtype.rb | 2 +- lib/plaid/models/investment_filter.rb | 2 +- ...investment_holdings_get_request_options.rb | 2 +- lib/plaid/models/investment_transaction.rb | 2 +- .../models/investment_transaction_subtype.rb | 2 +- .../models/investment_transaction_type.rb | 2 +- .../investments_default_update_webhook.rb | 2 +- .../investments_holdings_get_request.rb | 2 +- .../investments_holdings_get_response.rb | 2 +- .../investments_transactions_get_request.rb | 2 +- ...tments_transactions_get_request_options.rb | 2 +- .../investments_transactions_get_response.rb | 2 +- .../investments_transactions_override.rb | 2 +- lib/plaid/models/issuing_country.rb | 39 + lib/plaid/models/item.rb | 2 +- .../item_access_token_invalidate_request.rb | 2 +- .../item_access_token_invalidate_response.rb | 2 +- .../models/item_application_list_request.rb | 2 +- .../models/item_application_list_response.rb | 2 +- .../models/item_application_list_user_auth.rb | 2 +- .../item_application_scopes_update_request.rb | 2 +- ...item_application_scopes_update_response.rb | 2 +- lib/plaid/models/item_error_webhook.rb | 2 +- lib/plaid/models/item_get_request.rb | 2 +- lib/plaid/models/item_get_response.rb | 2 +- lib/plaid/models/item_import_request.rb | 2 +- .../models/item_import_request_options.rb | 2 +- .../models/item_import_request_user_auth.rb | 2 +- lib/plaid/models/item_import_response.rb | 2 +- .../models/item_product_ready_webhook.rb | 2 +- .../item_public_token_create_request.rb | 2 +- .../item_public_token_create_response.rb | 2 +- .../item_public_token_exchange_request.rb | 2 +- .../item_public_token_exchange_response.rb | 2 +- lib/plaid/models/item_remove_request.rb | 2 +- lib/plaid/models/item_remove_response.rb | 2 +- lib/plaid/models/item_status.rb | 2 +- lib/plaid/models/item_status_investments.rb | 2 +- lib/plaid/models/item_status_last_webhook.rb | 2 +- lib/plaid/models/item_status_nullable.rb | 2 +- lib/plaid/models/item_status_transactions.rb | 2 +- .../models/item_webhook_update_request.rb | 2 +- .../models/item_webhook_update_response.rb | 2 +- lib/plaid/models/jwk_public_key.rb | 2 +- lib/plaid/models/jwt_header.rb | 2 +- lib/plaid/models/kyc_check_address_summary.rb | 252 + .../models/kyc_check_date_of_birth_summary.rb | 224 + lib/plaid/models/kyc_check_details.rb | 295 + .../models/kyc_check_id_number_summary.rb | 224 + lib/plaid/models/kyc_check_name_summary.rb | 224 + lib/plaid/models/kyc_check_phone_summary.rb | 224 + .../liabilities_default_update_webhook.rb | 2 +- lib/plaid/models/liabilities_get_request.rb | 2 +- .../models/liabilities_get_request_options.rb | 2 +- lib/plaid/models/liabilities_get_response.rb | 2 +- lib/plaid/models/liabilities_object.rb | 2 +- lib/plaid/models/liability_override.rb | 2 +- .../models/link_token_account_filters.rb | 2 +- .../models/link_token_create_credit_filter.rb | 2 +- .../link_token_create_depository_filter.rb | 2 +- .../link_token_create_institution_data.rb | 2 +- .../link_token_create_investment_filter.rb | 2 +- .../models/link_token_create_loan_filter.rb | 2 +- lib/plaid/models/link_token_create_request.rb | 16 +- ...k_token_create_request_account_subtypes.rb | 2 +- .../models/link_token_create_request_auth.rb | 2 +- ...ink_token_create_request_deposit_switch.rb | 2 +- ...oken_create_request_income_verification.rb | 2 +- ...request_income_verification_bank_income.rb | 23 +- ...uest_income_verification_payroll_income.rb | 22 +- ...token_create_request_payment_initiation.rb | 2 +- .../link_token_create_request_transfer.rb | 2 +- .../link_token_create_request_update.rb | 2 +- .../models/link_token_create_request_user.rb | 2 +- .../models/link_token_create_response.rb | 2 +- lib/plaid/models/link_token_eu_config.rb | 2 +- .../link_token_get_metadata_response.rb | 2 +- lib/plaid/models/link_token_get_request.rb | 2 +- lib/plaid/models/link_token_get_response.rb | 2 +- .../models/list_dashboard_user_request.rb | 241 + ...list_entity_watchlist_screening_request.rb | 286 + .../list_identity_verification_request.rb | 303 + ..._individual_watchlist_screening_request.rb | 286 + lib/plaid/models/list_pagination.rb | 221 + ...chlist_screening_entity_history_request.rb | 256 + ..._watchlist_screening_entity_hit_request.rb | 256 + ...hlist_screening_entity_programs_request.rb | 241 + ...chlist_screening_entity_reviews_request.rb | 256 + ...st_screening_individual_history_request.rb | 256 + ...chlist_screening_individual_hit_request.rb | 256 + ...t_screening_individual_programs_request.rb | 241 + ...st_screening_individual_reviews_request.rb | 256 + lib/plaid/models/loan_account_subtype.rb | 2 +- lib/plaid/models/loan_filter.rb | 2 +- lib/plaid/models/location.rb | 2 +- lib/plaid/models/match_summary.rb | 224 + lib/plaid/models/match_summary_code.rb | 42 + lib/plaid/models/meta.rb | 2 +- lib/plaid/models/mfa.rb | 2 +- lib/plaid/models/mortgage_interest_rate.rb | 2 +- lib/plaid/models/mortgage_liability.rb | 2 +- lib/plaid/models/mortgage_property_address.rb | 2 +- .../models/multi_document_risk_signal.rb | 244 + lib/plaid/models/net_pay.rb | 2 +- .../models/new_accounts_available_webhook.rb | 2 +- lib/plaid/models/numbers.rb | 2 +- lib/plaid/models/numbers_ach.rb | 2 +- lib/plaid/models/numbers_ach_nullable.rb | 2 +- lib/plaid/models/numbers_bacs.rb | 2 +- lib/plaid/models/numbers_bacs_nullable.rb | 2 +- lib/plaid/models/numbers_eft.rb | 2 +- lib/plaid/models/numbers_eft_nullable.rb | 2 +- lib/plaid/models/numbers_international.rb | 2 +- .../models/numbers_international_nullable.rb | 2 +- lib/plaid/models/override_account_type.rb | 2 +- lib/plaid/models/override_accounts.rb | 2 +- lib/plaid/models/owner.rb | 2 +- lib/plaid/models/owner_override.rb | 2 +- .../models/paginated_dashboard_user_list.rb | 261 + ...paginated_entity_watchlist_program_list.rb | 261 + ...ted_entity_watchlist_screening_hit_list.rb | 261 + ...ginated_entity_watchlist_screening_list.rb | 261 + ..._entity_watchlist_screening_review_list.rb | 261 + ...ed_identity_verification_paginated_list.rb | 261 + ...nated_individual_watchlist_program_list.rb | 246 + ...individual_watchlist_screening_hit_list.rb | 261 + ...ted_individual_watchlist_screening_list.rb | 261 + ...ividual_watchlist_screening_review_list.rb | 261 + lib/plaid/models/pay.rb | 2 +- lib/plaid/models/pay_frequency.rb | 2 +- lib/plaid/models/pay_frequency_value.rb | 2 +- lib/plaid/models/pay_period_details.rb | 2 +- .../models/pay_stub_deductions_breakdown.rb | 2 +- lib/plaid/models/pay_stub_deductions_total.rb | 2 +- .../models/pay_stub_distribution_breakdown.rb | 2 +- .../models/pay_stub_earnings_breakdown.rb | 2 +- lib/plaid/models/pay_stub_earnings_total.rb | 2 +- .../models/pay_stub_pay_period_details.rb | 2 +- lib/plaid/models/pay_stub_taxpayer_id.rb | 2 +- .../models/pay_stub_verification_attribute.rb | 2 +- lib/plaid/models/payment_amount.rb | 2 +- lib/plaid/models/payment_amount_currency.rb | 2 +- lib/plaid/models/payment_channel.rb | 2 +- .../payment_consent_max_payment_amount.rb | 2 +- .../payment_consent_periodic_alignment.rb | 2 +- .../models/payment_consent_periodic_amount.rb | 2 +- .../payment_consent_periodic_amount_amount.rb | 2 +- .../payment_consent_periodic_interval.rb | 2 +- .../models/payment_consent_valid_date_time.rb | 2 +- .../models/payment_initiation_address.rb | 2 +- .../models/payment_initiation_consent.rb | 2 +- .../payment_initiation_consent_constraints.rb | 2 +- ...yment_initiation_consent_create_request.rb | 2 +- ...ment_initiation_consent_create_response.rb | 2 +- .../payment_initiation_consent_get_request.rb | 2 +- ...payment_initiation_consent_get_response.rb | 2 +- ...tiation_consent_payment_execute_request.rb | 2 +- ...iation_consent_payment_execute_response.rb | 2 +- ...yment_initiation_consent_revoke_request.rb | 2 +- ...ment_initiation_consent_revoke_response.rb | 2 +- .../payment_initiation_consent_scope.rb | 2 +- .../payment_initiation_consent_status.rb | 2 +- .../models/payment_initiation_metadata.rb | 19 +- ...nt_initiation_optional_restriction_bacs.rb | 2 +- .../models/payment_initiation_payment.rb | 21 +- ...yment_initiation_payment_create_request.rb | 2 +- ...ment_initiation_payment_create_response.rb | 2 +- ...ayment_initiation_payment_create_status.rb | 2 +- .../payment_initiation_payment_get_request.rb | 2 +- ...payment_initiation_payment_get_response.rb | 21 +- ...payment_initiation_payment_list_request.rb | 2 +- ...ayment_initiation_payment_list_response.rb | 2 +- ...ment_initiation_payment_reverse_request.rb | 100 +- ...ent_initiation_payment_reverse_response.rb | 2 +- .../payment_initiation_payment_status.rb | 2 +- ...initiation_payment_token_create_request.rb | 2 +- ...nitiation_payment_token_create_response.rb | 2 +- .../models/payment_initiation_recipient.rb | 23 +- ...ent_initiation_recipient_create_request.rb | 2 +- ...nt_initiation_recipient_create_response.rb | 2 +- ...ayment_initiation_recipient_get_request.rb | 2 +- ...yment_initiation_recipient_get_response.rb | 15 +- ...nitiation_recipient_get_response_all_of.rb | 2 +- ...yment_initiation_recipient_list_request.rb | 2 +- ...ment_initiation_recipient_list_response.rb | 2 +- .../payment_initiation_refund_status.rb | 2 +- ...ment_initiation_standing_order_metadata.rb | 2 +- lib/plaid/models/payment_meta.rb | 2 +- lib/plaid/models/payment_schedule_interval.rb | 2 +- lib/plaid/models/payment_scheme.rb | 2 +- .../models/payment_status_update_webhook.rb | 2 +- lib/plaid/models/payroll_income_object.rb | 2 +- lib/plaid/models/payroll_item.rb | 2 +- lib/plaid/models/payroll_item_status.rb | 2 +- lib/plaid/models/payroll_risk_signals_item.rb | 242 + lib/plaid/models/paystub.rb | 2 +- lib/plaid/models/paystub_address.rb | 2 +- lib/plaid/models/paystub_deduction.rb | 2 +- lib/plaid/models/paystub_details.rb | 2 +- lib/plaid/models/paystub_employer.rb | 2 +- lib/plaid/models/paystub_override.rb | 2 +- lib/plaid/models/paystub_override_employee.rb | 2 +- .../paystub_override_employee_address.rb | 2 +- lib/plaid/models/paystub_override_employer.rb | 2 +- lib/plaid/models/paystub_pay_frequency.rb | 2 +- lib/plaid/models/paystub_verification.rb | 2 +- .../models/paystub_verification_status.rb | 2 +- lib/plaid/models/paystub_ytd_details.rb | 2 +- .../models/pending_expiration_webhook.rb | 2 +- lib/plaid/models/personal_finance_category.rb | 2 +- lib/plaid/models/phone_number.rb | 2 +- lib/plaid/models/phone_type.rb | 39 + .../models/physical_document_category.rb | 42 + .../physical_document_extracted_data.rb | 311 + ...ysical_document_extracted_data_analysis.rb | 266 + lib/plaid/models/physical_document_images.rb | 269 + lib/plaid/models/plaid_error.rb | 3 +- lib/plaid/models/platform_ids.rb | 2 +- lib/plaid/models/po_box_status.rb | 40 + ...sor_apex_processor_token_create_request.rb | 2 +- .../models/processor_auth_get_request.rb | 2 +- .../models/processor_auth_get_response.rb | 2 +- .../models/processor_balance_get_request.rb | 2 +- .../processor_balance_get_request_options.rb | 2 +- .../models/processor_balance_get_response.rb | 2 +- .../processor_bank_transfer_create_request.rb | 2 +- ...processor_bank_transfer_create_response.rb | 2 +- .../models/processor_identity_get_request.rb | 2 +- .../models/processor_identity_get_response.rb | 2 +- lib/plaid/models/processor_number.rb | 2 +- ...tripe_bank_account_token_create_request.rb | 2 +- ...ripe_bank_account_token_create_response.rb | 2 +- .../models/processor_token_create_request.rb | 2 +- .../models/processor_token_create_response.rb | 2 +- lib/plaid/models/product_access.rb | 2 +- lib/plaid/models/product_status.rb | 2 +- lib/plaid/models/product_status_breakdown.rb | 2 +- lib/plaid/models/products.rb | 2 +- lib/plaid/models/program_name_sensitivity.rb | 41 + .../projected_income_summary_field_number.rb | 2 +- lib/plaid/models/pslf_status.rb | 2 +- lib/plaid/models/recaptcha_required_error.rb | 2 +- lib/plaid/models/recipient_bacs.rb | 2 +- lib/plaid/models/recipient_bacs_nullable.rb | 2 +- .../models/recurring_transaction_frequency.rb | 2 +- lib/plaid/models/relay_event.rb | 2 +- lib/plaid/models/removed_transaction.rb | 2 +- .../models/risk_signal_document_reference.rb | 231 + ...dbox_bank_transfer_fire_webhook_request.rb | 2 +- ...box_bank_transfer_fire_webhook_response.rb | 2 +- .../sandbox_bank_transfer_simulate_request.rb | 2 +- ...sandbox_bank_transfer_simulate_response.rb | 2 +- .../sandbox_income_fire_webhook_request.rb | 14 +- .../sandbox_income_fire_webhook_response.rb | 2 +- .../sandbox_item_fire_webhook_request.rb | 4 +- .../sandbox_item_fire_webhook_response.rb | 2 +- .../sandbox_item_reset_login_request.rb | 2 +- .../sandbox_item_reset_login_response.rb | 2 +- ...ox_item_set_verification_status_request.rb | 2 +- ...x_item_set_verification_status_response.rb | 2 +- .../sandbox_oauth_select_accounts_request.rb | 2 +- .../sandbox_processor_token_create_request.rb | 2 +- ..._processor_token_create_request_options.rb | 2 +- ...sandbox_processor_token_create_response.rb | 2 +- .../sandbox_public_token_create_request.rb | 2 +- ...box_public_token_create_request_options.rb | 2 +- ...ken_create_request_options_transactions.rb | 2 +- .../sandbox_public_token_create_response.rb | 2 +- .../sandbox_transfer_fire_webhook_request.rb | 2 +- .../sandbox_transfer_fire_webhook_response.rb | 2 +- ...box_transfer_repayment_simulate_request.rb | 2 +- ...ox_transfer_repayment_simulate_response.rb | 2 +- .../sandbox_transfer_simulate_request.rb | 2 +- .../sandbox_transfer_simulate_response.rb | 2 +- ...sandbox_transfer_sweep_simulate_request.rb | 2 +- ...andbox_transfer_sweep_simulate_response.rb | 2 +- lib/plaid/models/scopes.rb | 2 +- lib/plaid/models/scopes_context.rb | 2 +- lib/plaid/models/scopes_nullable.rb | 2 +- lib/plaid/models/screening_hit_analysis.rb | 261 + lib/plaid/models/screening_hit_data.rb | 258 + .../screening_hit_date_of_birth_item.rb | 228 + .../models/screening_hit_documents_items.rb | 228 + lib/plaid/models/screening_hit_names_items.rb | 228 + .../screening_status_updated_webhook.rb | 251 + lib/plaid/models/security.rb | 2 +- lib/plaid/models/security_override.rb | 2 +- lib/plaid/models/sender_bacs_nullable.rb | 2 +- lib/plaid/models/servicer_address_data.rb | 2 +- lib/plaid/models/signal_address_data.rb | 2 +- .../models/signal_decision_report_request.rb | 2 +- .../models/signal_decision_report_response.rb | 2 +- lib/plaid/models/signal_device.rb | 2 +- .../models/signal_evaluate_core_attributes.rb | 2 +- lib/plaid/models/signal_evaluate_request.rb | 2 +- lib/plaid/models/signal_evaluate_response.rb | 2 +- lib/plaid/models/signal_person_name.rb | 2 +- lib/plaid/models/signal_prepare_request.rb | 2 +- lib/plaid/models/signal_prepare_response.rb | 2 +- .../models/signal_return_report_request.rb | 2 +- .../models/signal_return_report_response.rb | 2 +- lib/plaid/models/signal_scores.rb | 2 +- lib/plaid/models/signal_user.rb | 2 +- lib/plaid/models/simulated_transfer_sweep.rb | 2 +- .../models/single_document_risk_signal.rb | 241 + lib/plaid/models/source.rb | 41 + lib/plaid/models/standalone_account_type.rb | 2 +- .../models/standalone_currency_code_list.rb | 2 +- .../standalone_investment_transaction_type.rb | 2 +- lib/plaid/models/strategy.rb | 41 + lib/plaid/models/student_loan.rb | 2 +- .../models/student_loan_repayment_model.rb | 2 +- lib/plaid/models/student_loan_status.rb | 2 +- lib/plaid/models/student_repayment_plan.rb | 2 +- .../models/sync_updates_available_webhook.rb | 285 + lib/plaid/models/taxform.rb | 2 +- lib/plaid/models/taxpayer_id.rb | 2 +- lib/plaid/models/total.rb | 2 +- .../models/total_canonical_description.rb | 2 +- lib/plaid/models/transaction.rb | 2 +- lib/plaid/models/transaction_all_of.rb | 2 +- lib/plaid/models/transaction_base.rb | 2 +- lib/plaid/models/transaction_code.rb | 2 +- lib/plaid/models/transaction_data.rb | 2 +- lib/plaid/models/transaction_override.rb | 2 +- lib/plaid/models/transaction_stream.rb | 8 +- lib/plaid/models/transaction_stream_amount.rb | 2 +- lib/plaid/models/transaction_stream_status.rb | 2 +- .../models/transactions_category_rule.rb | 2 +- .../transactions_enhance_get_request.rb | 2 +- .../transactions_enhance_get_response.rb | 2 +- lib/plaid/models/transactions_get_request.rb | 2 +- .../transactions_get_request_options.rb | 2 +- lib/plaid/models/transactions_get_response.rb | 2 +- .../transactions_recurring_get_request.rb | 2 +- ...nsactions_recurring_get_request_options.rb | 2 +- .../transactions_recurring_get_response.rb | 2 +- .../models/transactions_refresh_request.rb | 2 +- .../models/transactions_refresh_response.rb | 2 +- .../models/transactions_removed_webhook.rb | 2 +- lib/plaid/models/transactions_rule_details.rb | 2 +- lib/plaid/models/transactions_rule_field.rb | 2 +- lib/plaid/models/transactions_rule_type.rb | 2 +- .../transactions_rules_create_request.rb | 4 +- .../transactions_rules_create_response.rb | 4 +- .../models/transactions_rules_list_request.rb | 4 +- .../transactions_rules_list_response.rb | 4 +- .../transactions_rules_remove_request.rb | 4 +- .../transactions_rules_remove_response.rb | 4 +- lib/plaid/models/transactions_sync_request.rb | 2 +- .../transactions_sync_request_options.rb | 2 +- .../models/transactions_sync_response.rb | 2 +- lib/plaid/models/transfer.rb | 2 +- lib/plaid/models/transfer_authorization.rb | 2 +- .../transfer_authorization_create_request.rb | 2 +- .../transfer_authorization_create_response.rb | 2 +- .../models/transfer_authorization_decision.rb | 2 +- ...ansfer_authorization_decision_rationale.rb | 2 +- ...r_authorization_decision_rationale_code.rb | 2 +- .../models/transfer_authorization_device.rb | 2 +- ...ansfer_authorization_guarantee_decision.rb | 2 +- ...horization_guarantee_decision_rationale.rb | 2 +- ...ation_guarantee_decision_rationale_code.rb | 2 +- ...ransfer_authorization_proposed_transfer.rb | 2 +- lib/plaid/models/transfer_cancel_request.rb | 2 +- lib/plaid/models/transfer_cancel_response.rb | 2 +- lib/plaid/models/transfer_create_request.rb | 4 +- lib/plaid/models/transfer_create_response.rb | 2 +- lib/plaid/models/transfer_event.rb | 2 +- .../models/transfer_event_list_request.rb | 2 +- .../models/transfer_event_list_response.rb | 2 +- .../transfer_event_list_transfer_type.rb | 2 +- .../models/transfer_event_sync_request.rb | 2 +- .../models/transfer_event_sync_response.rb | 2 +- lib/plaid/models/transfer_event_type.rb | 2 +- .../models/transfer_events_update_webhook.rb | 2 +- lib/plaid/models/transfer_failure.rb | 2 +- lib/plaid/models/transfer_get_request.rb | 2 +- lib/plaid/models/transfer_get_response.rb | 2 +- .../transfer_intent_authorization_decision.rb | 2 +- lib/plaid/models/transfer_intent_create.rb | 21 +- .../models/transfer_intent_create_mode.rb | 2 +- .../models/transfer_intent_create_request.rb | 23 +- .../models/transfer_intent_create_response.rb | 2 +- lib/plaid/models/transfer_intent_get.rb | 41 +- .../transfer_intent_get_failure_reason.rb | 2 +- .../models/transfer_intent_get_request.rb | 2 +- .../models/transfer_intent_get_response.rb | 2 +- lib/plaid/models/transfer_intent_status.rb | 2 +- lib/plaid/models/transfer_list_request.rb | 2 +- lib/plaid/models/transfer_list_response.rb | 2 +- .../transfer_migrate_account_request.rb | 2 +- .../transfer_migrate_account_response.rb | 2 +- lib/plaid/models/transfer_network.rb | 2 +- lib/plaid/models/transfer_repayment.rb | 2 +- .../models/transfer_repayment_list_request.rb | 2 +- .../transfer_repayment_list_response.rb | 2 +- lib/plaid/models/transfer_repayment_return.rb | 2 +- .../transfer_repayment_return_list_request.rb | 2 +- ...transfer_repayment_return_list_response.rb | 2 +- lib/plaid/models/transfer_status.rb | 2 +- lib/plaid/models/transfer_sweep.rb | 2 +- .../models/transfer_sweep_get_request.rb | 2 +- .../models/transfer_sweep_get_response.rb | 2 +- .../models/transfer_sweep_list_request.rb | 2 +- .../models/transfer_sweep_list_response.rb | 2 +- lib/plaid/models/transfer_sweep_status.rb | 2 +- lib/plaid/models/transfer_type.rb | 2 +- .../transfer_user_address_in_request.rb | 2 +- .../transfer_user_address_in_response.rb | 2 +- lib/plaid/models/transfer_user_in_request.rb | 2 +- lib/plaid/models/transfer_user_in_response.rb | 2 +- .../models/update_entity_screening_request.rb | 285 + ...e_entity_screening_request_search_terms.rb | 315 + .../update_individual_screening_request.rb | 285 + ...dividual_screening_request_search_terms.rb | 260 + lib/plaid/models/user_address.rb | 328 ++ lib/plaid/models/user_create_request.rb | 2 +- lib/plaid/models/user_create_response.rb | 3 +- lib/plaid/models/user_custom_password.rb | 2 +- lib/plaid/models/user_id_number.rb | 239 + lib/plaid/models/user_name.rb | 240 + .../models/user_permission_revoked_webhook.rb | 2 +- lib/plaid/models/verification_attribute.rb | 2 +- .../models/verification_expired_webhook.rb | 2 +- .../models/verification_refresh_status.rb | 2 +- lib/plaid/models/verification_status.rb | 2 +- lib/plaid/models/w2.rb | 2 +- lib/plaid/models/w2_box12.rb | 2 +- lib/plaid/models/w2_state_and_local_wages.rb | 2 +- lib/plaid/models/wallet.rb | 253 + lib/plaid/models/wallet_balance.rb | 2 +- lib/plaid/models/wallet_create_request.rb | 244 + lib/plaid/models/wallet_create_response.rb | 276 + lib/plaid/models/wallet_get_request.rb | 2 +- lib/plaid/models/wallet_get_response.rb | 47 +- lib/plaid/models/wallet_iso_currency_code.rb | 38 + lib/plaid/models/wallet_numbers.rb | 2 +- lib/plaid/models/wallet_transaction.rb | 8 +- lib/plaid/models/wallet_transaction_amount.rb | 50 +- .../models/wallet_transaction_counterparty.rb | 2 +- .../wallet_transaction_counterparty_bacs.rb | 2 +- ...wallet_transaction_counterparty_numbers.rb | 2 +- .../wallet_transaction_execute_request.rb | 2 +- .../wallet_transaction_execute_response.rb | 2 +- .../models/wallet_transaction_get_request.rb | 266 + .../models/wallet_transaction_get_response.rb | 369 ++ lib/plaid/models/wallet_transaction_status.rb | 2 +- .../wallet_transactions_list_request.rb | 2 +- .../wallet_transactions_list_response.rb | 2 +- lib/plaid/models/warning.rb | 2 +- .../models/watchlist_screening_audit_trail.rb | 249 + .../watchlist_screening_create_request.rb | 254 + .../models/watchlist_screening_document.rb | 271 + .../watchlist_screening_document_type.rb | 50 + .../watchlist_screening_entity_review_list.rb | 242 + lib/plaid/models/watchlist_screening_hit.rb | 349 ++ .../models/watchlist_screening_hit_list.rb | 242 + .../watchlist_screening_hit_locations.rb | 272 + .../models/watchlist_screening_hit_status.rb | 40 + .../models/watchlist_screening_individual.rb | 287 + lib/plaid/models/watchlist_screening_list.rb | 242 + ...atchlist_screening_request_search_terms.rb | 302 + .../models/watchlist_screening_review.rb | 301 + .../models/watchlist_screening_review_list.rb | 242 + .../watchlist_screening_search_terms.rb | 317 + .../models/watchlist_screening_status.rb | 40 + lib/plaid/models/weak_alias_determination.rb | 40 + lib/plaid/models/webhook_type.rb | 2 +- .../webhook_update_acknowledged_webhook.rb | 2 +- .../webhook_verification_key_get_request.rb | 2 +- .../webhook_verification_key_get_response.rb | 2 +- .../ytd_gross_income_summary_field_number.rb | 2 +- .../ytd_net_income_summary_field_number.rb | 2 +- lib/plaid/version.rb | 4 +- plaid.gemspec | 2 +- templates/ruby/api_client.mustache | 4 +- 819 files changed, 39621 insertions(+), 2659 deletions(-) create mode 100644 lib/plaid/models/address_purpose_label.rb rename lib/plaid/models/{transactions_recurring_deactivate_request.rb => create_entity_screening_request.rb} (83%) create mode 100644 lib/plaid/models/create_entity_watchlist_screening_review_request.rb create mode 100644 lib/plaid/models/create_individual_watchlist_screening_review_request.rb create mode 100644 lib/plaid/models/credit_payroll_income_risk_signals_get_request.rb create mode 100644 lib/plaid/models/credit_payroll_income_risk_signals_get_response.rb create mode 100644 lib/plaid/models/dashboard_user.rb create mode 100644 lib/plaid/models/dashboard_user_list.rb create mode 100644 lib/plaid/models/dashboard_user_status.rb create mode 100644 lib/plaid/models/date_range.rb create mode 100644 lib/plaid/models/document_analysis.rb create mode 100644 lib/plaid/models/document_authenticity_match_code.rb create mode 100644 lib/plaid/models/document_date_of_birth_match_code.rb create mode 100644 lib/plaid/models/document_name_match_code.rb create mode 100644 lib/plaid/models/document_risk_signal.rb rename lib/plaid/models/{transactions_recurring_deactivate_response.rb => document_risk_signal_institution_metadata.rb} (86%) create mode 100644 lib/plaid/models/document_risk_signals_object.rb create mode 100644 lib/plaid/models/document_status.rb rename lib/plaid/models/{payment_initiation_refund.rb => documentary_verification.rb} (77%) create mode 100644 lib/plaid/models/documentary_verification_document.rb create mode 100644 lib/plaid/models/entity_document.rb create mode 100644 lib/plaid/models/entity_document_type.rb create mode 100644 lib/plaid/models/entity_screening_hit_analysis.rb create mode 100644 lib/plaid/models/entity_screening_hit_data.rb create mode 100644 lib/plaid/models/entity_screening_hit_documents_items.rb create mode 100644 lib/plaid/models/entity_screening_hit_emails.rb create mode 100644 lib/plaid/models/entity_screening_hit_emails_items.rb create mode 100644 lib/plaid/models/entity_screening_hit_names.rb create mode 100644 lib/plaid/models/entity_screening_hit_names_items.rb create mode 100644 lib/plaid/models/entity_screening_hit_phone_numbers.rb create mode 100644 lib/plaid/models/entity_screening_hit_urls.rb create mode 100644 lib/plaid/models/entity_screening_hit_urls_items.rb create mode 100644 lib/plaid/models/entity_screening_hits_phone_number_items.rb create mode 100644 lib/plaid/models/entity_screening_status_updated_webhook.rb create mode 100644 lib/plaid/models/entity_watchlist_code.rb create mode 100644 lib/plaid/models/entity_watchlist_program.rb create mode 100644 lib/plaid/models/entity_watchlist_screening.rb create mode 100644 lib/plaid/models/entity_watchlist_screening_hit.rb create mode 100644 lib/plaid/models/entity_watchlist_screening_hit_list.rb create mode 100644 lib/plaid/models/entity_watchlist_screening_list.rb create mode 100644 lib/plaid/models/entity_watchlist_screening_program_list.rb create mode 100644 lib/plaid/models/entity_watchlist_screening_review.rb create mode 100644 lib/plaid/models/entity_watchlist_screening_search_terms.rb create mode 100644 lib/plaid/models/entity_watchlist_search_terms.rb create mode 100644 lib/plaid/models/expiration_date.rb create mode 100644 lib/plaid/models/generic_screening_hit_location_items.rb create mode 100644 lib/plaid/models/get_dashboard_user_request.rb create mode 100644 lib/plaid/models/get_entity_watchlist_screening_request.rb create mode 100644 lib/plaid/models/get_identity_verification_request.rb create mode 100644 lib/plaid/models/get_individual_watchlist_screening_request.rb create mode 100644 lib/plaid/models/get_watchlist_screening_entity_program_request.rb create mode 100644 lib/plaid/models/get_watchlist_screening_individual_program_request.rb create mode 100644 lib/plaid/models/id_number_type.rb create mode 100644 lib/plaid/models/identity_verification.rb create mode 100644 lib/plaid/models/identity_verification_create_request.rb create mode 100644 lib/plaid/models/identity_verification_list.rb create mode 100644 lib/plaid/models/identity_verification_request_user.rb create mode 100644 lib/plaid/models/identity_verification_retried_webhook.rb create mode 100644 lib/plaid/models/identity_verification_retry_request.rb create mode 100644 lib/plaid/models/identity_verification_retry_request_steps_object.rb create mode 100644 lib/plaid/models/identity_verification_status.rb create mode 100644 lib/plaid/models/identity_verification_status_updated_webhook.rb create mode 100644 lib/plaid/models/identity_verification_step_status.rb create mode 100644 lib/plaid/models/identity_verification_step_summary.rb create mode 100644 lib/plaid/models/identity_verification_step_updated_webhook.rb create mode 100644 lib/plaid/models/identity_verification_template_reference.rb create mode 100644 lib/plaid/models/identity_verification_user_address.rb create mode 100644 lib/plaid/models/identity_verification_user_data.rb create mode 100644 lib/plaid/models/image_quality.rb create mode 100644 lib/plaid/models/individual_screening_hit_names.rb create mode 100644 lib/plaid/models/individual_watchlist_code.rb create mode 100644 lib/plaid/models/individual_watchlist_program.rb create mode 100644 lib/plaid/models/individual_watchlist_program_list.rb create mode 100644 lib/plaid/models/issuing_country.rb create mode 100644 lib/plaid/models/kyc_check_address_summary.rb create mode 100644 lib/plaid/models/kyc_check_date_of_birth_summary.rb create mode 100644 lib/plaid/models/kyc_check_details.rb create mode 100644 lib/plaid/models/kyc_check_id_number_summary.rb create mode 100644 lib/plaid/models/kyc_check_name_summary.rb create mode 100644 lib/plaid/models/kyc_check_phone_summary.rb create mode 100644 lib/plaid/models/list_dashboard_user_request.rb create mode 100644 lib/plaid/models/list_entity_watchlist_screening_request.rb create mode 100644 lib/plaid/models/list_identity_verification_request.rb create mode 100644 lib/plaid/models/list_individual_watchlist_screening_request.rb create mode 100644 lib/plaid/models/list_pagination.rb create mode 100644 lib/plaid/models/list_watchlist_screening_entity_history_request.rb create mode 100644 lib/plaid/models/list_watchlist_screening_entity_hit_request.rb create mode 100644 lib/plaid/models/list_watchlist_screening_entity_programs_request.rb create mode 100644 lib/plaid/models/list_watchlist_screening_entity_reviews_request.rb create mode 100644 lib/plaid/models/list_watchlist_screening_individual_history_request.rb create mode 100644 lib/plaid/models/list_watchlist_screening_individual_hit_request.rb create mode 100644 lib/plaid/models/list_watchlist_screening_individual_programs_request.rb create mode 100644 lib/plaid/models/list_watchlist_screening_individual_reviews_request.rb create mode 100644 lib/plaid/models/match_summary.rb create mode 100644 lib/plaid/models/match_summary_code.rb create mode 100644 lib/plaid/models/multi_document_risk_signal.rb create mode 100644 lib/plaid/models/paginated_dashboard_user_list.rb create mode 100644 lib/plaid/models/paginated_entity_watchlist_program_list.rb create mode 100644 lib/plaid/models/paginated_entity_watchlist_screening_hit_list.rb create mode 100644 lib/plaid/models/paginated_entity_watchlist_screening_list.rb create mode 100644 lib/plaid/models/paginated_entity_watchlist_screening_review_list.rb create mode 100644 lib/plaid/models/paginated_identity_verification_paginated_list.rb create mode 100644 lib/plaid/models/paginated_individual_watchlist_program_list.rb create mode 100644 lib/plaid/models/paginated_individual_watchlist_screening_hit_list.rb create mode 100644 lib/plaid/models/paginated_individual_watchlist_screening_list.rb create mode 100644 lib/plaid/models/paginated_individual_watchlist_screening_review_list.rb create mode 100644 lib/plaid/models/payroll_risk_signals_item.rb create mode 100644 lib/plaid/models/phone_type.rb create mode 100644 lib/plaid/models/physical_document_category.rb create mode 100644 lib/plaid/models/physical_document_extracted_data.rb create mode 100644 lib/plaid/models/physical_document_extracted_data_analysis.rb create mode 100644 lib/plaid/models/physical_document_images.rb create mode 100644 lib/plaid/models/po_box_status.rb create mode 100644 lib/plaid/models/program_name_sensitivity.rb create mode 100644 lib/plaid/models/risk_signal_document_reference.rb create mode 100644 lib/plaid/models/screening_hit_analysis.rb create mode 100644 lib/plaid/models/screening_hit_data.rb create mode 100644 lib/plaid/models/screening_hit_date_of_birth_item.rb create mode 100644 lib/plaid/models/screening_hit_documents_items.rb create mode 100644 lib/plaid/models/screening_hit_names_items.rb create mode 100644 lib/plaid/models/screening_status_updated_webhook.rb create mode 100644 lib/plaid/models/single_document_risk_signal.rb create mode 100644 lib/plaid/models/source.rb create mode 100644 lib/plaid/models/strategy.rb create mode 100644 lib/plaid/models/sync_updates_available_webhook.rb create mode 100644 lib/plaid/models/update_entity_screening_request.rb create mode 100644 lib/plaid/models/update_entity_screening_request_search_terms.rb create mode 100644 lib/plaid/models/update_individual_screening_request.rb create mode 100644 lib/plaid/models/update_individual_screening_request_search_terms.rb create mode 100644 lib/plaid/models/user_address.rb create mode 100644 lib/plaid/models/user_id_number.rb create mode 100644 lib/plaid/models/user_name.rb create mode 100644 lib/plaid/models/wallet.rb create mode 100644 lib/plaid/models/wallet_create_request.rb create mode 100644 lib/plaid/models/wallet_create_response.rb create mode 100644 lib/plaid/models/wallet_iso_currency_code.rb create mode 100644 lib/plaid/models/wallet_transaction_get_request.rb create mode 100644 lib/plaid/models/wallet_transaction_get_response.rb create mode 100644 lib/plaid/models/watchlist_screening_audit_trail.rb create mode 100644 lib/plaid/models/watchlist_screening_create_request.rb create mode 100644 lib/plaid/models/watchlist_screening_document.rb create mode 100644 lib/plaid/models/watchlist_screening_document_type.rb create mode 100644 lib/plaid/models/watchlist_screening_entity_review_list.rb create mode 100644 lib/plaid/models/watchlist_screening_hit.rb create mode 100644 lib/plaid/models/watchlist_screening_hit_list.rb create mode 100644 lib/plaid/models/watchlist_screening_hit_locations.rb create mode 100644 lib/plaid/models/watchlist_screening_hit_status.rb create mode 100644 lib/plaid/models/watchlist_screening_individual.rb create mode 100644 lib/plaid/models/watchlist_screening_list.rb create mode 100644 lib/plaid/models/watchlist_screening_request_search_terms.rb create mode 100644 lib/plaid/models/watchlist_screening_review.rb create mode 100644 lib/plaid/models/watchlist_screening_review_list.rb create mode 100644 lib/plaid/models/watchlist_screening_search_terms.rb create mode 100644 lib/plaid/models/watchlist_screening_status.rb create mode 100644 lib/plaid/models/weak_alias_determination.rb diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index c83ae1a07..d2a05dee5 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -23,6 +23,7 @@ docs/Address.md docs/AddressData.md docs/AddressDataNullable.md docs/AddressNullable.md +docs/AddressPurposeLabel.md docs/Application.md docs/ApplicationGetRequest.md docs/ApplicationGetResponse.md @@ -109,6 +110,9 @@ docs/ClientProvidedEnhancedTransaction.md docs/ClientProvidedRawTransaction.md docs/ConnectedApplication.md docs/CountryCode.md +docs/CreateEntityScreeningRequest.md +docs/CreateEntityWatchlistScreeningReviewRequest.md +docs/CreateIndividualWatchlistScreeningReviewRequest.md docs/CreditAccountSubtype.md docs/CreditBankIncome.md docs/CreditBankIncomeAccount.md @@ -153,9 +157,15 @@ docs/CreditPayrollIncomePrecheckRequest.md docs/CreditPayrollIncomePrecheckResponse.md docs/CreditPayrollIncomeRefreshRequest.md docs/CreditPayrollIncomeRefreshResponse.md +docs/CreditPayrollIncomeRiskSignalsGetRequest.md +docs/CreditPayrollIncomeRiskSignalsGetResponse.md docs/CreditPlatformIds.md docs/CreditW2.md docs/CustomerInitiatedReturnRisk.md +docs/DashboardUser.md +docs/DashboardUserList.md +docs/DashboardUserStatus.md +docs/DateRange.md docs/Deductions.md docs/DeductionsBreakdown.md docs/DeductionsTotal.md @@ -177,7 +187,17 @@ docs/DepositoryAccountSubtype.md docs/DepositoryFilter.md docs/DistributionBreakdown.md docs/DocType.md +docs/DocumentAnalysis.md +docs/DocumentAuthenticityMatchCode.md +docs/DocumentDateOfBirthMatchCode.md docs/DocumentMetadata.md +docs/DocumentNameMatchCode.md +docs/DocumentRiskSignal.md +docs/DocumentRiskSignalInstitutionMetadata.md +docs/DocumentRiskSignalsObject.md +docs/DocumentStatus.md +docs/DocumentaryVerification.md +docs/DocumentaryVerificationDocument.md docs/Earnings.md docs/EarningsBreakdown.md docs/EarningsBreakdownCanonicalDescription.md @@ -196,24 +216,73 @@ docs/EmploymentVerificationGetRequest.md docs/EmploymentVerificationGetResponse.md docs/EmploymentVerificationStatus.md docs/Enhancements.md +docs/EntityDocument.md +docs/EntityDocumentType.md +docs/EntityScreeningHitAnalysis.md +docs/EntityScreeningHitData.md +docs/EntityScreeningHitDocumentsItems.md +docs/EntityScreeningHitEmails.md +docs/EntityScreeningHitEmailsItems.md +docs/EntityScreeningHitNames.md +docs/EntityScreeningHitNamesItems.md +docs/EntityScreeningHitPhoneNumbers.md +docs/EntityScreeningHitUrls.md +docs/EntityScreeningHitUrlsItems.md +docs/EntityScreeningHitsPhoneNumberItems.md +docs/EntityScreeningStatusUpdatedWebhook.md +docs/EntityWatchlistCode.md +docs/EntityWatchlistProgram.md +docs/EntityWatchlistScreening.md +docs/EntityWatchlistScreeningHit.md +docs/EntityWatchlistScreeningHitList.md +docs/EntityWatchlistScreeningList.md +docs/EntityWatchlistScreeningProgramList.md +docs/EntityWatchlistScreeningReview.md +docs/EntityWatchlistScreeningSearchTerms.md +docs/EntityWatchlistSearchTerms.md docs/Error.md +docs/ExpirationDate.md docs/ExternalPaymentInitiationConsentOptions.md docs/ExternalPaymentOptions.md docs/ExternalPaymentRefundDetails.md docs/ExternalPaymentScheduleBase.md docs/ExternalPaymentScheduleGet.md docs/ExternalPaymentScheduleRequest.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 docs/Holding.md docs/HoldingsDefaultUpdateWebhook.md docs/HoldingsOverride.md +docs/IDNumberType.md docs/IdentityDefaultUpdateWebhook.md docs/IdentityGetRequest.md docs/IdentityGetRequestOptions.md docs/IdentityGetResponse.md docs/IdentityUpdateTypes.md +docs/IdentityVerification.md +docs/IdentityVerificationCreateRequest.md +docs/IdentityVerificationList.md +docs/IdentityVerificationRequestUser.md +docs/IdentityVerificationRetriedWebhook.md +docs/IdentityVerificationRetryRequest.md +docs/IdentityVerificationRetryRequestStepsObject.md +docs/IdentityVerificationStatus.md +docs/IdentityVerificationStatusUpdatedWebhook.md +docs/IdentityVerificationStepStatus.md +docs/IdentityVerificationStepSummary.md +docs/IdentityVerificationStepUpdatedWebhook.md +docs/IdentityVerificationTemplateReference.md +docs/IdentityVerificationUserAddress.md +docs/IdentityVerificationUserData.md +docs/ImageQuality.md docs/IncidentUpdate.md docs/IncomeBreakdown.md docs/IncomeBreakdownType.md @@ -243,6 +312,10 @@ docs/IncomeVerificationStatusWebhook.md docs/IncomeVerificationTaxformsGetRequest.md docs/IncomeVerificationTaxformsGetResponse.md docs/IncomeVerificationWebhookStatus.md +docs/IndividualScreeningHitNames.md +docs/IndividualWatchlistCode.md +docs/IndividualWatchlistProgram.md +docs/IndividualWatchlistProgramList.md docs/InflowModel.md docs/InitialUpdateWebhook.md docs/Institution.md @@ -271,6 +344,7 @@ docs/InvestmentsTransactionsGetRequest.md docs/InvestmentsTransactionsGetRequestOptions.md docs/InvestmentsTransactionsGetResponse.md docs/InvestmentsTransactionsOverride.md +docs/IssuingCountry.md docs/Item.md docs/ItemAccessTokenInvalidateRequest.md docs/ItemAccessTokenInvalidateResponse.md @@ -302,6 +376,12 @@ docs/ItemWebhookUpdateRequest.md docs/ItemWebhookUpdateResponse.md docs/JWKPublicKey.md docs/JWTHeader.md +docs/KYCCheckAddressSummary.md +docs/KYCCheckDateOfBirthSummary.md +docs/KYCCheckDetails.md +docs/KYCCheckIDNumberSummary.md +docs/KYCCheckNameSummary.md +docs/KYCCheckPhoneSummary.md docs/LiabilitiesDefaultUpdateWebhook.md docs/LiabilitiesGetRequest.md docs/LiabilitiesGetRequestOptions.md @@ -330,14 +410,30 @@ 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/ListPagination.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/LoanAccountSubtype.md docs/LoanFilter.md docs/Location.md docs/MFA.md +docs/MatchSummary.md +docs/MatchSummaryCode.md docs/Meta.md docs/MortgageInterestRate.md docs/MortgageLiability.md docs/MortgagePropertyAddress.md +docs/MultiDocumentRiskSignal.md docs/NetPay.md docs/NewAccountsAvailableWebhook.md docs/Numbers.md @@ -353,7 +449,18 @@ docs/OverrideAccountType.md docs/OverrideAccounts.md docs/Owner.md docs/OwnerOverride.md +docs/POBoxStatus.md docs/PSLFStatus.md +docs/PaginatedDashboardUserList.md +docs/PaginatedEntityWatchlistProgramList.md +docs/PaginatedEntityWatchlistScreeningHitList.md +docs/PaginatedEntityWatchlistScreeningList.md +docs/PaginatedEntityWatchlistScreeningReviewList.md +docs/PaginatedIdentityVerificationPaginatedList.md +docs/PaginatedIndividualWatchlistProgramList.md +docs/PaginatedIndividualWatchlistScreeningHitList.md +docs/PaginatedIndividualWatchlistScreeningList.md +docs/PaginatedIndividualWatchlistScreeningReviewList.md docs/Pay.md docs/PayFrequency.md docs/PayFrequencyValue.md @@ -411,7 +518,6 @@ docs/PaymentInitiationRecipientGetResponse.md docs/PaymentInitiationRecipientGetResponseAllOf.md docs/PaymentInitiationRecipientListRequest.md docs/PaymentInitiationRecipientListResponse.md -docs/PaymentInitiationRefund.md docs/PaymentInitiationRefundStatus.md docs/PaymentInitiationStandingOrderMetadata.md docs/PaymentMeta.md @@ -421,6 +527,7 @@ docs/PaymentStatusUpdateWebhook.md docs/PayrollIncomeObject.md docs/PayrollItem.md docs/PayrollItemStatus.md +docs/PayrollRiskSignalsItem.md docs/Paystub.md docs/PaystubAddress.md docs/PaystubDeduction.md @@ -437,6 +544,11 @@ docs/PaystubYTDDetails.md docs/PendingExpirationWebhook.md docs/PersonalFinanceCategory.md docs/PhoneNumber.md +docs/PhoneType.md +docs/PhysicalDocumentCategory.md +docs/PhysicalDocumentExtractedData.md +docs/PhysicalDocumentExtractedDataAnalysis.md +docs/PhysicalDocumentImages.md docs/PlaidApi.md docs/PlaidError.md docs/PlatformIds.md @@ -459,6 +571,7 @@ docs/ProductAccess.md docs/ProductStatus.md docs/ProductStatusBreakdown.md docs/Products.md +docs/ProgramNameSensitivity.md docs/ProjectedIncomeSummaryFieldNumber.md docs/RecaptchaRequiredError.md docs/RecipientBACS.md @@ -466,6 +579,7 @@ docs/RecipientBACSNullable.md docs/RecurringTransactionFrequency.md docs/RelayEvent.md docs/RemovedTransaction.md +docs/RiskSignalDocumentReference.md docs/SandboxBankTransferFireWebhookRequest.md docs/SandboxBankTransferFireWebhookResponse.md docs/SandboxBankTransferSimulateRequest.md @@ -497,6 +611,12 @@ docs/SandboxTransferSweepSimulateResponse.md docs/Scopes.md docs/ScopesContext.md docs/ScopesNullable.md +docs/ScreeningHitAnalysis.md +docs/ScreeningHitData.md +docs/ScreeningHitDateOfBirthItem.md +docs/ScreeningHitDocumentsItems.md +docs/ScreeningHitNamesItems.md +docs/ScreeningStatusUpdatedWebhook.md docs/Security.md docs/SecurityOverride.md docs/SenderBACSNullable.md @@ -516,13 +636,17 @@ docs/SignalReturnReportResponse.md docs/SignalScores.md docs/SignalUser.md docs/SimulatedTransferSweep.md +docs/SingleDocumentRiskSignal.md +docs/Source.md docs/StandaloneAccountType.md docs/StandaloneCurrencyCodeList.md docs/StandaloneInvestmentTransactionType.md +docs/Strategy.md docs/StudentLoan.md docs/StudentLoanRepaymentModel.md docs/StudentLoanStatus.md docs/StudentRepaymentPlan.md +docs/SyncUpdatesAvailableWebhook.md docs/Taxform.md docs/TaxpayerID.md docs/Total.md @@ -542,8 +666,6 @@ docs/TransactionsEnhanceGetResponse.md docs/TransactionsGetRequest.md docs/TransactionsGetRequestOptions.md docs/TransactionsGetResponse.md -docs/TransactionsRecurringDeactivateRequest.md -docs/TransactionsRecurringDeactivateResponse.md docs/TransactionsRecurringGetRequest.md docs/TransactionsRecurringGetRequestOptions.md docs/TransactionsRecurringGetResponse.md @@ -622,9 +744,16 @@ docs/TransferUserAddressInRequest.md docs/TransferUserAddressInResponse.md docs/TransferUserInRequest.md docs/TransferUserInResponse.md +docs/UpdateEntityScreeningRequest.md +docs/UpdateEntityScreeningRequestSearchTerms.md +docs/UpdateIndividualScreeningRequest.md +docs/UpdateIndividualScreeningRequestSearchTerms.md +docs/UserAddress.md docs/UserCreateRequest.md docs/UserCreateResponse.md docs/UserCustomPassword.md +docs/UserIDNumber.md +docs/UserName.md docs/UserPermissionRevokedWebhook.md docs/VerificationAttribute.md docs/VerificationExpiredWebhook.md @@ -633,9 +762,13 @@ docs/VerificationStatus.md docs/W2.md docs/W2Box12.md docs/W2StateAndLocalWages.md +docs/Wallet.md docs/WalletBalance.md +docs/WalletCreateRequest.md +docs/WalletCreateResponse.md docs/WalletGetRequest.md docs/WalletGetResponse.md +docs/WalletISOCurrencyCode.md docs/WalletNumbers.md docs/WalletTransaction.md docs/WalletTransactionAmount.md @@ -644,10 +777,29 @@ docs/WalletTransactionCounterpartyBACS.md docs/WalletTransactionCounterpartyNumbers.md docs/WalletTransactionExecuteRequest.md docs/WalletTransactionExecuteResponse.md +docs/WalletTransactionGetRequest.md +docs/WalletTransactionGetResponse.md docs/WalletTransactionStatus.md docs/WalletTransactionsListRequest.md docs/WalletTransactionsListResponse.md docs/Warning.md +docs/WatchlistScreeningAuditTrail.md +docs/WatchlistScreeningCreateRequest.md +docs/WatchlistScreeningDocument.md +docs/WatchlistScreeningDocumentType.md +docs/WatchlistScreeningEntityReviewList.md +docs/WatchlistScreeningHit.md +docs/WatchlistScreeningHitList.md +docs/WatchlistScreeningHitLocations.md +docs/WatchlistScreeningHitStatus.md +docs/WatchlistScreeningIndividual.md +docs/WatchlistScreeningList.md +docs/WatchlistScreeningRequestSearchTerms.md +docs/WatchlistScreeningReview.md +docs/WatchlistScreeningReviewList.md +docs/WatchlistScreeningSearchTerms.md +docs/WatchlistScreeningStatus.md +docs/WeakAliasDetermination.md docs/WebhookType.md docs/WebhookUpdateAcknowledgedWebhook.md docs/WebhookVerificationKeyGetRequest.md @@ -683,6 +835,7 @@ lib/plaid/models/address.rb lib/plaid/models/address_data.rb lib/plaid/models/address_data_nullable.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 @@ -770,6 +923,9 @@ 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/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/credit_account_subtype.rb lib/plaid/models/credit_bank_income.rb lib/plaid/models/credit_bank_income_account.rb @@ -814,9 +970,15 @@ lib/plaid/models/credit_payroll_income_precheck_request.rb lib/plaid/models/credit_payroll_income_precheck_response.rb lib/plaid/models/credit_payroll_income_refresh_request.rb lib/plaid/models/credit_payroll_income_refresh_response.rb +lib/plaid/models/credit_payroll_income_risk_signals_get_request.rb +lib/plaid/models/credit_payroll_income_risk_signals_get_response.rb lib/plaid/models/credit_platform_ids.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_list.rb +lib/plaid/models/dashboard_user_status.rb +lib/plaid/models/date_range.rb lib/plaid/models/deductions.rb lib/plaid/models/deductions_breakdown.rb lib/plaid/models/deductions_total.rb @@ -838,7 +1000,17 @@ lib/plaid/models/depository_account_subtype.rb lib/plaid/models/depository_filter.rb lib/plaid/models/distribution_breakdown.rb lib/plaid/models/doc_type.rb +lib/plaid/models/document_analysis.rb +lib/plaid/models/document_authenticity_match_code.rb +lib/plaid/models/document_date_of_birth_match_code.rb lib/plaid/models/document_metadata.rb +lib/plaid/models/document_name_match_code.rb +lib/plaid/models/document_risk_signal.rb +lib/plaid/models/document_risk_signal_institution_metadata.rb +lib/plaid/models/document_risk_signals_object.rb +lib/plaid/models/document_status.rb +lib/plaid/models/documentary_verification.rb +lib/plaid/models/documentary_verification_document.rb lib/plaid/models/earnings.rb lib/plaid/models/earnings_breakdown.rb lib/plaid/models/earnings_breakdown_canonical_description.rb @@ -857,24 +1029,73 @@ lib/plaid/models/employment_verification_get_request.rb lib/plaid/models/employment_verification_get_response.rb lib/plaid/models/employment_verification_status.rb lib/plaid/models/enhancements.rb +lib/plaid/models/entity_document.rb +lib/plaid/models/entity_document_type.rb +lib/plaid/models/entity_screening_hit_analysis.rb +lib/plaid/models/entity_screening_hit_data.rb +lib/plaid/models/entity_screening_hit_documents_items.rb +lib/plaid/models/entity_screening_hit_emails.rb +lib/plaid/models/entity_screening_hit_emails_items.rb +lib/plaid/models/entity_screening_hit_names.rb +lib/plaid/models/entity_screening_hit_names_items.rb +lib/plaid/models/entity_screening_hit_phone_numbers.rb +lib/plaid/models/entity_screening_hit_urls.rb +lib/plaid/models/entity_screening_hit_urls_items.rb +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_screening.rb +lib/plaid/models/entity_watchlist_screening_hit.rb +lib/plaid/models/entity_watchlist_screening_hit_list.rb +lib/plaid/models/entity_watchlist_screening_list.rb +lib/plaid/models/entity_watchlist_screening_program_list.rb +lib/plaid/models/entity_watchlist_screening_review.rb +lib/plaid/models/entity_watchlist_screening_search_terms.rb +lib/plaid/models/entity_watchlist_search_terms.rb lib/plaid/models/error.rb +lib/plaid/models/expiration_date.rb lib/plaid/models/external_payment_initiation_consent_options.rb lib/plaid/models/external_payment_options.rb 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/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 lib/plaid/models/holding.rb lib/plaid/models/holdings_default_update_webhook.rb lib/plaid/models/holdings_override.rb +lib/plaid/models/id_number_type.rb lib/plaid/models/identity_default_update_webhook.rb lib/plaid/models/identity_get_request.rb lib/plaid/models/identity_get_request_options.rb lib/plaid/models/identity_get_response.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_list.rb +lib/plaid/models/identity_verification_request_user.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_status.rb +lib/plaid/models/identity_verification_status_updated_webhook.rb +lib/plaid/models/identity_verification_step_status.rb +lib/plaid/models/identity_verification_step_summary.rb +lib/plaid/models/identity_verification_step_updated_webhook.rb +lib/plaid/models/identity_verification_template_reference.rb +lib/plaid/models/identity_verification_user_address.rb +lib/plaid/models/identity_verification_user_data.rb +lib/plaid/models/image_quality.rb lib/plaid/models/incident_update.rb lib/plaid/models/income_breakdown.rb lib/plaid/models/income_breakdown_type.rb @@ -904,6 +1125,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_screening_hit_names.rb +lib/plaid/models/individual_watchlist_code.rb +lib/plaid/models/individual_watchlist_program.rb +lib/plaid/models/individual_watchlist_program_list.rb lib/plaid/models/inflow_model.rb lib/plaid/models/initial_update_webhook.rb lib/plaid/models/institution.rb @@ -932,6 +1157,7 @@ lib/plaid/models/investments_transactions_get_request.rb lib/plaid/models/investments_transactions_get_request_options.rb lib/plaid/models/investments_transactions_get_response.rb lib/plaid/models/investments_transactions_override.rb +lib/plaid/models/issuing_country.rb lib/plaid/models/item.rb lib/plaid/models/item_access_token_invalidate_request.rb lib/plaid/models/item_access_token_invalidate_response.rb @@ -963,6 +1189,12 @@ lib/plaid/models/item_webhook_update_request.rb lib/plaid/models/item_webhook_update_response.rb lib/plaid/models/jwk_public_key.rb lib/plaid/models/jwt_header.rb +lib/plaid/models/kyc_check_address_summary.rb +lib/plaid/models/kyc_check_date_of_birth_summary.rb +lib/plaid/models/kyc_check_details.rb +lib/plaid/models/kyc_check_id_number_summary.rb +lib/plaid/models/kyc_check_name_summary.rb +lib/plaid/models/kyc_check_phone_summary.rb lib/plaid/models/liabilities_default_update_webhook.rb lib/plaid/models/liabilities_get_request.rb lib/plaid/models/liabilities_get_request_options.rb @@ -991,14 +1223,30 @@ 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_pagination.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/loan_account_subtype.rb lib/plaid/models/loan_filter.rb lib/plaid/models/location.rb +lib/plaid/models/match_summary.rb +lib/plaid/models/match_summary_code.rb lib/plaid/models/meta.rb lib/plaid/models/mfa.rb 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/net_pay.rb lib/plaid/models/new_accounts_available_webhook.rb lib/plaid/models/numbers.rb @@ -1014,6 +1262,16 @@ 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.rb +lib/plaid/models/paginated_entity_watchlist_program_list.rb +lib/plaid/models/paginated_entity_watchlist_screening_hit_list.rb +lib/plaid/models/paginated_entity_watchlist_screening_list.rb +lib/plaid/models/paginated_entity_watchlist_screening_review_list.rb +lib/plaid/models/paginated_identity_verification_paginated_list.rb +lib/plaid/models/paginated_individual_watchlist_program_list.rb +lib/plaid/models/paginated_individual_watchlist_screening_hit_list.rb +lib/plaid/models/paginated_individual_watchlist_screening_list.rb +lib/plaid/models/paginated_individual_watchlist_screening_review_list.rb lib/plaid/models/pay.rb lib/plaid/models/pay_frequency.rb lib/plaid/models/pay_frequency_value.rb @@ -1071,7 +1329,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.rb lib/plaid/models/payment_initiation_refund_status.rb lib/plaid/models/payment_initiation_standing_order_metadata.rb lib/plaid/models/payment_meta.rb @@ -1081,6 +1338,7 @@ lib/plaid/models/payment_status_update_webhook.rb lib/plaid/models/payroll_income_object.rb lib/plaid/models/payroll_item.rb lib/plaid/models/payroll_item_status.rb +lib/plaid/models/payroll_risk_signals_item.rb lib/plaid/models/paystub.rb lib/plaid/models/paystub_address.rb lib/plaid/models/paystub_deduction.rb @@ -1097,8 +1355,14 @@ 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_type.rb +lib/plaid/models/physical_document_category.rb +lib/plaid/models/physical_document_extracted_data.rb +lib/plaid/models/physical_document_extracted_data_analysis.rb +lib/plaid/models/physical_document_images.rb lib/plaid/models/plaid_error.rb lib/plaid/models/platform_ids.rb +lib/plaid/models/po_box_status.rb lib/plaid/models/processor_apex_processor_token_create_request.rb lib/plaid/models/processor_auth_get_request.rb lib/plaid/models/processor_auth_get_response.rb @@ -1118,6 +1382,7 @@ lib/plaid/models/product_access.rb lib/plaid/models/product_status.rb lib/plaid/models/product_status_breakdown.rb lib/plaid/models/products.rb +lib/plaid/models/program_name_sensitivity.rb lib/plaid/models/projected_income_summary_field_number.rb lib/plaid/models/pslf_status.rb lib/plaid/models/recaptcha_required_error.rb @@ -1126,6 +1391,7 @@ lib/plaid/models/recipient_bacs_nullable.rb lib/plaid/models/recurring_transaction_frequency.rb lib/plaid/models/relay_event.rb lib/plaid/models/removed_transaction.rb +lib/plaid/models/risk_signal_document_reference.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 @@ -1157,6 +1423,12 @@ lib/plaid/models/sandbox_transfer_sweep_simulate_response.rb lib/plaid/models/scopes.rb lib/plaid/models/scopes_context.rb lib/plaid/models/scopes_nullable.rb +lib/plaid/models/screening_hit_analysis.rb +lib/plaid/models/screening_hit_data.rb +lib/plaid/models/screening_hit_date_of_birth_item.rb +lib/plaid/models/screening_hit_documents_items.rb +lib/plaid/models/screening_hit_names_items.rb +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 @@ -1176,13 +1448,17 @@ lib/plaid/models/signal_return_report_response.rb lib/plaid/models/signal_scores.rb lib/plaid/models/signal_user.rb lib/plaid/models/simulated_transfer_sweep.rb +lib/plaid/models/single_document_risk_signal.rb +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/strategy.rb lib/plaid/models/student_loan.rb lib/plaid/models/student_loan_repayment_model.rb lib/plaid/models/student_loan_status.rb 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/total.rb @@ -1202,8 +1478,6 @@ lib/plaid/models/transactions_enhance_get_response.rb lib/plaid/models/transactions_get_request.rb lib/plaid/models/transactions_get_request_options.rb lib/plaid/models/transactions_get_response.rb -lib/plaid/models/transactions_recurring_deactivate_request.rb -lib/plaid/models/transactions_recurring_deactivate_response.rb lib/plaid/models/transactions_recurring_get_request.rb lib/plaid/models/transactions_recurring_get_request_options.rb lib/plaid/models/transactions_recurring_get_response.rb @@ -1282,9 +1556,16 @@ 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_response.rb +lib/plaid/models/update_entity_screening_request.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_search_terms.rb +lib/plaid/models/user_address.rb lib/plaid/models/user_create_request.rb lib/plaid/models/user_create_response.rb lib/plaid/models/user_custom_password.rb +lib/plaid/models/user_id_number.rb +lib/plaid/models/user_name.rb lib/plaid/models/user_permission_revoked_webhook.rb lib/plaid/models/verification_attribute.rb lib/plaid/models/verification_expired_webhook.rb @@ -1293,9 +1574,13 @@ lib/plaid/models/verification_status.rb lib/plaid/models/w2.rb lib/plaid/models/w2_box12.rb lib/plaid/models/w2_state_and_local_wages.rb +lib/plaid/models/wallet.rb lib/plaid/models/wallet_balance.rb +lib/plaid/models/wallet_create_request.rb +lib/plaid/models/wallet_create_response.rb lib/plaid/models/wallet_get_request.rb lib/plaid/models/wallet_get_response.rb +lib/plaid/models/wallet_iso_currency_code.rb lib/plaid/models/wallet_numbers.rb lib/plaid/models/wallet_transaction.rb lib/plaid/models/wallet_transaction_amount.rb @@ -1304,10 +1589,29 @@ lib/plaid/models/wallet_transaction_counterparty_bacs.rb lib/plaid/models/wallet_transaction_counterparty_numbers.rb lib/plaid/models/wallet_transaction_execute_request.rb 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_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_review_list.rb +lib/plaid/models/watchlist_screening_hit.rb +lib/plaid/models/watchlist_screening_hit_list.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_list.rb +lib/plaid/models/watchlist_screening_request_search_terms.rb +lib/plaid/models/watchlist_screening_review.rb +lib/plaid/models/watchlist_screening_review_list.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_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 e25a6b329..f1c386834 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,115 @@ See full changelog for the OpenAPI schema (OAS) [here](https://github.com/plaid/plaid-openapi/blob/master/CHANGELOG.md). +# 15.5.0 +- Updating to OAS 2020-09-14_1.115.2 + +## OpenAPI Schema Changes +### 2020-09-14_1.115.2 +- Update description fields to fix formatting errors +- Reflect that `error.suggested_action` is `nullable` + +### 2020-09-14_1.115.1 +- Update OpenAPI spec + +### 2020-09-14_1.115.0 +- Added `income_report_token` to `/credit/payroll_income/get` response + +### 2020-09-14_1.114.2 +- Add `/wallet/create` endpoint + +### 2020-09-14_1.114.1 +- Add beta `additional_consented_products` field to `/link/token/create` + +### 2020-09-14_1.113.1 +- Updated `/transactions/recurring/get` description + +### 2020-09-14_1.113.0 +- Add webhooks for new Monitor and Identity Verification products + +### 2020-09-14_1.112.0 +- Add endpoints for new Monitor and Identity Verification products + +### 2020-09-14_1.111.15 +- Remove `emi_recipient_id` from Payment Initiation Recipient + +### 2020-09-14_1.111.14 +- Add optional `iban` and `bacs` fields to `options` in the `/payment_initiation/consent/create` request + +### 2020-09-14_1.111.13 +- Updated `/transactions/sync` description + +### 2020-09-14_1.111.12 +- Add more accurate enum documentations to `/transactions/recurring/get` API doc + +### 2020-09-14_1.111.11 +- Additional documentation for `/transactions/sync` + +### 2020-09-14_1.111.9 +- Remove deprecated field `createdAt` from `/application/get` response + +### 2020-09-14_1.111.8 +- Add field validation to `BankTransferDirection` + +### 2020-09-14_1.111.7 +- Remove deprecated field `createdAt` from `/application/get` response + +### 2020-09-14_1.111.6 +- Add external doc link to `transactions/recurring/get` + +### 2020-09-14_1.111.5 +- Updating the API doc for Recurring Transactions + +### 2020-09-14_1.111.4 +- Add `DisplayName` in `/application/get` response + +### 2020-09-14_1.111.3 +- Updated sample responses for all Transfer endpoints + +### 2020-09-14_1.111.2 +- Changing `beta/transactions/rules/` routes to `beta/transactions/rules/v1` + +### 2020-09-14_1.111.1 +- Fixing `InsitututionMetadata` typo to `InstitutionMetadata` in private `/beta/credit/payroll_income/risk_signals/get`endpoint response + +### 2020-09-14_1.111.0 +- Added `require_guarantee`, `guarantee_decision`, and `guarantee_decision_rationale` to `/transfer/intent` in order to support Guarantee when using Transfer UI. + +### 2020-09-14_1.110.2 +- Add additional supported `type` enums in `WalletTransaction`. + +### 2020-09-14_1.110.1 +- Add Additional History billing information for /asset_report/create. + +### 2020-09-14_1.110.0 +- Add `user_id` to income verification webhook payload + +### 2020-09-14_1.109.1 +- Make `consent_id` field nullable in `PaymentInitiationPayment`. + +### 2020-09-14_1.109.0 +- Replace `initiated_refunds` with `refund_ids` in the `/payment_initiation/payment/get` and `/payment_initiation/payment/list` responses + +### 2020-09-14_1.108.0 +- Added `/beta/credit/payroll_income/risk_signals/get` endpoint (currently private) + +### 2020-09-14_1.107.4 +- Remove unsupported ACH classes from `bank_transfer/` and `transfer/` endpoints. + +### 2020-09-14_1.107.3 +- Add `enable_multiple_items` parameter for bank income. + +### 2020-09-14_1.107.2 +- Fix typo in `institution_name` parameter for credit endpoints. + +### 2020-09-14_1.107.0 +- Added `reference` and `idempotency_key` fields to the `payment_initiation/payment/reverse` request. + +### 2020-09-14_1.106.0 +- Added `is_update_mode` to `income_verification` in the `/link/token/create` body + +### 2020-09-14_1.105.2 +- Consolidate item schemas + # 15.4.0 - Updating to OAS 2020-09-14_1.105.1 - Expose Faraday::Connection object for additional configuration options diff --git a/Makefile b/Makefile index e5eaf9ab5..93a1b1398 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.4.0 +RUBY_PACKAGE_VERSION=15.5.0 .PHONY: release release: diff --git a/README.md b/README.md index 73882c94b..a4e223290 100644 --- a/README.md +++ b/README.md @@ -77,10 +77,45 @@ api_client = Plaid::ApiClient.new( ) api_client.connection.options[:timeout] = 60*20 # 20 minutes ``` + +To use custom middleware, reinitialize the Faraday::Connection object: +``` +configuration = Plaid::Configuration.new +api_client = Plaid::ApiClient.new(configuration) +api_client.create_connection do |builder| + builder.use Faraday::Response::Logger +end +``` ## Data type differences from API and from previous versions ### Dates -Dates and date times in requests and responses, which are represented as strings in the API and in previous client library versions, are represented in this version of the library as Ruby `Date` or `DateTime` objects. + +Dates and datetimes in requests, which are represented as strings in the API and in previous client library versions, are represented in this version of the Ruby client library as Ruby `Date` or `DateTime` objects. + +Time zone information is required for request fields that accept datetimes. Failing to include time zone information (or passing in a string, instead of a `Date` or `DateTime` object) will result in an error. See the following examples for guidance on `Date` and `DateTime` usage. + +If the API reference documentation for a field specifies `format: date`, any of following are acceptable: + +```rb +require 'date' + +# Not an exhaustive list of possible options +a = Date.new(2022, 5, 5) +b = Date.new(2022, 5, 5).to_date +c = Date.parse('2022-05-05') +d = Date.parse('2022-05-05').to_date +e = Date.today +``` + +If the API reference documentation for a field specifies `format: date-time`, either of the following are acceptable: + +```rb +require 'time' + +# Not an exhaustive list of possible options +a = Time.parse("2022-05-06T22:35:49Z").to_datetime +b = Date.parse("2022-05-06T22:35:49Z").to_datetime +``` ## Examples diff --git a/lib/plaid.rb b/lib/plaid.rb index fd92e2061..18ba4e474 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -42,6 +42,7 @@ require 'plaid/models/address_data' require 'plaid/models/address_data_nullable' 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' @@ -128,6 +129,9 @@ require 'plaid/models/client_provided_raw_transaction' require 'plaid/models/connected_application' 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/credit_account_subtype' require 'plaid/models/credit_bank_income' require 'plaid/models/credit_bank_income_account' @@ -172,9 +176,15 @@ require 'plaid/models/credit_payroll_income_precheck_response' require 'plaid/models/credit_payroll_income_refresh_request' require 'plaid/models/credit_payroll_income_refresh_response' +require 'plaid/models/credit_payroll_income_risk_signals_get_request' +require 'plaid/models/credit_payroll_income_risk_signals_get_response' require 'plaid/models/credit_platform_ids' require 'plaid/models/credit_w2' require 'plaid/models/customer_initiated_return_risk' +require 'plaid/models/dashboard_user' +require 'plaid/models/dashboard_user_list' +require 'plaid/models/dashboard_user_status' +require 'plaid/models/date_range' require 'plaid/models/deductions' require 'plaid/models/deductions_breakdown' require 'plaid/models/deductions_total' @@ -196,7 +206,17 @@ require 'plaid/models/depository_filter' require 'plaid/models/distribution_breakdown' require 'plaid/models/doc_type' +require 'plaid/models/document_analysis' +require 'plaid/models/document_authenticity_match_code' +require 'plaid/models/document_date_of_birth_match_code' require 'plaid/models/document_metadata' +require 'plaid/models/document_name_match_code' +require 'plaid/models/document_risk_signal' +require 'plaid/models/document_risk_signal_institution_metadata' +require 'plaid/models/document_risk_signals_object' +require 'plaid/models/document_status' +require 'plaid/models/documentary_verification' +require 'plaid/models/documentary_verification_document' require 'plaid/models/earnings' require 'plaid/models/earnings_breakdown' require 'plaid/models/earnings_breakdown_canonical_description' @@ -215,24 +235,73 @@ require 'plaid/models/employment_verification_get_response' require 'plaid/models/employment_verification_status' require 'plaid/models/enhancements' +require 'plaid/models/entity_document' +require 'plaid/models/entity_document_type' +require 'plaid/models/entity_screening_hit_analysis' +require 'plaid/models/entity_screening_hit_data' +require 'plaid/models/entity_screening_hit_documents_items' +require 'plaid/models/entity_screening_hit_emails' +require 'plaid/models/entity_screening_hit_emails_items' +require 'plaid/models/entity_screening_hit_names' +require 'plaid/models/entity_screening_hit_names_items' +require 'plaid/models/entity_screening_hit_phone_numbers' +require 'plaid/models/entity_screening_hit_urls' +require 'plaid/models/entity_screening_hit_urls_items' +require 'plaid/models/entity_screening_hits_phone_number_items' +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_screening' +require 'plaid/models/entity_watchlist_screening_hit' +require 'plaid/models/entity_watchlist_screening_hit_list' +require 'plaid/models/entity_watchlist_screening_list' +require 'plaid/models/entity_watchlist_screening_program_list' +require 'plaid/models/entity_watchlist_screening_review' +require 'plaid/models/entity_watchlist_screening_search_terms' +require 'plaid/models/entity_watchlist_search_terms' require 'plaid/models/error' +require 'plaid/models/expiration_date' require 'plaid/models/external_payment_initiation_consent_options' require 'plaid/models/external_payment_options' require 'plaid/models/external_payment_refund_details' require 'plaid/models/external_payment_schedule_base' require 'plaid/models/external_payment_schedule_get' require 'plaid/models/external_payment_schedule_request' +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' require 'plaid/models/holding' require 'plaid/models/holdings_default_update_webhook' require 'plaid/models/holdings_override' +require 'plaid/models/id_number_type' require 'plaid/models/identity_default_update_webhook' require 'plaid/models/identity_get_request' require 'plaid/models/identity_get_request_options' require 'plaid/models/identity_get_response' require 'plaid/models/identity_update_types' +require 'plaid/models/identity_verification' +require 'plaid/models/identity_verification_create_request' +require 'plaid/models/identity_verification_list' +require 'plaid/models/identity_verification_request_user' +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_status' +require 'plaid/models/identity_verification_status_updated_webhook' +require 'plaid/models/identity_verification_step_status' +require 'plaid/models/identity_verification_step_summary' +require 'plaid/models/identity_verification_step_updated_webhook' +require 'plaid/models/identity_verification_template_reference' +require 'plaid/models/identity_verification_user_address' +require 'plaid/models/identity_verification_user_data' +require 'plaid/models/image_quality' require 'plaid/models/incident_update' require 'plaid/models/income_breakdown' require 'plaid/models/income_breakdown_type' @@ -262,6 +331,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_screening_hit_names' +require 'plaid/models/individual_watchlist_code' +require 'plaid/models/individual_watchlist_program' +require 'plaid/models/individual_watchlist_program_list' require 'plaid/models/inflow_model' require 'plaid/models/initial_update_webhook' require 'plaid/models/institution' @@ -290,6 +363,7 @@ require 'plaid/models/investments_transactions_get_request_options' require 'plaid/models/investments_transactions_get_response' require 'plaid/models/investments_transactions_override' +require 'plaid/models/issuing_country' require 'plaid/models/item' require 'plaid/models/item_access_token_invalidate_request' require 'plaid/models/item_access_token_invalidate_response' @@ -321,6 +395,12 @@ require 'plaid/models/item_webhook_update_response' require 'plaid/models/jwk_public_key' require 'plaid/models/jwt_header' +require 'plaid/models/kyc_check_address_summary' +require 'plaid/models/kyc_check_date_of_birth_summary' +require 'plaid/models/kyc_check_details' +require 'plaid/models/kyc_check_id_number_summary' +require 'plaid/models/kyc_check_name_summary' +require 'plaid/models/kyc_check_phone_summary' require 'plaid/models/liabilities_default_update_webhook' require 'plaid/models/liabilities_get_request' require 'plaid/models/liabilities_get_request_options' @@ -349,14 +429,30 @@ 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_pagination' +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/loan_account_subtype' require 'plaid/models/loan_filter' require 'plaid/models/location' require 'plaid/models/mfa' +require 'plaid/models/match_summary' +require 'plaid/models/match_summary_code' require 'plaid/models/meta' require 'plaid/models/mortgage_interest_rate' require 'plaid/models/mortgage_liability' require 'plaid/models/mortgage_property_address' +require 'plaid/models/multi_document_risk_signal' require 'plaid/models/net_pay' require 'plaid/models/new_accounts_available_webhook' require 'plaid/models/numbers' @@ -372,7 +468,18 @@ require 'plaid/models/override_accounts' require 'plaid/models/owner' require 'plaid/models/owner_override' +require 'plaid/models/po_box_status' require 'plaid/models/pslf_status' +require 'plaid/models/paginated_dashboard_user_list' +require 'plaid/models/paginated_entity_watchlist_program_list' +require 'plaid/models/paginated_entity_watchlist_screening_hit_list' +require 'plaid/models/paginated_entity_watchlist_screening_list' +require 'plaid/models/paginated_entity_watchlist_screening_review_list' +require 'plaid/models/paginated_identity_verification_paginated_list' +require 'plaid/models/paginated_individual_watchlist_program_list' +require 'plaid/models/paginated_individual_watchlist_screening_hit_list' +require 'plaid/models/paginated_individual_watchlist_screening_list' +require 'plaid/models/paginated_individual_watchlist_screening_review_list' require 'plaid/models/pay' require 'plaid/models/pay_frequency' require 'plaid/models/pay_frequency_value' @@ -430,7 +537,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' require 'plaid/models/payment_initiation_refund_status' require 'plaid/models/payment_initiation_standing_order_metadata' require 'plaid/models/payment_meta' @@ -440,6 +546,7 @@ require 'plaid/models/payroll_income_object' require 'plaid/models/payroll_item' require 'plaid/models/payroll_item_status' +require 'plaid/models/payroll_risk_signals_item' require 'plaid/models/paystub' require 'plaid/models/paystub_address' require 'plaid/models/paystub_deduction' @@ -456,6 +563,11 @@ require 'plaid/models/pending_expiration_webhook' require 'plaid/models/personal_finance_category' require 'plaid/models/phone_number' +require 'plaid/models/phone_type' +require 'plaid/models/physical_document_category' +require 'plaid/models/physical_document_extracted_data' +require 'plaid/models/physical_document_extracted_data_analysis' +require 'plaid/models/physical_document_images' require 'plaid/models/plaid_error' require 'plaid/models/platform_ids' require 'plaid/models/processor_apex_processor_token_create_request' @@ -477,6 +589,7 @@ require 'plaid/models/product_status' require 'plaid/models/product_status_breakdown' require 'plaid/models/products' +require 'plaid/models/program_name_sensitivity' require 'plaid/models/projected_income_summary_field_number' require 'plaid/models/recaptcha_required_error' require 'plaid/models/recipient_bacs' @@ -484,6 +597,7 @@ require 'plaid/models/recurring_transaction_frequency' require 'plaid/models/relay_event' require 'plaid/models/removed_transaction' +require 'plaid/models/risk_signal_document_reference' 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' @@ -515,6 +629,12 @@ require 'plaid/models/scopes' require 'plaid/models/scopes_context' require 'plaid/models/scopes_nullable' +require 'plaid/models/screening_hit_analysis' +require 'plaid/models/screening_hit_data' +require 'plaid/models/screening_hit_date_of_birth_item' +require 'plaid/models/screening_hit_documents_items' +require 'plaid/models/screening_hit_names_items' +require 'plaid/models/screening_status_updated_webhook' require 'plaid/models/security' require 'plaid/models/security_override' require 'plaid/models/sender_bacs_nullable' @@ -534,13 +654,17 @@ require 'plaid/models/signal_scores' require 'plaid/models/signal_user' require 'plaid/models/simulated_transfer_sweep' +require 'plaid/models/single_document_risk_signal' +require 'plaid/models/source' require 'plaid/models/standalone_account_type' require 'plaid/models/standalone_currency_code_list' require 'plaid/models/standalone_investment_transaction_type' +require 'plaid/models/strategy' require 'plaid/models/student_loan' require 'plaid/models/student_loan_repayment_model' require 'plaid/models/student_loan_status' require 'plaid/models/student_repayment_plan' +require 'plaid/models/sync_updates_available_webhook' require 'plaid/models/taxform' require 'plaid/models/taxpayer_id' require 'plaid/models/total' @@ -560,8 +684,6 @@ require 'plaid/models/transactions_get_request' require 'plaid/models/transactions_get_request_options' require 'plaid/models/transactions_get_response' -require 'plaid/models/transactions_recurring_deactivate_request' -require 'plaid/models/transactions_recurring_deactivate_response' require 'plaid/models/transactions_recurring_get_request' require 'plaid/models/transactions_recurring_get_request_options' require 'plaid/models/transactions_recurring_get_response' @@ -640,9 +762,16 @@ require 'plaid/models/transfer_user_address_in_response' require 'plaid/models/transfer_user_in_request' require 'plaid/models/transfer_user_in_response' +require 'plaid/models/update_entity_screening_request' +require 'plaid/models/update_entity_screening_request_search_terms' +require 'plaid/models/update_individual_screening_request' +require 'plaid/models/update_individual_screening_request_search_terms' +require 'plaid/models/user_address' require 'plaid/models/user_create_request' require 'plaid/models/user_create_response' require 'plaid/models/user_custom_password' +require 'plaid/models/user_id_number' +require 'plaid/models/user_name' require 'plaid/models/user_permission_revoked_webhook' require 'plaid/models/verification_attribute' require 'plaid/models/verification_expired_webhook' @@ -651,9 +780,13 @@ require 'plaid/models/w2' require 'plaid/models/w2_box12' require 'plaid/models/w2_state_and_local_wages' +require 'plaid/models/wallet' require 'plaid/models/wallet_balance' +require 'plaid/models/wallet_create_request' +require 'plaid/models/wallet_create_response' require 'plaid/models/wallet_get_request' require 'plaid/models/wallet_get_response' +require 'plaid/models/wallet_iso_currency_code' require 'plaid/models/wallet_numbers' require 'plaid/models/wallet_transaction' require 'plaid/models/wallet_transaction_amount' @@ -662,10 +795,29 @@ require 'plaid/models/wallet_transaction_counterparty_numbers' require 'plaid/models/wallet_transaction_execute_request' require 'plaid/models/wallet_transaction_execute_response' +require 'plaid/models/wallet_transaction_get_request' +require 'plaid/models/wallet_transaction_get_response' require 'plaid/models/wallet_transaction_status' 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_review_list' +require 'plaid/models/watchlist_screening_hit' +require 'plaid/models/watchlist_screening_hit_list' +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_list' +require 'plaid/models/watchlist_screening_request_search_terms' +require 'plaid/models/watchlist_screening_review' +require 'plaid/models/watchlist_screening_review_list' +require 'plaid/models/watchlist_screening_search_terms' +require 'plaid/models/watchlist_screening_status' +require 'plaid/models/weak_alias_determination' 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 d785caec4..ff502c0af 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -2294,6 +2294,136 @@ def credit_payroll_income_refresh_with_http_info(credit_payroll_income_refresh_r return data, status_code, headers end + # List dashboard users + # List all dashboard users associated with your account. + # @param list_dashboard_user_request [ListDashboardUserRequest] + # @param [Hash] opts the optional parameters + # @return [PaginatedDashboardUserList] + def dashboard_user_list(list_dashboard_user_request, opts = {}) + data, _status_code, _headers = dashboard_user_list_with_http_info(list_dashboard_user_request, opts) + data + end + + # List dashboard users + # List all dashboard users associated with your account. + # @param list_dashboard_user_request [ListDashboardUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(PaginatedDashboardUserList, Integer, Hash)>] PaginatedDashboardUserList data, response status code and response headers + def dashboard_user_list_with_http_info(list_dashboard_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.dashboard_user_list ...' + 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" + 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(list_dashboard_user_request) + + # return_type + return_type = opts[:debug_return_type] || 'PaginatedDashboardUserList' + + # 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 + + # Retrieve a dashboard user + # Retrieve information about a dashboard user. + # @param get_dashboard_user_request [GetDashboardUserRequest] + # @param [Hash] opts the optional parameters + # @return [DashboardUser] + def dashobard_user_get(get_dashboard_user_request, opts = {}) + data, _status_code, _headers = dashobard_user_get_with_http_info(get_dashboard_user_request, opts) + data + end + + # Retrieve a dashboard user + # Retrieve information about a dashboard user. + # @param get_dashboard_user_request [GetDashboardUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(DashboardUser, Integer, Hash)>] DashboardUser data, response status code and response headers + def dashobard_user_get_with_http_info(get_dashboard_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.dashobard_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" + end + # resource path + local_var_path = '/dashboard_user/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(get_dashboard_user_request) + + # return_type + return_type = opts[:debug_return_type] || 'DashboardUser' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.dashobard_user_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#dashobard_user_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create a deposit switch without using Plaid Exchange # This endpoint provides an alternative to `/deposit_switch/create` for customers who have not yet fully integrated with Plaid Exchange. Like `/deposit_switch/create`, it creates a deposit switch entity that will be persisted throughout the lifecycle of the switch. # @param deposit_switch_alt_create_request [DepositSwitchAltCreateRequest] @@ -2749,31 +2879,31 @@ def identity_get_with_http_info(identity_get_request, opts = {}) return data, status_code, headers end - # (Deprecated) Create an income verification instance - # `/income/verification/create` begins the income verification process by returning an `income_verification_id`. You can then provide the `income_verification_id` to `/link/token/create` under the `income_verification` parameter in order to create a Link instance that will prompt the user to go through the income verification flow. Plaid will fire an `INCOME` webhook once the user completes the Payroll Income flow, or when the uploaded documents in the Document Income flow have finished processing. - # @param income_verification_create_request [IncomeVerificationCreateRequest] + # Create a new identity verification + # 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 `\"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 [IncomeVerificationCreateResponse] - def income_verification_create(income_verification_create_request, opts = {}) - data, _status_code, _headers = income_verification_create_with_http_info(income_verification_create_request, opts) + # @return [IdentityVerification] + 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 end - # (Deprecated) Create an income verification instance - # `/income/verification/create` begins the income verification process by returning an `income_verification_id`. You can then provide the `income_verification_id` to `/link/token/create` under the `income_verification` parameter in order to create a Link instance that will prompt the user to go through the income verification flow. Plaid will fire an `INCOME` webhook once the user completes the Payroll Income flow, or when the uploaded documents in the Document Income flow have finished processing. - # @param income_verification_create_request [IncomeVerificationCreateRequest] + # Create a new identity verification + # 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 `\"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<(IncomeVerificationCreateResponse, Integer, Hash)>] IncomeVerificationCreateResponse data, response status code and response headers - def income_verification_create_with_http_info(income_verification_create_request, opts = {}) + # @return [Array<(IdentityVerification, Integer, Hash)>] IdentityVerification 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.income_verification_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.identity_verification_create ...' end - # verify the required parameter 'income_verification_create_request' is set - if @api_client.config.client_side_validation && income_verification_create_request.nil? - fail ArgumentError, "Missing the required parameter 'income_verification_create_request' when calling PlaidApi.income_verification_create" + # verify the required parameter 'identity_verification_create_request' is set + if @api_client.config.client_side_validation && identity_verification_create_request.nil? + fail ArgumentError, "Missing the required parameter 'identity_verification_create_request' when calling PlaidApi.identity_verification_create" end # resource path - local_var_path = '/income/verification/create' + local_var_path = '/identity_verification/create' # query parameters query_params = opts[:query_params] || {} @@ -2789,16 +2919,16 @@ def income_verification_create_with_http_info(income_verification_create_request form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(income_verification_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(identity_verification_create_request) # return_type - return_type = opts[:debug_return_type] || 'IncomeVerificationCreateResponse' + return_type = opts[:debug_return_type] || 'IdentityVerification' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.income_verification_create", + :operation => :"PlaidApi.identity_verification_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2809,36 +2939,36 @@ def income_verification_create_with_http_info(income_verification_create_request 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#income_verification_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#identity_verification_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # (Deprecated) Download the original documents used for income verification - # `/income/verification/documents/download` provides the ability to download the source documents associated with the verification. If Document Income was used, the documents will be those the user provided in Link. For Payroll Income, the most recent files available for download from the payroll provider will be available from this endpoint. The response to `/income/verification/documents/download` is a ZIP file in binary data. If a `document_id` is passed, a single document will be contained in this file. If not, the response will contain all documents associated with the verification. The `request_id` is returned in the `Plaid-Request-ID` header. - # @param income_verification_documents_download_request [IncomeVerificationDocumentsDownloadRequest] + # Retrieve Identity Verification + # Retrieve a previously created identity verification + # @param get_identity_verification_request [GetIdentityVerificationRequest] # @param [Hash] opts the optional parameters - # @return [File] - def income_verification_documents_download(income_verification_documents_download_request, opts = {}) - data, _status_code, _headers = income_verification_documents_download_with_http_info(income_verification_documents_download_request, opts) + # @return [IdentityVerification] + def identity_verification_get(get_identity_verification_request, opts = {}) + data, _status_code, _headers = identity_verification_get_with_http_info(get_identity_verification_request, opts) data end - # (Deprecated) Download the original documents used for income verification - # `/income/verification/documents/download` provides the ability to download the source documents associated with the verification. If Document Income was used, the documents will be those the user provided in Link. For Payroll Income, the most recent files available for download from the payroll provider will be available from this endpoint. The response to `/income/verification/documents/download` is a ZIP file in binary data. If a `document_id` is passed, a single document will be contained in this file. If not, the response will contain all documents associated with the verification. The `request_id` is returned in the `Plaid-Request-ID` header. - # @param income_verification_documents_download_request [IncomeVerificationDocumentsDownloadRequest] + # Retrieve Identity Verification + # Retrieve a previously created identity verification + # @param get_identity_verification_request [GetIdentityVerificationRequest] # @param [Hash] opts the optional parameters - # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers - def income_verification_documents_download_with_http_info(income_verification_documents_download_request, opts = {}) + # @return [Array<(IdentityVerification, Integer, Hash)>] IdentityVerification data, response status code and response headers + def identity_verification_get_with_http_info(get_identity_verification_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.income_verification_documents_download ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.identity_verification_get ...' end - # verify the required parameter 'income_verification_documents_download_request' is set - if @api_client.config.client_side_validation && income_verification_documents_download_request.nil? - fail ArgumentError, "Missing the required parameter 'income_verification_documents_download_request' when calling PlaidApi.income_verification_documents_download" + # 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" end # resource path - local_var_path = '/income/verification/documents/download' + local_var_path = '/identity_verification/get' # query parameters query_params = opts[:query_params] || {} @@ -2846,7 +2976,7 @@ def income_verification_documents_download_with_http_info(income_verification_do # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/zip']) + 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']) @@ -2854,16 +2984,16 @@ def income_verification_documents_download_with_http_info(income_verification_do form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(income_verification_documents_download_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(get_identity_verification_request) # return_type - return_type = opts[:debug_return_type] || 'File' + return_type = opts[:debug_return_type] || 'IdentityVerification' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.income_verification_documents_download", + :operation => :"PlaidApi.identity_verification_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2874,36 +3004,36 @@ def income_verification_documents_download_with_http_info(income_verification_do 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#income_verification_documents_download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#identity_verification_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # (Deprecated) Retrieve information from the paystubs used for income verification - # `/income/verification/paystubs/get` returns the information collected from the paystubs that were used to verify an end user''s income. It can be called once the status of the verification has been set to `VERIFICATION_STATUS_PROCESSING_COMPLETE`, as reported by the `INCOME: verification_status` webhook. Attempting to call the endpoint before verification has been completed will result in an error. This endpoint has been deprecated; new integrations should use `/credit/payroll_income/get` instead. - # @param income_verification_paystubs_get_request [IncomeVerificationPaystubsGetRequest] + # List Identity Verifications + # Filter and list Identity Verifications created by your account + # @param list_identity_verification_request [ListIdentityVerificationRequest] # @param [Hash] opts the optional parameters - # @return [IncomeVerificationPaystubsGetResponse] - def income_verification_paystubs_get(income_verification_paystubs_get_request, opts = {}) - data, _status_code, _headers = income_verification_paystubs_get_with_http_info(income_verification_paystubs_get_request, opts) + # @return [PaginatedIdentityVerificationPaginatedList] + def identity_verification_list(list_identity_verification_request, opts = {}) + data, _status_code, _headers = identity_verification_list_with_http_info(list_identity_verification_request, opts) data end - # (Deprecated) Retrieve information from the paystubs used for income verification - # `/income/verification/paystubs/get` returns the information collected from the paystubs that were used to verify an end user''s income. It can be called once the status of the verification has been set to `VERIFICATION_STATUS_PROCESSING_COMPLETE`, as reported by the `INCOME: verification_status` webhook. Attempting to call the endpoint before verification has been completed will result in an error. This endpoint has been deprecated; new integrations should use `/credit/payroll_income/get` instead. - # @param income_verification_paystubs_get_request [IncomeVerificationPaystubsGetRequest] + # List Identity Verifications + # Filter and list Identity Verifications created by your account + # @param list_identity_verification_request [ListIdentityVerificationRequest] # @param [Hash] opts the optional parameters - # @return [Array<(IncomeVerificationPaystubsGetResponse, Integer, Hash)>] IncomeVerificationPaystubsGetResponse data, response status code and response headers - def income_verification_paystubs_get_with_http_info(income_verification_paystubs_get_request, opts = {}) + # @return [Array<(PaginatedIdentityVerificationPaginatedList, Integer, Hash)>] PaginatedIdentityVerificationPaginatedList data, response status code and response headers + def identity_verification_list_with_http_info(list_identity_verification_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.income_verification_paystubs_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.identity_verification_list ...' end - # verify the required parameter 'income_verification_paystubs_get_request' is set - if @api_client.config.client_side_validation && income_verification_paystubs_get_request.nil? - fail ArgumentError, "Missing the required parameter 'income_verification_paystubs_get_request' when calling PlaidApi.income_verification_paystubs_get" + # 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" end # resource path - local_var_path = '/income/verification/paystubs/get' + local_var_path = '/identity_verification/list' # query parameters query_params = opts[:query_params] || {} @@ -2919,16 +3049,16 @@ def income_verification_paystubs_get_with_http_info(income_verification_paystubs form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(income_verification_paystubs_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(list_identity_verification_request) # return_type - return_type = opts[:debug_return_type] || 'IncomeVerificationPaystubsGetResponse' + return_type = opts[:debug_return_type] || 'PaginatedIdentityVerificationPaginatedList' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.income_verification_paystubs_get", + :operation => :"PlaidApi.identity_verification_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2939,36 +3069,36 @@ def income_verification_paystubs_get_with_http_info(income_verification_paystubs 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#income_verification_paystubs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#identity_verification_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # (Deprecated) Check digital income verification eligibility and optimize conversion - # `/income/verification/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 and returns a `precheck_id` that can be provided to `/link/token/create`. If the user is eligible for digital verification, providing the `precheck_id` 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 `precheck_id` can still be provided to `/link/token/create` and 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 either `employer` or `transactions_access_tokens` data will increase the chance of receiving a useful result. This endpoint has been deprecated; new integrations should use `/credit/payroll_income/precheck` instead. - # @param income_verification_precheck_request [IncomeVerificationPrecheckRequest] + # Retry an Identity Verification + # Allow a customer to retry their identity verification + # @param identity_verification_retry_request [IdentityVerificationRetryRequest] # @param [Hash] opts the optional parameters - # @return [IncomeVerificationPrecheckResponse] - def income_verification_precheck(income_verification_precheck_request, opts = {}) - data, _status_code, _headers = income_verification_precheck_with_http_info(income_verification_precheck_request, opts) + # @return [IdentityVerification] + 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 end - # (Deprecated) Check digital income verification eligibility and optimize conversion - # `/income/verification/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 and returns a `precheck_id` that can be provided to `/link/token/create`. If the user is eligible for digital verification, providing the `precheck_id` 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 `precheck_id` can still be provided to `/link/token/create` and 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 either `employer` or `transactions_access_tokens` data will increase the chance of receiving a useful result. This endpoint has been deprecated; new integrations should use `/credit/payroll_income/precheck` instead. - # @param income_verification_precheck_request [IncomeVerificationPrecheckRequest] + # Retry an Identity Verification + # Allow a customer to retry their identity verification + # @param identity_verification_retry_request [IdentityVerificationRetryRequest] # @param [Hash] opts the optional parameters - # @return [Array<(IncomeVerificationPrecheckResponse, Integer, Hash)>] IncomeVerificationPrecheckResponse data, response status code and response headers - def income_verification_precheck_with_http_info(income_verification_precheck_request, opts = {}) + # @return [Array<(IdentityVerification, Integer, Hash)>] IdentityVerification 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.income_verification_precheck ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.identity_verification_retry ...' end - # verify the required parameter 'income_verification_precheck_request' is set - if @api_client.config.client_side_validation && income_verification_precheck_request.nil? - fail ArgumentError, "Missing the required parameter 'income_verification_precheck_request' when calling PlaidApi.income_verification_precheck" + # verify the required parameter 'identity_verification_retry_request' is set + if @api_client.config.client_side_validation && identity_verification_retry_request.nil? + fail ArgumentError, "Missing the required parameter 'identity_verification_retry_request' when calling PlaidApi.identity_verification_retry" end # resource path - local_var_path = '/income/verification/precheck' + local_var_path = '/identity_verification/retry' # query parameters query_params = opts[:query_params] || {} @@ -2984,16 +3114,16 @@ def income_verification_precheck_with_http_info(income_verification_precheck_req form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(income_verification_precheck_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(identity_verification_retry_request) # return_type - return_type = opts[:debug_return_type] || 'IncomeVerificationPrecheckResponse' + return_type = opts[:debug_return_type] || 'IdentityVerification' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.income_verification_precheck", + :operation => :"PlaidApi.identity_verification_retry", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3004,36 +3134,36 @@ def income_verification_precheck_with_http_info(income_verification_precheck_req 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#income_verification_precheck\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#identity_verification_retry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # (Deprecated) Refresh an income verification - # `/income/verification/refresh` refreshes a given income verification. - # @param income_verification_refresh_request [IncomeVerificationRefreshRequest] + # (Deprecated) Create an income verification instance + # `/income/verification/create` begins the income verification process by returning an `income_verification_id`. You can then provide the `income_verification_id` to `/link/token/create` under the `income_verification` parameter in order to create a Link instance that will prompt the user to go through the income verification flow. Plaid will fire an `INCOME` webhook once the user completes the Payroll Income flow, or when the uploaded documents in the Document Income flow have finished processing. + # @param income_verification_create_request [IncomeVerificationCreateRequest] # @param [Hash] opts the optional parameters - # @return [IncomeVerificationRefreshResponse] - def income_verification_refresh(income_verification_refresh_request, opts = {}) - data, _status_code, _headers = income_verification_refresh_with_http_info(income_verification_refresh_request, opts) + # @return [IncomeVerificationCreateResponse] + def income_verification_create(income_verification_create_request, opts = {}) + data, _status_code, _headers = income_verification_create_with_http_info(income_verification_create_request, opts) data end - # (Deprecated) Refresh an income verification - # `/income/verification/refresh` refreshes a given income verification. - # @param income_verification_refresh_request [IncomeVerificationRefreshRequest] + # (Deprecated) Create an income verification instance + # `/income/verification/create` begins the income verification process by returning an `income_verification_id`. You can then provide the `income_verification_id` to `/link/token/create` under the `income_verification` parameter in order to create a Link instance that will prompt the user to go through the income verification flow. Plaid will fire an `INCOME` webhook once the user completes the Payroll Income flow, or when the uploaded documents in the Document Income flow have finished processing. + # @param income_verification_create_request [IncomeVerificationCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(IncomeVerificationRefreshResponse, Integer, Hash)>] IncomeVerificationRefreshResponse data, response status code and response headers - def income_verification_refresh_with_http_info(income_verification_refresh_request, opts = {}) + # @return [Array<(IncomeVerificationCreateResponse, Integer, Hash)>] IncomeVerificationCreateResponse data, response status code and response headers + def income_verification_create_with_http_info(income_verification_create_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.income_verification_refresh ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.income_verification_create ...' end - # verify the required parameter 'income_verification_refresh_request' is set - if @api_client.config.client_side_validation && income_verification_refresh_request.nil? - fail ArgumentError, "Missing the required parameter 'income_verification_refresh_request' when calling PlaidApi.income_verification_refresh" + # verify the required parameter 'income_verification_create_request' is set + if @api_client.config.client_side_validation && income_verification_create_request.nil? + fail ArgumentError, "Missing the required parameter 'income_verification_create_request' when calling PlaidApi.income_verification_create" end # resource path - local_var_path = '/income/verification/refresh' + local_var_path = '/income/verification/create' # query parameters query_params = opts[:query_params] || {} @@ -3049,16 +3179,16 @@ def income_verification_refresh_with_http_info(income_verification_refresh_reque form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(income_verification_refresh_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(income_verification_create_request) # return_type - return_type = opts[:debug_return_type] || 'IncomeVerificationRefreshResponse' + return_type = opts[:debug_return_type] || 'IncomeVerificationCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.income_verification_refresh", + :operation => :"PlaidApi.income_verification_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3069,36 +3199,36 @@ def income_verification_refresh_with_http_info(income_verification_refresh_reque 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#income_verification_refresh\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#income_verification_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # (Deprecated) Retrieve information from the tax documents used for income verification - # `/income/verification/taxforms/get` returns the information collected from forms that were used to verify an end user''s income. It can be called once the status of the verification has been set to `VERIFICATION_STATUS_PROCESSING_COMPLETE`, as reported by the `INCOME: verification_status` webhook. Attempting to call the endpoint before verification has been completed will result in an error. This endpoint has been deprecated; new integrations should use `/credit/payroll_income/get` instead. - # @param request_body [Hash] + # (Deprecated) Download the original documents used for income verification + # `/income/verification/documents/download` provides the ability to download the source documents associated with the verification. If Document Income was used, the documents will be those the user provided in Link. For Payroll Income, the most recent files available for download from the payroll provider will be available from this endpoint. The response to `/income/verification/documents/download` is a ZIP file in binary data. If a `document_id` is passed, a single document will be contained in this file. If not, the response will contain all documents associated with the verification. The `request_id` is returned in the `Plaid-Request-ID` header. + # @param income_verification_documents_download_request [IncomeVerificationDocumentsDownloadRequest] # @param [Hash] opts the optional parameters - # @return [IncomeVerificationTaxformsGetResponse] - def income_verification_taxforms_get(request_body, opts = {}) - data, _status_code, _headers = income_verification_taxforms_get_with_http_info(request_body, opts) + # @return [File] + def income_verification_documents_download(income_verification_documents_download_request, opts = {}) + data, _status_code, _headers = income_verification_documents_download_with_http_info(income_verification_documents_download_request, opts) data end - # (Deprecated) Retrieve information from the tax documents used for income verification - # `/income/verification/taxforms/get` returns the information collected from forms that were used to verify an end user''s income. It can be called once the status of the verification has been set to `VERIFICATION_STATUS_PROCESSING_COMPLETE`, as reported by the `INCOME: verification_status` webhook. Attempting to call the endpoint before verification has been completed will result in an error. This endpoint has been deprecated; new integrations should use `/credit/payroll_income/get` instead. - # @param request_body [Hash] + # (Deprecated) Download the original documents used for income verification + # `/income/verification/documents/download` provides the ability to download the source documents associated with the verification. If Document Income was used, the documents will be those the user provided in Link. For Payroll Income, the most recent files available for download from the payroll provider will be available from this endpoint. The response to `/income/verification/documents/download` is a ZIP file in binary data. If a `document_id` is passed, a single document will be contained in this file. If not, the response will contain all documents associated with the verification. The `request_id` is returned in the `Plaid-Request-ID` header. + # @param income_verification_documents_download_request [IncomeVerificationDocumentsDownloadRequest] # @param [Hash] opts the optional parameters - # @return [Array<(IncomeVerificationTaxformsGetResponse, Integer, Hash)>] IncomeVerificationTaxformsGetResponse data, response status code and response headers - def income_verification_taxforms_get_with_http_info(request_body, opts = {}) + # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers + def income_verification_documents_download_with_http_info(income_verification_documents_download_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.income_verification_taxforms_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.income_verification_documents_download ...' 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.income_verification_taxforms_get" + # verify the required parameter 'income_verification_documents_download_request' is set + if @api_client.config.client_side_validation && income_verification_documents_download_request.nil? + fail ArgumentError, "Missing the required parameter 'income_verification_documents_download_request' when calling PlaidApi.income_verification_documents_download" end # resource path - local_var_path = '/income/verification/taxforms/get' + local_var_path = '/income/verification/documents/download' # query parameters query_params = opts[:query_params] || {} @@ -3106,7 +3236,7 @@ def income_verification_taxforms_get_with_http_info(request_body, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['application/zip']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -3114,16 +3244,16 @@ def income_verification_taxforms_get_with_http_info(request_body, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) + post_body = opts[:debug_body] || @api_client.object_to_http_body(income_verification_documents_download_request) # return_type - return_type = opts[:debug_return_type] || 'IncomeVerificationTaxformsGetResponse' + return_type = opts[:debug_return_type] || 'File' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.income_verification_taxforms_get", + :operation => :"PlaidApi.income_verification_documents_download", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3134,36 +3264,1531 @@ def income_verification_taxforms_get_with_http_info(request_body, 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#income_verification_taxforms_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#income_verification_documents_download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get details of all supported institutions - # Returns a JSON response containing details on all financial institutions currently supported by Plaid. Because Plaid supports thousands of institutions, results are paginated. If there is no overlap between an institution’s enabled products and a client’s enabled products, then the institution will be filtered out from the response. As a result, the number of institutions returned may not match the count specified in the call. + # (Deprecated) Retrieve information from the paystubs used for income verification + # `/income/verification/paystubs/get` returns the information collected from the paystubs that were used to verify an end user''s income. It can be called once the status of the verification has been set to `VERIFICATION_STATUS_PROCESSING_COMPLETE`, as reported by the `INCOME: verification_status` webhook. Attempting to call the endpoint before verification has been completed will result in an error. This endpoint has been deprecated; new integrations should use `/credit/payroll_income/get` instead. + # @param income_verification_paystubs_get_request [IncomeVerificationPaystubsGetRequest] + # @param [Hash] opts the optional parameters + # @return [IncomeVerificationPaystubsGetResponse] + def income_verification_paystubs_get(income_verification_paystubs_get_request, opts = {}) + data, _status_code, _headers = income_verification_paystubs_get_with_http_info(income_verification_paystubs_get_request, opts) + data + end + + # (Deprecated) Retrieve information from the paystubs used for income verification + # `/income/verification/paystubs/get` returns the information collected from the paystubs that were used to verify an end user''s income. It can be called once the status of the verification has been set to `VERIFICATION_STATUS_PROCESSING_COMPLETE`, as reported by the `INCOME: verification_status` webhook. Attempting to call the endpoint before verification has been completed will result in an error. This endpoint has been deprecated; new integrations should use `/credit/payroll_income/get` instead. + # @param income_verification_paystubs_get_request [IncomeVerificationPaystubsGetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(IncomeVerificationPaystubsGetResponse, Integer, Hash)>] IncomeVerificationPaystubsGetResponse data, response status code and response headers + def income_verification_paystubs_get_with_http_info(income_verification_paystubs_get_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.income_verification_paystubs_get ...' + end + # verify the required parameter 'income_verification_paystubs_get_request' is set + if @api_client.config.client_side_validation && income_verification_paystubs_get_request.nil? + fail ArgumentError, "Missing the required parameter 'income_verification_paystubs_get_request' when calling PlaidApi.income_verification_paystubs_get" + end + # resource path + local_var_path = '/income/verification/paystubs/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(income_verification_paystubs_get_request) + + # return_type + return_type = opts[:debug_return_type] || 'IncomeVerificationPaystubsGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.income_verification_paystubs_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#income_verification_paystubs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # (Deprecated) Check digital income verification eligibility and optimize conversion + # `/income/verification/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 and returns a `precheck_id` that can be provided to `/link/token/create`. If the user is eligible for digital verification, providing the `precheck_id` 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 `precheck_id` can still be provided to `/link/token/create` and 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 either `employer` or `transactions_access_tokens` data will increase the chance of receiving a useful result. This endpoint has been deprecated; new integrations should use `/credit/payroll_income/precheck` instead. + # @param income_verification_precheck_request [IncomeVerificationPrecheckRequest] + # @param [Hash] opts the optional parameters + # @return [IncomeVerificationPrecheckResponse] + def income_verification_precheck(income_verification_precheck_request, opts = {}) + data, _status_code, _headers = income_verification_precheck_with_http_info(income_verification_precheck_request, opts) + data + end + + # (Deprecated) Check digital income verification eligibility and optimize conversion + # `/income/verification/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 and returns a `precheck_id` that can be provided to `/link/token/create`. If the user is eligible for digital verification, providing the `precheck_id` 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 `precheck_id` can still be provided to `/link/token/create` and 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 either `employer` or `transactions_access_tokens` data will increase the chance of receiving a useful result. This endpoint has been deprecated; new integrations should use `/credit/payroll_income/precheck` instead. + # @param income_verification_precheck_request [IncomeVerificationPrecheckRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(IncomeVerificationPrecheckResponse, Integer, Hash)>] IncomeVerificationPrecheckResponse data, response status code and response headers + def income_verification_precheck_with_http_info(income_verification_precheck_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.income_verification_precheck ...' + end + # verify the required parameter 'income_verification_precheck_request' is set + if @api_client.config.client_side_validation && income_verification_precheck_request.nil? + fail ArgumentError, "Missing the required parameter 'income_verification_precheck_request' when calling PlaidApi.income_verification_precheck" + end + # resource path + local_var_path = '/income/verification/precheck' + + # 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(income_verification_precheck_request) + + # return_type + return_type = opts[:debug_return_type] || 'IncomeVerificationPrecheckResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.income_verification_precheck", + :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#income_verification_precheck\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # (Deprecated) Refresh an income verification + # `/income/verification/refresh` refreshes a given income verification. + # @param income_verification_refresh_request [IncomeVerificationRefreshRequest] + # @param [Hash] opts the optional parameters + # @return [IncomeVerificationRefreshResponse] + def income_verification_refresh(income_verification_refresh_request, opts = {}) + data, _status_code, _headers = income_verification_refresh_with_http_info(income_verification_refresh_request, opts) + data + end + + # (Deprecated) Refresh an income verification + # `/income/verification/refresh` refreshes a given income verification. + # @param income_verification_refresh_request [IncomeVerificationRefreshRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(IncomeVerificationRefreshResponse, Integer, Hash)>] IncomeVerificationRefreshResponse data, response status code and response headers + def income_verification_refresh_with_http_info(income_verification_refresh_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.income_verification_refresh ...' + end + # verify the required parameter 'income_verification_refresh_request' is set + if @api_client.config.client_side_validation && income_verification_refresh_request.nil? + fail ArgumentError, "Missing the required parameter 'income_verification_refresh_request' when calling PlaidApi.income_verification_refresh" + end + # resource path + local_var_path = '/income/verification/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(income_verification_refresh_request) + + # return_type + return_type = opts[:debug_return_type] || 'IncomeVerificationRefreshResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.income_verification_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#income_verification_refresh\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # (Deprecated) Retrieve information from the tax documents used for income verification + # `/income/verification/taxforms/get` returns the information collected from forms that were used to verify an end user''s income. It can be called once the status of the verification has been set to `VERIFICATION_STATUS_PROCESSING_COMPLETE`, as reported by the `INCOME: verification_status` webhook. Attempting to call the endpoint before verification has been completed will result in an error. This endpoint has been deprecated; new integrations should use `/credit/payroll_income/get` instead. + # @param request_body [Hash] + # @param [Hash] opts the optional parameters + # @return [IncomeVerificationTaxformsGetResponse] + def income_verification_taxforms_get(request_body, opts = {}) + data, _status_code, _headers = income_verification_taxforms_get_with_http_info(request_body, opts) + data + end + + # (Deprecated) Retrieve information from the tax documents used for income verification + # `/income/verification/taxforms/get` returns the information collected from forms that were used to verify an end user''s income. It can be called once the status of the verification has been set to `VERIFICATION_STATUS_PROCESSING_COMPLETE`, as reported by the `INCOME: verification_status` webhook. Attempting to call the endpoint before verification has been completed will result in an error. This endpoint has been deprecated; new integrations should use `/credit/payroll_income/get` instead. + # @param request_body [Hash] + # @param [Hash] opts the optional parameters + # @return [Array<(IncomeVerificationTaxformsGetResponse, Integer, Hash)>] IncomeVerificationTaxformsGetResponse data, response status code and response headers + def income_verification_taxforms_get_with_http_info(request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.income_verification_taxforms_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.income_verification_taxforms_get" + end + # resource path + local_var_path = '/income/verification/taxforms/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] || 'IncomeVerificationTaxformsGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.income_verification_taxforms_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#income_verification_taxforms_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get details of all supported institutions + # Returns a JSON response containing details on all financial institutions currently supported by Plaid. Because Plaid supports thousands of institutions, results are paginated. If there is no overlap between an institution’s enabled products and a client’s enabled products, then the institution will be filtered out from the response. As a result, the number of institutions returned may not match the count specified in the call. # @param institutions_get_request [InstitutionsGetRequest] # @param [Hash] opts the optional parameters - # @return [InstitutionsGetResponse] - def institutions_get(institutions_get_request, opts = {}) - data, _status_code, _headers = institutions_get_with_http_info(institutions_get_request, opts) + # @return [InstitutionsGetResponse] + def institutions_get(institutions_get_request, opts = {}) + data, _status_code, _headers = institutions_get_with_http_info(institutions_get_request, opts) + data + end + + # Get details of all supported institutions + # Returns a JSON response containing details on all financial institutions currently supported by Plaid. Because Plaid supports thousands of institutions, results are paginated. If there is no overlap between an institution’s enabled products and a client’s enabled products, then the institution will be filtered out from the response. As a result, the number of institutions returned may not match the count specified in the call. + # @param institutions_get_request [InstitutionsGetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(InstitutionsGetResponse, Integer, Hash)>] InstitutionsGetResponse data, response status code and response headers + def institutions_get_with_http_info(institutions_get_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.institutions_get ...' + end + # verify the required parameter 'institutions_get_request' is set + if @api_client.config.client_side_validation && institutions_get_request.nil? + fail ArgumentError, "Missing the required parameter 'institutions_get_request' when calling PlaidApi.institutions_get" + end + # resource path + local_var_path = '/institutions/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(institutions_get_request) + + # return_type + return_type = opts[:debug_return_type] || 'InstitutionsGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.institutions_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#institutions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get details of an institution + # Returns a JSON response containing details on a specified financial institution currently supported by Plaid. Versioning note: API versions 2019-05-29 and earlier allow use of the `public_key` parameter instead of the `client_id` and `secret` to authenticate to this endpoint. The `public_key` has been deprecated; all customers are encouraged to use `client_id` and `secret` instead. + # @param institutions_get_by_id_request [InstitutionsGetByIdRequest] + # @param [Hash] opts the optional parameters + # @return [InstitutionsGetByIdResponse] + def institutions_get_by_id(institutions_get_by_id_request, opts = {}) + data, _status_code, _headers = institutions_get_by_id_with_http_info(institutions_get_by_id_request, opts) + data + end + + # Get details of an institution + # Returns a JSON response containing details on a specified financial institution currently supported by Plaid. Versioning note: API versions 2019-05-29 and earlier allow use of the `public_key` parameter instead of the `client_id` and `secret` to authenticate to this endpoint. The `public_key` has been deprecated; all customers are encouraged to use `client_id` and `secret` instead. + # @param institutions_get_by_id_request [InstitutionsGetByIdRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(InstitutionsGetByIdResponse, Integer, Hash)>] InstitutionsGetByIdResponse data, response status code and response headers + def institutions_get_by_id_with_http_info(institutions_get_by_id_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.institutions_get_by_id ...' + end + # verify the required parameter 'institutions_get_by_id_request' is set + if @api_client.config.client_side_validation && institutions_get_by_id_request.nil? + fail ArgumentError, "Missing the required parameter 'institutions_get_by_id_request' when calling PlaidApi.institutions_get_by_id" + end + # resource path + local_var_path = '/institutions/get_by_id' + + # 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(institutions_get_by_id_request) + + # return_type + return_type = opts[:debug_return_type] || 'InstitutionsGetByIdResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.institutions_get_by_id", + :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#institutions_get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Search institutions + # Returns a JSON response containing details for institutions that match the query parameters, up to a maximum of ten institutions per query. Versioning note: API versions 2019-05-29 and earlier allow use of the `public_key` parameter instead of the `client_id` and `secret` parameters to authenticate to this endpoint. The `public_key` parameter has since been deprecated; all customers are encouraged to use `client_id` and `secret` instead. + # @param institutions_search_request [InstitutionsSearchRequest] + # @param [Hash] opts the optional parameters + # @return [InstitutionsSearchResponse] + def institutions_search(institutions_search_request, opts = {}) + data, _status_code, _headers = institutions_search_with_http_info(institutions_search_request, opts) + data + end + + # Search institutions + # Returns a JSON response containing details for institutions that match the query parameters, up to a maximum of ten institutions per query. Versioning note: API versions 2019-05-29 and earlier allow use of the `public_key` parameter instead of the `client_id` and `secret` parameters to authenticate to this endpoint. The `public_key` parameter has since been deprecated; all customers are encouraged to use `client_id` and `secret` instead. + # @param institutions_search_request [InstitutionsSearchRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(InstitutionsSearchResponse, Integer, Hash)>] InstitutionsSearchResponse data, response status code and response headers + def institutions_search_with_http_info(institutions_search_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.institutions_search ...' + end + # verify the required parameter 'institutions_search_request' is set + if @api_client.config.client_side_validation && institutions_search_request.nil? + fail ArgumentError, "Missing the required parameter 'institutions_search_request' when calling PlaidApi.institutions_search" + end + # resource path + local_var_path = '/institutions/search' + + # 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(institutions_search_request) + + # return_type + return_type = opts[:debug_return_type] || 'InstitutionsSearchResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.institutions_search", + :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#institutions_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get Investment holdings + # The `/investments/holdings/get` endpoint allows developers to receive user-authorized stock position data for `investment`-type accounts. + # @param investments_holdings_get_request [InvestmentsHoldingsGetRequest] + # @param [Hash] opts the optional parameters + # @return [InvestmentsHoldingsGetResponse] + def investments_holdings_get(investments_holdings_get_request, opts = {}) + data, _status_code, _headers = investments_holdings_get_with_http_info(investments_holdings_get_request, opts) + data + end + + # Get Investment holdings + # The `/investments/holdings/get` endpoint allows developers to receive user-authorized stock position data for `investment`-type accounts. + # @param investments_holdings_get_request [InvestmentsHoldingsGetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(InvestmentsHoldingsGetResponse, Integer, Hash)>] InvestmentsHoldingsGetResponse data, response status code and response headers + def investments_holdings_get_with_http_info(investments_holdings_get_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.investments_holdings_get ...' + end + # verify the required parameter 'investments_holdings_get_request' is set + if @api_client.config.client_side_validation && investments_holdings_get_request.nil? + fail ArgumentError, "Missing the required parameter 'investments_holdings_get_request' when calling PlaidApi.investments_holdings_get" + end + # resource path + local_var_path = '/investments/holdings/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(investments_holdings_get_request) + + # return_type + return_type = opts[:debug_return_type] || 'InvestmentsHoldingsGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.investments_holdings_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#investments_holdings_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get investment transactions + # The `/investments/transactions/get` endpoint allows developers to retrieve user-authorized transaction data for investment accounts. Transactions are returned in reverse-chronological order, and the sequence of transaction ordering is stable and will not shift. Due to the potentially large number of investment transactions associated with an Item, results are paginated. Manipulate the count and offset parameters in conjunction with the `total_investment_transactions` response body field to fetch all available investment transactions. + # @param investments_transactions_get_request [InvestmentsTransactionsGetRequest] + # @param [Hash] opts the optional parameters + # @return [InvestmentsTransactionsGetResponse] + def investments_transactions_get(investments_transactions_get_request, opts = {}) + data, _status_code, _headers = investments_transactions_get_with_http_info(investments_transactions_get_request, opts) + data + end + + # Get investment transactions + # The `/investments/transactions/get` endpoint allows developers to retrieve user-authorized transaction data for investment accounts. Transactions are returned in reverse-chronological order, and the sequence of transaction ordering is stable and will not shift. Due to the potentially large number of investment transactions associated with an Item, results are paginated. Manipulate the count and offset parameters in conjunction with the `total_investment_transactions` response body field to fetch all available investment transactions. + # @param investments_transactions_get_request [InvestmentsTransactionsGetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(InvestmentsTransactionsGetResponse, Integer, Hash)>] InvestmentsTransactionsGetResponse data, response status code and response headers + def investments_transactions_get_with_http_info(investments_transactions_get_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.investments_transactions_get ...' + end + # verify the required parameter 'investments_transactions_get_request' is set + if @api_client.config.client_side_validation && investments_transactions_get_request.nil? + fail ArgumentError, "Missing the required parameter 'investments_transactions_get_request' when calling PlaidApi.investments_transactions_get" + end + # resource path + local_var_path = '/investments/transactions/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(investments_transactions_get_request) + + # return_type + return_type = opts[:debug_return_type] || 'InvestmentsTransactionsGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.investments_transactions_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#investments_transactions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Invalidate access_token + # By default, the `access_token` associated with an Item does not expire and should be stored in a persistent, secure manner. You can use the `/item/access_token/invalidate` endpoint to rotate the `access_token` associated with an Item. The endpoint returns a new `access_token` and immediately invalidates the previous `access_token`. + # @param item_access_token_invalidate_request [ItemAccessTokenInvalidateRequest] + # @param [Hash] opts the optional parameters + # @return [ItemAccessTokenInvalidateResponse] + def item_access_token_invalidate(item_access_token_invalidate_request, opts = {}) + data, _status_code, _headers = item_access_token_invalidate_with_http_info(item_access_token_invalidate_request, opts) + data + end + + # Invalidate access_token + # By default, the `access_token` associated with an Item does not expire and should be stored in a persistent, secure manner. You can use the `/item/access_token/invalidate` endpoint to rotate the `access_token` associated with an Item. The endpoint returns a new `access_token` and immediately invalidates the previous `access_token`. + # @param item_access_token_invalidate_request [ItemAccessTokenInvalidateRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ItemAccessTokenInvalidateResponse, Integer, Hash)>] ItemAccessTokenInvalidateResponse data, response status code and response headers + def item_access_token_invalidate_with_http_info(item_access_token_invalidate_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.item_access_token_invalidate ...' + end + # verify the required parameter 'item_access_token_invalidate_request' is set + if @api_client.config.client_side_validation && item_access_token_invalidate_request.nil? + fail ArgumentError, "Missing the required parameter 'item_access_token_invalidate_request' when calling PlaidApi.item_access_token_invalidate" + end + # resource path + local_var_path = '/item/access_token/invalidate' + + # 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(item_access_token_invalidate_request) + + # return_type + return_type = opts[:debug_return_type] || 'ItemAccessTokenInvalidateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.item_access_token_invalidate", + :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#item_access_token_invalidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List a user’s connected applications + # List a user’s connected applications + # @param item_application_list_request [ItemApplicationListRequest] + # @param [Hash] opts the optional parameters + # @return [ItemApplicationListResponse] + def item_application_list(item_application_list_request, opts = {}) + data, _status_code, _headers = item_application_list_with_http_info(item_application_list_request, opts) + data + end + + # List a user’s connected applications + # List a user’s connected applications + # @param item_application_list_request [ItemApplicationListRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ItemApplicationListResponse, Integer, Hash)>] ItemApplicationListResponse data, response status code and response headers + def item_application_list_with_http_info(item_application_list_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.item_application_list ...' + end + # verify the required parameter 'item_application_list_request' is set + if @api_client.config.client_side_validation && item_application_list_request.nil? + fail ArgumentError, "Missing the required parameter 'item_application_list_request' when calling PlaidApi.item_application_list" + end + # resource path + local_var_path = '/item/application/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(item_application_list_request) + + # return_type + return_type = opts[:debug_return_type] || 'ItemApplicationListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.item_application_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#item_application_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update the scopes of access for a particular application + # Enable consumers to update product access on selected accounts for an application. + # @param item_application_scopes_update_request [ItemApplicationScopesUpdateRequest] + # @param [Hash] opts the optional parameters + # @return [ItemApplicationScopesUpdateResponse] + def item_application_scopes_update(item_application_scopes_update_request, opts = {}) + data, _status_code, _headers = item_application_scopes_update_with_http_info(item_application_scopes_update_request, opts) + data + end + + # Update the scopes of access for a particular application + # Enable consumers to update product access on selected accounts for an application. + # @param item_application_scopes_update_request [ItemApplicationScopesUpdateRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ItemApplicationScopesUpdateResponse, Integer, Hash)>] ItemApplicationScopesUpdateResponse data, response status code and response headers + def item_application_scopes_update_with_http_info(item_application_scopes_update_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.item_application_scopes_update ...' + end + # verify the required parameter 'item_application_scopes_update_request' is set + if @api_client.config.client_side_validation && item_application_scopes_update_request.nil? + fail ArgumentError, "Missing the required parameter 'item_application_scopes_update_request' when calling PlaidApi.item_application_scopes_update" + end + # resource path + local_var_path = '/item/application/scopes/update' + + # 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(item_application_scopes_update_request) + + # return_type + return_type = opts[:debug_return_type] || 'ItemApplicationScopesUpdateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.item_application_scopes_update", + :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#item_application_scopes_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create public token + # Note: As of July 2020, the `/item/public_token/create` endpoint is deprecated. Instead, use `/link/token/create` with an `access_token` to create a Link token for use with [update mode](https://plaid.com/docs/link/update-mode). If you need your user to take action to restore or resolve an error associated with an Item, generate a public token with the `/item/public_token/create` endpoint and then initialize Link with that `public_token`. A `public_token` is one-time use and expires after 30 minutes. You use a `public_token` to initialize Link in [update mode](https://plaid.com/docs/link/update-mode) for a particular Item. You can generate a `public_token` for an Item even if you did not use Link to create the Item originally. The `/item/public_token/create` endpoint is **not** used to create your initial `public_token`. If you have not already received an `access_token` for a specific Item, use Link to obtain your `public_token` instead. See the [Quickstart](https://plaid.com/docs/quickstart) for more information. + # @param item_public_token_create_request [ItemPublicTokenCreateRequest] + # @param [Hash] opts the optional parameters + # @return [ItemPublicTokenCreateResponse] + def item_create_public_token(item_public_token_create_request, opts = {}) + data, _status_code, _headers = item_create_public_token_with_http_info(item_public_token_create_request, opts) + data + end + + # Create public token + # Note: As of July 2020, the `/item/public_token/create` endpoint is deprecated. Instead, use `/link/token/create` with an `access_token` to create a Link token for use with [update mode](https://plaid.com/docs/link/update-mode). If you need your user to take action to restore or resolve an error associated with an Item, generate a public token with the `/item/public_token/create` endpoint and then initialize Link with that `public_token`. A `public_token` is one-time use and expires after 30 minutes. You use a `public_token` to initialize Link in [update mode](https://plaid.com/docs/link/update-mode) for a particular Item. You can generate a `public_token` for an Item even if you did not use Link to create the Item originally. The `/item/public_token/create` endpoint is **not** used to create your initial `public_token`. If you have not already received an `access_token` for a specific Item, use Link to obtain your `public_token` instead. See the [Quickstart](https://plaid.com/docs/quickstart) for more information. + # @param item_public_token_create_request [ItemPublicTokenCreateRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ItemPublicTokenCreateResponse, Integer, Hash)>] ItemPublicTokenCreateResponse data, response status code and response headers + def item_create_public_token_with_http_info(item_public_token_create_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.item_create_public_token ...' + end + # verify the required parameter 'item_public_token_create_request' is set + if @api_client.config.client_side_validation && item_public_token_create_request.nil? + fail ArgumentError, "Missing the required parameter 'item_public_token_create_request' when calling PlaidApi.item_create_public_token" + end + # resource path + local_var_path = '/item/public_token/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(item_public_token_create_request) + + # return_type + return_type = opts[:debug_return_type] || 'ItemPublicTokenCreateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.item_create_public_token", + :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#item_create_public_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve an Item + # Returns information about the status of an Item. + # @param item_get_request [ItemGetRequest] + # @param [Hash] opts the optional parameters + # @return [ItemGetResponse] + def item_get(item_get_request, opts = {}) + data, _status_code, _headers = item_get_with_http_info(item_get_request, opts) + data + end + + # Retrieve an Item + # Returns information about the status of an Item. + # @param item_get_request [ItemGetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ItemGetResponse, Integer, Hash)>] ItemGetResponse data, response status code and response headers + def item_get_with_http_info(item_get_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.item_get ...' + end + # verify the required parameter 'item_get_request' is set + if @api_client.config.client_side_validation && item_get_request.nil? + fail ArgumentError, "Missing the required parameter 'item_get_request' when calling PlaidApi.item_get" + end + # resource path + local_var_path = '/item/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(item_get_request) + + # return_type + return_type = opts[:debug_return_type] || 'ItemGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.item_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#item_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Import Item + # `/item/import` creates an Item via your Plaid Exchange Integration and returns an `access_token`. As part of an `/item/import` request, you will include a User ID (`user_auth.user_id`) and Authentication Token (`user_auth.auth_token`) that enable data aggregation through your Plaid Exchange API endpoints. These authentication principals are to be chosen by you. Upon creating an Item via `/item/import`, Plaid will automatically begin an extraction of that Item through the Plaid Exchange infrastructure you have already integrated. This will automatically generate the Plaid native account ID for the account the user will switch their direct deposit to (`target_account_id`). + # @param item_import_request [ItemImportRequest] + # @param [Hash] opts the optional parameters + # @return [ItemImportResponse] + def item_import(item_import_request, opts = {}) + data, _status_code, _headers = item_import_with_http_info(item_import_request, opts) + data + end + + # Import Item + # `/item/import` creates an Item via your Plaid Exchange Integration and returns an `access_token`. As part of an `/item/import` request, you will include a User ID (`user_auth.user_id`) and Authentication Token (`user_auth.auth_token`) that enable data aggregation through your Plaid Exchange API endpoints. These authentication principals are to be chosen by you. Upon creating an Item via `/item/import`, Plaid will automatically begin an extraction of that Item through the Plaid Exchange infrastructure you have already integrated. This will automatically generate the Plaid native account ID for the account the user will switch their direct deposit to (`target_account_id`). + # @param item_import_request [ItemImportRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ItemImportResponse, Integer, Hash)>] ItemImportResponse data, response status code and response headers + def item_import_with_http_info(item_import_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.item_import ...' + end + # verify the required parameter 'item_import_request' is set + if @api_client.config.client_side_validation && item_import_request.nil? + fail ArgumentError, "Missing the required parameter 'item_import_request' when calling PlaidApi.item_import" + end + # resource path + local_var_path = '/item/import' + + # 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(item_import_request) + + # return_type + return_type = opts[:debug_return_type] || 'ItemImportResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.item_import", + :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#item_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Exchange public token for an access token + # Exchange a Link `public_token` for an API `access_token`. Link hands off the `public_token` client-side via the `onSuccess` callback once a user has successfully created an Item. The `public_token` is ephemeral and expires after 30 minutes. An `access_token` does not expire, but can be revoked by calling `/item/remove`. The response also includes an `item_id` that should be stored with the `access_token`. The `item_id` is used to identify an Item in a webhook. The `item_id` can also be retrieved by making an `/item/get` request. + # @param item_public_token_exchange_request [ItemPublicTokenExchangeRequest] + # @param [Hash] opts the optional parameters + # @return [ItemPublicTokenExchangeResponse] + def item_public_token_exchange(item_public_token_exchange_request, opts = {}) + data, _status_code, _headers = item_public_token_exchange_with_http_info(item_public_token_exchange_request, opts) + data + end + + # Exchange public token for an access token + # Exchange a Link `public_token` for an API `access_token`. Link hands off the `public_token` client-side via the `onSuccess` callback once a user has successfully created an Item. The `public_token` is ephemeral and expires after 30 minutes. An `access_token` does not expire, but can be revoked by calling `/item/remove`. The response also includes an `item_id` that should be stored with the `access_token`. The `item_id` is used to identify an Item in a webhook. The `item_id` can also be retrieved by making an `/item/get` request. + # @param item_public_token_exchange_request [ItemPublicTokenExchangeRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ItemPublicTokenExchangeResponse, Integer, Hash)>] ItemPublicTokenExchangeResponse data, response status code and response headers + def item_public_token_exchange_with_http_info(item_public_token_exchange_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.item_public_token_exchange ...' + end + # verify the required parameter 'item_public_token_exchange_request' is set + if @api_client.config.client_side_validation && item_public_token_exchange_request.nil? + fail ArgumentError, "Missing the required parameter 'item_public_token_exchange_request' when calling PlaidApi.item_public_token_exchange" + end + # resource path + local_var_path = '/item/public_token/exchange' + + # 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(item_public_token_exchange_request) + + # return_type + return_type = opts[:debug_return_type] || 'ItemPublicTokenExchangeResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.item_public_token_exchange", + :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#item_public_token_exchange\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Remove an Item + # The `/item/remove` endpoint allows you to remove an Item. Once removed, the `access_token`, as well as any processor tokens or bank account tokens associated with the Item, is no longer valid and cannot be used to access any data that was associated with the Item. Note that in the Development environment, issuing an `/item/remove` request will not decrement your live credential count. To increase your credential account in Development, contact Support. Also note that for certain OAuth-based institutions, an Item removed via `/item/remove` may still show as an active connection in the institution's OAuth permission manager. API versions 2019-05-29 and earlier return a `removed` boolean as part of the response. + # @param item_remove_request [ItemRemoveRequest] + # @param [Hash] opts the optional parameters + # @return [ItemRemoveResponse] + def item_remove(item_remove_request, opts = {}) + data, _status_code, _headers = item_remove_with_http_info(item_remove_request, opts) + data + end + + # Remove an Item + # The `/item/remove` endpoint allows you to remove an Item. Once removed, the `access_token`, as well as any processor tokens or bank account tokens associated with the Item, is no longer valid and cannot be used to access any data that was associated with the Item. Note that in the Development environment, issuing an `/item/remove` request will not decrement your live credential count. To increase your credential account in Development, contact Support. Also note that for certain OAuth-based institutions, an Item removed via `/item/remove` may still show as an active connection in the institution's OAuth permission manager. API versions 2019-05-29 and earlier return a `removed` boolean as part of the response. + # @param item_remove_request [ItemRemoveRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ItemRemoveResponse, Integer, Hash)>] ItemRemoveResponse data, response status code and response headers + def item_remove_with_http_info(item_remove_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.item_remove ...' + end + # verify the required parameter 'item_remove_request' is set + if @api_client.config.client_side_validation && item_remove_request.nil? + fail ArgumentError, "Missing the required parameter 'item_remove_request' when calling PlaidApi.item_remove" + end + # resource path + local_var_path = '/item/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(item_remove_request) + + # return_type + return_type = opts[:debug_return_type] || 'ItemRemoveResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.item_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#item_remove\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update Webhook URL + # The POST `/item/webhook/update` allows you to update the webhook URL associated with an Item. This request triggers a [`WEBHOOK_UPDATE_ACKNOWLEDGED`](https://plaid.com/docs/api/items/#webhook_update_acknowledged) webhook to the newly specified webhook URL. + # @param item_webhook_update_request [ItemWebhookUpdateRequest] + # @param [Hash] opts the optional parameters + # @return [ItemWebhookUpdateResponse] + def item_webhook_update(item_webhook_update_request, opts = {}) + data, _status_code, _headers = item_webhook_update_with_http_info(item_webhook_update_request, opts) + data + end + + # Update Webhook URL + # The POST `/item/webhook/update` allows you to update the webhook URL associated with an Item. This request triggers a [`WEBHOOK_UPDATE_ACKNOWLEDGED`](https://plaid.com/docs/api/items/#webhook_update_acknowledged) webhook to the newly specified webhook URL. + # @param item_webhook_update_request [ItemWebhookUpdateRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ItemWebhookUpdateResponse, Integer, Hash)>] ItemWebhookUpdateResponse data, response status code and response headers + def item_webhook_update_with_http_info(item_webhook_update_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.item_webhook_update ...' + end + # verify the required parameter 'item_webhook_update_request' is set + if @api_client.config.client_side_validation && item_webhook_update_request.nil? + fail ArgumentError, "Missing the required parameter 'item_webhook_update_request' when calling PlaidApi.item_webhook_update" + end + # resource path + local_var_path = '/item/webhook/update' + + # 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(item_webhook_update_request) + + # return_type + return_type = opts[:debug_return_type] || 'ItemWebhookUpdateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.item_webhook_update", + :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#item_webhook_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve Liabilities data + # The `/liabilities/get` endpoint returns various details about an Item with loan or credit accounts. Liabilities data is available primarily for US financial institutions, with some limited coverage of Canadian institutions. Currently supported account types are account type `credit` with account subtype `credit card` or `paypal`, and account type `loan` with account subtype `student` or `mortgage`. To limit accounts listed in Link to types and subtypes supported by Liabilities, you can use the `account_filters` parameter when [creating a Link token](https://plaid.com/docs/api/tokens/#linktokencreate). The types of information returned by Liabilities can include balances and due dates, loan terms, and account details such as original loan amount and guarantor. Data is refreshed approximately once per day; the latest data can be retrieved by calling `/liabilities/get`. Note: This request may take some time to complete if `liabilities` was not specified as an initial product when creating the Item. This is because Plaid must communicate directly with the institution to retrieve the additional data. + # @param liabilities_get_request [LiabilitiesGetRequest] + # @param [Hash] opts the optional parameters + # @return [LiabilitiesGetResponse] + def liabilities_get(liabilities_get_request, opts = {}) + data, _status_code, _headers = liabilities_get_with_http_info(liabilities_get_request, opts) + data + end + + # Retrieve Liabilities data + # The `/liabilities/get` endpoint returns various details about an Item with loan or credit accounts. Liabilities data is available primarily for US financial institutions, with some limited coverage of Canadian institutions. Currently supported account types are account type `credit` with account subtype `credit card` or `paypal`, and account type `loan` with account subtype `student` or `mortgage`. To limit accounts listed in Link to types and subtypes supported by Liabilities, you can use the `account_filters` parameter when [creating a Link token](https://plaid.com/docs/api/tokens/#linktokencreate). The types of information returned by Liabilities can include balances and due dates, loan terms, and account details such as original loan amount and guarantor. Data is refreshed approximately once per day; the latest data can be retrieved by calling `/liabilities/get`. Note: This request may take some time to complete if `liabilities` was not specified as an initial product when creating the Item. This is because Plaid must communicate directly with the institution to retrieve the additional data. + # @param liabilities_get_request [LiabilitiesGetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(LiabilitiesGetResponse, Integer, Hash)>] LiabilitiesGetResponse data, response status code and response headers + def liabilities_get_with_http_info(liabilities_get_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.liabilities_get ...' + end + # verify the required parameter 'liabilities_get_request' is set + if @api_client.config.client_side_validation && liabilities_get_request.nil? + fail ArgumentError, "Missing the required parameter 'liabilities_get_request' when calling PlaidApi.liabilities_get" + end + # resource path + local_var_path = '/liabilities/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(liabilities_get_request) + + # return_type + return_type = opts[:debug_return_type] || 'LiabilitiesGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.liabilities_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#liabilities_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] + # @param [Hash] opts the optional parameters + # @return [LinkTokenCreateResponse] + def link_token_create(link_token_create_request, opts = {}) + data, _status_code, _headers = link_token_create_with_http_info(link_token_create_request, opts) + data + 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] + # @param [Hash] opts the optional parameters + # @return [Array<(LinkTokenCreateResponse, Integer, Hash)>] LinkTokenCreateResponse data, response status code and response headers + def link_token_create_with_http_info(link_token_create_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.link_token_create ...' + end + # verify the required parameter 'link_token_create_request' is set + if @api_client.config.client_side_validation && link_token_create_request.nil? + fail ArgumentError, "Missing the required parameter 'link_token_create_request' when calling PlaidApi.link_token_create" + end + # resource path + local_var_path = '/link/token/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_token_create_request) + + # return_type + return_type = opts[:debug_return_type] || 'LinkTokenCreateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.link_token_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_token_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get Link Token + # The `/link/token/get` endpoint gets information about a previously-created `link_token` using the `/link/token/create` endpoint. It can be useful for debugging purposes. + # @param link_token_get_request [LinkTokenGetRequest] + # @param [Hash] opts the optional parameters + # @return [LinkTokenGetResponse] + def link_token_get(link_token_get_request, opts = {}) + data, _status_code, _headers = link_token_get_with_http_info(link_token_get_request, opts) + data + end + + # Get Link Token + # The `/link/token/get` endpoint gets information about a previously-created `link_token` using the `/link/token/create` endpoint. It can be useful for debugging purposes. + # @param link_token_get_request [LinkTokenGetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(LinkTokenGetResponse, Integer, Hash)>] LinkTokenGetResponse data, response status code and response headers + def link_token_get_with_http_info(link_token_get_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.link_token_get ...' + end + # verify the required parameter 'link_token_get_request' is set + if @api_client.config.client_side_validation && link_token_get_request.nil? + fail ArgumentError, "Missing the required parameter 'link_token_get_request' when calling PlaidApi.link_token_get" + end + # resource path + local_var_path = '/link/token/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_token_get_request) + + # return_type + return_type = opts[:debug_return_type] || 'LinkTokenGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.link_token_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_token_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create payment consent + # The `/payment_initiation/consent/create` endpoint is used to create a payment consent, which can be used to initiate payments on behalf of the user. Payment consents are created with `UNAUTHORISED` status by default and must be authorised by the user before payments can be initiated. Consents can be limited in time and scope, and have constraints that describe limitations for payments. + # @param payment_initiation_consent_create_request [PaymentInitiationConsentCreateRequest] + # @param [Hash] opts the optional parameters + # @return [PaymentInitiationConsentCreateResponse] + def payment_initiation_consent_create(payment_initiation_consent_create_request, opts = {}) + data, _status_code, _headers = payment_initiation_consent_create_with_http_info(payment_initiation_consent_create_request, opts) + data + end + + # Create payment consent + # The `/payment_initiation/consent/create` endpoint is used to create a payment consent, which can be used to initiate payments on behalf of the user. Payment consents are created with `UNAUTHORISED` status by default and must be authorised by the user before payments can be initiated. Consents can be limited in time and scope, and have constraints that describe limitations for payments. + # @param payment_initiation_consent_create_request [PaymentInitiationConsentCreateRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(PaymentInitiationConsentCreateResponse, Integer, Hash)>] PaymentInitiationConsentCreateResponse data, response status code and response headers + def payment_initiation_consent_create_with_http_info(payment_initiation_consent_create_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_consent_create ...' + end + # verify the required parameter 'payment_initiation_consent_create_request' is set + if @api_client.config.client_side_validation && payment_initiation_consent_create_request.nil? + fail ArgumentError, "Missing the required parameter 'payment_initiation_consent_create_request' when calling PlaidApi.payment_initiation_consent_create" + end + # resource path + local_var_path = '/payment_initiation/consent/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(payment_initiation_consent_create_request) + + # return_type + return_type = opts[:debug_return_type] || 'PaymentInitiationConsentCreateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.payment_initiation_consent_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#payment_initiation_consent_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get payment consent + # The `/payment_initiation/consent/get` endpoint can be used to check the status of a payment consent, as well as to receive basic information such as recipient and constraints. + # @param payment_initiation_consent_get_request [PaymentInitiationConsentGetRequest] + # @param [Hash] opts the optional parameters + # @return [PaymentInitiationConsentGetResponse] + def payment_initiation_consent_get(payment_initiation_consent_get_request, opts = {}) + data, _status_code, _headers = payment_initiation_consent_get_with_http_info(payment_initiation_consent_get_request, opts) + data + end + + # Get payment consent + # The `/payment_initiation/consent/get` endpoint can be used to check the status of a payment consent, as well as to receive basic information such as recipient and constraints. + # @param payment_initiation_consent_get_request [PaymentInitiationConsentGetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(PaymentInitiationConsentGetResponse, Integer, Hash)>] PaymentInitiationConsentGetResponse data, response status code and response headers + def payment_initiation_consent_get_with_http_info(payment_initiation_consent_get_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_consent_get ...' + end + # verify the required parameter 'payment_initiation_consent_get_request' is set + if @api_client.config.client_side_validation && payment_initiation_consent_get_request.nil? + fail ArgumentError, "Missing the required parameter 'payment_initiation_consent_get_request' when calling PlaidApi.payment_initiation_consent_get" + end + # resource path + local_var_path = '/payment_initiation/consent/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(payment_initiation_consent_get_request) + + # return_type + return_type = opts[:debug_return_type] || 'PaymentInitiationConsentGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.payment_initiation_consent_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#payment_initiation_consent_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Execute a single payment using consent + # The `/payment_initiation/consent/payment/execute` endpoint can be used to execute payments using payment consent. + # @param payment_initiation_consent_payment_execute_request [PaymentInitiationConsentPaymentExecuteRequest] + # @param [Hash] opts the optional parameters + # @return [PaymentInitiationConsentPaymentExecuteResponse] + def payment_initiation_consent_payment_execute(payment_initiation_consent_payment_execute_request, opts = {}) + data, _status_code, _headers = payment_initiation_consent_payment_execute_with_http_info(payment_initiation_consent_payment_execute_request, opts) data end - # Get details of all supported institutions - # Returns a JSON response containing details on all financial institutions currently supported by Plaid. Because Plaid supports thousands of institutions, results are paginated. If there is no overlap between an institution’s enabled products and a client’s enabled products, then the institution will be filtered out from the response. As a result, the number of institutions returned may not match the count specified in the call. - # @param institutions_get_request [InstitutionsGetRequest] + # Execute a single payment using consent + # The `/payment_initiation/consent/payment/execute` endpoint can be used to execute payments using payment consent. + # @param payment_initiation_consent_payment_execute_request [PaymentInitiationConsentPaymentExecuteRequest] # @param [Hash] opts the optional parameters - # @return [Array<(InstitutionsGetResponse, Integer, Hash)>] InstitutionsGetResponse data, response status code and response headers - def institutions_get_with_http_info(institutions_get_request, opts = {}) + # @return [Array<(PaymentInitiationConsentPaymentExecuteResponse, Integer, Hash)>] PaymentInitiationConsentPaymentExecuteResponse data, response status code and response headers + def payment_initiation_consent_payment_execute_with_http_info(payment_initiation_consent_payment_execute_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.institutions_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_consent_payment_execute ...' end - # verify the required parameter 'institutions_get_request' is set - if @api_client.config.client_side_validation && institutions_get_request.nil? - fail ArgumentError, "Missing the required parameter 'institutions_get_request' when calling PlaidApi.institutions_get" + # verify the required parameter 'payment_initiation_consent_payment_execute_request' is set + if @api_client.config.client_side_validation && payment_initiation_consent_payment_execute_request.nil? + fail ArgumentError, "Missing the required parameter 'payment_initiation_consent_payment_execute_request' when calling PlaidApi.payment_initiation_consent_payment_execute" end # resource path - local_var_path = '/institutions/get' + local_var_path = '/payment_initiation/consent/payment/execute' # query parameters query_params = opts[:query_params] || {} @@ -3179,16 +4804,16 @@ def institutions_get_with_http_info(institutions_get_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(institutions_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_consent_payment_execute_request) # return_type - return_type = opts[:debug_return_type] || 'InstitutionsGetResponse' + return_type = opts[:debug_return_type] || 'PaymentInitiationConsentPaymentExecuteResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.institutions_get", + :operation => :"PlaidApi.payment_initiation_consent_payment_execute", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3199,36 +4824,36 @@ def institutions_get_with_http_info(institutions_get_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#institutions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#payment_initiation_consent_payment_execute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get details of an institution - # Returns a JSON response containing details on a specified financial institution currently supported by Plaid. Versioning note: API versions 2019-05-29 and earlier allow use of the `public_key` parameter instead of the `client_id` and `secret` to authenticate to this endpoint. The `public_key` has been deprecated; all customers are encouraged to use `client_id` and `secret` instead. - # @param institutions_get_by_id_request [InstitutionsGetByIdRequest] + # Revoke payment consent + # The `/payment_initiation/consent/revoke` endpoint can be used to revoke the payment consent. Once the consent is revoked, it is not possible to initiate payments using it. + # @param payment_initiation_consent_revoke_request [PaymentInitiationConsentRevokeRequest] # @param [Hash] opts the optional parameters - # @return [InstitutionsGetByIdResponse] - def institutions_get_by_id(institutions_get_by_id_request, opts = {}) - data, _status_code, _headers = institutions_get_by_id_with_http_info(institutions_get_by_id_request, opts) + # @return [PaymentInitiationConsentRevokeResponse] + def payment_initiation_consent_revoke(payment_initiation_consent_revoke_request, opts = {}) + data, _status_code, _headers = payment_initiation_consent_revoke_with_http_info(payment_initiation_consent_revoke_request, opts) data end - # Get details of an institution - # Returns a JSON response containing details on a specified financial institution currently supported by Plaid. Versioning note: API versions 2019-05-29 and earlier allow use of the `public_key` parameter instead of the `client_id` and `secret` to authenticate to this endpoint. The `public_key` has been deprecated; all customers are encouraged to use `client_id` and `secret` instead. - # @param institutions_get_by_id_request [InstitutionsGetByIdRequest] + # Revoke payment consent + # The `/payment_initiation/consent/revoke` endpoint can be used to revoke the payment consent. Once the consent is revoked, it is not possible to initiate payments using it. + # @param payment_initiation_consent_revoke_request [PaymentInitiationConsentRevokeRequest] # @param [Hash] opts the optional parameters - # @return [Array<(InstitutionsGetByIdResponse, Integer, Hash)>] InstitutionsGetByIdResponse data, response status code and response headers - def institutions_get_by_id_with_http_info(institutions_get_by_id_request, opts = {}) + # @return [Array<(PaymentInitiationConsentRevokeResponse, Integer, Hash)>] PaymentInitiationConsentRevokeResponse data, response status code and response headers + def payment_initiation_consent_revoke_with_http_info(payment_initiation_consent_revoke_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.institutions_get_by_id ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_consent_revoke ...' end - # verify the required parameter 'institutions_get_by_id_request' is set - if @api_client.config.client_side_validation && institutions_get_by_id_request.nil? - fail ArgumentError, "Missing the required parameter 'institutions_get_by_id_request' when calling PlaidApi.institutions_get_by_id" + # verify the required parameter 'payment_initiation_consent_revoke_request' is set + if @api_client.config.client_side_validation && payment_initiation_consent_revoke_request.nil? + fail ArgumentError, "Missing the required parameter 'payment_initiation_consent_revoke_request' when calling PlaidApi.payment_initiation_consent_revoke" end # resource path - local_var_path = '/institutions/get_by_id' + local_var_path = '/payment_initiation/consent/revoke' # query parameters query_params = opts[:query_params] || {} @@ -3244,16 +4869,16 @@ def institutions_get_by_id_with_http_info(institutions_get_by_id_request, opts = form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(institutions_get_by_id_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_consent_revoke_request) # return_type - return_type = opts[:debug_return_type] || 'InstitutionsGetByIdResponse' + return_type = opts[:debug_return_type] || 'PaymentInitiationConsentRevokeResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.institutions_get_by_id", + :operation => :"PlaidApi.payment_initiation_consent_revoke", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3264,36 +4889,166 @@ def institutions_get_by_id_with_http_info(institutions_get_by_id_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#institutions_get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#payment_initiation_consent_revoke\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Search institutions - # Returns a JSON response containing details for institutions that match the query parameters, up to a maximum of ten institutions per query. Versioning note: API versions 2019-05-29 and earlier allow use of the `public_key` parameter instead of the `client_id` and `secret` parameters to authenticate to this endpoint. The `public_key` parameter has since been deprecated; all customers are encouraged to use `client_id` and `secret` instead. - # @param institutions_search_request [InstitutionsSearchRequest] + # Create a payment + # After creating a payment recipient, you can use the `/payment_initiation/payment/create` endpoint to create a payment to that recipient. Payments can be one-time or standing order (recurring) and can be denominated in either EUR or GBP. If making domestic GBP-denominated payments, your recipient must have been created with BACS numbers. In general, EUR-denominated payments will be sent via SEPA Credit Transfer and GBP-denominated payments will be sent via the Faster Payments network, but the payment network used will be determined by the institution. Payments sent via Faster Payments will typically arrive immediately, while payments sent via SEPA Credit Transfer will typically arrive in one business day. Standing orders (recurring payments) must be denominated in GBP and can only be sent to recipients in the UK. Once created, standing order payments cannot be modified or canceled via the API. An end user can cancel or modify a standing order directly on their banking application or website, or by contacting the bank. Standing orders will follow the payment rules of the underlying rails (Faster Payments in UK). Payments can be sent Monday to Friday, excluding bank holidays. If the pre-arranged date falls on a weekend or bank holiday, the payment is made on the next working day. It is not possible to guarantee the exact time the payment will reach the recipient’s account, although at least 90% of standing order payments are sent by 6am. In the Development environment, payments must be below 5 GBP / EUR. For details on any payment limits in Production, contact your Plaid Account Manager. + # @param payment_initiation_payment_create_request [PaymentInitiationPaymentCreateRequest] # @param [Hash] opts the optional parameters - # @return [InstitutionsSearchResponse] - def institutions_search(institutions_search_request, opts = {}) - data, _status_code, _headers = institutions_search_with_http_info(institutions_search_request, opts) + # @return [PaymentInitiationPaymentCreateResponse] + def payment_initiation_payment_create(payment_initiation_payment_create_request, opts = {}) + data, _status_code, _headers = payment_initiation_payment_create_with_http_info(payment_initiation_payment_create_request, opts) data end - # Search institutions - # Returns a JSON response containing details for institutions that match the query parameters, up to a maximum of ten institutions per query. Versioning note: API versions 2019-05-29 and earlier allow use of the `public_key` parameter instead of the `client_id` and `secret` parameters to authenticate to this endpoint. The `public_key` parameter has since been deprecated; all customers are encouraged to use `client_id` and `secret` instead. - # @param institutions_search_request [InstitutionsSearchRequest] + # Create a payment + # After creating a payment recipient, you can use the `/payment_initiation/payment/create` endpoint to create a payment to that recipient. Payments can be one-time or standing order (recurring) and can be denominated in either EUR or GBP. If making domestic GBP-denominated payments, your recipient must have been created with BACS numbers. In general, EUR-denominated payments will be sent via SEPA Credit Transfer and GBP-denominated payments will be sent via the Faster Payments network, but the payment network used will be determined by the institution. Payments sent via Faster Payments will typically arrive immediately, while payments sent via SEPA Credit Transfer will typically arrive in one business day. Standing orders (recurring payments) must be denominated in GBP and can only be sent to recipients in the UK. Once created, standing order payments cannot be modified or canceled via the API. An end user can cancel or modify a standing order directly on their banking application or website, or by contacting the bank. Standing orders will follow the payment rules of the underlying rails (Faster Payments in UK). Payments can be sent Monday to Friday, excluding bank holidays. If the pre-arranged date falls on a weekend or bank holiday, the payment is made on the next working day. It is not possible to guarantee the exact time the payment will reach the recipient’s account, although at least 90% of standing order payments are sent by 6am. In the Development environment, payments must be below 5 GBP / EUR. For details on any payment limits in Production, contact your Plaid Account Manager. + # @param payment_initiation_payment_create_request [PaymentInitiationPaymentCreateRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(PaymentInitiationPaymentCreateResponse, Integer, Hash)>] PaymentInitiationPaymentCreateResponse data, response status code and response headers + def payment_initiation_payment_create_with_http_info(payment_initiation_payment_create_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_payment_create ...' + end + # verify the required parameter 'payment_initiation_payment_create_request' is set + if @api_client.config.client_side_validation && payment_initiation_payment_create_request.nil? + fail ArgumentError, "Missing the required parameter 'payment_initiation_payment_create_request' when calling PlaidApi.payment_initiation_payment_create" + end + # resource path + local_var_path = '/payment_initiation/payment/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(payment_initiation_payment_create_request) + + # return_type + return_type = opts[:debug_return_type] || 'PaymentInitiationPaymentCreateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.payment_initiation_payment_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#payment_initiation_payment_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get payment details + # The `/payment_initiation/payment/get` endpoint can be used to check the status of a payment, as well as to receive basic information such as recipient and payment amount. In the case of standing orders, the `/payment_initiation/payment/get` endpoint will provide information about the status of the overall standing order itself; the API cannot be used to retrieve payment status for individual payments within a standing order. + # @param payment_initiation_payment_get_request [PaymentInitiationPaymentGetRequest] + # @param [Hash] opts the optional parameters + # @return [PaymentInitiationPaymentGetResponse] + def payment_initiation_payment_get(payment_initiation_payment_get_request, opts = {}) + data, _status_code, _headers = payment_initiation_payment_get_with_http_info(payment_initiation_payment_get_request, opts) + data + end + + # Get payment details + # The `/payment_initiation/payment/get` endpoint can be used to check the status of a payment, as well as to receive basic information such as recipient and payment amount. In the case of standing orders, the `/payment_initiation/payment/get` endpoint will provide information about the status of the overall standing order itself; the API cannot be used to retrieve payment status for individual payments within a standing order. + # @param payment_initiation_payment_get_request [PaymentInitiationPaymentGetRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(PaymentInitiationPaymentGetResponse, Integer, Hash)>] PaymentInitiationPaymentGetResponse data, response status code and response headers + def payment_initiation_payment_get_with_http_info(payment_initiation_payment_get_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_payment_get ...' + end + # verify the required parameter 'payment_initiation_payment_get_request' is set + if @api_client.config.client_side_validation && payment_initiation_payment_get_request.nil? + fail ArgumentError, "Missing the required parameter 'payment_initiation_payment_get_request' when calling PlaidApi.payment_initiation_payment_get" + end + # resource path + local_var_path = '/payment_initiation/payment/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(payment_initiation_payment_get_request) + + # return_type + return_type = opts[:debug_return_type] || 'PaymentInitiationPaymentGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] + + new_options = opts.merge( + :operation => :"PlaidApi.payment_initiation_payment_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#payment_initiation_payment_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List payments + # The `/payment_initiation/payment/list` endpoint can be used to retrieve all created payments. By default, the 10 most recent payments are returned. You can request more payments and paginate through the results using the optional `count` and `cursor` parameters. + # @param payment_initiation_payment_list_request [PaymentInitiationPaymentListRequest] + # @param [Hash] opts the optional parameters + # @return [PaymentInitiationPaymentListResponse] + def payment_initiation_payment_list(payment_initiation_payment_list_request, opts = {}) + data, _status_code, _headers = payment_initiation_payment_list_with_http_info(payment_initiation_payment_list_request, opts) + data + end + + # List payments + # The `/payment_initiation/payment/list` endpoint can be used to retrieve all created payments. By default, the 10 most recent payments are returned. You can request more payments and paginate through the results using the optional `count` and `cursor` parameters. + # @param payment_initiation_payment_list_request [PaymentInitiationPaymentListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(InstitutionsSearchResponse, Integer, Hash)>] InstitutionsSearchResponse data, response status code and response headers - def institutions_search_with_http_info(institutions_search_request, opts = {}) + # @return [Array<(PaymentInitiationPaymentListResponse, Integer, Hash)>] PaymentInitiationPaymentListResponse data, response status code and response headers + def payment_initiation_payment_list_with_http_info(payment_initiation_payment_list_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.institutions_search ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_payment_list ...' end - # verify the required parameter 'institutions_search_request' is set - if @api_client.config.client_side_validation && institutions_search_request.nil? - fail ArgumentError, "Missing the required parameter 'institutions_search_request' when calling PlaidApi.institutions_search" + # verify the required parameter 'payment_initiation_payment_list_request' is set + if @api_client.config.client_side_validation && payment_initiation_payment_list_request.nil? + fail ArgumentError, "Missing the required parameter 'payment_initiation_payment_list_request' when calling PlaidApi.payment_initiation_payment_list" end # resource path - local_var_path = '/institutions/search' + local_var_path = '/payment_initiation/payment/list' # query parameters query_params = opts[:query_params] || {} @@ -3309,16 +5064,16 @@ def institutions_search_with_http_info(institutions_search_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(institutions_search_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_payment_list_request) # return_type - return_type = opts[:debug_return_type] || 'InstitutionsSearchResponse' + return_type = opts[:debug_return_type] || 'PaymentInitiationPaymentListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.institutions_search", + :operation => :"PlaidApi.payment_initiation_payment_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3329,36 +5084,36 @@ def institutions_search_with_http_info(institutions_search_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#institutions_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#payment_initiation_payment_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get Investment holdings - # The `/investments/holdings/get` endpoint allows developers to receive user-authorized stock position data for `investment`-type accounts. - # @param investments_holdings_get_request [InvestmentsHoldingsGetRequest] + # 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. + # @param payment_initiation_payment_reverse_request [PaymentInitiationPaymentReverseRequest] # @param [Hash] opts the optional parameters - # @return [InvestmentsHoldingsGetResponse] - def investments_holdings_get(investments_holdings_get_request, opts = {}) - data, _status_code, _headers = investments_holdings_get_with_http_info(investments_holdings_get_request, opts) + # @return [PaymentInitiationPaymentReverseResponse] + def payment_initiation_payment_reverse(payment_initiation_payment_reverse_request, opts = {}) + data, _status_code, _headers = payment_initiation_payment_reverse_with_http_info(payment_initiation_payment_reverse_request, opts) data end - # Get Investment holdings - # The `/investments/holdings/get` endpoint allows developers to receive user-authorized stock position data for `investment`-type accounts. - # @param investments_holdings_get_request [InvestmentsHoldingsGetRequest] + # 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. + # @param payment_initiation_payment_reverse_request [PaymentInitiationPaymentReverseRequest] # @param [Hash] opts the optional parameters - # @return [Array<(InvestmentsHoldingsGetResponse, Integer, Hash)>] InvestmentsHoldingsGetResponse data, response status code and response headers - def investments_holdings_get_with_http_info(investments_holdings_get_request, opts = {}) + # @return [Array<(PaymentInitiationPaymentReverseResponse, Integer, Hash)>] PaymentInitiationPaymentReverseResponse data, response status code and response headers + def payment_initiation_payment_reverse_with_http_info(payment_initiation_payment_reverse_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.investments_holdings_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_payment_reverse ...' end - # verify the required parameter 'investments_holdings_get_request' is set - if @api_client.config.client_side_validation && investments_holdings_get_request.nil? - fail ArgumentError, "Missing the required parameter 'investments_holdings_get_request' when calling PlaidApi.investments_holdings_get" + # verify the required parameter 'payment_initiation_payment_reverse_request' is set + if @api_client.config.client_side_validation && payment_initiation_payment_reverse_request.nil? + fail ArgumentError, "Missing the required parameter 'payment_initiation_payment_reverse_request' when calling PlaidApi.payment_initiation_payment_reverse" end # resource path - local_var_path = '/investments/holdings/get' + local_var_path = '/payment_initiation/payment/reverse' # query parameters query_params = opts[:query_params] || {} @@ -3374,16 +5129,16 @@ def investments_holdings_get_with_http_info(investments_holdings_get_request, op form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(investments_holdings_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_payment_reverse_request) # return_type - return_type = opts[:debug_return_type] || 'InvestmentsHoldingsGetResponse' + return_type = opts[:debug_return_type] || 'PaymentInitiationPaymentReverseResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.investments_holdings_get", + :operation => :"PlaidApi.payment_initiation_payment_reverse", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3394,36 +5149,36 @@ def investments_holdings_get_with_http_info(investments_holdings_get_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#investments_holdings_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#payment_initiation_payment_reverse\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get investment transactions - # The `/investments/transactions/get` endpoint allows developers to retrieve user-authorized transaction data for investment accounts. Transactions are returned in reverse-chronological order, and the sequence of transaction ordering is stable and will not shift. Due to the potentially large number of investment transactions associated with an Item, results are paginated. Manipulate the count and offset parameters in conjunction with the `total_investment_transactions` response body field to fetch all available investment transactions. - # @param investments_transactions_get_request [InvestmentsTransactionsGetRequest] + # 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`. + # @param payment_initiation_recipient_create_request [PaymentInitiationRecipientCreateRequest] # @param [Hash] opts the optional parameters - # @return [InvestmentsTransactionsGetResponse] - def investments_transactions_get(investments_transactions_get_request, opts = {}) - data, _status_code, _headers = investments_transactions_get_with_http_info(investments_transactions_get_request, opts) + # @return [PaymentInitiationRecipientCreateResponse] + def payment_initiation_recipient_create(payment_initiation_recipient_create_request, opts = {}) + data, _status_code, _headers = payment_initiation_recipient_create_with_http_info(payment_initiation_recipient_create_request, opts) data end - # Get investment transactions - # The `/investments/transactions/get` endpoint allows developers to retrieve user-authorized transaction data for investment accounts. Transactions are returned in reverse-chronological order, and the sequence of transaction ordering is stable and will not shift. Due to the potentially large number of investment transactions associated with an Item, results are paginated. Manipulate the count and offset parameters in conjunction with the `total_investment_transactions` response body field to fetch all available investment transactions. - # @param investments_transactions_get_request [InvestmentsTransactionsGetRequest] + # 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`. + # @param payment_initiation_recipient_create_request [PaymentInitiationRecipientCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(InvestmentsTransactionsGetResponse, Integer, Hash)>] InvestmentsTransactionsGetResponse data, response status code and response headers - def investments_transactions_get_with_http_info(investments_transactions_get_request, opts = {}) + # @return [Array<(PaymentInitiationRecipientCreateResponse, Integer, Hash)>] PaymentInitiationRecipientCreateResponse data, response status code and response headers + def payment_initiation_recipient_create_with_http_info(payment_initiation_recipient_create_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.investments_transactions_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_recipient_create ...' end - # verify the required parameter 'investments_transactions_get_request' is set - if @api_client.config.client_side_validation && investments_transactions_get_request.nil? - fail ArgumentError, "Missing the required parameter 'investments_transactions_get_request' when calling PlaidApi.investments_transactions_get" + # verify the required parameter 'payment_initiation_recipient_create_request' is set + if @api_client.config.client_side_validation && payment_initiation_recipient_create_request.nil? + fail ArgumentError, "Missing the required parameter 'payment_initiation_recipient_create_request' when calling PlaidApi.payment_initiation_recipient_create" end # resource path - local_var_path = '/investments/transactions/get' + local_var_path = '/payment_initiation/recipient/create' # query parameters query_params = opts[:query_params] || {} @@ -3439,16 +5194,16 @@ def investments_transactions_get_with_http_info(investments_transactions_get_req form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(investments_transactions_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_recipient_create_request) # return_type - return_type = opts[:debug_return_type] || 'InvestmentsTransactionsGetResponse' + return_type = opts[:debug_return_type] || 'PaymentInitiationRecipientCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.investments_transactions_get", + :operation => :"PlaidApi.payment_initiation_recipient_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3459,36 +5214,36 @@ def investments_transactions_get_with_http_info(investments_transactions_get_req 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#investments_transactions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#payment_initiation_recipient_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Invalidate access_token - # By default, the `access_token` associated with an Item does not expire and should be stored in a persistent, secure manner. You can use the `/item/access_token/invalidate` endpoint to rotate the `access_token` associated with an Item. The endpoint returns a new `access_token` and immediately invalidates the previous `access_token`. - # @param item_access_token_invalidate_request [ItemAccessTokenInvalidateRequest] + # Get payment recipient + # Get details about a payment recipient you have previously created. + # @param payment_initiation_recipient_get_request [PaymentInitiationRecipientGetRequest] # @param [Hash] opts the optional parameters - # @return [ItemAccessTokenInvalidateResponse] - def item_access_token_invalidate(item_access_token_invalidate_request, opts = {}) - data, _status_code, _headers = item_access_token_invalidate_with_http_info(item_access_token_invalidate_request, opts) + # @return [PaymentInitiationRecipientGetResponse] + def payment_initiation_recipient_get(payment_initiation_recipient_get_request, opts = {}) + data, _status_code, _headers = payment_initiation_recipient_get_with_http_info(payment_initiation_recipient_get_request, opts) data end - # Invalidate access_token - # By default, the `access_token` associated with an Item does not expire and should be stored in a persistent, secure manner. You can use the `/item/access_token/invalidate` endpoint to rotate the `access_token` associated with an Item. The endpoint returns a new `access_token` and immediately invalidates the previous `access_token`. - # @param item_access_token_invalidate_request [ItemAccessTokenInvalidateRequest] + # Get payment recipient + # Get details about a payment recipient you have previously created. + # @param payment_initiation_recipient_get_request [PaymentInitiationRecipientGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(ItemAccessTokenInvalidateResponse, Integer, Hash)>] ItemAccessTokenInvalidateResponse data, response status code and response headers - def item_access_token_invalidate_with_http_info(item_access_token_invalidate_request, opts = {}) + # @return [Array<(PaymentInitiationRecipientGetResponse, Integer, Hash)>] PaymentInitiationRecipientGetResponse data, response status code and response headers + def payment_initiation_recipient_get_with_http_info(payment_initiation_recipient_get_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.item_access_token_invalidate ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_recipient_get ...' end - # verify the required parameter 'item_access_token_invalidate_request' is set - if @api_client.config.client_side_validation && item_access_token_invalidate_request.nil? - fail ArgumentError, "Missing the required parameter 'item_access_token_invalidate_request' when calling PlaidApi.item_access_token_invalidate" + # verify the required parameter 'payment_initiation_recipient_get_request' is set + if @api_client.config.client_side_validation && payment_initiation_recipient_get_request.nil? + fail ArgumentError, "Missing the required parameter 'payment_initiation_recipient_get_request' when calling PlaidApi.payment_initiation_recipient_get" end # resource path - local_var_path = '/item/access_token/invalidate' + local_var_path = '/payment_initiation/recipient/get' # query parameters query_params = opts[:query_params] || {} @@ -3504,16 +5259,16 @@ def item_access_token_invalidate_with_http_info(item_access_token_invalidate_req form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(item_access_token_invalidate_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_recipient_get_request) # return_type - return_type = opts[:debug_return_type] || 'ItemAccessTokenInvalidateResponse' + return_type = opts[:debug_return_type] || 'PaymentInitiationRecipientGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.item_access_token_invalidate", + :operation => :"PlaidApi.payment_initiation_recipient_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3524,36 +5279,36 @@ def item_access_token_invalidate_with_http_info(item_access_token_invalidate_req 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#item_access_token_invalidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#payment_initiation_recipient_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List a user’s connected applications - # List a user’s connected applications - # @param item_application_list_request [ItemApplicationListRequest] + # List payment recipients + # The `/payment_initiation/recipient/list` endpoint list the payment recipients that you have previously created. + # @param payment_initiation_recipient_list_request [PaymentInitiationRecipientListRequest] # @param [Hash] opts the optional parameters - # @return [ItemApplicationListResponse] - def item_application_list(item_application_list_request, opts = {}) - data, _status_code, _headers = item_application_list_with_http_info(item_application_list_request, opts) + # @return [PaymentInitiationRecipientListResponse] + def payment_initiation_recipient_list(payment_initiation_recipient_list_request, opts = {}) + data, _status_code, _headers = payment_initiation_recipient_list_with_http_info(payment_initiation_recipient_list_request, opts) data end - # List a user’s connected applications - # List a user’s connected applications - # @param item_application_list_request [ItemApplicationListRequest] + # List payment recipients + # The `/payment_initiation/recipient/list` endpoint list the payment recipients that you have previously created. + # @param payment_initiation_recipient_list_request [PaymentInitiationRecipientListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(ItemApplicationListResponse, Integer, Hash)>] ItemApplicationListResponse data, response status code and response headers - def item_application_list_with_http_info(item_application_list_request, opts = {}) + # @return [Array<(PaymentInitiationRecipientListResponse, Integer, Hash)>] PaymentInitiationRecipientListResponse data, response status code and response headers + def payment_initiation_recipient_list_with_http_info(payment_initiation_recipient_list_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.item_application_list ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_recipient_list ...' end - # verify the required parameter 'item_application_list_request' is set - if @api_client.config.client_side_validation && item_application_list_request.nil? - fail ArgumentError, "Missing the required parameter 'item_application_list_request' when calling PlaidApi.item_application_list" + # verify the required parameter 'payment_initiation_recipient_list_request' is set + if @api_client.config.client_side_validation && payment_initiation_recipient_list_request.nil? + fail ArgumentError, "Missing the required parameter 'payment_initiation_recipient_list_request' when calling PlaidApi.payment_initiation_recipient_list" end # resource path - local_var_path = '/item/application/list' + local_var_path = '/payment_initiation/recipient/list' # query parameters query_params = opts[:query_params] || {} @@ -3569,16 +5324,16 @@ def item_application_list_with_http_info(item_application_list_request, opts = { form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(item_application_list_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_recipient_list_request) # return_type - return_type = opts[:debug_return_type] || 'ItemApplicationListResponse' + return_type = opts[:debug_return_type] || 'PaymentInitiationRecipientListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.item_application_list", + :operation => :"PlaidApi.payment_initiation_recipient_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3589,36 +5344,36 @@ def item_application_list_with_http_info(item_application_list_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#item_application_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#payment_initiation_recipient_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update the scopes of access for a particular application - # Enable consumers to update product access on selected accounts for an application. - # @param item_application_scopes_update_request [ItemApplicationScopesUpdateRequest] + # Create Apex bank account token + # Used to create a token suitable for sending to Apex to enable Plaid-Apex integrations. + # @param processor_apex_processor_token_create_request [ProcessorApexProcessorTokenCreateRequest] # @param [Hash] opts the optional parameters - # @return [ItemApplicationScopesUpdateResponse] - def item_application_scopes_update(item_application_scopes_update_request, opts = {}) - data, _status_code, _headers = item_application_scopes_update_with_http_info(item_application_scopes_update_request, opts) + # @return [ProcessorTokenCreateResponse] + def processor_apex_processor_token_create(processor_apex_processor_token_create_request, opts = {}) + data, _status_code, _headers = processor_apex_processor_token_create_with_http_info(processor_apex_processor_token_create_request, opts) data end - # Update the scopes of access for a particular application - # Enable consumers to update product access on selected accounts for an application. - # @param item_application_scopes_update_request [ItemApplicationScopesUpdateRequest] + # Create Apex bank account token + # Used to create a token suitable for sending to Apex to enable Plaid-Apex integrations. + # @param processor_apex_processor_token_create_request [ProcessorApexProcessorTokenCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(ItemApplicationScopesUpdateResponse, Integer, Hash)>] ItemApplicationScopesUpdateResponse data, response status code and response headers - def item_application_scopes_update_with_http_info(item_application_scopes_update_request, opts = {}) + # @return [Array<(ProcessorTokenCreateResponse, Integer, Hash)>] ProcessorTokenCreateResponse data, response status code and response headers + def processor_apex_processor_token_create_with_http_info(processor_apex_processor_token_create_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.item_application_scopes_update ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.processor_apex_processor_token_create ...' end - # verify the required parameter 'item_application_scopes_update_request' is set - if @api_client.config.client_side_validation && item_application_scopes_update_request.nil? - fail ArgumentError, "Missing the required parameter 'item_application_scopes_update_request' when calling PlaidApi.item_application_scopes_update" + # verify the required parameter 'processor_apex_processor_token_create_request' is set + if @api_client.config.client_side_validation && processor_apex_processor_token_create_request.nil? + fail ArgumentError, "Missing the required parameter 'processor_apex_processor_token_create_request' when calling PlaidApi.processor_apex_processor_token_create" end # resource path - local_var_path = '/item/application/scopes/update' + local_var_path = '/processor/apex/processor_token/create' # query parameters query_params = opts[:query_params] || {} @@ -3634,16 +5389,16 @@ def item_application_scopes_update_with_http_info(item_application_scopes_update form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(item_application_scopes_update_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(processor_apex_processor_token_create_request) # return_type - return_type = opts[:debug_return_type] || 'ItemApplicationScopesUpdateResponse' + return_type = opts[:debug_return_type] || 'ProcessorTokenCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.item_application_scopes_update", + :operation => :"PlaidApi.processor_apex_processor_token_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3654,36 +5409,36 @@ def item_application_scopes_update_with_http_info(item_application_scopes_update 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#item_application_scopes_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#processor_apex_processor_token_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create public token - # Note: As of July 2020, the `/item/public_token/create` endpoint is deprecated. Instead, use `/link/token/create` with an `access_token` to create a Link token for use with [update mode](https://plaid.com/docs/link/update-mode). If you need your user to take action to restore or resolve an error associated with an Item, generate a public token with the `/item/public_token/create` endpoint and then initialize Link with that `public_token`. A `public_token` is one-time use and expires after 30 minutes. You use a `public_token` to initialize Link in [update mode](https://plaid.com/docs/link/update-mode) for a particular Item. You can generate a `public_token` for an Item even if you did not use Link to create the Item originally. The `/item/public_token/create` endpoint is **not** used to create your initial `public_token`. If you have not already received an `access_token` for a specific Item, use Link to obtain your `public_token` instead. See the [Quickstart](https://plaid.com/docs/quickstart) for more information. - # @param item_public_token_create_request [ItemPublicTokenCreateRequest] + # Retrieve Auth data + # The `/processor/auth/get` endpoint returns the bank account and bank identification number (such as the routing number, for US accounts), for a checking or savings account that''s associated with a given `processor_token`. The endpoint also returns high-level account data and balances when available. Versioning note: API versions 2019-05-29 and earlier use a different schema for the `numbers` object returned by this endpoint. For details, see [Plaid API versioning](https://plaid.com/docs/api/versioning/#version-2020-09-14). + # @param processor_auth_get_request [ProcessorAuthGetRequest] # @param [Hash] opts the optional parameters - # @return [ItemPublicTokenCreateResponse] - def item_create_public_token(item_public_token_create_request, opts = {}) - data, _status_code, _headers = item_create_public_token_with_http_info(item_public_token_create_request, opts) + # @return [ProcessorAuthGetResponse] + def processor_auth_get(processor_auth_get_request, opts = {}) + data, _status_code, _headers = processor_auth_get_with_http_info(processor_auth_get_request, opts) data end - # Create public token - # Note: As of July 2020, the `/item/public_token/create` endpoint is deprecated. Instead, use `/link/token/create` with an `access_token` to create a Link token for use with [update mode](https://plaid.com/docs/link/update-mode). If you need your user to take action to restore or resolve an error associated with an Item, generate a public token with the `/item/public_token/create` endpoint and then initialize Link with that `public_token`. A `public_token` is one-time use and expires after 30 minutes. You use a `public_token` to initialize Link in [update mode](https://plaid.com/docs/link/update-mode) for a particular Item. You can generate a `public_token` for an Item even if you did not use Link to create the Item originally. The `/item/public_token/create` endpoint is **not** used to create your initial `public_token`. If you have not already received an `access_token` for a specific Item, use Link to obtain your `public_token` instead. See the [Quickstart](https://plaid.com/docs/quickstart) for more information. - # @param item_public_token_create_request [ItemPublicTokenCreateRequest] + # Retrieve Auth data + # The `/processor/auth/get` endpoint returns the bank account and bank identification number (such as the routing number, for US accounts), for a checking or savings account that''s associated with a given `processor_token`. The endpoint also returns high-level account data and balances when available. Versioning note: API versions 2019-05-29 and earlier use a different schema for the `numbers` object returned by this endpoint. For details, see [Plaid API versioning](https://plaid.com/docs/api/versioning/#version-2020-09-14). + # @param processor_auth_get_request [ProcessorAuthGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(ItemPublicTokenCreateResponse, Integer, Hash)>] ItemPublicTokenCreateResponse data, response status code and response headers - def item_create_public_token_with_http_info(item_public_token_create_request, opts = {}) + # @return [Array<(ProcessorAuthGetResponse, Integer, Hash)>] ProcessorAuthGetResponse data, response status code and response headers + def processor_auth_get_with_http_info(processor_auth_get_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.item_create_public_token ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.processor_auth_get ...' end - # verify the required parameter 'item_public_token_create_request' is set - if @api_client.config.client_side_validation && item_public_token_create_request.nil? - fail ArgumentError, "Missing the required parameter 'item_public_token_create_request' when calling PlaidApi.item_create_public_token" + # verify the required parameter 'processor_auth_get_request' is set + if @api_client.config.client_side_validation && processor_auth_get_request.nil? + fail ArgumentError, "Missing the required parameter 'processor_auth_get_request' when calling PlaidApi.processor_auth_get" end # resource path - local_var_path = '/item/public_token/create' + local_var_path = '/processor/auth/get' # query parameters query_params = opts[:query_params] || {} @@ -3699,16 +5454,16 @@ def item_create_public_token_with_http_info(item_public_token_create_request, op form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(item_public_token_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(processor_auth_get_request) # return_type - return_type = opts[:debug_return_type] || 'ItemPublicTokenCreateResponse' + return_type = opts[:debug_return_type] || 'ProcessorAuthGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.item_create_public_token", + :operation => :"PlaidApi.processor_auth_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3719,36 +5474,36 @@ def item_create_public_token_with_http_info(item_public_token_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#item_create_public_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#processor_auth_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Retrieve an Item - # Returns information about the status of an Item. - # @param item_get_request [ItemGetRequest] + # Retrieve Balance data + # The `/processor/balance/get` endpoint returns the real-time balance for each of an Item's accounts. While other endpoints may return a balance object, only `/processor/balance/get` forces the available and current balance fields to be refreshed rather than cached. + # @param processor_balance_get_request [ProcessorBalanceGetRequest] The `/processor/balance/get` endpoint returns the real-time balance for the account associated with a given `processor_token`. The current balance is the total amount of funds in the account. The available balance is the current balance less any outstanding holds or debits that have not yet posted to the account. Note that not all institutions calculate the available balance. In the event that available balance is unavailable from the institution, Plaid will return an available balance value of `null`. # @param [Hash] opts the optional parameters - # @return [ItemGetResponse] - def item_get(item_get_request, opts = {}) - data, _status_code, _headers = item_get_with_http_info(item_get_request, opts) + # @return [ProcessorBalanceGetResponse] + def processor_balance_get(processor_balance_get_request, opts = {}) + data, _status_code, _headers = processor_balance_get_with_http_info(processor_balance_get_request, opts) data end - # Retrieve an Item - # Returns information about the status of an Item. - # @param item_get_request [ItemGetRequest] + # Retrieve Balance data + # The `/processor/balance/get` endpoint returns the real-time balance for each of an Item's accounts. While other endpoints may return a balance object, only `/processor/balance/get` forces the available and current balance fields to be refreshed rather than cached. + # @param processor_balance_get_request [ProcessorBalanceGetRequest] The `/processor/balance/get` endpoint returns the real-time balance for the account associated with a given `processor_token`. The current balance is the total amount of funds in the account. The available balance is the current balance less any outstanding holds or debits that have not yet posted to the account. Note that not all institutions calculate the available balance. In the event that available balance is unavailable from the institution, Plaid will return an available balance value of `null`. # @param [Hash] opts the optional parameters - # @return [Array<(ItemGetResponse, Integer, Hash)>] ItemGetResponse data, response status code and response headers - def item_get_with_http_info(item_get_request, opts = {}) + # @return [Array<(ProcessorBalanceGetResponse, Integer, Hash)>] ProcessorBalanceGetResponse data, response status code and response headers + def processor_balance_get_with_http_info(processor_balance_get_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.item_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.processor_balance_get ...' end - # verify the required parameter 'item_get_request' is set - if @api_client.config.client_side_validation && item_get_request.nil? - fail ArgumentError, "Missing the required parameter 'item_get_request' when calling PlaidApi.item_get" + # verify the required parameter 'processor_balance_get_request' is set + if @api_client.config.client_side_validation && processor_balance_get_request.nil? + fail ArgumentError, "Missing the required parameter 'processor_balance_get_request' when calling PlaidApi.processor_balance_get" end # resource path - local_var_path = '/item/get' + local_var_path = '/processor/balance/get' # query parameters query_params = opts[:query_params] || {} @@ -3764,16 +5519,16 @@ def item_get_with_http_info(item_get_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(item_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(processor_balance_get_request) # return_type - return_type = opts[:debug_return_type] || 'ItemGetResponse' + return_type = opts[:debug_return_type] || 'ProcessorBalanceGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.item_get", + :operation => :"PlaidApi.processor_balance_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3784,36 +5539,36 @@ def item_get_with_http_info(item_get_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#item_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#processor_balance_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Import Item - # `/item/import` creates an Item via your Plaid Exchange Integration and returns an `access_token`. As part of an `/item/import` request, you will include a User ID (`user_auth.user_id`) and Authentication Token (`user_auth.auth_token`) that enable data aggregation through your Plaid Exchange API endpoints. These authentication principals are to be chosen by you. Upon creating an Item via `/item/import`, Plaid will automatically begin an extraction of that Item through the Plaid Exchange infrastructure you have already integrated. This will automatically generate the Plaid native account ID for the account the user will switch their direct deposit to (`target_account_id`). - # @param item_import_request [ItemImportRequest] + # Create a bank transfer as a processor + # Use the `/processor/bank_transfer/create` endpoint to initiate a new bank transfer as a processor + # @param processor_bank_transfer_create_request [ProcessorBankTransferCreateRequest] # @param [Hash] opts the optional parameters - # @return [ItemImportResponse] - def item_import(item_import_request, opts = {}) - data, _status_code, _headers = item_import_with_http_info(item_import_request, opts) + # @return [ProcessorBankTransferCreateResponse] + def processor_bank_transfer_create(processor_bank_transfer_create_request, opts = {}) + data, _status_code, _headers = processor_bank_transfer_create_with_http_info(processor_bank_transfer_create_request, opts) data end - # Import Item - # `/item/import` creates an Item via your Plaid Exchange Integration and returns an `access_token`. As part of an `/item/import` request, you will include a User ID (`user_auth.user_id`) and Authentication Token (`user_auth.auth_token`) that enable data aggregation through your Plaid Exchange API endpoints. These authentication principals are to be chosen by you. Upon creating an Item via `/item/import`, Plaid will automatically begin an extraction of that Item through the Plaid Exchange infrastructure you have already integrated. This will automatically generate the Plaid native account ID for the account the user will switch their direct deposit to (`target_account_id`). - # @param item_import_request [ItemImportRequest] + # Create a bank transfer as a processor + # Use the `/processor/bank_transfer/create` endpoint to initiate a new bank transfer as a processor + # @param processor_bank_transfer_create_request [ProcessorBankTransferCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(ItemImportResponse, Integer, Hash)>] ItemImportResponse data, response status code and response headers - def item_import_with_http_info(item_import_request, opts = {}) + # @return [Array<(ProcessorBankTransferCreateResponse, Integer, Hash)>] ProcessorBankTransferCreateResponse data, response status code and response headers + def processor_bank_transfer_create_with_http_info(processor_bank_transfer_create_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.item_import ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.processor_bank_transfer_create ...' end - # verify the required parameter 'item_import_request' is set - if @api_client.config.client_side_validation && item_import_request.nil? - fail ArgumentError, "Missing the required parameter 'item_import_request' when calling PlaidApi.item_import" + # verify the required parameter 'processor_bank_transfer_create_request' is set + if @api_client.config.client_side_validation && processor_bank_transfer_create_request.nil? + fail ArgumentError, "Missing the required parameter 'processor_bank_transfer_create_request' when calling PlaidApi.processor_bank_transfer_create" end # resource path - local_var_path = '/item/import' + local_var_path = '/processor/bank_transfer/create' # query parameters query_params = opts[:query_params] || {} @@ -3829,16 +5584,16 @@ def item_import_with_http_info(item_import_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(item_import_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(processor_bank_transfer_create_request) # return_type - return_type = opts[:debug_return_type] || 'ItemImportResponse' + return_type = opts[:debug_return_type] || 'ProcessorBankTransferCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.item_import", + :operation => :"PlaidApi.processor_bank_transfer_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3849,36 +5604,36 @@ def item_import_with_http_info(item_import_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#item_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#processor_bank_transfer_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Exchange public token for an access token - # Exchange a Link `public_token` for an API `access_token`. Link hands off the `public_token` client-side via the `onSuccess` callback once a user has successfully created an Item. The `public_token` is ephemeral and expires after 30 minutes. An `access_token` does not expire, but can be revoked by calling `/item/remove`. The response also includes an `item_id` that should be stored with the `access_token`. The `item_id` is used to identify an Item in a webhook. The `item_id` can also be retrieved by making an `/item/get` request. - # @param item_public_token_exchange_request [ItemPublicTokenExchangeRequest] + # Retrieve Identity data + # The `/processor/identity/get` endpoint allows you to retrieve various account holder information on file with the financial institution, including names, emails, phone numbers, and addresses. + # @param processor_identity_get_request [ProcessorIdentityGetRequest] # @param [Hash] opts the optional parameters - # @return [ItemPublicTokenExchangeResponse] - def item_public_token_exchange(item_public_token_exchange_request, opts = {}) - data, _status_code, _headers = item_public_token_exchange_with_http_info(item_public_token_exchange_request, opts) + # @return [ProcessorIdentityGetResponse] + def processor_identity_get(processor_identity_get_request, opts = {}) + data, _status_code, _headers = processor_identity_get_with_http_info(processor_identity_get_request, opts) data end - # Exchange public token for an access token - # Exchange a Link `public_token` for an API `access_token`. Link hands off the `public_token` client-side via the `onSuccess` callback once a user has successfully created an Item. The `public_token` is ephemeral and expires after 30 minutes. An `access_token` does not expire, but can be revoked by calling `/item/remove`. The response also includes an `item_id` that should be stored with the `access_token`. The `item_id` is used to identify an Item in a webhook. The `item_id` can also be retrieved by making an `/item/get` request. - # @param item_public_token_exchange_request [ItemPublicTokenExchangeRequest] + # Retrieve Identity data + # The `/processor/identity/get` endpoint allows you to retrieve various account holder information on file with the financial institution, including names, emails, phone numbers, and addresses. + # @param processor_identity_get_request [ProcessorIdentityGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(ItemPublicTokenExchangeResponse, Integer, Hash)>] ItemPublicTokenExchangeResponse data, response status code and response headers - def item_public_token_exchange_with_http_info(item_public_token_exchange_request, opts = {}) + # @return [Array<(ProcessorIdentityGetResponse, Integer, Hash)>] ProcessorIdentityGetResponse data, response status code and response headers + def processor_identity_get_with_http_info(processor_identity_get_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.item_public_token_exchange ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.processor_identity_get ...' end - # verify the required parameter 'item_public_token_exchange_request' is set - if @api_client.config.client_side_validation && item_public_token_exchange_request.nil? - fail ArgumentError, "Missing the required parameter 'item_public_token_exchange_request' when calling PlaidApi.item_public_token_exchange" + # verify the required parameter 'processor_identity_get_request' is set + if @api_client.config.client_side_validation && processor_identity_get_request.nil? + fail ArgumentError, "Missing the required parameter 'processor_identity_get_request' when calling PlaidApi.processor_identity_get" end # resource path - local_var_path = '/item/public_token/exchange' + local_var_path = '/processor/identity/get' # query parameters query_params = opts[:query_params] || {} @@ -3894,16 +5649,16 @@ def item_public_token_exchange_with_http_info(item_public_token_exchange_request form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(item_public_token_exchange_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(processor_identity_get_request) # return_type - return_type = opts[:debug_return_type] || 'ItemPublicTokenExchangeResponse' + return_type = opts[:debug_return_type] || 'ProcessorIdentityGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.item_public_token_exchange", + :operation => :"PlaidApi.processor_identity_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3914,36 +5669,36 @@ def item_public_token_exchange_with_http_info(item_public_token_exchange_request 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#item_public_token_exchange\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#processor_identity_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Remove an Item - # The `/item/remove` endpoint allows you to remove an Item. Once removed, the `access_token`, as well as any processor tokens or bank account tokens associated with the Item, is no longer valid and cannot be used to access any data that was associated with the Item. Note that in the Development environment, issuing an `/item/remove` request will not decrement your live credential count. To increase your credential account in Development, contact Support. Also note that for certain OAuth-based institutions, an Item removed via `/item/remove` may still show as an active connection in the institution's OAuth permission manager. API versions 2019-05-29 and earlier return a `removed` boolean as part of the response. - # @param item_remove_request [ItemRemoveRequest] + # 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`. + # @param processor_stripe_bank_account_token_create_request [ProcessorStripeBankAccountTokenCreateRequest] # @param [Hash] opts the optional parameters - # @return [ItemRemoveResponse] - def item_remove(item_remove_request, opts = {}) - data, _status_code, _headers = item_remove_with_http_info(item_remove_request, opts) + # @return [ProcessorStripeBankAccountTokenCreateResponse] + def processor_stripe_bank_account_token_create(processor_stripe_bank_account_token_create_request, opts = {}) + data, _status_code, _headers = processor_stripe_bank_account_token_create_with_http_info(processor_stripe_bank_account_token_create_request, opts) data end - # Remove an Item - # The `/item/remove` endpoint allows you to remove an Item. Once removed, the `access_token`, as well as any processor tokens or bank account tokens associated with the Item, is no longer valid and cannot be used to access any data that was associated with the Item. Note that in the Development environment, issuing an `/item/remove` request will not decrement your live credential count. To increase your credential account in Development, contact Support. Also note that for certain OAuth-based institutions, an Item removed via `/item/remove` may still show as an active connection in the institution's OAuth permission manager. API versions 2019-05-29 and earlier return a `removed` boolean as part of the response. - # @param item_remove_request [ItemRemoveRequest] + # 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`. + # @param processor_stripe_bank_account_token_create_request [ProcessorStripeBankAccountTokenCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(ItemRemoveResponse, Integer, Hash)>] ItemRemoveResponse data, response status code and response headers - def item_remove_with_http_info(item_remove_request, opts = {}) + # @return [Array<(ProcessorStripeBankAccountTokenCreateResponse, Integer, Hash)>] ProcessorStripeBankAccountTokenCreateResponse data, response status code and response headers + def processor_stripe_bank_account_token_create_with_http_info(processor_stripe_bank_account_token_create_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.item_remove ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.processor_stripe_bank_account_token_create ...' end - # verify the required parameter 'item_remove_request' is set - if @api_client.config.client_side_validation && item_remove_request.nil? - fail ArgumentError, "Missing the required parameter 'item_remove_request' when calling PlaidApi.item_remove" + # verify the required parameter 'processor_stripe_bank_account_token_create_request' is set + if @api_client.config.client_side_validation && processor_stripe_bank_account_token_create_request.nil? + fail ArgumentError, "Missing the required parameter 'processor_stripe_bank_account_token_create_request' when calling PlaidApi.processor_stripe_bank_account_token_create" end # resource path - local_var_path = '/item/remove' + local_var_path = '/processor/stripe/bank_account_token/create' # query parameters query_params = opts[:query_params] || {} @@ -3959,16 +5714,16 @@ def item_remove_with_http_info(item_remove_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(item_remove_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(processor_stripe_bank_account_token_create_request) # return_type - return_type = opts[:debug_return_type] || 'ItemRemoveResponse' + return_type = opts[:debug_return_type] || 'ProcessorStripeBankAccountTokenCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.item_remove", + :operation => :"PlaidApi.processor_stripe_bank_account_token_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3979,36 +5734,36 @@ def item_remove_with_http_info(item_remove_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#item_remove\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#processor_stripe_bank_account_token_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update Webhook URL - # The POST `/item/webhook/update` allows you to update the webhook URL associated with an Item. This request triggers a [`WEBHOOK_UPDATE_ACKNOWLEDGED`](https://plaid.com/docs/api/items/#webhook_update_acknowledged) webhook to the newly specified webhook URL. - # @param item_webhook_update_request [ItemWebhookUpdateRequest] + # 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`. + # @param processor_token_create_request [ProcessorTokenCreateRequest] # @param [Hash] opts the optional parameters - # @return [ItemWebhookUpdateResponse] - def item_webhook_update(item_webhook_update_request, opts = {}) - data, _status_code, _headers = item_webhook_update_with_http_info(item_webhook_update_request, opts) + # @return [ProcessorTokenCreateResponse] + def processor_token_create(processor_token_create_request, opts = {}) + data, _status_code, _headers = processor_token_create_with_http_info(processor_token_create_request, opts) data end - # Update Webhook URL - # The POST `/item/webhook/update` allows you to update the webhook URL associated with an Item. This request triggers a [`WEBHOOK_UPDATE_ACKNOWLEDGED`](https://plaid.com/docs/api/items/#webhook_update_acknowledged) webhook to the newly specified webhook URL. - # @param item_webhook_update_request [ItemWebhookUpdateRequest] + # 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`. + # @param processor_token_create_request [ProcessorTokenCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(ItemWebhookUpdateResponse, Integer, Hash)>] ItemWebhookUpdateResponse data, response status code and response headers - def item_webhook_update_with_http_info(item_webhook_update_request, opts = {}) + # @return [Array<(ProcessorTokenCreateResponse, Integer, Hash)>] ProcessorTokenCreateResponse data, response status code and response headers + def processor_token_create_with_http_info(processor_token_create_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.item_webhook_update ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.processor_token_create ...' end - # verify the required parameter 'item_webhook_update_request' is set - if @api_client.config.client_side_validation && item_webhook_update_request.nil? - fail ArgumentError, "Missing the required parameter 'item_webhook_update_request' when calling PlaidApi.item_webhook_update" + # verify the required parameter 'processor_token_create_request' is set + if @api_client.config.client_side_validation && processor_token_create_request.nil? + fail ArgumentError, "Missing the required parameter 'processor_token_create_request' when calling PlaidApi.processor_token_create" end # resource path - local_var_path = '/item/webhook/update' + local_var_path = '/processor/token/create' # query parameters query_params = opts[:query_params] || {} @@ -4024,16 +5779,16 @@ def item_webhook_update_with_http_info(item_webhook_update_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(item_webhook_update_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(processor_token_create_request) # return_type - return_type = opts[:debug_return_type] || 'ItemWebhookUpdateResponse' + return_type = opts[:debug_return_type] || 'ProcessorTokenCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.item_webhook_update", + :operation => :"PlaidApi.processor_token_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4044,36 +5799,36 @@ def item_webhook_update_with_http_info(item_webhook_update_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#item_webhook_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#processor_token_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Retrieve Liabilities data - # The `/liabilities/get` endpoint returns various details about an Item with loan or credit accounts. Liabilities data is available primarily for US financial institutions, with some limited coverage of Canadian institutions. Currently supported account types are account type `credit` with account subtype `credit card` or `paypal`, and account type `loan` with account subtype `student` or `mortgage`. To limit accounts listed in Link to types and subtypes supported by Liabilities, you can use the `account_filters` parameter when [creating a Link token](https://plaid.com/docs/api/tokens/#linktokencreate). The types of information returned by Liabilities can include balances and due dates, loan terms, and account details such as original loan amount and guarantor. Data is refreshed approximately once per day; the latest data can be retrieved by calling `/liabilities/get`. Note: This request may take some time to complete if `liabilities` was not specified as an initial product when creating the Item. This is because Plaid must communicate directly with the institution to retrieve the additional data. - # @param liabilities_get_request [LiabilitiesGetRequest] + # Manually fire a Bank Transfer webhook + # Use the `/sandbox/bank_transfer/fire_webhook` endpoint to manually trigger a Bank Transfers webhook in the Sandbox environment. + # @param sandbox_bank_transfer_fire_webhook_request [SandboxBankTransferFireWebhookRequest] # @param [Hash] opts the optional parameters - # @return [LiabilitiesGetResponse] - def liabilities_get(liabilities_get_request, opts = {}) - data, _status_code, _headers = liabilities_get_with_http_info(liabilities_get_request, opts) + # @return [SandboxBankTransferFireWebhookResponse] + def sandbox_bank_transfer_fire_webhook(sandbox_bank_transfer_fire_webhook_request, opts = {}) + data, _status_code, _headers = sandbox_bank_transfer_fire_webhook_with_http_info(sandbox_bank_transfer_fire_webhook_request, opts) data end - # Retrieve Liabilities data - # The `/liabilities/get` endpoint returns various details about an Item with loan or credit accounts. Liabilities data is available primarily for US financial institutions, with some limited coverage of Canadian institutions. Currently supported account types are account type `credit` with account subtype `credit card` or `paypal`, and account type `loan` with account subtype `student` or `mortgage`. To limit accounts listed in Link to types and subtypes supported by Liabilities, you can use the `account_filters` parameter when [creating a Link token](https://plaid.com/docs/api/tokens/#linktokencreate). The types of information returned by Liabilities can include balances and due dates, loan terms, and account details such as original loan amount and guarantor. Data is refreshed approximately once per day; the latest data can be retrieved by calling `/liabilities/get`. Note: This request may take some time to complete if `liabilities` was not specified as an initial product when creating the Item. This is because Plaid must communicate directly with the institution to retrieve the additional data. - # @param liabilities_get_request [LiabilitiesGetRequest] + # Manually fire a Bank Transfer webhook + # Use the `/sandbox/bank_transfer/fire_webhook` endpoint to manually trigger a Bank Transfers webhook in the Sandbox environment. + # @param sandbox_bank_transfer_fire_webhook_request [SandboxBankTransferFireWebhookRequest] # @param [Hash] opts the optional parameters - # @return [Array<(LiabilitiesGetResponse, Integer, Hash)>] LiabilitiesGetResponse data, response status code and response headers - def liabilities_get_with_http_info(liabilities_get_request, opts = {}) + # @return [Array<(SandboxBankTransferFireWebhookResponse, Integer, Hash)>] SandboxBankTransferFireWebhookResponse data, response status code and response headers + def sandbox_bank_transfer_fire_webhook_with_http_info(sandbox_bank_transfer_fire_webhook_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.liabilities_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_bank_transfer_fire_webhook ...' end - # verify the required parameter 'liabilities_get_request' is set - if @api_client.config.client_side_validation && liabilities_get_request.nil? - fail ArgumentError, "Missing the required parameter 'liabilities_get_request' when calling PlaidApi.liabilities_get" + # verify the required parameter 'sandbox_bank_transfer_fire_webhook_request' is set + if @api_client.config.client_side_validation && sandbox_bank_transfer_fire_webhook_request.nil? + fail ArgumentError, "Missing the required parameter 'sandbox_bank_transfer_fire_webhook_request' when calling PlaidApi.sandbox_bank_transfer_fire_webhook" end # resource path - local_var_path = '/liabilities/get' + local_var_path = '/sandbox/bank_transfer/fire_webhook' # query parameters query_params = opts[:query_params] || {} @@ -4089,16 +5844,16 @@ def liabilities_get_with_http_info(liabilities_get_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(liabilities_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_bank_transfer_fire_webhook_request) # return_type - return_type = opts[:debug_return_type] || 'LiabilitiesGetResponse' + return_type = opts[:debug_return_type] || 'SandboxBankTransferFireWebhookResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.liabilities_get", + :operation => :"PlaidApi.sandbox_bank_transfer_fire_webhook", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4109,36 +5864,36 @@ def liabilities_get_with_http_info(liabilities_get_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#liabilities_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#sandbox_bank_transfer_fire_webhook\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] + # Simulate a bank transfer event in Sandbox + # Use the `/sandbox/bank_transfer/simulate` endpoint to simulate a bank transfer event in the Sandbox environment. Note that while an event will be simulated and will appear when using endpoints such as `/bank_transfer/event/sync` or `/bank_transfer/event/list`, no transactions will actually take place and funds will not move between accounts, even within the Sandbox. + # @param sandbox_bank_transfer_simulate_request [SandboxBankTransferSimulateRequest] # @param [Hash] opts the optional parameters - # @return [LinkTokenCreateResponse] - def link_token_create(link_token_create_request, opts = {}) - data, _status_code, _headers = link_token_create_with_http_info(link_token_create_request, opts) + # @return [SandboxBankTransferSimulateResponse] + def sandbox_bank_transfer_simulate(sandbox_bank_transfer_simulate_request, opts = {}) + data, _status_code, _headers = sandbox_bank_transfer_simulate_with_http_info(sandbox_bank_transfer_simulate_request, opts) data 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] + # Simulate a bank transfer event in Sandbox + # Use the `/sandbox/bank_transfer/simulate` endpoint to simulate a bank transfer event in the Sandbox environment. Note that while an event will be simulated and will appear when using endpoints such as `/bank_transfer/event/sync` or `/bank_transfer/event/list`, no transactions will actually take place and funds will not move between accounts, even within the Sandbox. + # @param sandbox_bank_transfer_simulate_request [SandboxBankTransferSimulateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(LinkTokenCreateResponse, Integer, Hash)>] LinkTokenCreateResponse data, response status code and response headers - def link_token_create_with_http_info(link_token_create_request, opts = {}) + # @return [Array<(SandboxBankTransferSimulateResponse, Integer, Hash)>] SandboxBankTransferSimulateResponse data, response status code and response headers + def sandbox_bank_transfer_simulate_with_http_info(sandbox_bank_transfer_simulate_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.link_token_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_bank_transfer_simulate ...' end - # verify the required parameter 'link_token_create_request' is set - if @api_client.config.client_side_validation && link_token_create_request.nil? - fail ArgumentError, "Missing the required parameter 'link_token_create_request' when calling PlaidApi.link_token_create" + # verify the required parameter 'sandbox_bank_transfer_simulate_request' is set + if @api_client.config.client_side_validation && sandbox_bank_transfer_simulate_request.nil? + fail ArgumentError, "Missing the required parameter 'sandbox_bank_transfer_simulate_request' when calling PlaidApi.sandbox_bank_transfer_simulate" end # resource path - local_var_path = '/link/token/create' + local_var_path = '/sandbox/bank_transfer/simulate' # query parameters query_params = opts[:query_params] || {} @@ -4154,16 +5909,16 @@ def link_token_create_with_http_info(link_token_create_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(link_token_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_bank_transfer_simulate_request) # return_type - return_type = opts[:debug_return_type] || 'LinkTokenCreateResponse' + return_type = opts[:debug_return_type] || 'SandboxBankTransferSimulateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.link_token_create", + :operation => :"PlaidApi.sandbox_bank_transfer_simulate", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4174,36 +5929,36 @@ def link_token_create_with_http_info(link_token_create_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#link_token_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#sandbox_bank_transfer_simulate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get Link Token - # The `/link/token/get` endpoint gets information about a previously-created `link_token` using the `/link/token/create` endpoint. It can be useful for debugging purposes. - # @param link_token_get_request [LinkTokenGetRequest] + # Manually fire an Income webhook + # Use the `/sandbox/income/fire_webhook` endpoint to manually trigger an Income webhook in the Sandbox environment. + # @param sandbox_income_fire_webhook_request [SandboxIncomeFireWebhookRequest] # @param [Hash] opts the optional parameters - # @return [LinkTokenGetResponse] - def link_token_get(link_token_get_request, opts = {}) - data, _status_code, _headers = link_token_get_with_http_info(link_token_get_request, opts) + # @return [SandboxIncomeFireWebhookResponse] + def sandbox_income_fire_webhook(sandbox_income_fire_webhook_request, opts = {}) + data, _status_code, _headers = sandbox_income_fire_webhook_with_http_info(sandbox_income_fire_webhook_request, opts) data end - # Get Link Token - # The `/link/token/get` endpoint gets information about a previously-created `link_token` using the `/link/token/create` endpoint. It can be useful for debugging purposes. - # @param link_token_get_request [LinkTokenGetRequest] + # Manually fire an Income webhook + # Use the `/sandbox/income/fire_webhook` endpoint to manually trigger an Income webhook in the Sandbox environment. + # @param sandbox_income_fire_webhook_request [SandboxIncomeFireWebhookRequest] # @param [Hash] opts the optional parameters - # @return [Array<(LinkTokenGetResponse, Integer, Hash)>] LinkTokenGetResponse data, response status code and response headers - def link_token_get_with_http_info(link_token_get_request, opts = {}) + # @return [Array<(SandboxIncomeFireWebhookResponse, Integer, Hash)>] SandboxIncomeFireWebhookResponse data, response status code and response headers + def sandbox_income_fire_webhook_with_http_info(sandbox_income_fire_webhook_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.link_token_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_income_fire_webhook ...' end - # verify the required parameter 'link_token_get_request' is set - if @api_client.config.client_side_validation && link_token_get_request.nil? - fail ArgumentError, "Missing the required parameter 'link_token_get_request' when calling PlaidApi.link_token_get" + # verify the required parameter 'sandbox_income_fire_webhook_request' is set + if @api_client.config.client_side_validation && sandbox_income_fire_webhook_request.nil? + fail ArgumentError, "Missing the required parameter 'sandbox_income_fire_webhook_request' when calling PlaidApi.sandbox_income_fire_webhook" end # resource path - local_var_path = '/link/token/get' + local_var_path = '/sandbox/income/fire_webhook' # query parameters query_params = opts[:query_params] || {} @@ -4219,16 +5974,16 @@ def link_token_get_with_http_info(link_token_get_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(link_token_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_income_fire_webhook_request) # return_type - return_type = opts[:debug_return_type] || 'LinkTokenGetResponse' + return_type = opts[:debug_return_type] || 'SandboxIncomeFireWebhookResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.link_token_get", + :operation => :"PlaidApi.sandbox_income_fire_webhook", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4239,36 +5994,36 @@ def link_token_get_with_http_info(link_token_get_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#link_token_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#sandbox_income_fire_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create payment consent - # The `/payment_initiation/consent/create` endpoint is used to create a payment consent, which can be used to initiate payments on behalf of the user. Payment consents are created with `UNAUTHORISED` status by default and must be authorised by the user before payments can be initiated. Consents can be limited in time and scope, and have constraints that describe limitations for payments. - # @param payment_initiation_consent_create_request [PaymentInitiationConsentCreateRequest] + # Fire a test webhook + # The `/sandbox/item/fire_webhook` endpoint is used to test that code correctly handles webhooks. This endpoint can trigger the following webhooks: `DEFAULT_UPDATE`: Transactions update webhook to be fired for a given Sandbox Item. If the Item does not support Transactions, a `SANDBOX_PRODUCT_NOT_ENABLED` error will result. `NEW_ACCOUNTS_AVAILABLE`: Webhook to be fired for a given Sandbox Item created with Account Select v2. `AUTH_DATA_UPDATE`: Webhook to be fired for a given Sandbox Item created with Auth as an enabled product. Note that this endpoint is provided for developer ease-of-use and is not required for testing webhooks; webhooks will also fire in Sandbox under the same conditions that they would in Production or Development' + # @param sandbox_item_fire_webhook_request [SandboxItemFireWebhookRequest] # @param [Hash] opts the optional parameters - # @return [PaymentInitiationConsentCreateResponse] - def payment_initiation_consent_create(payment_initiation_consent_create_request, opts = {}) - data, _status_code, _headers = payment_initiation_consent_create_with_http_info(payment_initiation_consent_create_request, opts) + # @return [SandboxItemFireWebhookResponse] + def sandbox_item_fire_webhook(sandbox_item_fire_webhook_request, opts = {}) + data, _status_code, _headers = sandbox_item_fire_webhook_with_http_info(sandbox_item_fire_webhook_request, opts) data end - # Create payment consent - # The `/payment_initiation/consent/create` endpoint is used to create a payment consent, which can be used to initiate payments on behalf of the user. Payment consents are created with `UNAUTHORISED` status by default and must be authorised by the user before payments can be initiated. Consents can be limited in time and scope, and have constraints that describe limitations for payments. - # @param payment_initiation_consent_create_request [PaymentInitiationConsentCreateRequest] + # Fire a test webhook + # The `/sandbox/item/fire_webhook` endpoint is used to test that code correctly handles webhooks. This endpoint can trigger the following webhooks: `DEFAULT_UPDATE`: Transactions update webhook to be fired for a given Sandbox Item. If the Item does not support Transactions, a `SANDBOX_PRODUCT_NOT_ENABLED` error will result. `NEW_ACCOUNTS_AVAILABLE`: Webhook to be fired for a given Sandbox Item created with Account Select v2. `AUTH_DATA_UPDATE`: Webhook to be fired for a given Sandbox Item created with Auth as an enabled product. Note that this endpoint is provided for developer ease-of-use and is not required for testing webhooks; webhooks will also fire in Sandbox under the same conditions that they would in Production or Development' + # @param sandbox_item_fire_webhook_request [SandboxItemFireWebhookRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaymentInitiationConsentCreateResponse, Integer, Hash)>] PaymentInitiationConsentCreateResponse data, response status code and response headers - def payment_initiation_consent_create_with_http_info(payment_initiation_consent_create_request, opts = {}) + # @return [Array<(SandboxItemFireWebhookResponse, Integer, Hash)>] SandboxItemFireWebhookResponse data, response status code and response headers + def sandbox_item_fire_webhook_with_http_info(sandbox_item_fire_webhook_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_consent_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_item_fire_webhook ...' end - # verify the required parameter 'payment_initiation_consent_create_request' is set - if @api_client.config.client_side_validation && payment_initiation_consent_create_request.nil? - fail ArgumentError, "Missing the required parameter 'payment_initiation_consent_create_request' when calling PlaidApi.payment_initiation_consent_create" + # verify the required parameter 'sandbox_item_fire_webhook_request' is set + if @api_client.config.client_side_validation && sandbox_item_fire_webhook_request.nil? + fail ArgumentError, "Missing the required parameter 'sandbox_item_fire_webhook_request' when calling PlaidApi.sandbox_item_fire_webhook" end # resource path - local_var_path = '/payment_initiation/consent/create' + local_var_path = '/sandbox/item/fire_webhook' # query parameters query_params = opts[:query_params] || {} @@ -4284,16 +6039,16 @@ def payment_initiation_consent_create_with_http_info(payment_initiation_consent_ form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_consent_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_item_fire_webhook_request) # return_type - return_type = opts[:debug_return_type] || 'PaymentInitiationConsentCreateResponse' + return_type = opts[:debug_return_type] || 'SandboxItemFireWebhookResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.payment_initiation_consent_create", + :operation => :"PlaidApi.sandbox_item_fire_webhook", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4304,36 +6059,36 @@ def payment_initiation_consent_create_with_http_info(payment_initiation_consent_ 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#payment_initiation_consent_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#sandbox_item_fire_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get payment consent - # The `/payment_initiation/consent/get` endpoint can be used to check the status of a payment consent, as well as to receive basic information such as recipient and constraints. - # @param payment_initiation_consent_get_request [PaymentInitiationConsentGetRequest] + # Force a Sandbox Item into an error state + # `/sandbox/item/reset_login/` forces an Item into an `ITEM_LOGIN_REQUIRED` state in order to simulate an Item whose login is no longer valid. This makes it easy to test Link's [update mode](https://plaid.com/docs/link/update-mode) flow in the Sandbox environment. After calling `/sandbox/item/reset_login`, You can then use Plaid Link update mode to restore the Item to a good state. An `ITEM_LOGIN_REQUIRED` webhook will also be fired after a call to this endpoint, if one is associated with the Item. In the Sandbox, Items will transition to an `ITEM_LOGIN_REQUIRED` error state automatically after 30 days, even if this endpoint is not called. + # @param sandbox_item_reset_login_request [SandboxItemResetLoginRequest] # @param [Hash] opts the optional parameters - # @return [PaymentInitiationConsentGetResponse] - def payment_initiation_consent_get(payment_initiation_consent_get_request, opts = {}) - data, _status_code, _headers = payment_initiation_consent_get_with_http_info(payment_initiation_consent_get_request, opts) + # @return [SandboxItemResetLoginResponse] + def sandbox_item_reset_login(sandbox_item_reset_login_request, opts = {}) + data, _status_code, _headers = sandbox_item_reset_login_with_http_info(sandbox_item_reset_login_request, opts) data end - # Get payment consent - # The `/payment_initiation/consent/get` endpoint can be used to check the status of a payment consent, as well as to receive basic information such as recipient and constraints. - # @param payment_initiation_consent_get_request [PaymentInitiationConsentGetRequest] + # Force a Sandbox Item into an error state + # `/sandbox/item/reset_login/` forces an Item into an `ITEM_LOGIN_REQUIRED` state in order to simulate an Item whose login is no longer valid. This makes it easy to test Link's [update mode](https://plaid.com/docs/link/update-mode) flow in the Sandbox environment. After calling `/sandbox/item/reset_login`, You can then use Plaid Link update mode to restore the Item to a good state. An `ITEM_LOGIN_REQUIRED` webhook will also be fired after a call to this endpoint, if one is associated with the Item. In the Sandbox, Items will transition to an `ITEM_LOGIN_REQUIRED` error state automatically after 30 days, even if this endpoint is not called. + # @param sandbox_item_reset_login_request [SandboxItemResetLoginRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaymentInitiationConsentGetResponse, Integer, Hash)>] PaymentInitiationConsentGetResponse data, response status code and response headers - def payment_initiation_consent_get_with_http_info(payment_initiation_consent_get_request, opts = {}) + # @return [Array<(SandboxItemResetLoginResponse, Integer, Hash)>] SandboxItemResetLoginResponse data, response status code and response headers + def sandbox_item_reset_login_with_http_info(sandbox_item_reset_login_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_consent_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_item_reset_login ...' end - # verify the required parameter 'payment_initiation_consent_get_request' is set - if @api_client.config.client_side_validation && payment_initiation_consent_get_request.nil? - fail ArgumentError, "Missing the required parameter 'payment_initiation_consent_get_request' when calling PlaidApi.payment_initiation_consent_get" + # verify the required parameter 'sandbox_item_reset_login_request' is set + if @api_client.config.client_side_validation && sandbox_item_reset_login_request.nil? + fail ArgumentError, "Missing the required parameter 'sandbox_item_reset_login_request' when calling PlaidApi.sandbox_item_reset_login" end # resource path - local_var_path = '/payment_initiation/consent/get' + local_var_path = '/sandbox/item/reset_login' # query parameters query_params = opts[:query_params] || {} @@ -4349,16 +6104,16 @@ def payment_initiation_consent_get_with_http_info(payment_initiation_consent_get form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_consent_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_item_reset_login_request) # return_type - return_type = opts[:debug_return_type] || 'PaymentInitiationConsentGetResponse' + return_type = opts[:debug_return_type] || 'SandboxItemResetLoginResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.payment_initiation_consent_get", + :operation => :"PlaidApi.sandbox_item_reset_login", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4369,36 +6124,36 @@ def payment_initiation_consent_get_with_http_info(payment_initiation_consent_get 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#payment_initiation_consent_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#sandbox_item_reset_login\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Execute a single payment using consent - # The `/payment_initiation/consent/payment/execute` endpoint can be used to execute payments using payment consent. - # @param payment_initiation_consent_payment_execute_request [PaymentInitiationConsentPaymentExecuteRequest] + # Set verification status for Sandbox account + # The `/sandbox/item/set_verification_status` endpoint can be used to change the verification status of an Item in in the Sandbox in order to simulate the Automated Micro-deposit flow. Note that not all Plaid developer accounts are enabled for micro-deposit based verification by default. Your account must be enabled for this feature in order to test it in Sandbox. To enable this features or check your status, contact your account manager or [submit a product access Support ticket](https://dashboard.plaid.com/support/new/product-and-development/product-troubleshooting/request-product-access). For more information on testing Automated Micro-deposits in Sandbox, see [Auth full coverage testing](https://plaid.com/docs/auth/coverage/testing#). + # @param sandbox_item_set_verification_status_request [SandboxItemSetVerificationStatusRequest] # @param [Hash] opts the optional parameters - # @return [PaymentInitiationConsentPaymentExecuteResponse] - def payment_initiation_consent_payment_execute(payment_initiation_consent_payment_execute_request, opts = {}) - data, _status_code, _headers = payment_initiation_consent_payment_execute_with_http_info(payment_initiation_consent_payment_execute_request, opts) + # @return [SandboxItemSetVerificationStatusResponse] + def sandbox_item_set_verification_status(sandbox_item_set_verification_status_request, opts = {}) + data, _status_code, _headers = sandbox_item_set_verification_status_with_http_info(sandbox_item_set_verification_status_request, opts) data end - # Execute a single payment using consent - # The `/payment_initiation/consent/payment/execute` endpoint can be used to execute payments using payment consent. - # @param payment_initiation_consent_payment_execute_request [PaymentInitiationConsentPaymentExecuteRequest] + # Set verification status for Sandbox account + # The `/sandbox/item/set_verification_status` endpoint can be used to change the verification status of an Item in in the Sandbox in order to simulate the Automated Micro-deposit flow. Note that not all Plaid developer accounts are enabled for micro-deposit based verification by default. Your account must be enabled for this feature in order to test it in Sandbox. To enable this features or check your status, contact your account manager or [submit a product access Support ticket](https://dashboard.plaid.com/support/new/product-and-development/product-troubleshooting/request-product-access). For more information on testing Automated Micro-deposits in Sandbox, see [Auth full coverage testing](https://plaid.com/docs/auth/coverage/testing#). + # @param sandbox_item_set_verification_status_request [SandboxItemSetVerificationStatusRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaymentInitiationConsentPaymentExecuteResponse, Integer, Hash)>] PaymentInitiationConsentPaymentExecuteResponse data, response status code and response headers - def payment_initiation_consent_payment_execute_with_http_info(payment_initiation_consent_payment_execute_request, opts = {}) + # @return [Array<(SandboxItemSetVerificationStatusResponse, Integer, Hash)>] SandboxItemSetVerificationStatusResponse data, response status code and response headers + def sandbox_item_set_verification_status_with_http_info(sandbox_item_set_verification_status_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_consent_payment_execute ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_item_set_verification_status ...' end - # verify the required parameter 'payment_initiation_consent_payment_execute_request' is set - if @api_client.config.client_side_validation && payment_initiation_consent_payment_execute_request.nil? - fail ArgumentError, "Missing the required parameter 'payment_initiation_consent_payment_execute_request' when calling PlaidApi.payment_initiation_consent_payment_execute" + # verify the required parameter 'sandbox_item_set_verification_status_request' is set + if @api_client.config.client_side_validation && sandbox_item_set_verification_status_request.nil? + fail ArgumentError, "Missing the required parameter 'sandbox_item_set_verification_status_request' when calling PlaidApi.sandbox_item_set_verification_status" end # resource path - local_var_path = '/payment_initiation/consent/payment/execute' + local_var_path = '/sandbox/item/set_verification_status' # query parameters query_params = opts[:query_params] || {} @@ -4414,16 +6169,16 @@ def payment_initiation_consent_payment_execute_with_http_info(payment_initiation form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_consent_payment_execute_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_item_set_verification_status_request) # return_type - return_type = opts[:debug_return_type] || 'PaymentInitiationConsentPaymentExecuteResponse' + return_type = opts[:debug_return_type] || 'SandboxItemSetVerificationStatusResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.payment_initiation_consent_payment_execute", + :operation => :"PlaidApi.sandbox_item_set_verification_status", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4434,36 +6189,36 @@ def payment_initiation_consent_payment_execute_with_http_info(payment_initiation 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#payment_initiation_consent_payment_execute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#sandbox_item_set_verification_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Revoke payment consent - # The `/payment_initiation/consent/revoke` endpoint can be used to revoke the payment consent. Once the consent is revoked, it is not possible to initiate payments using it. - # @param payment_initiation_consent_revoke_request [PaymentInitiationConsentRevokeRequest] + # Save the selected accounts when connecting to the Platypus Oauth institution + # Save the selected accounts when connecting to the Platypus Oauth institution + # @param sandbox_oauth_select_accounts_request [SandboxOauthSelectAccountsRequest] # @param [Hash] opts the optional parameters - # @return [PaymentInitiationConsentRevokeResponse] - def payment_initiation_consent_revoke(payment_initiation_consent_revoke_request, opts = {}) - data, _status_code, _headers = payment_initiation_consent_revoke_with_http_info(payment_initiation_consent_revoke_request, opts) + # @return [Hash] + def sandbox_oauth_select_accounts(sandbox_oauth_select_accounts_request, opts = {}) + data, _status_code, _headers = sandbox_oauth_select_accounts_with_http_info(sandbox_oauth_select_accounts_request, opts) data end - # Revoke payment consent - # The `/payment_initiation/consent/revoke` endpoint can be used to revoke the payment consent. Once the consent is revoked, it is not possible to initiate payments using it. - # @param payment_initiation_consent_revoke_request [PaymentInitiationConsentRevokeRequest] + # Save the selected accounts when connecting to the Platypus Oauth institution + # Save the selected accounts when connecting to the Platypus Oauth institution + # @param sandbox_oauth_select_accounts_request [SandboxOauthSelectAccountsRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaymentInitiationConsentRevokeResponse, Integer, Hash)>] PaymentInitiationConsentRevokeResponse data, response status code and response headers - def payment_initiation_consent_revoke_with_http_info(payment_initiation_consent_revoke_request, opts = {}) + # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers + def sandbox_oauth_select_accounts_with_http_info(sandbox_oauth_select_accounts_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_consent_revoke ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_oauth_select_accounts ...' end - # verify the required parameter 'payment_initiation_consent_revoke_request' is set - if @api_client.config.client_side_validation && payment_initiation_consent_revoke_request.nil? - fail ArgumentError, "Missing the required parameter 'payment_initiation_consent_revoke_request' when calling PlaidApi.payment_initiation_consent_revoke" + # verify the required parameter 'sandbox_oauth_select_accounts_request' is set + if @api_client.config.client_side_validation && sandbox_oauth_select_accounts_request.nil? + fail ArgumentError, "Missing the required parameter 'sandbox_oauth_select_accounts_request' when calling PlaidApi.sandbox_oauth_select_accounts" end # resource path - local_var_path = '/payment_initiation/consent/revoke' + local_var_path = '/sandbox/oauth/select_accounts' # query parameters query_params = opts[:query_params] || {} @@ -4479,16 +6234,16 @@ def payment_initiation_consent_revoke_with_http_info(payment_initiation_consent_ form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_consent_revoke_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_oauth_select_accounts_request) # return_type - return_type = opts[:debug_return_type] || 'PaymentInitiationConsentRevokeResponse' + return_type = opts[:debug_return_type] || 'Hash' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.payment_initiation_consent_revoke", + :operation => :"PlaidApi.sandbox_oauth_select_accounts", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4499,36 +6254,36 @@ def payment_initiation_consent_revoke_with_http_info(payment_initiation_consent_ 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#payment_initiation_consent_revoke\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#sandbox_oauth_select_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a payment - # After creating a payment recipient, you can use the `/payment_initiation/payment/create` endpoint to create a payment to that recipient. Payments can be one-time or standing order (recurring) and can be denominated in either EUR or GBP. If making domestic GBP-denominated payments, your recipient must have been created with BACS numbers. In general, EUR-denominated payments will be sent via SEPA Credit Transfer and GBP-denominated payments will be sent via the Faster Payments network, but the payment network used will be determined by the institution. Payments sent via Faster Payments will typically arrive immediately, while payments sent via SEPA Credit Transfer will typically arrive in one business day. Standing orders (recurring payments) must be denominated in GBP and can only be sent to recipients in the UK. Once created, standing order payments cannot be modified or canceled via the API. An end user can cancel or modify a standing order directly on their banking application or website, or by contacting the bank. Standing orders will follow the payment rules of the underlying rails (Faster Payments in UK). Payments can be sent Monday to Friday, excluding bank holidays. If the pre-arranged date falls on a weekend or bank holiday, the payment is made on the next working day. It is not possible to guarantee the exact time the payment will reach the recipient’s account, although at least 90% of standing order payments are sent by 6am. In the Development environment, payments must be below 5 GBP / EUR. For details on any payment limits in Production, contact your Plaid Account Manager. - # @param payment_initiation_payment_create_request [PaymentInitiationPaymentCreateRequest] + # Create a test Item and processor token + # Use the `/sandbox/processor_token/create` endpoint to create a valid `processor_token` for an arbitrary institution ID and test credentials. The created `processor_token` corresponds to a new Sandbox Item. You can then use this `processor_token` with the `/processor/` API endpoints in Sandbox. You can also use `/sandbox/processor_token/create` with the [`user_custom` test username](https://plaid.com/docs/sandbox/user-custom) to generate a test account with custom data. + # @param sandbox_processor_token_create_request [SandboxProcessorTokenCreateRequest] # @param [Hash] opts the optional parameters - # @return [PaymentInitiationPaymentCreateResponse] - def payment_initiation_payment_create(payment_initiation_payment_create_request, opts = {}) - data, _status_code, _headers = payment_initiation_payment_create_with_http_info(payment_initiation_payment_create_request, opts) + # @return [SandboxProcessorTokenCreateResponse] + def sandbox_processor_token_create(sandbox_processor_token_create_request, opts = {}) + data, _status_code, _headers = sandbox_processor_token_create_with_http_info(sandbox_processor_token_create_request, opts) data end - # Create a payment - # After creating a payment recipient, you can use the `/payment_initiation/payment/create` endpoint to create a payment to that recipient. Payments can be one-time or standing order (recurring) and can be denominated in either EUR or GBP. If making domestic GBP-denominated payments, your recipient must have been created with BACS numbers. In general, EUR-denominated payments will be sent via SEPA Credit Transfer and GBP-denominated payments will be sent via the Faster Payments network, but the payment network used will be determined by the institution. Payments sent via Faster Payments will typically arrive immediately, while payments sent via SEPA Credit Transfer will typically arrive in one business day. Standing orders (recurring payments) must be denominated in GBP and can only be sent to recipients in the UK. Once created, standing order payments cannot be modified or canceled via the API. An end user can cancel or modify a standing order directly on their banking application or website, or by contacting the bank. Standing orders will follow the payment rules of the underlying rails (Faster Payments in UK). Payments can be sent Monday to Friday, excluding bank holidays. If the pre-arranged date falls on a weekend or bank holiday, the payment is made on the next working day. It is not possible to guarantee the exact time the payment will reach the recipient’s account, although at least 90% of standing order payments are sent by 6am. In the Development environment, payments must be below 5 GBP / EUR. For details on any payment limits in Production, contact your Plaid Account Manager. - # @param payment_initiation_payment_create_request [PaymentInitiationPaymentCreateRequest] + # Create a test Item and processor token + # Use the `/sandbox/processor_token/create` endpoint to create a valid `processor_token` for an arbitrary institution ID and test credentials. The created `processor_token` corresponds to a new Sandbox Item. You can then use this `processor_token` with the `/processor/` API endpoints in Sandbox. You can also use `/sandbox/processor_token/create` with the [`user_custom` test username](https://plaid.com/docs/sandbox/user-custom) to generate a test account with custom data. + # @param sandbox_processor_token_create_request [SandboxProcessorTokenCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaymentInitiationPaymentCreateResponse, Integer, Hash)>] PaymentInitiationPaymentCreateResponse data, response status code and response headers - def payment_initiation_payment_create_with_http_info(payment_initiation_payment_create_request, opts = {}) + # @return [Array<(SandboxProcessorTokenCreateResponse, Integer, Hash)>] SandboxProcessorTokenCreateResponse data, response status code and response headers + def sandbox_processor_token_create_with_http_info(sandbox_processor_token_create_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_payment_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_processor_token_create ...' end - # verify the required parameter 'payment_initiation_payment_create_request' is set - if @api_client.config.client_side_validation && payment_initiation_payment_create_request.nil? - fail ArgumentError, "Missing the required parameter 'payment_initiation_payment_create_request' when calling PlaidApi.payment_initiation_payment_create" + # verify the required parameter 'sandbox_processor_token_create_request' is set + if @api_client.config.client_side_validation && sandbox_processor_token_create_request.nil? + fail ArgumentError, "Missing the required parameter 'sandbox_processor_token_create_request' when calling PlaidApi.sandbox_processor_token_create" end # resource path - local_var_path = '/payment_initiation/payment/create' + local_var_path = '/sandbox/processor_token/create' # query parameters query_params = opts[:query_params] || {} @@ -4544,16 +6299,16 @@ def payment_initiation_payment_create_with_http_info(payment_initiation_payment_ form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_payment_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_processor_token_create_request) # return_type - return_type = opts[:debug_return_type] || 'PaymentInitiationPaymentCreateResponse' + return_type = opts[:debug_return_type] || 'SandboxProcessorTokenCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.payment_initiation_payment_create", + :operation => :"PlaidApi.sandbox_processor_token_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4564,36 +6319,36 @@ def payment_initiation_payment_create_with_http_info(payment_initiation_payment_ 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#payment_initiation_payment_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#sandbox_processor_token_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get payment details - # The `/payment_initiation/payment/get` endpoint can be used to check the status of a payment, as well as to receive basic information such as recipient and payment amount. In the case of standing orders, the `/payment_initiation/payment/get` endpoint will provide information about the status of the overall standing order itself; the API cannot be used to retrieve payment status for individual payments within a standing order. - # @param payment_initiation_payment_get_request [PaymentInitiationPaymentGetRequest] + # Create a test Item + # Use the `/sandbox/public_token/create` endpoint to create a valid `public_token` for an arbitrary institution ID, initial products, and test credentials. The created `public_token` maps to a new Sandbox Item. You can then call `/item/public_token/exchange` to exchange the `public_token` for an `access_token` and perform all API actions. `/sandbox/public_token/create` can also be used with the [`user_custom` test username](https://plaid.com/docs/sandbox/user-custom) to generate a test account with custom data. `/sandbox/public_token/create` cannot be used with OAuth institutions. + # @param sandbox_public_token_create_request [SandboxPublicTokenCreateRequest] # @param [Hash] opts the optional parameters - # @return [PaymentInitiationPaymentGetResponse] - def payment_initiation_payment_get(payment_initiation_payment_get_request, opts = {}) - data, _status_code, _headers = payment_initiation_payment_get_with_http_info(payment_initiation_payment_get_request, opts) + # @return [SandboxPublicTokenCreateResponse] + def sandbox_public_token_create(sandbox_public_token_create_request, opts = {}) + data, _status_code, _headers = sandbox_public_token_create_with_http_info(sandbox_public_token_create_request, opts) data end - # Get payment details - # The `/payment_initiation/payment/get` endpoint can be used to check the status of a payment, as well as to receive basic information such as recipient and payment amount. In the case of standing orders, the `/payment_initiation/payment/get` endpoint will provide information about the status of the overall standing order itself; the API cannot be used to retrieve payment status for individual payments within a standing order. - # @param payment_initiation_payment_get_request [PaymentInitiationPaymentGetRequest] + # Create a test Item + # Use the `/sandbox/public_token/create` endpoint to create a valid `public_token` for an arbitrary institution ID, initial products, and test credentials. The created `public_token` maps to a new Sandbox Item. You can then call `/item/public_token/exchange` to exchange the `public_token` for an `access_token` and perform all API actions. `/sandbox/public_token/create` can also be used with the [`user_custom` test username](https://plaid.com/docs/sandbox/user-custom) to generate a test account with custom data. `/sandbox/public_token/create` cannot be used with OAuth institutions. + # @param sandbox_public_token_create_request [SandboxPublicTokenCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaymentInitiationPaymentGetResponse, Integer, Hash)>] PaymentInitiationPaymentGetResponse data, response status code and response headers - def payment_initiation_payment_get_with_http_info(payment_initiation_payment_get_request, opts = {}) + # @return [Array<(SandboxPublicTokenCreateResponse, Integer, Hash)>] SandboxPublicTokenCreateResponse data, response status code and response headers + def sandbox_public_token_create_with_http_info(sandbox_public_token_create_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_payment_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_public_token_create ...' end - # verify the required parameter 'payment_initiation_payment_get_request' is set - if @api_client.config.client_side_validation && payment_initiation_payment_get_request.nil? - fail ArgumentError, "Missing the required parameter 'payment_initiation_payment_get_request' when calling PlaidApi.payment_initiation_payment_get" + # verify the required parameter 'sandbox_public_token_create_request' is set + if @api_client.config.client_side_validation && sandbox_public_token_create_request.nil? + fail ArgumentError, "Missing the required parameter 'sandbox_public_token_create_request' when calling PlaidApi.sandbox_public_token_create" end # resource path - local_var_path = '/payment_initiation/payment/get' + local_var_path = '/sandbox/public_token/create' # query parameters query_params = opts[:query_params] || {} @@ -4609,16 +6364,16 @@ def payment_initiation_payment_get_with_http_info(payment_initiation_payment_get form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_payment_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_public_token_create_request) # return_type - return_type = opts[:debug_return_type] || 'PaymentInitiationPaymentGetResponse' + return_type = opts[:debug_return_type] || 'SandboxPublicTokenCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.payment_initiation_payment_get", + :operation => :"PlaidApi.sandbox_public_token_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4629,36 +6384,36 @@ def payment_initiation_payment_get_with_http_info(payment_initiation_payment_get 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#payment_initiation_payment_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#sandbox_public_token_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List payments - # The `/payment_initiation/payment/list` endpoint can be used to retrieve all created payments. By default, the 10 most recent payments are returned. You can request more payments and paginate through the results using the optional `count` and `cursor` parameters. - # @param payment_initiation_payment_list_request [PaymentInitiationPaymentListRequest] + # Manually fire a Transfer webhook + # Use the `/sandbox/transfer/fire_webhook` endpoint to manually trigger a Transfer webhook in the Sandbox environment. + # @param sandbox_transfer_fire_webhook_request [SandboxTransferFireWebhookRequest] # @param [Hash] opts the optional parameters - # @return [PaymentInitiationPaymentListResponse] - def payment_initiation_payment_list(payment_initiation_payment_list_request, opts = {}) - data, _status_code, _headers = payment_initiation_payment_list_with_http_info(payment_initiation_payment_list_request, opts) + # @return [SandboxTransferFireWebhookResponse] + def sandbox_transfer_fire_webhook(sandbox_transfer_fire_webhook_request, opts = {}) + data, _status_code, _headers = sandbox_transfer_fire_webhook_with_http_info(sandbox_transfer_fire_webhook_request, opts) data end - # List payments - # The `/payment_initiation/payment/list` endpoint can be used to retrieve all created payments. By default, the 10 most recent payments are returned. You can request more payments and paginate through the results using the optional `count` and `cursor` parameters. - # @param payment_initiation_payment_list_request [PaymentInitiationPaymentListRequest] + # Manually fire a Transfer webhook + # Use the `/sandbox/transfer/fire_webhook` endpoint to manually trigger a Transfer webhook in the Sandbox environment. + # @param sandbox_transfer_fire_webhook_request [SandboxTransferFireWebhookRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaymentInitiationPaymentListResponse, Integer, Hash)>] PaymentInitiationPaymentListResponse data, response status code and response headers - def payment_initiation_payment_list_with_http_info(payment_initiation_payment_list_request, opts = {}) + # @return [Array<(SandboxTransferFireWebhookResponse, Integer, Hash)>] SandboxTransferFireWebhookResponse data, response status code and response headers + def sandbox_transfer_fire_webhook_with_http_info(sandbox_transfer_fire_webhook_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_payment_list ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_transfer_fire_webhook ...' end - # verify the required parameter 'payment_initiation_payment_list_request' is set - if @api_client.config.client_side_validation && payment_initiation_payment_list_request.nil? - fail ArgumentError, "Missing the required parameter 'payment_initiation_payment_list_request' when calling PlaidApi.payment_initiation_payment_list" + # verify the required parameter 'sandbox_transfer_fire_webhook_request' is set + if @api_client.config.client_side_validation && sandbox_transfer_fire_webhook_request.nil? + fail ArgumentError, "Missing the required parameter 'sandbox_transfer_fire_webhook_request' when calling PlaidApi.sandbox_transfer_fire_webhook" end # resource path - local_var_path = '/payment_initiation/payment/list' + local_var_path = '/sandbox/transfer/fire_webhook' # query parameters query_params = opts[:query_params] || {} @@ -4674,16 +6429,16 @@ def payment_initiation_payment_list_with_http_info(payment_initiation_payment_li form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_payment_list_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_transfer_fire_webhook_request) # return_type - return_type = opts[:debug_return_type] || 'PaymentInitiationPaymentListResponse' + return_type = opts[:debug_return_type] || 'SandboxTransferFireWebhookResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.payment_initiation_payment_list", + :operation => :"PlaidApi.sandbox_transfer_fire_webhook", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4694,36 +6449,36 @@ def payment_initiation_payment_list_with_http_info(payment_initiation_payment_li 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#payment_initiation_payment_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#sandbox_transfer_fire_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers 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. - # @param payment_initiation_payment_reverse_request [PaymentInitiationPaymentReverseRequest] + # Trigger the creation of a repayment + # Use the `/sandbox/transfer/repayment/simulate` endpoint to trigger the creation of a repayment. As a side effect of calling this route, a repayment is created that includes all unreimbursed returns of guaranteed transfers. If there are no such returns, an 400 error is returned. + # @param sandbox_transfer_repayment_simulate_request [SandboxTransferRepaymentSimulateRequest] # @param [Hash] opts the optional parameters - # @return [PaymentInitiationPaymentReverseResponse] - def payment_initiation_payment_reverse(payment_initiation_payment_reverse_request, opts = {}) - data, _status_code, _headers = payment_initiation_payment_reverse_with_http_info(payment_initiation_payment_reverse_request, opts) + # @return [SandboxTransferRepaymentSimulateResponse] + def sandbox_transfer_repayment_simulate(sandbox_transfer_repayment_simulate_request, opts = {}) + data, _status_code, _headers = sandbox_transfer_repayment_simulate_with_http_info(sandbox_transfer_repayment_simulate_request, opts) data 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. - # @param payment_initiation_payment_reverse_request [PaymentInitiationPaymentReverseRequest] + # Trigger the creation of a repayment + # Use the `/sandbox/transfer/repayment/simulate` endpoint to trigger the creation of a repayment. As a side effect of calling this route, a repayment is created that includes all unreimbursed returns of guaranteed transfers. If there are no such returns, an 400 error is returned. + # @param sandbox_transfer_repayment_simulate_request [SandboxTransferRepaymentSimulateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaymentInitiationPaymentReverseResponse, Integer, Hash)>] PaymentInitiationPaymentReverseResponse data, response status code and response headers - def payment_initiation_payment_reverse_with_http_info(payment_initiation_payment_reverse_request, opts = {}) + # @return [Array<(SandboxTransferRepaymentSimulateResponse, Integer, Hash)>] SandboxTransferRepaymentSimulateResponse data, response status code and response headers + def sandbox_transfer_repayment_simulate_with_http_info(sandbox_transfer_repayment_simulate_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_payment_reverse ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_transfer_repayment_simulate ...' end - # verify the required parameter 'payment_initiation_payment_reverse_request' is set - if @api_client.config.client_side_validation && payment_initiation_payment_reverse_request.nil? - fail ArgumentError, "Missing the required parameter 'payment_initiation_payment_reverse_request' when calling PlaidApi.payment_initiation_payment_reverse" + # verify the required parameter 'sandbox_transfer_repayment_simulate_request' is set + if @api_client.config.client_side_validation && sandbox_transfer_repayment_simulate_request.nil? + fail ArgumentError, "Missing the required parameter 'sandbox_transfer_repayment_simulate_request' when calling PlaidApi.sandbox_transfer_repayment_simulate" end # resource path - local_var_path = '/payment_initiation/payment/reverse' + local_var_path = '/sandbox/transfer/repayment/simulate' # query parameters query_params = opts[:query_params] || {} @@ -4739,16 +6494,16 @@ def payment_initiation_payment_reverse_with_http_info(payment_initiation_payment form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_payment_reverse_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_transfer_repayment_simulate_request) # return_type - return_type = opts[:debug_return_type] || 'PaymentInitiationPaymentReverseResponse' + return_type = opts[:debug_return_type] || 'SandboxTransferRepaymentSimulateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.payment_initiation_payment_reverse", + :operation => :"PlaidApi.sandbox_transfer_repayment_simulate", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4759,36 +6514,36 @@ def payment_initiation_payment_reverse_with_http_info(payment_initiation_payment 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#payment_initiation_payment_reverse\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#sandbox_transfer_repayment_simulate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers 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`. - # @param payment_initiation_recipient_create_request [PaymentInitiationRecipientCreateRequest] + # Simulate a transfer event in Sandbox + # Use the `/sandbox/transfer/simulate` endpoint to simulate a transfer event in the Sandbox environment. Note that while an event will be simulated and will appear when using endpoints such as `/transfer/event/sync` or `/transfer/event/list`, no transactions will actually take place and funds will not move between accounts, even within the Sandbox. + # @param sandbox_transfer_simulate_request [SandboxTransferSimulateRequest] # @param [Hash] opts the optional parameters - # @return [PaymentInitiationRecipientCreateResponse] - def payment_initiation_recipient_create(payment_initiation_recipient_create_request, opts = {}) - data, _status_code, _headers = payment_initiation_recipient_create_with_http_info(payment_initiation_recipient_create_request, opts) + # @return [SandboxTransferSimulateResponse] + def sandbox_transfer_simulate(sandbox_transfer_simulate_request, opts = {}) + data, _status_code, _headers = sandbox_transfer_simulate_with_http_info(sandbox_transfer_simulate_request, opts) data 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`. - # @param payment_initiation_recipient_create_request [PaymentInitiationRecipientCreateRequest] + # Simulate a transfer event in Sandbox + # Use the `/sandbox/transfer/simulate` endpoint to simulate a transfer event in the Sandbox environment. Note that while an event will be simulated and will appear when using endpoints such as `/transfer/event/sync` or `/transfer/event/list`, no transactions will actually take place and funds will not move between accounts, even within the Sandbox. + # @param sandbox_transfer_simulate_request [SandboxTransferSimulateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaymentInitiationRecipientCreateResponse, Integer, Hash)>] PaymentInitiationRecipientCreateResponse data, response status code and response headers - def payment_initiation_recipient_create_with_http_info(payment_initiation_recipient_create_request, opts = {}) + # @return [Array<(SandboxTransferSimulateResponse, Integer, Hash)>] SandboxTransferSimulateResponse data, response status code and response headers + def sandbox_transfer_simulate_with_http_info(sandbox_transfer_simulate_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_recipient_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_transfer_simulate ...' end - # verify the required parameter 'payment_initiation_recipient_create_request' is set - if @api_client.config.client_side_validation && payment_initiation_recipient_create_request.nil? - fail ArgumentError, "Missing the required parameter 'payment_initiation_recipient_create_request' when calling PlaidApi.payment_initiation_recipient_create" + # verify the required parameter 'sandbox_transfer_simulate_request' is set + if @api_client.config.client_side_validation && sandbox_transfer_simulate_request.nil? + fail ArgumentError, "Missing the required parameter 'sandbox_transfer_simulate_request' when calling PlaidApi.sandbox_transfer_simulate" end # resource path - local_var_path = '/payment_initiation/recipient/create' + local_var_path = '/sandbox/transfer/simulate' # query parameters query_params = opts[:query_params] || {} @@ -4804,16 +6559,16 @@ def payment_initiation_recipient_create_with_http_info(payment_initiation_recipi form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_recipient_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_transfer_simulate_request) # return_type - return_type = opts[:debug_return_type] || 'PaymentInitiationRecipientCreateResponse' + return_type = opts[:debug_return_type] || 'SandboxTransferSimulateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.payment_initiation_recipient_create", + :operation => :"PlaidApi.sandbox_transfer_simulate", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4824,36 +6579,36 @@ def payment_initiation_recipient_create_with_http_info(payment_initiation_recipi 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#payment_initiation_recipient_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#sandbox_transfer_simulate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get payment recipient - # Get details about a payment recipient you have previously created. - # @param payment_initiation_recipient_get_request [PaymentInitiationRecipientGetRequest] + # Simulate creating a sweep + # Use the `/sandbox/transfer/sweep/simulate` endpoint to create a sweep and associated events in the Sandbox environment. Upon calling this endpoint, all `posted` or `pending` transfers with a sweep status of `unswept` will become `swept`, and all `reversed` transfers with a sweep status of `swept` will become `reverse_swept`. + # @param sandbox_transfer_sweep_simulate_request [SandboxTransferSweepSimulateRequest] # @param [Hash] opts the optional parameters - # @return [PaymentInitiationRecipientGetResponse] - def payment_initiation_recipient_get(payment_initiation_recipient_get_request, opts = {}) - data, _status_code, _headers = payment_initiation_recipient_get_with_http_info(payment_initiation_recipient_get_request, opts) + # @return [SandboxTransferSweepSimulateResponse] + def sandbox_transfer_sweep_simulate(sandbox_transfer_sweep_simulate_request, opts = {}) + data, _status_code, _headers = sandbox_transfer_sweep_simulate_with_http_info(sandbox_transfer_sweep_simulate_request, opts) data end - # Get payment recipient - # Get details about a payment recipient you have previously created. - # @param payment_initiation_recipient_get_request [PaymentInitiationRecipientGetRequest] + # Simulate creating a sweep + # Use the `/sandbox/transfer/sweep/simulate` endpoint to create a sweep and associated events in the Sandbox environment. Upon calling this endpoint, all `posted` or `pending` transfers with a sweep status of `unswept` will become `swept`, and all `reversed` transfers with a sweep status of `swept` will become `reverse_swept`. + # @param sandbox_transfer_sweep_simulate_request [SandboxTransferSweepSimulateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaymentInitiationRecipientGetResponse, Integer, Hash)>] PaymentInitiationRecipientGetResponse data, response status code and response headers - def payment_initiation_recipient_get_with_http_info(payment_initiation_recipient_get_request, opts = {}) + # @return [Array<(SandboxTransferSweepSimulateResponse, Integer, Hash)>] SandboxTransferSweepSimulateResponse data, response status code and response headers + def sandbox_transfer_sweep_simulate_with_http_info(sandbox_transfer_sweep_simulate_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_recipient_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_transfer_sweep_simulate ...' end - # verify the required parameter 'payment_initiation_recipient_get_request' is set - if @api_client.config.client_side_validation && payment_initiation_recipient_get_request.nil? - fail ArgumentError, "Missing the required parameter 'payment_initiation_recipient_get_request' when calling PlaidApi.payment_initiation_recipient_get" + # verify the required parameter 'sandbox_transfer_sweep_simulate_request' is set + if @api_client.config.client_side_validation && sandbox_transfer_sweep_simulate_request.nil? + fail ArgumentError, "Missing the required parameter 'sandbox_transfer_sweep_simulate_request' when calling PlaidApi.sandbox_transfer_sweep_simulate" end # resource path - local_var_path = '/payment_initiation/recipient/get' + local_var_path = '/sandbox/transfer/sweep/simulate' # query parameters query_params = opts[:query_params] || {} @@ -4869,16 +6624,16 @@ def payment_initiation_recipient_get_with_http_info(payment_initiation_recipient form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_recipient_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_transfer_sweep_simulate_request) # return_type - return_type = opts[:debug_return_type] || 'PaymentInitiationRecipientGetResponse' + return_type = opts[:debug_return_type] || 'SandboxTransferSweepSimulateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.payment_initiation_recipient_get", + :operation => :"PlaidApi.sandbox_transfer_sweep_simulate", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4889,36 +6644,36 @@ def payment_initiation_recipient_get_with_http_info(payment_initiation_recipient 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#payment_initiation_recipient_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#sandbox_transfer_sweep_simulate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List payment recipients - # The `/payment_initiation/recipient/list` endpoint list the payment recipients that you have previously created. - # @param payment_initiation_recipient_list_request [PaymentInitiationRecipientListRequest] + # Report whether you initiated an ACH transaction + # After calling `/signal/evaluate`, call `/signal/decision/report` to report whether the transaction was initiated. This endpoint will return an `INVALID_REQUEST` error if called a second time with a different value for `initiated`. + # @param signal_decision_report_request [SignalDecisionReportRequest] # @param [Hash] opts the optional parameters - # @return [PaymentInitiationRecipientListResponse] - def payment_initiation_recipient_list(payment_initiation_recipient_list_request, opts = {}) - data, _status_code, _headers = payment_initiation_recipient_list_with_http_info(payment_initiation_recipient_list_request, opts) + # @return [SignalDecisionReportResponse] + def signal_decision_report(signal_decision_report_request, opts = {}) + data, _status_code, _headers = signal_decision_report_with_http_info(signal_decision_report_request, opts) data end - # List payment recipients - # The `/payment_initiation/recipient/list` endpoint list the payment recipients that you have previously created. - # @param payment_initiation_recipient_list_request [PaymentInitiationRecipientListRequest] + # Report whether you initiated an ACH transaction + # After calling `/signal/evaluate`, call `/signal/decision/report` to report whether the transaction was initiated. This endpoint will return an `INVALID_REQUEST` error if called a second time with a different value for `initiated`. + # @param signal_decision_report_request [SignalDecisionReportRequest] # @param [Hash] opts the optional parameters - # @return [Array<(PaymentInitiationRecipientListResponse, Integer, Hash)>] PaymentInitiationRecipientListResponse data, response status code and response headers - def payment_initiation_recipient_list_with_http_info(payment_initiation_recipient_list_request, opts = {}) + # @return [Array<(SignalDecisionReportResponse, Integer, Hash)>] SignalDecisionReportResponse data, response status code and response headers + def signal_decision_report_with_http_info(signal_decision_report_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.payment_initiation_recipient_list ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.signal_decision_report ...' end - # verify the required parameter 'payment_initiation_recipient_list_request' is set - if @api_client.config.client_side_validation && payment_initiation_recipient_list_request.nil? - fail ArgumentError, "Missing the required parameter 'payment_initiation_recipient_list_request' when calling PlaidApi.payment_initiation_recipient_list" + # verify the required parameter 'signal_decision_report_request' is set + if @api_client.config.client_side_validation && signal_decision_report_request.nil? + fail ArgumentError, "Missing the required parameter 'signal_decision_report_request' when calling PlaidApi.signal_decision_report" end # resource path - local_var_path = '/payment_initiation/recipient/list' + local_var_path = '/signal/decision/report' # query parameters query_params = opts[:query_params] || {} @@ -4934,16 +6689,16 @@ def payment_initiation_recipient_list_with_http_info(payment_initiation_recipien form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_initiation_recipient_list_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(signal_decision_report_request) # return_type - return_type = opts[:debug_return_type] || 'PaymentInitiationRecipientListResponse' + return_type = opts[:debug_return_type] || 'SignalDecisionReportResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.payment_initiation_recipient_list", + :operation => :"PlaidApi.signal_decision_report", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4954,36 +6709,36 @@ def payment_initiation_recipient_list_with_http_info(payment_initiation_recipien 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#payment_initiation_recipient_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#signal_decision_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - - # Create Apex bank account token - # Used to create a token suitable for sending to Apex to enable Plaid-Apex integrations. - # @param processor_apex_processor_token_create_request [ProcessorApexProcessorTokenCreateRequest] + + # Evaluate a planned ACH transaction + # Use `/signal/evaluate` to evaluate a planned ACH transaction to get a return risk assessment (such as a risk score and risk tier) and additional risk signals. In order to obtain a valid score for an ACH transaction, Plaid must have an access token for the account, and the Item must be healthy (receiving product updates) or have recently been in a healthy state. If the transaction does not meet eligibility requirements, an error will be returned corresponding to the underlying cause. If `/signal/evaluate` is called on the same transaction multiple times within a 24-hour period, cached results may be returned. + # @param signal_evaluate_request [SignalEvaluateRequest] # @param [Hash] opts the optional parameters - # @return [ProcessorTokenCreateResponse] - def processor_apex_processor_token_create(processor_apex_processor_token_create_request, opts = {}) - data, _status_code, _headers = processor_apex_processor_token_create_with_http_info(processor_apex_processor_token_create_request, opts) + # @return [SignalEvaluateResponse] + def signal_evaluate(signal_evaluate_request, opts = {}) + data, _status_code, _headers = signal_evaluate_with_http_info(signal_evaluate_request, opts) data end - # Create Apex bank account token - # Used to create a token suitable for sending to Apex to enable Plaid-Apex integrations. - # @param processor_apex_processor_token_create_request [ProcessorApexProcessorTokenCreateRequest] + # Evaluate a planned ACH transaction + # Use `/signal/evaluate` to evaluate a planned ACH transaction to get a return risk assessment (such as a risk score and risk tier) and additional risk signals. In order to obtain a valid score for an ACH transaction, Plaid must have an access token for the account, and the Item must be healthy (receiving product updates) or have recently been in a healthy state. If the transaction does not meet eligibility requirements, an error will be returned corresponding to the underlying cause. If `/signal/evaluate` is called on the same transaction multiple times within a 24-hour period, cached results may be returned. + # @param signal_evaluate_request [SignalEvaluateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(ProcessorTokenCreateResponse, Integer, Hash)>] ProcessorTokenCreateResponse data, response status code and response headers - def processor_apex_processor_token_create_with_http_info(processor_apex_processor_token_create_request, opts = {}) + # @return [Array<(SignalEvaluateResponse, Integer, Hash)>] SignalEvaluateResponse data, response status code and response headers + def signal_evaluate_with_http_info(signal_evaluate_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.processor_apex_processor_token_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.signal_evaluate ...' end - # verify the required parameter 'processor_apex_processor_token_create_request' is set - if @api_client.config.client_side_validation && processor_apex_processor_token_create_request.nil? - fail ArgumentError, "Missing the required parameter 'processor_apex_processor_token_create_request' when calling PlaidApi.processor_apex_processor_token_create" + # verify the required parameter 'signal_evaluate_request' is set + if @api_client.config.client_side_validation && signal_evaluate_request.nil? + fail ArgumentError, "Missing the required parameter 'signal_evaluate_request' when calling PlaidApi.signal_evaluate" end # resource path - local_var_path = '/processor/apex/processor_token/create' + local_var_path = '/signal/evaluate' # query parameters query_params = opts[:query_params] || {} @@ -4999,16 +6754,16 @@ def processor_apex_processor_token_create_with_http_info(processor_apex_processo form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(processor_apex_processor_token_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(signal_evaluate_request) # return_type - return_type = opts[:debug_return_type] || 'ProcessorTokenCreateResponse' + return_type = opts[:debug_return_type] || 'SignalEvaluateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.processor_apex_processor_token_create", + :operation => :"PlaidApi.signal_evaluate", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5019,36 +6774,36 @@ def processor_apex_processor_token_create_with_http_info(processor_apex_processo 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#processor_apex_processor_token_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#signal_evaluate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Retrieve Auth data - # The `/processor/auth/get` endpoint returns the bank account and bank identification number (such as the routing number, for US accounts), for a checking or savings account that''s associated with a given `processor_token`. The endpoint also returns high-level account data and balances when available. Versioning note: API versions 2019-05-29 and earlier use a different schema for the `numbers` object returned by this endpoint. For details, see [Plaid API versioning](https://plaid.com/docs/api/versioning/#version-2020-09-14). - # @param processor_auth_get_request [ProcessorAuthGetRequest] + # Prepare the Signal product before calling `/signal/evaluate` + # Call `/signal/prepare` with Plaid-linked bank account information at least 10 seconds before calling `/signal/evaluate` or as soon as an end-user enters the ACH deposit flow in your application. + # @param signal_prepare_request [SignalPrepareRequest] # @param [Hash] opts the optional parameters - # @return [ProcessorAuthGetResponse] - def processor_auth_get(processor_auth_get_request, opts = {}) - data, _status_code, _headers = processor_auth_get_with_http_info(processor_auth_get_request, opts) + # @return [SignalPrepareResponse] + def signal_prepare(signal_prepare_request, opts = {}) + data, _status_code, _headers = signal_prepare_with_http_info(signal_prepare_request, opts) data end - # Retrieve Auth data - # The `/processor/auth/get` endpoint returns the bank account and bank identification number (such as the routing number, for US accounts), for a checking or savings account that''s associated with a given `processor_token`. The endpoint also returns high-level account data and balances when available. Versioning note: API versions 2019-05-29 and earlier use a different schema for the `numbers` object returned by this endpoint. For details, see [Plaid API versioning](https://plaid.com/docs/api/versioning/#version-2020-09-14). - # @param processor_auth_get_request [ProcessorAuthGetRequest] + # Prepare the Signal product before calling `/signal/evaluate` + # Call `/signal/prepare` with Plaid-linked bank account information at least 10 seconds before calling `/signal/evaluate` or as soon as an end-user enters the ACH deposit flow in your application. + # @param signal_prepare_request [SignalPrepareRequest] # @param [Hash] opts the optional parameters - # @return [Array<(ProcessorAuthGetResponse, Integer, Hash)>] ProcessorAuthGetResponse data, response status code and response headers - def processor_auth_get_with_http_info(processor_auth_get_request, opts = {}) + # @return [Array<(SignalPrepareResponse, Integer, Hash)>] SignalPrepareResponse data, response status code and response headers + def signal_prepare_with_http_info(signal_prepare_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.processor_auth_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.signal_prepare ...' end - # verify the required parameter 'processor_auth_get_request' is set - if @api_client.config.client_side_validation && processor_auth_get_request.nil? - fail ArgumentError, "Missing the required parameter 'processor_auth_get_request' when calling PlaidApi.processor_auth_get" + # verify the required parameter 'signal_prepare_request' is set + if @api_client.config.client_side_validation && signal_prepare_request.nil? + fail ArgumentError, "Missing the required parameter 'signal_prepare_request' when calling PlaidApi.signal_prepare" end # resource path - local_var_path = '/processor/auth/get' + local_var_path = '/signal/prepare' # query parameters query_params = opts[:query_params] || {} @@ -5064,16 +6819,16 @@ def processor_auth_get_with_http_info(processor_auth_get_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(processor_auth_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(signal_prepare_request) # return_type - return_type = opts[:debug_return_type] || 'ProcessorAuthGetResponse' + return_type = opts[:debug_return_type] || 'SignalPrepareResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.processor_auth_get", + :operation => :"PlaidApi.signal_prepare", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5084,36 +6839,36 @@ def processor_auth_get_with_http_info(processor_auth_get_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#processor_auth_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#signal_prepare\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Retrieve Balance data - # The `/processor/balance/get` endpoint returns the real-time balance for each of an Item's accounts. While other endpoints may return a balance object, only `/processor/balance/get` forces the available and current balance fields to be refreshed rather than cached. - # @param processor_balance_get_request [ProcessorBalanceGetRequest] The `/processor/balance/get` endpoint returns the real-time balance for the account associated with a given `processor_token`. The current balance is the total amount of funds in the account. The available balance is the current balance less any outstanding holds or debits that have not yet posted to the account. Note that not all institutions calculate the available balance. In the event that available balance is unavailable from the institution, Plaid will return an available balance value of `null`. + # Report a return for an ACH transaction + # Call the `/signal/return/report` endpoint to report a returned transaction that was previously sent to the `/signal/evaluate` endpoint. Your feedback will be used by the model to incorporate the latest risk trend in your portfolio. + # @param signal_return_report_request [SignalReturnReportRequest] # @param [Hash] opts the optional parameters - # @return [ProcessorBalanceGetResponse] - def processor_balance_get(processor_balance_get_request, opts = {}) - data, _status_code, _headers = processor_balance_get_with_http_info(processor_balance_get_request, opts) + # @return [SignalReturnReportResponse] + def signal_return_report(signal_return_report_request, opts = {}) + data, _status_code, _headers = signal_return_report_with_http_info(signal_return_report_request, opts) data end - # Retrieve Balance data - # The `/processor/balance/get` endpoint returns the real-time balance for each of an Item's accounts. While other endpoints may return a balance object, only `/processor/balance/get` forces the available and current balance fields to be refreshed rather than cached. - # @param processor_balance_get_request [ProcessorBalanceGetRequest] The `/processor/balance/get` endpoint returns the real-time balance for the account associated with a given `processor_token`. The current balance is the total amount of funds in the account. The available balance is the current balance less any outstanding holds or debits that have not yet posted to the account. Note that not all institutions calculate the available balance. In the event that available balance is unavailable from the institution, Plaid will return an available balance value of `null`. + # Report a return for an ACH transaction + # Call the `/signal/return/report` endpoint to report a returned transaction that was previously sent to the `/signal/evaluate` endpoint. Your feedback will be used by the model to incorporate the latest risk trend in your portfolio. + # @param signal_return_report_request [SignalReturnReportRequest] # @param [Hash] opts the optional parameters - # @return [Array<(ProcessorBalanceGetResponse, Integer, Hash)>] ProcessorBalanceGetResponse data, response status code and response headers - def processor_balance_get_with_http_info(processor_balance_get_request, opts = {}) + # @return [Array<(SignalReturnReportResponse, Integer, Hash)>] SignalReturnReportResponse data, response status code and response headers + def signal_return_report_with_http_info(signal_return_report_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.processor_balance_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.signal_return_report ...' end - # verify the required parameter 'processor_balance_get_request' is set - if @api_client.config.client_side_validation && processor_balance_get_request.nil? - fail ArgumentError, "Missing the required parameter 'processor_balance_get_request' when calling PlaidApi.processor_balance_get" + # verify the required parameter 'signal_return_report_request' is set + if @api_client.config.client_side_validation && signal_return_report_request.nil? + fail ArgumentError, "Missing the required parameter 'signal_return_report_request' when calling PlaidApi.signal_return_report" end # resource path - local_var_path = '/processor/balance/get' + local_var_path = '/signal/return/report' # query parameters query_params = opts[:query_params] || {} @@ -5129,16 +6884,16 @@ def processor_balance_get_with_http_info(processor_balance_get_request, opts = { form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(processor_balance_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(signal_return_report_request) # return_type - return_type = opts[:debug_return_type] || 'ProcessorBalanceGetResponse' + return_type = opts[:debug_return_type] || 'SignalReturnReportResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.processor_balance_get", + :operation => :"PlaidApi.signal_return_report", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5149,36 +6904,36 @@ def processor_balance_get_with_http_info(processor_balance_get_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#processor_balance_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#signal_return_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a bank transfer as a processor - # Use the `/processor/bank_transfer/create` endpoint to initiate a new bank transfer as a processor - # @param processor_bank_transfer_create_request [ProcessorBankTransferCreateRequest] + # enhance locally-held transaction data + # The '/beta/transactions/v1/enhance' endpoint enriches raw transaction data provided directly by clients. The product is currently in beta. + # @param transactions_enhance_get_request [TransactionsEnhanceGetRequest] # @param [Hash] opts the optional parameters - # @return [ProcessorBankTransferCreateResponse] - def processor_bank_transfer_create(processor_bank_transfer_create_request, opts = {}) - data, _status_code, _headers = processor_bank_transfer_create_with_http_info(processor_bank_transfer_create_request, opts) + # @return [TransactionsEnhanceGetResponse] + def transactions_enhance(transactions_enhance_get_request, opts = {}) + data, _status_code, _headers = transactions_enhance_with_http_info(transactions_enhance_get_request, opts) data end - # Create a bank transfer as a processor - # Use the `/processor/bank_transfer/create` endpoint to initiate a new bank transfer as a processor - # @param processor_bank_transfer_create_request [ProcessorBankTransferCreateRequest] + # enhance locally-held transaction data + # The '/beta/transactions/v1/enhance' endpoint enriches raw transaction data provided directly by clients. The product is currently in beta. + # @param transactions_enhance_get_request [TransactionsEnhanceGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(ProcessorBankTransferCreateResponse, Integer, Hash)>] ProcessorBankTransferCreateResponse data, response status code and response headers - def processor_bank_transfer_create_with_http_info(processor_bank_transfer_create_request, opts = {}) + # @return [Array<(TransactionsEnhanceGetResponse, Integer, Hash)>] TransactionsEnhanceGetResponse data, response status code and response headers + def transactions_enhance_with_http_info(transactions_enhance_get_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.processor_bank_transfer_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_enhance ...' end - # verify the required parameter 'processor_bank_transfer_create_request' is set - if @api_client.config.client_side_validation && processor_bank_transfer_create_request.nil? - fail ArgumentError, "Missing the required parameter 'processor_bank_transfer_create_request' when calling PlaidApi.processor_bank_transfer_create" + # verify the required parameter 'transactions_enhance_get_request' is set + if @api_client.config.client_side_validation && transactions_enhance_get_request.nil? + fail ArgumentError, "Missing the required parameter 'transactions_enhance_get_request' when calling PlaidApi.transactions_enhance" end # resource path - local_var_path = '/processor/bank_transfer/create' + local_var_path = '/beta/transactions/v1/enhance' # query parameters query_params = opts[:query_params] || {} @@ -5194,16 +6949,16 @@ def processor_bank_transfer_create_with_http_info(processor_bank_transfer_create form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(processor_bank_transfer_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_enhance_get_request) # return_type - return_type = opts[:debug_return_type] || 'ProcessorBankTransferCreateResponse' + return_type = opts[:debug_return_type] || 'TransactionsEnhanceGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.processor_bank_transfer_create", + :operation => :"PlaidApi.transactions_enhance", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5214,36 +6969,36 @@ def processor_bank_transfer_create_with_http_info(processor_bank_transfer_create 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#processor_bank_transfer_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transactions_enhance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Retrieve Identity data - # The `/processor/identity/get` endpoint allows you to retrieve various account holder information on file with the financial institution, including names, emails, phone numbers, and addresses. - # @param processor_identity_get_request [ProcessorIdentityGetRequest] + # Get transaction data + # The `/transactions/get` endpoint allows developers to receive user-authorized transaction data for credit, depository, and some loan-type accounts (only those with account subtype `student`; coverage may be limited). For transaction history from investments accounts, use the [Investments endpoint](https://plaid.com/docs/api/products/investments/) instead. Transaction data is standardized across financial institutions, and in many cases transactions are linked to a clean name, entity type, location, and category. Similarly, account data is standardized and returned with a clean name, number, balance, and other meta information where available. Transactions are returned in reverse-chronological order, and the sequence of transaction ordering is stable and will not shift. Transactions are not immutable and can also be removed altogether by the institution; a removed transaction will no longer appear in `/transactions/get`. For more details, see [Pending and posted transactions](https://plaid.com/docs/transactions/transactions-data/#pending-and-posted-transactions). Due to the potentially large number of transactions associated with an Item, results are paginated. Manipulate the `count` and `offset` parameters in conjunction with the `total_transactions` response body field to fetch all available transactions. Data returned by `/transactions/get` will be the data available for the Item as of the most recent successful check for new transactions. Plaid typically checks for new data multiple times a day, but these checks may occur less frequently, such as once a day, depending on the institution. An Item's `status.transactions.last_successful_update` field will show the timestamp of the most recent successful update. To force Plaid to check for new transactions, you can use the `/transactions/refresh` endpoint. Note that data may not be immediately available to `/transactions/get`. Plaid will begin to prepare transactions data upon Item link, if Link was initialized with `transactions`, or upon the first call to `/transactions/get`, if it wasn't. To be alerted when transaction data is ready to be fetched, listen for the [`INITIAL_UPDATE`](https://plaid.com/docs/api/products/transactions/#initial_update) and [`HISTORICAL_UPDATE`](https://plaid.com/docs/api/products/transactions/#historical_update) webhooks. If no transaction history is ready when `/transactions/get` is called, it will return a `PRODUCT_NOT_READY` error. + # @param transactions_get_request [TransactionsGetRequest] # @param [Hash] opts the optional parameters - # @return [ProcessorIdentityGetResponse] - def processor_identity_get(processor_identity_get_request, opts = {}) - data, _status_code, _headers = processor_identity_get_with_http_info(processor_identity_get_request, opts) + # @return [TransactionsGetResponse] + def transactions_get(transactions_get_request, opts = {}) + data, _status_code, _headers = transactions_get_with_http_info(transactions_get_request, opts) data end - # Retrieve Identity data - # The `/processor/identity/get` endpoint allows you to retrieve various account holder information on file with the financial institution, including names, emails, phone numbers, and addresses. - # @param processor_identity_get_request [ProcessorIdentityGetRequest] + # Get transaction data + # The `/transactions/get` endpoint allows developers to receive user-authorized transaction data for credit, depository, and some loan-type accounts (only those with account subtype `student`; coverage may be limited). For transaction history from investments accounts, use the [Investments endpoint](https://plaid.com/docs/api/products/investments/) instead. Transaction data is standardized across financial institutions, and in many cases transactions are linked to a clean name, entity type, location, and category. Similarly, account data is standardized and returned with a clean name, number, balance, and other meta information where available. Transactions are returned in reverse-chronological order, and the sequence of transaction ordering is stable and will not shift. Transactions are not immutable and can also be removed altogether by the institution; a removed transaction will no longer appear in `/transactions/get`. For more details, see [Pending and posted transactions](https://plaid.com/docs/transactions/transactions-data/#pending-and-posted-transactions). Due to the potentially large number of transactions associated with an Item, results are paginated. Manipulate the `count` and `offset` parameters in conjunction with the `total_transactions` response body field to fetch all available transactions. Data returned by `/transactions/get` will be the data available for the Item as of the most recent successful check for new transactions. Plaid typically checks for new data multiple times a day, but these checks may occur less frequently, such as once a day, depending on the institution. An Item's `status.transactions.last_successful_update` field will show the timestamp of the most recent successful update. To force Plaid to check for new transactions, you can use the `/transactions/refresh` endpoint. Note that data may not be immediately available to `/transactions/get`. Plaid will begin to prepare transactions data upon Item link, if Link was initialized with `transactions`, or upon the first call to `/transactions/get`, if it wasn't. To be alerted when transaction data is ready to be fetched, listen for the [`INITIAL_UPDATE`](https://plaid.com/docs/api/products/transactions/#initial_update) and [`HISTORICAL_UPDATE`](https://plaid.com/docs/api/products/transactions/#historical_update) webhooks. If no transaction history is ready when `/transactions/get` is called, it will return a `PRODUCT_NOT_READY` error. + # @param transactions_get_request [TransactionsGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(ProcessorIdentityGetResponse, Integer, Hash)>] ProcessorIdentityGetResponse data, response status code and response headers - def processor_identity_get_with_http_info(processor_identity_get_request, opts = {}) + # @return [Array<(TransactionsGetResponse, Integer, Hash)>] TransactionsGetResponse data, response status code and response headers + def transactions_get_with_http_info(transactions_get_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.processor_identity_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_get ...' end - # verify the required parameter 'processor_identity_get_request' is set - if @api_client.config.client_side_validation && processor_identity_get_request.nil? - fail ArgumentError, "Missing the required parameter 'processor_identity_get_request' when calling PlaidApi.processor_identity_get" + # verify the required parameter 'transactions_get_request' is set + if @api_client.config.client_side_validation && transactions_get_request.nil? + fail ArgumentError, "Missing the required parameter 'transactions_get_request' when calling PlaidApi.transactions_get" end # resource path - local_var_path = '/processor/identity/get' + local_var_path = '/transactions/get' # query parameters query_params = opts[:query_params] || {} @@ -5259,16 +7014,16 @@ def processor_identity_get_with_http_info(processor_identity_get_request, opts = form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(processor_identity_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_get_request) # return_type - return_type = opts[:debug_return_type] || 'ProcessorIdentityGetResponse' + return_type = opts[:debug_return_type] || 'TransactionsGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.processor_identity_get", + :operation => :"PlaidApi.transactions_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5279,36 +7034,36 @@ def processor_identity_get_with_http_info(processor_identity_get_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#processor_identity_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transactions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers 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`. - # @param processor_stripe_bank_account_token_create_request [ProcessorStripeBankAccountTokenCreateRequest] + # Fetch recurring transaction streams + # The `/transactions/recurring/get` endpoint allows developers to receive a summary of the recurring outflow and inflow streams (expenses and deposits) from a user’s checking, savings or credit card accounts. Additionally, Plaid provides key insights about each recurring stream including the category, merchant, last amount, and more. Developers can use these insights to build tools and experiences that help their users better manage cash flow, monitor subscriptions, reduce spend, and stay on track with bill payments. This endpoint is not included by default as part of Transactions. To request access to this endpoint and learn more about pricing, contact your Plaid account manager. Note that unlike `/transactions/get`, `/transactions/recurring/get` will not initialize an Item with Transactions. The Item must already have been initialized with Transactions (either during Link, by specifying it in `/link/token/create`, or after Link, by calling `/transactions/get`) before calling this endpoint. Data is available to `/transactions/recurring/get` approximately 5 seconds after the [`HISTORICAL_UPDATE`](https://plaid.com/docs/api/products/transactions/#historical_update) webhook has fired (about 1-2 minutes after initialization). After the initial call, you can call `/transactions/recurring/get` endpoint at any point in the future to retrieve the latest summary of recurring streams. Since recurring streams do not change often, it will typically not be necessary to call this endpoint more than once per day. + # @param transactions_recurring_get_request [TransactionsRecurringGetRequest] # @param [Hash] opts the optional parameters - # @return [ProcessorStripeBankAccountTokenCreateResponse] - def processor_stripe_bank_account_token_create(processor_stripe_bank_account_token_create_request, opts = {}) - data, _status_code, _headers = processor_stripe_bank_account_token_create_with_http_info(processor_stripe_bank_account_token_create_request, opts) + # @return [TransactionsRecurringGetResponse] + def transactions_recurring_get(transactions_recurring_get_request, opts = {}) + data, _status_code, _headers = transactions_recurring_get_with_http_info(transactions_recurring_get_request, opts) data 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`. - # @param processor_stripe_bank_account_token_create_request [ProcessorStripeBankAccountTokenCreateRequest] + # Fetch recurring transaction streams + # The `/transactions/recurring/get` endpoint allows developers to receive a summary of the recurring outflow and inflow streams (expenses and deposits) from a user’s checking, savings or credit card accounts. Additionally, Plaid provides key insights about each recurring stream including the category, merchant, last amount, and more. Developers can use these insights to build tools and experiences that help their users better manage cash flow, monitor subscriptions, reduce spend, and stay on track with bill payments. This endpoint is not included by default as part of Transactions. To request access to this endpoint and learn more about pricing, contact your Plaid account manager. Note that unlike `/transactions/get`, `/transactions/recurring/get` will not initialize an Item with Transactions. The Item must already have been initialized with Transactions (either during Link, by specifying it in `/link/token/create`, or after Link, by calling `/transactions/get`) before calling this endpoint. Data is available to `/transactions/recurring/get` approximately 5 seconds after the [`HISTORICAL_UPDATE`](https://plaid.com/docs/api/products/transactions/#historical_update) webhook has fired (about 1-2 minutes after initialization). After the initial call, you can call `/transactions/recurring/get` endpoint at any point in the future to retrieve the latest summary of recurring streams. Since recurring streams do not change often, it will typically not be necessary to call this endpoint more than once per day. + # @param transactions_recurring_get_request [TransactionsRecurringGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(ProcessorStripeBankAccountTokenCreateResponse, Integer, Hash)>] ProcessorStripeBankAccountTokenCreateResponse data, response status code and response headers - def processor_stripe_bank_account_token_create_with_http_info(processor_stripe_bank_account_token_create_request, opts = {}) + # @return [Array<(TransactionsRecurringGetResponse, Integer, Hash)>] TransactionsRecurringGetResponse data, response status code and response headers + def transactions_recurring_get_with_http_info(transactions_recurring_get_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.processor_stripe_bank_account_token_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_recurring_get ...' end - # verify the required parameter 'processor_stripe_bank_account_token_create_request' is set - if @api_client.config.client_side_validation && processor_stripe_bank_account_token_create_request.nil? - fail ArgumentError, "Missing the required parameter 'processor_stripe_bank_account_token_create_request' when calling PlaidApi.processor_stripe_bank_account_token_create" + # verify the required parameter 'transactions_recurring_get_request' is set + if @api_client.config.client_side_validation && transactions_recurring_get_request.nil? + fail ArgumentError, "Missing the required parameter 'transactions_recurring_get_request' when calling PlaidApi.transactions_recurring_get" end # resource path - local_var_path = '/processor/stripe/bank_account_token/create' + local_var_path = '/transactions/recurring/get' # query parameters query_params = opts[:query_params] || {} @@ -5324,16 +7079,16 @@ def processor_stripe_bank_account_token_create_with_http_info(processor_stripe_b form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(processor_stripe_bank_account_token_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_recurring_get_request) # return_type - return_type = opts[:debug_return_type] || 'ProcessorStripeBankAccountTokenCreateResponse' + return_type = opts[:debug_return_type] || 'TransactionsRecurringGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.processor_stripe_bank_account_token_create", + :operation => :"PlaidApi.transactions_recurring_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5344,36 +7099,36 @@ def processor_stripe_bank_account_token_create_with_http_info(processor_stripe_b 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#processor_stripe_bank_account_token_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transactions_recurring_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers 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`. - # @param processor_token_create_request [ProcessorTokenCreateRequest] + # Refresh transaction data + # `/transactions/refresh` is an optional endpoint for users of the Transactions product. It initiates an on-demand extraction to fetch the newest transactions for an Item. This on-demand extraction takes place in addition to the periodic extractions that automatically occur multiple times a day for any Transactions-enabled Item. If changes to transactions are discovered after calling `/transactions/refresh`, Plaid will fire a webhook: [`TRANSACTIONS_REMOVED`](https://plaid.com/docs/api/products/transactions/#transactions_removed) will be fired if any removed transactions are detected, and [`DEFAULT_UPDATE`](https://plaid.com/docs/api/products/transactions/#default_update) will be fired if any new transactions are detected. New transactions can be fetched by calling `/transactions/get`. Access to `/transactions/refresh` in Production is specific to certain pricing plans. If you cannot access `/transactions/refresh` in Production, [contact Sales](https://www.plaid.com/contact) for assistance. + # @param transactions_refresh_request [TransactionsRefreshRequest] # @param [Hash] opts the optional parameters - # @return [ProcessorTokenCreateResponse] - def processor_token_create(processor_token_create_request, opts = {}) - data, _status_code, _headers = processor_token_create_with_http_info(processor_token_create_request, opts) + # @return [TransactionsRefreshResponse] + def transactions_refresh(transactions_refresh_request, opts = {}) + data, _status_code, _headers = transactions_refresh_with_http_info(transactions_refresh_request, opts) data 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`. - # @param processor_token_create_request [ProcessorTokenCreateRequest] + # Refresh transaction data + # `/transactions/refresh` is an optional endpoint for users of the Transactions product. It initiates an on-demand extraction to fetch the newest transactions for an Item. This on-demand extraction takes place in addition to the periodic extractions that automatically occur multiple times a day for any Transactions-enabled Item. If changes to transactions are discovered after calling `/transactions/refresh`, Plaid will fire a webhook: [`TRANSACTIONS_REMOVED`](https://plaid.com/docs/api/products/transactions/#transactions_removed) will be fired if any removed transactions are detected, and [`DEFAULT_UPDATE`](https://plaid.com/docs/api/products/transactions/#default_update) will be fired if any new transactions are detected. New transactions can be fetched by calling `/transactions/get`. Access to `/transactions/refresh` in Production is specific to certain pricing plans. If you cannot access `/transactions/refresh` in Production, [contact Sales](https://www.plaid.com/contact) for assistance. + # @param transactions_refresh_request [TransactionsRefreshRequest] # @param [Hash] opts the optional parameters - # @return [Array<(ProcessorTokenCreateResponse, Integer, Hash)>] ProcessorTokenCreateResponse data, response status code and response headers - def processor_token_create_with_http_info(processor_token_create_request, opts = {}) + # @return [Array<(TransactionsRefreshResponse, Integer, Hash)>] TransactionsRefreshResponse data, response status code and response headers + def transactions_refresh_with_http_info(transactions_refresh_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.processor_token_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_refresh ...' end - # verify the required parameter 'processor_token_create_request' is set - if @api_client.config.client_side_validation && processor_token_create_request.nil? - fail ArgumentError, "Missing the required parameter 'processor_token_create_request' when calling PlaidApi.processor_token_create" + # verify the required parameter 'transactions_refresh_request' is set + if @api_client.config.client_side_validation && transactions_refresh_request.nil? + fail ArgumentError, "Missing the required parameter 'transactions_refresh_request' when calling PlaidApi.transactions_refresh" end # resource path - local_var_path = '/processor/token/create' + local_var_path = '/transactions/refresh' # query parameters query_params = opts[:query_params] || {} @@ -5389,16 +7144,16 @@ def processor_token_create_with_http_info(processor_token_create_request, opts = form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(processor_token_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_refresh_request) # return_type - return_type = opts[:debug_return_type] || 'ProcessorTokenCreateResponse' + return_type = opts[:debug_return_type] || 'TransactionsRefreshResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.processor_token_create", + :operation => :"PlaidApi.transactions_refresh", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5409,36 +7164,36 @@ def processor_token_create_with_http_info(processor_token_create_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#processor_token_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transactions_refresh\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Manually fire a Bank Transfer webhook - # Use the `/sandbox/bank_transfer/fire_webhook` endpoint to manually trigger a Bank Transfers webhook in the Sandbox environment. - # @param sandbox_bank_transfer_fire_webhook_request [SandboxBankTransferFireWebhookRequest] + # Create transaction category rule + # The `/transactions/rules/v1/create` endpoint creates transaction categorization rules. Rules will be applied on the Item's transactions returned in `/transactions/get` response. The product is currently in beta. To request access, contact transactions-feedback@plaid.com. + # @param transactions_rules_create_request [TransactionsRulesCreateRequest] # @param [Hash] opts the optional parameters - # @return [SandboxBankTransferFireWebhookResponse] - def sandbox_bank_transfer_fire_webhook(sandbox_bank_transfer_fire_webhook_request, opts = {}) - data, _status_code, _headers = sandbox_bank_transfer_fire_webhook_with_http_info(sandbox_bank_transfer_fire_webhook_request, opts) + # @return [TransactionsRulesCreateResponse] + def transactions_rules_create(transactions_rules_create_request, opts = {}) + data, _status_code, _headers = transactions_rules_create_with_http_info(transactions_rules_create_request, opts) data end - # Manually fire a Bank Transfer webhook - # Use the `/sandbox/bank_transfer/fire_webhook` endpoint to manually trigger a Bank Transfers webhook in the Sandbox environment. - # @param sandbox_bank_transfer_fire_webhook_request [SandboxBankTransferFireWebhookRequest] + # Create transaction category rule + # The `/transactions/rules/v1/create` endpoint creates transaction categorization rules. Rules will be applied on the Item's transactions returned in `/transactions/get` response. The product is currently in beta. To request access, contact transactions-feedback@plaid.com. + # @param transactions_rules_create_request [TransactionsRulesCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(SandboxBankTransferFireWebhookResponse, Integer, Hash)>] SandboxBankTransferFireWebhookResponse data, response status code and response headers - def sandbox_bank_transfer_fire_webhook_with_http_info(sandbox_bank_transfer_fire_webhook_request, opts = {}) + # @return [Array<(TransactionsRulesCreateResponse, Integer, Hash)>] TransactionsRulesCreateResponse data, response status code and response headers + def transactions_rules_create_with_http_info(transactions_rules_create_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_bank_transfer_fire_webhook ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_rules_create ...' end - # verify the required parameter 'sandbox_bank_transfer_fire_webhook_request' is set - if @api_client.config.client_side_validation && sandbox_bank_transfer_fire_webhook_request.nil? - fail ArgumentError, "Missing the required parameter 'sandbox_bank_transfer_fire_webhook_request' when calling PlaidApi.sandbox_bank_transfer_fire_webhook" + # verify the required parameter 'transactions_rules_create_request' is set + if @api_client.config.client_side_validation && transactions_rules_create_request.nil? + fail ArgumentError, "Missing the required parameter 'transactions_rules_create_request' when calling PlaidApi.transactions_rules_create" end # resource path - local_var_path = '/sandbox/bank_transfer/fire_webhook' + local_var_path = '/beta/transactions/rules/v1/create' # query parameters query_params = opts[:query_params] || {} @@ -5454,16 +7209,16 @@ def sandbox_bank_transfer_fire_webhook_with_http_info(sandbox_bank_transfer_fire form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_bank_transfer_fire_webhook_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_rules_create_request) # return_type - return_type = opts[:debug_return_type] || 'SandboxBankTransferFireWebhookResponse' + return_type = opts[:debug_return_type] || 'TransactionsRulesCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.sandbox_bank_transfer_fire_webhook", + :operation => :"PlaidApi.transactions_rules_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5474,36 +7229,36 @@ def sandbox_bank_transfer_fire_webhook_with_http_info(sandbox_bank_transfer_fire 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#sandbox_bank_transfer_fire_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transactions_rules_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Simulate a bank transfer event in Sandbox - # Use the `/sandbox/bank_transfer/simulate` endpoint to simulate a bank transfer event in the Sandbox environment. Note that while an event will be simulated and will appear when using endpoints such as `/bank_transfer/event/sync` or `/bank_transfer/event/list`, no transactions will actually take place and funds will not move between accounts, even within the Sandbox. - # @param sandbox_bank_transfer_simulate_request [SandboxBankTransferSimulateRequest] + # Return a list of rules created for the Item associated with the access token. + # The `/transactions/rules/v1/list` returns a list of transaction rules created for the Item associated with the access token. + # @param transactions_rules_list_request [TransactionsRulesListRequest] # @param [Hash] opts the optional parameters - # @return [SandboxBankTransferSimulateResponse] - def sandbox_bank_transfer_simulate(sandbox_bank_transfer_simulate_request, opts = {}) - data, _status_code, _headers = sandbox_bank_transfer_simulate_with_http_info(sandbox_bank_transfer_simulate_request, opts) + # @return [TransactionsRulesListResponse] + def transactions_rules_list(transactions_rules_list_request, opts = {}) + data, _status_code, _headers = transactions_rules_list_with_http_info(transactions_rules_list_request, opts) data end - # Simulate a bank transfer event in Sandbox - # Use the `/sandbox/bank_transfer/simulate` endpoint to simulate a bank transfer event in the Sandbox environment. Note that while an event will be simulated and will appear when using endpoints such as `/bank_transfer/event/sync` or `/bank_transfer/event/list`, no transactions will actually take place and funds will not move between accounts, even within the Sandbox. - # @param sandbox_bank_transfer_simulate_request [SandboxBankTransferSimulateRequest] + # Return a list of rules created for the Item associated with the access token. + # The `/transactions/rules/v1/list` returns a list of transaction rules created for the Item associated with the access token. + # @param transactions_rules_list_request [TransactionsRulesListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(SandboxBankTransferSimulateResponse, Integer, Hash)>] SandboxBankTransferSimulateResponse data, response status code and response headers - def sandbox_bank_transfer_simulate_with_http_info(sandbox_bank_transfer_simulate_request, opts = {}) + # @return [Array<(TransactionsRulesListResponse, Integer, Hash)>] TransactionsRulesListResponse data, response status code and response headers + def transactions_rules_list_with_http_info(transactions_rules_list_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_bank_transfer_simulate ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_rules_list ...' end - # verify the required parameter 'sandbox_bank_transfer_simulate_request' is set - if @api_client.config.client_side_validation && sandbox_bank_transfer_simulate_request.nil? - fail ArgumentError, "Missing the required parameter 'sandbox_bank_transfer_simulate_request' when calling PlaidApi.sandbox_bank_transfer_simulate" + # verify the required parameter 'transactions_rules_list_request' is set + if @api_client.config.client_side_validation && transactions_rules_list_request.nil? + fail ArgumentError, "Missing the required parameter 'transactions_rules_list_request' when calling PlaidApi.transactions_rules_list" end # resource path - local_var_path = '/sandbox/bank_transfer/simulate' + local_var_path = '/beta/transactions/rules/v1/list' # query parameters query_params = opts[:query_params] || {} @@ -5519,16 +7274,16 @@ def sandbox_bank_transfer_simulate_with_http_info(sandbox_bank_transfer_simulate form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_bank_transfer_simulate_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_rules_list_request) # return_type - return_type = opts[:debug_return_type] || 'SandboxBankTransferSimulateResponse' + return_type = opts[:debug_return_type] || 'TransactionsRulesListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.sandbox_bank_transfer_simulate", + :operation => :"PlaidApi.transactions_rules_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5539,36 +7294,36 @@ def sandbox_bank_transfer_simulate_with_http_info(sandbox_bank_transfer_simulate 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#sandbox_bank_transfer_simulate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transactions_rules_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Manually fire an Income webhook - # Use the `/sandbox/income/fire_webhook` endpoint to manually trigger an Income webhook in the Sandbox environment. - # @param sandbox_income_fire_webhook_request [SandboxIncomeFireWebhookRequest] + # Remove transaction rule + # The `/transactions/rules/v1/remove` endpoint is used to remove a transaction rule. + # @param transactions_rules_remove_request [TransactionsRulesRemoveRequest] # @param [Hash] opts the optional parameters - # @return [SandboxIncomeFireWebhookResponse] - def sandbox_income_fire_webhook(sandbox_income_fire_webhook_request, opts = {}) - data, _status_code, _headers = sandbox_income_fire_webhook_with_http_info(sandbox_income_fire_webhook_request, opts) + # @return [TransactionsRulesRemoveResponse] + def transactions_rules_remove(transactions_rules_remove_request, opts = {}) + data, _status_code, _headers = transactions_rules_remove_with_http_info(transactions_rules_remove_request, opts) data end - # Manually fire an Income webhook - # Use the `/sandbox/income/fire_webhook` endpoint to manually trigger an Income webhook in the Sandbox environment. - # @param sandbox_income_fire_webhook_request [SandboxIncomeFireWebhookRequest] + # Remove transaction rule + # The `/transactions/rules/v1/remove` endpoint is used to remove a transaction rule. + # @param transactions_rules_remove_request [TransactionsRulesRemoveRequest] # @param [Hash] opts the optional parameters - # @return [Array<(SandboxIncomeFireWebhookResponse, Integer, Hash)>] SandboxIncomeFireWebhookResponse data, response status code and response headers - def sandbox_income_fire_webhook_with_http_info(sandbox_income_fire_webhook_request, opts = {}) + # @return [Array<(TransactionsRulesRemoveResponse, Integer, Hash)>] TransactionsRulesRemoveResponse data, response status code and response headers + def transactions_rules_remove_with_http_info(transactions_rules_remove_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_income_fire_webhook ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_rules_remove ...' end - # verify the required parameter 'sandbox_income_fire_webhook_request' is set - if @api_client.config.client_side_validation && sandbox_income_fire_webhook_request.nil? - fail ArgumentError, "Missing the required parameter 'sandbox_income_fire_webhook_request' when calling PlaidApi.sandbox_income_fire_webhook" + # verify the required parameter 'transactions_rules_remove_request' is set + if @api_client.config.client_side_validation && transactions_rules_remove_request.nil? + fail ArgumentError, "Missing the required parameter 'transactions_rules_remove_request' when calling PlaidApi.transactions_rules_remove" end # resource path - local_var_path = '/sandbox/income/fire_webhook' + local_var_path = '/beta/transactions/rules/v1/remove' # query parameters query_params = opts[:query_params] || {} @@ -5584,16 +7339,16 @@ def sandbox_income_fire_webhook_with_http_info(sandbox_income_fire_webhook_reque form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_income_fire_webhook_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_rules_remove_request) # return_type - return_type = opts[:debug_return_type] || 'SandboxIncomeFireWebhookResponse' + return_type = opts[:debug_return_type] || 'TransactionsRulesRemoveResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.sandbox_income_fire_webhook", + :operation => :"PlaidApi.transactions_rules_remove", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5604,36 +7359,36 @@ def sandbox_income_fire_webhook_with_http_info(sandbox_income_fire_webhook_reque 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#sandbox_income_fire_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transactions_rules_remove\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Fire a test webhook - # The `/sandbox/item/fire_webhook` endpoint is used to test that code correctly handles webhooks. This endpoint can trigger the following webhooks: `DEFAULT_UPDATE`: Transactions update webhook to be fired for a given Sandbox Item. If the Item does not support Transactions, a `SANDBOX_PRODUCT_NOT_ENABLED` error will result. `NEW_ACCOUNTS_AVAILABLE`: Webhook to be fired for a given Sandbox Item created with Account Select v2. `AUTH_DATA_UPDATE`: Webhook to be fired for a given Sandbox Item created with Auth as an enabled product. Note that this endpoint is provided for developer ease-of-use and is not required for testing webhooks; webhooks will also fire in Sandbox under the same conditions that they would in Production or Development' - # @param sandbox_item_fire_webhook_request [SandboxItemFireWebhookRequest] + # Get incremental transaction updates on an Item + # This endpoint replaces `/transactions/get` and its associated webhooks for most common use-cases. The `/transactions/sync` endpoint allows developers to subscribe to all transactions associated with an Item and get updates synchronously in a stream-like manner, using a cursor to track which updates have already been seen. `/transactions/sync` provides the same functionality as `/transactions/get` and can be used instead of `/transactions/get` to simplify the process of tracking transactions updates. This endpoint provides user-authorized transaction data for `credit`, `depository`, and some loan-type accounts (only those with account subtype `student`; coverage may be limited). For transaction history from `investments` accounts, use `/investments/transactions/get` instead. Returned transactions data is grouped into three types of update, indicating whether the transaction was added, removed, or modified since the last call to the API. In the first call to `/transactions/sync` for an Item, the endpoint will return all historical transactions data associated with that Item up until the time of the API call (as \"adds\"), which then generates a `latest_cursor` for that Item. In subsequent calls, send the `latest_cursor` to receive only the changes that have occurred since the previous call. Due to the potentially large number of transactions associated with an Item, results are paginated. The `has_more` field specifies if additional calls are necessary to fetch all available transaction updates. Whenever new or updated transaction data becomes available, `/transactions/sync` will provide these updates. Plaid typically checks for new data multiple times a day, but these checks may occur less frequently, such as once a day, depending on the institution. An Item's `status.transactions.last_successful_update` field will show the timestamp of the most recent successful update. To force Plaid to check for new transactions, use the `/transactions/refresh` endpoint. Note that for newly created Items, data may not be immediately available to `/transactions/sync`. Plaid begins preparing transactions data when the Item is created, but the process can take anywhere from a few seconds to several minutes to complete, depending on the number of transactions available. To be alerted when new data is available, listen for the [`SYNC_UPDATES_AVAILABLE`](https://plaid.com/docs/api/products/transactions/#sync_updates_available) webhook. + # @param transactions_sync_request [TransactionsSyncRequest] # @param [Hash] opts the optional parameters - # @return [SandboxItemFireWebhookResponse] - def sandbox_item_fire_webhook(sandbox_item_fire_webhook_request, opts = {}) - data, _status_code, _headers = sandbox_item_fire_webhook_with_http_info(sandbox_item_fire_webhook_request, opts) + # @return [TransactionsSyncResponse] + def transactions_sync(transactions_sync_request, opts = {}) + data, _status_code, _headers = transactions_sync_with_http_info(transactions_sync_request, opts) data end - # Fire a test webhook - # The `/sandbox/item/fire_webhook` endpoint is used to test that code correctly handles webhooks. This endpoint can trigger the following webhooks: `DEFAULT_UPDATE`: Transactions update webhook to be fired for a given Sandbox Item. If the Item does not support Transactions, a `SANDBOX_PRODUCT_NOT_ENABLED` error will result. `NEW_ACCOUNTS_AVAILABLE`: Webhook to be fired for a given Sandbox Item created with Account Select v2. `AUTH_DATA_UPDATE`: Webhook to be fired for a given Sandbox Item created with Auth as an enabled product. Note that this endpoint is provided for developer ease-of-use and is not required for testing webhooks; webhooks will also fire in Sandbox under the same conditions that they would in Production or Development' - # @param sandbox_item_fire_webhook_request [SandboxItemFireWebhookRequest] + # Get incremental transaction updates on an Item + # This endpoint replaces `/transactions/get` and its associated webhooks for most common use-cases. The `/transactions/sync` endpoint allows developers to subscribe to all transactions associated with an Item and get updates synchronously in a stream-like manner, using a cursor to track which updates have already been seen. `/transactions/sync` provides the same functionality as `/transactions/get` and can be used instead of `/transactions/get` to simplify the process of tracking transactions updates. This endpoint provides user-authorized transaction data for `credit`, `depository`, and some loan-type accounts (only those with account subtype `student`; coverage may be limited). For transaction history from `investments` accounts, use `/investments/transactions/get` instead. Returned transactions data is grouped into three types of update, indicating whether the transaction was added, removed, or modified since the last call to the API. In the first call to `/transactions/sync` for an Item, the endpoint will return all historical transactions data associated with that Item up until the time of the API call (as \"adds\"), which then generates a `latest_cursor` for that Item. In subsequent calls, send the `latest_cursor` to receive only the changes that have occurred since the previous call. Due to the potentially large number of transactions associated with an Item, results are paginated. The `has_more` field specifies if additional calls are necessary to fetch all available transaction updates. Whenever new or updated transaction data becomes available, `/transactions/sync` will provide these updates. Plaid typically checks for new data multiple times a day, but these checks may occur less frequently, such as once a day, depending on the institution. An Item's `status.transactions.last_successful_update` field will show the timestamp of the most recent successful update. To force Plaid to check for new transactions, use the `/transactions/refresh` endpoint. Note that for newly created Items, data may not be immediately available to `/transactions/sync`. Plaid begins preparing transactions data when the Item is created, but the process can take anywhere from a few seconds to several minutes to complete, depending on the number of transactions available. To be alerted when new data is available, listen for the [`SYNC_UPDATES_AVAILABLE`](https://plaid.com/docs/api/products/transactions/#sync_updates_available) webhook. + # @param transactions_sync_request [TransactionsSyncRequest] # @param [Hash] opts the optional parameters - # @return [Array<(SandboxItemFireWebhookResponse, Integer, Hash)>] SandboxItemFireWebhookResponse data, response status code and response headers - def sandbox_item_fire_webhook_with_http_info(sandbox_item_fire_webhook_request, opts = {}) + # @return [Array<(TransactionsSyncResponse, Integer, Hash)>] TransactionsSyncResponse data, response status code and response headers + def transactions_sync_with_http_info(transactions_sync_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_item_fire_webhook ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_sync ...' end - # verify the required parameter 'sandbox_item_fire_webhook_request' is set - if @api_client.config.client_side_validation && sandbox_item_fire_webhook_request.nil? - fail ArgumentError, "Missing the required parameter 'sandbox_item_fire_webhook_request' when calling PlaidApi.sandbox_item_fire_webhook" + # verify the required parameter 'transactions_sync_request' is set + if @api_client.config.client_side_validation && transactions_sync_request.nil? + fail ArgumentError, "Missing the required parameter 'transactions_sync_request' when calling PlaidApi.transactions_sync" end # resource path - local_var_path = '/sandbox/item/fire_webhook' + local_var_path = '/transactions/sync' # query parameters query_params = opts[:query_params] || {} @@ -5649,16 +7404,16 @@ def sandbox_item_fire_webhook_with_http_info(sandbox_item_fire_webhook_request, form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_item_fire_webhook_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_sync_request) # return_type - return_type = opts[:debug_return_type] || 'SandboxItemFireWebhookResponse' + return_type = opts[:debug_return_type] || 'TransactionsSyncResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.sandbox_item_fire_webhook", + :operation => :"PlaidApi.transactions_sync", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5669,36 +7424,36 @@ def sandbox_item_fire_webhook_with_http_info(sandbox_item_fire_webhook_request, 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#sandbox_item_fire_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transactions_sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Force a Sandbox Item into an error state - # `/sandbox/item/reset_login/` forces an Item into an `ITEM_LOGIN_REQUIRED` state in order to simulate an Item whose login is no longer valid. This makes it easy to test Link's [update mode](https://plaid.com/docs/link/update-mode) flow in the Sandbox environment. After calling `/sandbox/item/reset_login`, You can then use Plaid Link update mode to restore the Item to a good state. An `ITEM_LOGIN_REQUIRED` webhook will also be fired after a call to this endpoint, if one is associated with the Item. In the Sandbox, Items will transition to an `ITEM_LOGIN_REQUIRED` error state automatically after 30 days, even if this endpoint is not called. - # @param sandbox_item_reset_login_request [SandboxItemResetLoginRequest] + # 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. + # @param transfer_authorization_create_request [TransferAuthorizationCreateRequest] # @param [Hash] opts the optional parameters - # @return [SandboxItemResetLoginResponse] - def sandbox_item_reset_login(sandbox_item_reset_login_request, opts = {}) - data, _status_code, _headers = sandbox_item_reset_login_with_http_info(sandbox_item_reset_login_request, opts) + # @return [TransferAuthorizationCreateResponse] + def transfer_authorization_create(transfer_authorization_create_request, opts = {}) + data, _status_code, _headers = transfer_authorization_create_with_http_info(transfer_authorization_create_request, opts) data end - # Force a Sandbox Item into an error state - # `/sandbox/item/reset_login/` forces an Item into an `ITEM_LOGIN_REQUIRED` state in order to simulate an Item whose login is no longer valid. This makes it easy to test Link's [update mode](https://plaid.com/docs/link/update-mode) flow in the Sandbox environment. After calling `/sandbox/item/reset_login`, You can then use Plaid Link update mode to restore the Item to a good state. An `ITEM_LOGIN_REQUIRED` webhook will also be fired after a call to this endpoint, if one is associated with the Item. In the Sandbox, Items will transition to an `ITEM_LOGIN_REQUIRED` error state automatically after 30 days, even if this endpoint is not called. - # @param sandbox_item_reset_login_request [SandboxItemResetLoginRequest] + # 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. + # @param transfer_authorization_create_request [TransferAuthorizationCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(SandboxItemResetLoginResponse, Integer, Hash)>] SandboxItemResetLoginResponse data, response status code and response headers - def sandbox_item_reset_login_with_http_info(sandbox_item_reset_login_request, opts = {}) + # @return [Array<(TransferAuthorizationCreateResponse, Integer, Hash)>] TransferAuthorizationCreateResponse data, response status code and response headers + def transfer_authorization_create_with_http_info(transfer_authorization_create_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_item_reset_login ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_authorization_create ...' end - # verify the required parameter 'sandbox_item_reset_login_request' is set - if @api_client.config.client_side_validation && sandbox_item_reset_login_request.nil? - fail ArgumentError, "Missing the required parameter 'sandbox_item_reset_login_request' when calling PlaidApi.sandbox_item_reset_login" + # verify the required parameter 'transfer_authorization_create_request' is set + if @api_client.config.client_side_validation && transfer_authorization_create_request.nil? + fail ArgumentError, "Missing the required parameter 'transfer_authorization_create_request' when calling PlaidApi.transfer_authorization_create" end # resource path - local_var_path = '/sandbox/item/reset_login' + local_var_path = '/transfer/authorization/create' # query parameters query_params = opts[:query_params] || {} @@ -5714,16 +7469,16 @@ def sandbox_item_reset_login_with_http_info(sandbox_item_reset_login_request, op form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_item_reset_login_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_authorization_create_request) # return_type - return_type = opts[:debug_return_type] || 'SandboxItemResetLoginResponse' + return_type = opts[:debug_return_type] || 'TransferAuthorizationCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.sandbox_item_reset_login", + :operation => :"PlaidApi.transfer_authorization_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5734,36 +7489,36 @@ def sandbox_item_reset_login_with_http_info(sandbox_item_reset_login_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#sandbox_item_reset_login\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transfer_authorization_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Set verification status for Sandbox account - # The `/sandbox/item/set_verification_status` endpoint can be used to change the verification status of an Item in in the Sandbox in order to simulate the Automated Micro-deposit flow. Note that not all Plaid developer accounts are enabled for micro-deposit based verification by default. Your account must be enabled for this feature in order to test it in Sandbox. To enable this features or check your status, contact your account manager or [submit a product access Support ticket](https://dashboard.plaid.com/support/new/product-and-development/product-troubleshooting/request-product-access). For more information on testing Automated Micro-deposits in Sandbox, see [Auth full coverage testing](https://plaid.com/docs/auth/coverage/testing#). - # @param sandbox_item_set_verification_status_request [SandboxItemSetVerificationStatusRequest] + # 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`. + # @param transfer_cancel_request [TransferCancelRequest] # @param [Hash] opts the optional parameters - # @return [SandboxItemSetVerificationStatusResponse] - def sandbox_item_set_verification_status(sandbox_item_set_verification_status_request, opts = {}) - data, _status_code, _headers = sandbox_item_set_verification_status_with_http_info(sandbox_item_set_verification_status_request, opts) + # @return [TransferCancelResponse] + def transfer_cancel(transfer_cancel_request, opts = {}) + data, _status_code, _headers = transfer_cancel_with_http_info(transfer_cancel_request, opts) data end - # Set verification status for Sandbox account - # The `/sandbox/item/set_verification_status` endpoint can be used to change the verification status of an Item in in the Sandbox in order to simulate the Automated Micro-deposit flow. Note that not all Plaid developer accounts are enabled for micro-deposit based verification by default. Your account must be enabled for this feature in order to test it in Sandbox. To enable this features or check your status, contact your account manager or [submit a product access Support ticket](https://dashboard.plaid.com/support/new/product-and-development/product-troubleshooting/request-product-access). For more information on testing Automated Micro-deposits in Sandbox, see [Auth full coverage testing](https://plaid.com/docs/auth/coverage/testing#). - # @param sandbox_item_set_verification_status_request [SandboxItemSetVerificationStatusRequest] + # 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`. + # @param transfer_cancel_request [TransferCancelRequest] # @param [Hash] opts the optional parameters - # @return [Array<(SandboxItemSetVerificationStatusResponse, Integer, Hash)>] SandboxItemSetVerificationStatusResponse data, response status code and response headers - def sandbox_item_set_verification_status_with_http_info(sandbox_item_set_verification_status_request, opts = {}) + # @return [Array<(TransferCancelResponse, Integer, Hash)>] TransferCancelResponse data, response status code and response headers + def transfer_cancel_with_http_info(transfer_cancel_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_item_set_verification_status ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_cancel ...' end - # verify the required parameter 'sandbox_item_set_verification_status_request' is set - if @api_client.config.client_side_validation && sandbox_item_set_verification_status_request.nil? - fail ArgumentError, "Missing the required parameter 'sandbox_item_set_verification_status_request' when calling PlaidApi.sandbox_item_set_verification_status" + # verify the required parameter 'transfer_cancel_request' is set + if @api_client.config.client_side_validation && transfer_cancel_request.nil? + fail ArgumentError, "Missing the required parameter 'transfer_cancel_request' when calling PlaidApi.transfer_cancel" end # resource path - local_var_path = '/sandbox/item/set_verification_status' + local_var_path = '/transfer/cancel' # query parameters query_params = opts[:query_params] || {} @@ -5779,16 +7534,16 @@ def sandbox_item_set_verification_status_with_http_info(sandbox_item_set_verific form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_item_set_verification_status_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_cancel_request) # return_type - return_type = opts[:debug_return_type] || 'SandboxItemSetVerificationStatusResponse' + return_type = opts[:debug_return_type] || 'TransferCancelResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.sandbox_item_set_verification_status", + :operation => :"PlaidApi.transfer_cancel", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5799,36 +7554,36 @@ def sandbox_item_set_verification_status_with_http_info(sandbox_item_set_verific 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#sandbox_item_set_verification_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transfer_cancel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Save the selected accounts when connecting to the Platypus Oauth institution - # Save the selected accounts when connecting to the Platypus Oauth institution - # @param sandbox_oauth_select_accounts_request [SandboxOauthSelectAccountsRequest] + # Create a transfer + # Use the `/transfer/create` endpoint to initiate a new transfer. + # @param transfer_create_request [TransferCreateRequest] # @param [Hash] opts the optional parameters - # @return [Hash] - def sandbox_oauth_select_accounts(sandbox_oauth_select_accounts_request, opts = {}) - data, _status_code, _headers = sandbox_oauth_select_accounts_with_http_info(sandbox_oauth_select_accounts_request, opts) + # @return [TransferCreateResponse] + def transfer_create(transfer_create_request, opts = {}) + data, _status_code, _headers = transfer_create_with_http_info(transfer_create_request, opts) data end - # Save the selected accounts when connecting to the Platypus Oauth institution - # Save the selected accounts when connecting to the Platypus Oauth institution - # @param sandbox_oauth_select_accounts_request [SandboxOauthSelectAccountsRequest] + # Create a transfer + # Use the `/transfer/create` endpoint to initiate a new transfer. + # @param transfer_create_request [TransferCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers - def sandbox_oauth_select_accounts_with_http_info(sandbox_oauth_select_accounts_request, opts = {}) + # @return [Array<(TransferCreateResponse, Integer, Hash)>] TransferCreateResponse data, response status code and response headers + def transfer_create_with_http_info(transfer_create_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_oauth_select_accounts ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_create ...' end - # verify the required parameter 'sandbox_oauth_select_accounts_request' is set - if @api_client.config.client_side_validation && sandbox_oauth_select_accounts_request.nil? - fail ArgumentError, "Missing the required parameter 'sandbox_oauth_select_accounts_request' when calling PlaidApi.sandbox_oauth_select_accounts" + # verify the required parameter 'transfer_create_request' is set + if @api_client.config.client_side_validation && transfer_create_request.nil? + fail ArgumentError, "Missing the required parameter 'transfer_create_request' when calling PlaidApi.transfer_create" end # resource path - local_var_path = '/sandbox/oauth/select_accounts' + local_var_path = '/transfer/create' # query parameters query_params = opts[:query_params] || {} @@ -5844,16 +7599,16 @@ def sandbox_oauth_select_accounts_with_http_info(sandbox_oauth_select_accounts_r form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_oauth_select_accounts_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_create_request) # return_type - return_type = opts[:debug_return_type] || 'Hash' + return_type = opts[:debug_return_type] || 'TransferCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.sandbox_oauth_select_accounts", + :operation => :"PlaidApi.transfer_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5864,36 +7619,36 @@ def sandbox_oauth_select_accounts_with_http_info(sandbox_oauth_select_accounts_r 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#sandbox_oauth_select_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transfer_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a test Item and processor token - # Use the `/sandbox/processor_token/create` endpoint to create a valid `processor_token` for an arbitrary institution ID and test credentials. The created `processor_token` corresponds to a new Sandbox Item. You can then use this `processor_token` with the `/processor/` API endpoints in Sandbox. You can also use `/sandbox/processor_token/create` with the [`user_custom` test username](https://plaid.com/docs/sandbox/user-custom) to generate a test account with custom data. - # @param sandbox_processor_token_create_request [SandboxProcessorTokenCreateRequest] + # List transfer events + # Use the `/transfer/event/list` endpoint to get a list of transfer events based on specified filter criteria. + # @param transfer_event_list_request [TransferEventListRequest] # @param [Hash] opts the optional parameters - # @return [SandboxProcessorTokenCreateResponse] - def sandbox_processor_token_create(sandbox_processor_token_create_request, opts = {}) - data, _status_code, _headers = sandbox_processor_token_create_with_http_info(sandbox_processor_token_create_request, opts) + # @return [TransferEventListResponse] + def transfer_event_list(transfer_event_list_request, opts = {}) + data, _status_code, _headers = transfer_event_list_with_http_info(transfer_event_list_request, opts) data end - # Create a test Item and processor token - # Use the `/sandbox/processor_token/create` endpoint to create a valid `processor_token` for an arbitrary institution ID and test credentials. The created `processor_token` corresponds to a new Sandbox Item. You can then use this `processor_token` with the `/processor/` API endpoints in Sandbox. You can also use `/sandbox/processor_token/create` with the [`user_custom` test username](https://plaid.com/docs/sandbox/user-custom) to generate a test account with custom data. - # @param sandbox_processor_token_create_request [SandboxProcessorTokenCreateRequest] + # List transfer events + # Use the `/transfer/event/list` endpoint to get a list of transfer events based on specified filter criteria. + # @param transfer_event_list_request [TransferEventListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(SandboxProcessorTokenCreateResponse, Integer, Hash)>] SandboxProcessorTokenCreateResponse data, response status code and response headers - def sandbox_processor_token_create_with_http_info(sandbox_processor_token_create_request, opts = {}) + # @return [Array<(TransferEventListResponse, Integer, Hash)>] TransferEventListResponse data, response status code and response headers + def transfer_event_list_with_http_info(transfer_event_list_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_processor_token_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_event_list ...' end - # verify the required parameter 'sandbox_processor_token_create_request' is set - if @api_client.config.client_side_validation && sandbox_processor_token_create_request.nil? - fail ArgumentError, "Missing the required parameter 'sandbox_processor_token_create_request' when calling PlaidApi.sandbox_processor_token_create" + # verify the required parameter 'transfer_event_list_request' is set + if @api_client.config.client_side_validation && transfer_event_list_request.nil? + fail ArgumentError, "Missing the required parameter 'transfer_event_list_request' when calling PlaidApi.transfer_event_list" end # resource path - local_var_path = '/sandbox/processor_token/create' + local_var_path = '/transfer/event/list' # query parameters query_params = opts[:query_params] || {} @@ -5909,16 +7664,16 @@ def sandbox_processor_token_create_with_http_info(sandbox_processor_token_create form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_processor_token_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_event_list_request) # return_type - return_type = opts[:debug_return_type] || 'SandboxProcessorTokenCreateResponse' + return_type = opts[:debug_return_type] || 'TransferEventListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.sandbox_processor_token_create", + :operation => :"PlaidApi.transfer_event_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5929,36 +7684,36 @@ def sandbox_processor_token_create_with_http_info(sandbox_processor_token_create 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#sandbox_processor_token_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transfer_event_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a test Item - # Use the `/sandbox/public_token/create` endpoint to create a valid `public_token` for an arbitrary institution ID, initial products, and test credentials. The created `public_token` maps to a new Sandbox Item. You can then call `/item/public_token/exchange` to exchange the `public_token` for an `access_token` and perform all API actions. `/sandbox/public_token/create` can also be used with the [`user_custom` test username](https://plaid.com/docs/sandbox/user-custom) to generate a test account with custom data. `/sandbox/public_token/create` cannot be used with OAuth institutions. - # @param sandbox_public_token_create_request [SandboxPublicTokenCreateRequest] + # Sync transfer events + # `/transfer/event/sync` allows you to request up to the next 25 transfer events that happened after a specific `event_id`. Use the `/transfer/event/sync` endpoint to guarantee you have seen all transfer events. + # @param transfer_event_sync_request [TransferEventSyncRequest] # @param [Hash] opts the optional parameters - # @return [SandboxPublicTokenCreateResponse] - def sandbox_public_token_create(sandbox_public_token_create_request, opts = {}) - data, _status_code, _headers = sandbox_public_token_create_with_http_info(sandbox_public_token_create_request, opts) + # @return [TransferEventSyncResponse] + def transfer_event_sync(transfer_event_sync_request, opts = {}) + data, _status_code, _headers = transfer_event_sync_with_http_info(transfer_event_sync_request, opts) data end - # Create a test Item - # Use the `/sandbox/public_token/create` endpoint to create a valid `public_token` for an arbitrary institution ID, initial products, and test credentials. The created `public_token` maps to a new Sandbox Item. You can then call `/item/public_token/exchange` to exchange the `public_token` for an `access_token` and perform all API actions. `/sandbox/public_token/create` can also be used with the [`user_custom` test username](https://plaid.com/docs/sandbox/user-custom) to generate a test account with custom data. `/sandbox/public_token/create` cannot be used with OAuth institutions. - # @param sandbox_public_token_create_request [SandboxPublicTokenCreateRequest] + # Sync transfer events + # `/transfer/event/sync` allows you to request up to the next 25 transfer events that happened after a specific `event_id`. Use the `/transfer/event/sync` endpoint to guarantee you have seen all transfer events. + # @param transfer_event_sync_request [TransferEventSyncRequest] # @param [Hash] opts the optional parameters - # @return [Array<(SandboxPublicTokenCreateResponse, Integer, Hash)>] SandboxPublicTokenCreateResponse data, response status code and response headers - def sandbox_public_token_create_with_http_info(sandbox_public_token_create_request, opts = {}) + # @return [Array<(TransferEventSyncResponse, Integer, Hash)>] TransferEventSyncResponse data, response status code and response headers + def transfer_event_sync_with_http_info(transfer_event_sync_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_public_token_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_event_sync ...' end - # verify the required parameter 'sandbox_public_token_create_request' is set - if @api_client.config.client_side_validation && sandbox_public_token_create_request.nil? - fail ArgumentError, "Missing the required parameter 'sandbox_public_token_create_request' when calling PlaidApi.sandbox_public_token_create" + # verify the required parameter 'transfer_event_sync_request' is set + if @api_client.config.client_side_validation && transfer_event_sync_request.nil? + fail ArgumentError, "Missing the required parameter 'transfer_event_sync_request' when calling PlaidApi.transfer_event_sync" end # resource path - local_var_path = '/sandbox/public_token/create' + local_var_path = '/transfer/event/sync' # query parameters query_params = opts[:query_params] || {} @@ -5974,16 +7729,16 @@ def sandbox_public_token_create_with_http_info(sandbox_public_token_create_reque form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_public_token_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_event_sync_request) # return_type - return_type = opts[:debug_return_type] || 'SandboxPublicTokenCreateResponse' + return_type = opts[:debug_return_type] || 'TransferEventSyncResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.sandbox_public_token_create", + :operation => :"PlaidApi.transfer_event_sync", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -5994,36 +7749,36 @@ def sandbox_public_token_create_with_http_info(sandbox_public_token_create_reque 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#sandbox_public_token_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transfer_event_sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Manually fire a Transfer webhook - # Use the `/sandbox/transfer/fire_webhook` endpoint to manually trigger a Transfer webhook in the Sandbox environment. - # @param sandbox_transfer_fire_webhook_request [SandboxTransferFireWebhookRequest] + # Retrieve a transfer + # The `/transfer/get` fetches information about the transfer corresponding to the given `transfer_id`. + # @param transfer_get_request [TransferGetRequest] # @param [Hash] opts the optional parameters - # @return [SandboxTransferFireWebhookResponse] - def sandbox_transfer_fire_webhook(sandbox_transfer_fire_webhook_request, opts = {}) - data, _status_code, _headers = sandbox_transfer_fire_webhook_with_http_info(sandbox_transfer_fire_webhook_request, opts) + # @return [TransferGetResponse] + def transfer_get(transfer_get_request, opts = {}) + data, _status_code, _headers = transfer_get_with_http_info(transfer_get_request, opts) data end - # Manually fire a Transfer webhook - # Use the `/sandbox/transfer/fire_webhook` endpoint to manually trigger a Transfer webhook in the Sandbox environment. - # @param sandbox_transfer_fire_webhook_request [SandboxTransferFireWebhookRequest] + # Retrieve a transfer + # The `/transfer/get` fetches information about the transfer corresponding to the given `transfer_id`. + # @param transfer_get_request [TransferGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(SandboxTransferFireWebhookResponse, Integer, Hash)>] SandboxTransferFireWebhookResponse data, response status code and response headers - def sandbox_transfer_fire_webhook_with_http_info(sandbox_transfer_fire_webhook_request, opts = {}) + # @return [Array<(TransferGetResponse, Integer, Hash)>] TransferGetResponse data, response status code and response headers + def transfer_get_with_http_info(transfer_get_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_transfer_fire_webhook ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_get ...' end - # verify the required parameter 'sandbox_transfer_fire_webhook_request' is set - if @api_client.config.client_side_validation && sandbox_transfer_fire_webhook_request.nil? - fail ArgumentError, "Missing the required parameter 'sandbox_transfer_fire_webhook_request' when calling PlaidApi.sandbox_transfer_fire_webhook" + # verify the required parameter 'transfer_get_request' is set + if @api_client.config.client_side_validation && transfer_get_request.nil? + fail ArgumentError, "Missing the required parameter 'transfer_get_request' when calling PlaidApi.transfer_get" end # resource path - local_var_path = '/sandbox/transfer/fire_webhook' + local_var_path = '/transfer/get' # query parameters query_params = opts[:query_params] || {} @@ -6039,16 +7794,16 @@ def sandbox_transfer_fire_webhook_with_http_info(sandbox_transfer_fire_webhook_r form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_transfer_fire_webhook_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_get_request) # return_type - return_type = opts[:debug_return_type] || 'SandboxTransferFireWebhookResponse' + return_type = opts[:debug_return_type] || 'TransferGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.sandbox_transfer_fire_webhook", + :operation => :"PlaidApi.transfer_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -6059,36 +7814,36 @@ def sandbox_transfer_fire_webhook_with_http_info(sandbox_transfer_fire_webhook_r 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#sandbox_transfer_fire_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transfer_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Trigger the creation of a repayment - # Use the `/sandbox/transfer/repayment/simulate` endpoint to trigger the creation of a repayment. As a side effect of calling this route, a repayment is created that includes all unreimbursed returns of guaranteed transfers. If there are no such returns, an 400 error is returned. - # @param sandbox_transfer_repayment_simulate_request [SandboxTransferRepaymentSimulateRequest] + # Create a transfer intent object to invoke the Transfer UI + # Use the `/transfer/intent/create` endpoint to generate a transfer intent object and invoke the Transfer UI. + # @param transfer_intent_create_request [TransferIntentCreateRequest] # @param [Hash] opts the optional parameters - # @return [SandboxTransferRepaymentSimulateResponse] - def sandbox_transfer_repayment_simulate(sandbox_transfer_repayment_simulate_request, opts = {}) - data, _status_code, _headers = sandbox_transfer_repayment_simulate_with_http_info(sandbox_transfer_repayment_simulate_request, opts) + # @return [TransferIntentCreateResponse] + def transfer_intent_create(transfer_intent_create_request, opts = {}) + data, _status_code, _headers = transfer_intent_create_with_http_info(transfer_intent_create_request, opts) data end - # Trigger the creation of a repayment - # Use the `/sandbox/transfer/repayment/simulate` endpoint to trigger the creation of a repayment. As a side effect of calling this route, a repayment is created that includes all unreimbursed returns of guaranteed transfers. If there are no such returns, an 400 error is returned. - # @param sandbox_transfer_repayment_simulate_request [SandboxTransferRepaymentSimulateRequest] + # Create a transfer intent object to invoke the Transfer UI + # Use the `/transfer/intent/create` endpoint to generate a transfer intent object and invoke the Transfer UI. + # @param transfer_intent_create_request [TransferIntentCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(SandboxTransferRepaymentSimulateResponse, Integer, Hash)>] SandboxTransferRepaymentSimulateResponse data, response status code and response headers - def sandbox_transfer_repayment_simulate_with_http_info(sandbox_transfer_repayment_simulate_request, opts = {}) + # @return [Array<(TransferIntentCreateResponse, Integer, Hash)>] TransferIntentCreateResponse data, response status code and response headers + def transfer_intent_create_with_http_info(transfer_intent_create_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_transfer_repayment_simulate ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_intent_create ...' end - # verify the required parameter 'sandbox_transfer_repayment_simulate_request' is set - if @api_client.config.client_side_validation && sandbox_transfer_repayment_simulate_request.nil? - fail ArgumentError, "Missing the required parameter 'sandbox_transfer_repayment_simulate_request' when calling PlaidApi.sandbox_transfer_repayment_simulate" + # verify the required parameter 'transfer_intent_create_request' is set + if @api_client.config.client_side_validation && transfer_intent_create_request.nil? + fail ArgumentError, "Missing the required parameter 'transfer_intent_create_request' when calling PlaidApi.transfer_intent_create" end # resource path - local_var_path = '/sandbox/transfer/repayment/simulate' + local_var_path = '/transfer/intent/create' # query parameters query_params = opts[:query_params] || {} @@ -6104,16 +7859,16 @@ def sandbox_transfer_repayment_simulate_with_http_info(sandbox_transfer_repaymen form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_transfer_repayment_simulate_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_intent_create_request) # return_type - return_type = opts[:debug_return_type] || 'SandboxTransferRepaymentSimulateResponse' + return_type = opts[:debug_return_type] || 'TransferIntentCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.sandbox_transfer_repayment_simulate", + :operation => :"PlaidApi.transfer_intent_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -6124,36 +7879,36 @@ def sandbox_transfer_repayment_simulate_with_http_info(sandbox_transfer_repaymen 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#sandbox_transfer_repayment_simulate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transfer_intent_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Simulate a transfer event in Sandbox - # Use the `/sandbox/transfer/simulate` endpoint to simulate a transfer event in the Sandbox environment. Note that while an event will be simulated and will appear when using endpoints such as `/transfer/event/sync` or `/transfer/event/list`, no transactions will actually take place and funds will not move between accounts, even within the Sandbox. - # @param sandbox_transfer_simulate_request [SandboxTransferSimulateRequest] + # Retrieve more information about a transfer intent + # Use the `/transfer/intent/get` endpoint to retrieve more information about a transfer intent. + # @param request_body [Hash] # @param [Hash] opts the optional parameters - # @return [SandboxTransferSimulateResponse] - def sandbox_transfer_simulate(sandbox_transfer_simulate_request, opts = {}) - data, _status_code, _headers = sandbox_transfer_simulate_with_http_info(sandbox_transfer_simulate_request, opts) + # @return [TransferIntentGetResponse] + def transfer_intent_get(request_body, opts = {}) + data, _status_code, _headers = transfer_intent_get_with_http_info(request_body, opts) data end - # Simulate a transfer event in Sandbox - # Use the `/sandbox/transfer/simulate` endpoint to simulate a transfer event in the Sandbox environment. Note that while an event will be simulated and will appear when using endpoints such as `/transfer/event/sync` or `/transfer/event/list`, no transactions will actually take place and funds will not move between accounts, even within the Sandbox. - # @param sandbox_transfer_simulate_request [SandboxTransferSimulateRequest] + # Retrieve more information about a transfer intent + # Use the `/transfer/intent/get` endpoint to retrieve more information about a transfer intent. + # @param request_body [Hash] # @param [Hash] opts the optional parameters - # @return [Array<(SandboxTransferSimulateResponse, Integer, Hash)>] SandboxTransferSimulateResponse data, response status code and response headers - def sandbox_transfer_simulate_with_http_info(sandbox_transfer_simulate_request, opts = {}) + # @return [Array<(TransferIntentGetResponse, Integer, Hash)>] TransferIntentGetResponse data, response status code and response headers + def transfer_intent_get_with_http_info(request_body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_transfer_simulate ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_intent_get ...' end - # verify the required parameter 'sandbox_transfer_simulate_request' is set - if @api_client.config.client_side_validation && sandbox_transfer_simulate_request.nil? - fail ArgumentError, "Missing the required parameter 'sandbox_transfer_simulate_request' when calling PlaidApi.sandbox_transfer_simulate" + # 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.transfer_intent_get" end # resource path - local_var_path = '/sandbox/transfer/simulate' + local_var_path = '/transfer/intent/get' # query parameters query_params = opts[:query_params] || {} @@ -6169,16 +7924,16 @@ def sandbox_transfer_simulate_with_http_info(sandbox_transfer_simulate_request, form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_transfer_simulate_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type - return_type = opts[:debug_return_type] || 'SandboxTransferSimulateResponse' + return_type = opts[:debug_return_type] || 'TransferIntentGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.sandbox_transfer_simulate", + :operation => :"PlaidApi.transfer_intent_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -6189,36 +7944,36 @@ def sandbox_transfer_simulate_with_http_info(sandbox_transfer_simulate_request, 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#sandbox_transfer_simulate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transfer_intent_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Simulate creating a sweep - # Use the `/sandbox/transfer/sweep/simulate` endpoint to create a sweep and associated events in the Sandbox environment. Upon calling this endpoint, all `posted` or `pending` transfers with a sweep status of `unswept` will become `swept`, and all `reversed` transfers with a sweep status of `swept` will become `reverse_swept`. - # @param sandbox_transfer_sweep_simulate_request [SandboxTransferSweepSimulateRequest] + # List transfers + # Use the `/transfer/list` endpoint to see a list of all your transfers and their statuses. Results are paginated; use the `count` and `offset` query parameters to retrieve the desired transfers. + # @param transfer_list_request [TransferListRequest] # @param [Hash] opts the optional parameters - # @return [SandboxTransferSweepSimulateResponse] - def sandbox_transfer_sweep_simulate(sandbox_transfer_sweep_simulate_request, opts = {}) - data, _status_code, _headers = sandbox_transfer_sweep_simulate_with_http_info(sandbox_transfer_sweep_simulate_request, opts) + # @return [TransferListResponse] + def transfer_list(transfer_list_request, opts = {}) + data, _status_code, _headers = transfer_list_with_http_info(transfer_list_request, opts) data end - # Simulate creating a sweep - # Use the `/sandbox/transfer/sweep/simulate` endpoint to create a sweep and associated events in the Sandbox environment. Upon calling this endpoint, all `posted` or `pending` transfers with a sweep status of `unswept` will become `swept`, and all `reversed` transfers with a sweep status of `swept` will become `reverse_swept`. - # @param sandbox_transfer_sweep_simulate_request [SandboxTransferSweepSimulateRequest] + # List transfers + # Use the `/transfer/list` endpoint to see a list of all your transfers and their statuses. Results are paginated; use the `count` and `offset` query parameters to retrieve the desired transfers. + # @param transfer_list_request [TransferListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(SandboxTransferSweepSimulateResponse, Integer, Hash)>] SandboxTransferSweepSimulateResponse data, response status code and response headers - def sandbox_transfer_sweep_simulate_with_http_info(sandbox_transfer_sweep_simulate_request, opts = {}) + # @return [Array<(TransferListResponse, Integer, Hash)>] TransferListResponse data, response status code and response headers + def transfer_list_with_http_info(transfer_list_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.sandbox_transfer_sweep_simulate ...' - end - # verify the required parameter 'sandbox_transfer_sweep_simulate_request' is set - if @api_client.config.client_side_validation && sandbox_transfer_sweep_simulate_request.nil? - fail ArgumentError, "Missing the required parameter 'sandbox_transfer_sweep_simulate_request' when calling PlaidApi.sandbox_transfer_sweep_simulate" + @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_list ...' + end + # verify the required parameter 'transfer_list_request' is set + if @api_client.config.client_side_validation && transfer_list_request.nil? + fail ArgumentError, "Missing the required parameter 'transfer_list_request' when calling PlaidApi.transfer_list" end # resource path - local_var_path = '/sandbox/transfer/sweep/simulate' + local_var_path = '/transfer/list' # query parameters query_params = opts[:query_params] || {} @@ -6234,16 +7989,16 @@ def sandbox_transfer_sweep_simulate_with_http_info(sandbox_transfer_sweep_simula form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_transfer_sweep_simulate_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_list_request) # return_type - return_type = opts[:debug_return_type] || 'SandboxTransferSweepSimulateResponse' + return_type = opts[:debug_return_type] || 'TransferListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.sandbox_transfer_sweep_simulate", + :operation => :"PlaidApi.transfer_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -6254,36 +8009,36 @@ def sandbox_transfer_sweep_simulate_with_http_info(sandbox_transfer_sweep_simula 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#sandbox_transfer_sweep_simulate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transfer_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Report whether you initiated an ACH transaction - # After calling `/signal/evaluate`, call `/signal/decision/report` to report whether the transaction was initiated. This endpoint will return an `INVALID_REQUEST` error if called a second time with a different value for `initiated`. - # @param signal_decision_report_request [SignalDecisionReportRequest] + # Migrate account into Transfers + # As an alternative to adding Items via Link, you can also use the `/transfer/migrate_account` endpoint to migrate known account and routing numbers to Plaid Items. Note that Items created in this way are not compatible with endpoints for other products, such as `/accounts/balance/get`, and can only be used with Transfer endpoints. If you require access to other endpoints, create the Item through Link instead. Access to `/transfer/migrate_account` is not enabled by default; to obtain access, contact your Plaid Account Manager. + # @param transfer_migrate_account_request [TransferMigrateAccountRequest] # @param [Hash] opts the optional parameters - # @return [SignalDecisionReportResponse] - def signal_decision_report(signal_decision_report_request, opts = {}) - data, _status_code, _headers = signal_decision_report_with_http_info(signal_decision_report_request, opts) + # @return [TransferMigrateAccountResponse] + def transfer_migrate_account(transfer_migrate_account_request, opts = {}) + data, _status_code, _headers = transfer_migrate_account_with_http_info(transfer_migrate_account_request, opts) data end - # Report whether you initiated an ACH transaction - # After calling `/signal/evaluate`, call `/signal/decision/report` to report whether the transaction was initiated. This endpoint will return an `INVALID_REQUEST` error if called a second time with a different value for `initiated`. - # @param signal_decision_report_request [SignalDecisionReportRequest] + # Migrate account into Transfers + # As an alternative to adding Items via Link, you can also use the `/transfer/migrate_account` endpoint to migrate known account and routing numbers to Plaid Items. Note that Items created in this way are not compatible with endpoints for other products, such as `/accounts/balance/get`, and can only be used with Transfer endpoints. If you require access to other endpoints, create the Item through Link instead. Access to `/transfer/migrate_account` is not enabled by default; to obtain access, contact your Plaid Account Manager. + # @param transfer_migrate_account_request [TransferMigrateAccountRequest] # @param [Hash] opts the optional parameters - # @return [Array<(SignalDecisionReportResponse, Integer, Hash)>] SignalDecisionReportResponse data, response status code and response headers - def signal_decision_report_with_http_info(signal_decision_report_request, opts = {}) + # @return [Array<(TransferMigrateAccountResponse, Integer, Hash)>] TransferMigrateAccountResponse data, response status code and response headers + def transfer_migrate_account_with_http_info(transfer_migrate_account_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.signal_decision_report ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_migrate_account ...' end - # verify the required parameter 'signal_decision_report_request' is set - if @api_client.config.client_side_validation && signal_decision_report_request.nil? - fail ArgumentError, "Missing the required parameter 'signal_decision_report_request' when calling PlaidApi.signal_decision_report" + # verify the required parameter 'transfer_migrate_account_request' is set + if @api_client.config.client_side_validation && transfer_migrate_account_request.nil? + fail ArgumentError, "Missing the required parameter 'transfer_migrate_account_request' when calling PlaidApi.transfer_migrate_account" end # resource path - local_var_path = '/signal/decision/report' + local_var_path = '/transfer/migrate_account' # query parameters query_params = opts[:query_params] || {} @@ -6299,16 +8054,16 @@ def signal_decision_report_with_http_info(signal_decision_report_request, opts = form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(signal_decision_report_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_migrate_account_request) # return_type - return_type = opts[:debug_return_type] || 'SignalDecisionReportResponse' + return_type = opts[:debug_return_type] || 'TransferMigrateAccountResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.signal_decision_report", + :operation => :"PlaidApi.transfer_migrate_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -6319,36 +8074,36 @@ def signal_decision_report_with_http_info(signal_decision_report_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#signal_decision_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transfer_migrate_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Evaluate a planned ACH transaction - # Use `/signal/evaluate` to evaluate a planned ACH transaction to get a return risk assessment (such as a risk score and risk tier) and additional risk signals. In order to obtain a valid score for an ACH transaction, Plaid must have an access token for the account, and the Item must be healthy (receiving product updates) or have recently been in a healthy state. If the transaction does not meet eligibility requirements, an error will be returned corresponding to the underlying cause. If `/signal/evaluate` is called on the same transaction multiple times within a 24-hour period, cached results may be returned. - # @param signal_evaluate_request [SignalEvaluateRequest] + # Lists historical repayments + # The `/transfer/repayment/list` endpoint fetches repayments matching the given filters. Repayments are returned in reverse-chronological order (most recent first) starting at the given `start_time`. + # @param transfer_repayment_list_request [TransferRepaymentListRequest] # @param [Hash] opts the optional parameters - # @return [SignalEvaluateResponse] - def signal_evaluate(signal_evaluate_request, opts = {}) - data, _status_code, _headers = signal_evaluate_with_http_info(signal_evaluate_request, opts) + # @return [TransferRepaymentListResponse] + def transfer_repayment_list(transfer_repayment_list_request, opts = {}) + data, _status_code, _headers = transfer_repayment_list_with_http_info(transfer_repayment_list_request, opts) data end - # Evaluate a planned ACH transaction - # Use `/signal/evaluate` to evaluate a planned ACH transaction to get a return risk assessment (such as a risk score and risk tier) and additional risk signals. In order to obtain a valid score for an ACH transaction, Plaid must have an access token for the account, and the Item must be healthy (receiving product updates) or have recently been in a healthy state. If the transaction does not meet eligibility requirements, an error will be returned corresponding to the underlying cause. If `/signal/evaluate` is called on the same transaction multiple times within a 24-hour period, cached results may be returned. - # @param signal_evaluate_request [SignalEvaluateRequest] + # Lists historical repayments + # The `/transfer/repayment/list` endpoint fetches repayments matching the given filters. Repayments are returned in reverse-chronological order (most recent first) starting at the given `start_time`. + # @param transfer_repayment_list_request [TransferRepaymentListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(SignalEvaluateResponse, Integer, Hash)>] SignalEvaluateResponse data, response status code and response headers - def signal_evaluate_with_http_info(signal_evaluate_request, opts = {}) + # @return [Array<(TransferRepaymentListResponse, Integer, Hash)>] TransferRepaymentListResponse data, response status code and response headers + def transfer_repayment_list_with_http_info(transfer_repayment_list_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.signal_evaluate ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_repayment_list ...' end - # verify the required parameter 'signal_evaluate_request' is set - if @api_client.config.client_side_validation && signal_evaluate_request.nil? - fail ArgumentError, "Missing the required parameter 'signal_evaluate_request' when calling PlaidApi.signal_evaluate" + # verify the required parameter 'transfer_repayment_list_request' is set + if @api_client.config.client_side_validation && transfer_repayment_list_request.nil? + fail ArgumentError, "Missing the required parameter 'transfer_repayment_list_request' when calling PlaidApi.transfer_repayment_list" end # resource path - local_var_path = '/signal/evaluate' + local_var_path = '/transfer/repayment/list' # query parameters query_params = opts[:query_params] || {} @@ -6364,16 +8119,16 @@ def signal_evaluate_with_http_info(signal_evaluate_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(signal_evaluate_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_repayment_list_request) # return_type - return_type = opts[:debug_return_type] || 'SignalEvaluateResponse' + return_type = opts[:debug_return_type] || 'TransferRepaymentListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.signal_evaluate", + :operation => :"PlaidApi.transfer_repayment_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -6384,36 +8139,36 @@ def signal_evaluate_with_http_info(signal_evaluate_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#signal_evaluate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transfer_repayment_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Prepare the Signal product before calling `/signal/evaluate` - # Call `/signal/prepare` with Plaid-linked bank account information at least 10 seconds before calling `/signal/evaluate` or as soon as an end-user enters the ACH deposit flow in your application. - # @param signal_prepare_request [SignalPrepareRequest] + # List the returns included in a repayment + # The `/transfer/repayment/return/list` endpoint retrieves the set of returns that were batched together into the specified repayment. The sum of amounts of returns retrieved by this request equals the amount of the repayment. + # @param transfer_repayment_return_list_request [TransferRepaymentReturnListRequest] # @param [Hash] opts the optional parameters - # @return [SignalPrepareResponse] - def signal_prepare(signal_prepare_request, opts = {}) - data, _status_code, _headers = signal_prepare_with_http_info(signal_prepare_request, opts) + # @return [TransferRepaymentReturnListResponse] + def transfer_repayment_return_list(transfer_repayment_return_list_request, opts = {}) + data, _status_code, _headers = transfer_repayment_return_list_with_http_info(transfer_repayment_return_list_request, opts) data end - # Prepare the Signal product before calling `/signal/evaluate` - # Call `/signal/prepare` with Plaid-linked bank account information at least 10 seconds before calling `/signal/evaluate` or as soon as an end-user enters the ACH deposit flow in your application. - # @param signal_prepare_request [SignalPrepareRequest] + # List the returns included in a repayment + # The `/transfer/repayment/return/list` endpoint retrieves the set of returns that were batched together into the specified repayment. The sum of amounts of returns retrieved by this request equals the amount of the repayment. + # @param transfer_repayment_return_list_request [TransferRepaymentReturnListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(SignalPrepareResponse, Integer, Hash)>] SignalPrepareResponse data, response status code and response headers - def signal_prepare_with_http_info(signal_prepare_request, opts = {}) + # @return [Array<(TransferRepaymentReturnListResponse, Integer, Hash)>] TransferRepaymentReturnListResponse data, response status code and response headers + def transfer_repayment_return_list_with_http_info(transfer_repayment_return_list_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.signal_prepare ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_repayment_return_list ...' end - # verify the required parameter 'signal_prepare_request' is set - if @api_client.config.client_side_validation && signal_prepare_request.nil? - fail ArgumentError, "Missing the required parameter 'signal_prepare_request' when calling PlaidApi.signal_prepare" + # verify the required parameter 'transfer_repayment_return_list_request' is set + if @api_client.config.client_side_validation && transfer_repayment_return_list_request.nil? + fail ArgumentError, "Missing the required parameter 'transfer_repayment_return_list_request' when calling PlaidApi.transfer_repayment_return_list" end # resource path - local_var_path = '/signal/prepare' + local_var_path = '/transfer/repayment/return/list' # query parameters query_params = opts[:query_params] || {} @@ -6429,16 +8184,16 @@ def signal_prepare_with_http_info(signal_prepare_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(signal_prepare_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_repayment_return_list_request) # return_type - return_type = opts[:debug_return_type] || 'SignalPrepareResponse' + return_type = opts[:debug_return_type] || 'TransferRepaymentReturnListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.signal_prepare", + :operation => :"PlaidApi.transfer_repayment_return_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -6449,36 +8204,36 @@ def signal_prepare_with_http_info(signal_prepare_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#signal_prepare\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transfer_repayment_return_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Report a return for an ACH transaction - # Call the `/signal/return/report` endpoint to report a returned transaction that was previously sent to the `/signal/evaluate` endpoint. Your feedback will be used by the model to incorporate the latest risk trend in your portfolio. - # @param signal_return_report_request [SignalReturnReportRequest] + # Retrieve a sweep + # The `/transfer/sweep/get` endpoint fetches a sweep corresponding to the given `sweep_id`. + # @param transfer_sweep_get_request [TransferSweepGetRequest] # @param [Hash] opts the optional parameters - # @return [SignalReturnReportResponse] - def signal_return_report(signal_return_report_request, opts = {}) - data, _status_code, _headers = signal_return_report_with_http_info(signal_return_report_request, opts) + # @return [TransferSweepGetResponse] + def transfer_sweep_get(transfer_sweep_get_request, opts = {}) + data, _status_code, _headers = transfer_sweep_get_with_http_info(transfer_sweep_get_request, opts) data end - # Report a return for an ACH transaction - # Call the `/signal/return/report` endpoint to report a returned transaction that was previously sent to the `/signal/evaluate` endpoint. Your feedback will be used by the model to incorporate the latest risk trend in your portfolio. - # @param signal_return_report_request [SignalReturnReportRequest] + # Retrieve a sweep + # The `/transfer/sweep/get` endpoint fetches a sweep corresponding to the given `sweep_id`. + # @param transfer_sweep_get_request [TransferSweepGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(SignalReturnReportResponse, Integer, Hash)>] SignalReturnReportResponse data, response status code and response headers - def signal_return_report_with_http_info(signal_return_report_request, opts = {}) + # @return [Array<(TransferSweepGetResponse, Integer, Hash)>] TransferSweepGetResponse data, response status code and response headers + def transfer_sweep_get_with_http_info(transfer_sweep_get_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.signal_return_report ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_sweep_get ...' end - # verify the required parameter 'signal_return_report_request' is set - if @api_client.config.client_side_validation && signal_return_report_request.nil? - fail ArgumentError, "Missing the required parameter 'signal_return_report_request' when calling PlaidApi.signal_return_report" + # verify the required parameter 'transfer_sweep_get_request' is set + if @api_client.config.client_side_validation && transfer_sweep_get_request.nil? + fail ArgumentError, "Missing the required parameter 'transfer_sweep_get_request' when calling PlaidApi.transfer_sweep_get" end # resource path - local_var_path = '/signal/return/report' + local_var_path = '/transfer/sweep/get' # query parameters query_params = opts[:query_params] || {} @@ -6494,16 +8249,16 @@ def signal_return_report_with_http_info(signal_return_report_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(signal_return_report_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_sweep_get_request) # return_type - return_type = opts[:debug_return_type] || 'SignalReturnReportResponse' + return_type = opts[:debug_return_type] || 'TransferSweepGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.signal_return_report", + :operation => :"PlaidApi.transfer_sweep_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -6514,36 +8269,36 @@ def signal_return_report_with_http_info(signal_return_report_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#signal_return_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transfer_sweep_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # enhance locally-held transaction data - # The '/beta/transactions/v1/enhance' endpoint enriches raw transaction data provided directly by clients. The product is currently in beta. - # @param transactions_enhance_get_request [TransactionsEnhanceGetRequest] + # List sweeps + # The `/transfer/sweep/list` endpoint fetches sweeps matching the given filters. + # @param transfer_sweep_list_request [TransferSweepListRequest] # @param [Hash] opts the optional parameters - # @return [TransactionsEnhanceGetResponse] - def transactions_enhance(transactions_enhance_get_request, opts = {}) - data, _status_code, _headers = transactions_enhance_with_http_info(transactions_enhance_get_request, opts) + # @return [TransferSweepListResponse] + def transfer_sweep_list(transfer_sweep_list_request, opts = {}) + data, _status_code, _headers = transfer_sweep_list_with_http_info(transfer_sweep_list_request, opts) data end - # enhance locally-held transaction data - # The '/beta/transactions/v1/enhance' endpoint enriches raw transaction data provided directly by clients. The product is currently in beta. - # @param transactions_enhance_get_request [TransactionsEnhanceGetRequest] + # List sweeps + # The `/transfer/sweep/list` endpoint fetches sweeps matching the given filters. + # @param transfer_sweep_list_request [TransferSweepListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(TransactionsEnhanceGetResponse, Integer, Hash)>] TransactionsEnhanceGetResponse data, response status code and response headers - def transactions_enhance_with_http_info(transactions_enhance_get_request, opts = {}) + # @return [Array<(TransferSweepListResponse, Integer, Hash)>] TransferSweepListResponse data, response status code and response headers + def transfer_sweep_list_with_http_info(transfer_sweep_list_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_enhance ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_sweep_list ...' end - # verify the required parameter 'transactions_enhance_get_request' is set - if @api_client.config.client_side_validation && transactions_enhance_get_request.nil? - fail ArgumentError, "Missing the required parameter 'transactions_enhance_get_request' when calling PlaidApi.transactions_enhance" + # verify the required parameter 'transfer_sweep_list_request' is set + if @api_client.config.client_side_validation && transfer_sweep_list_request.nil? + fail ArgumentError, "Missing the required parameter 'transfer_sweep_list_request' when calling PlaidApi.transfer_sweep_list" end # resource path - local_var_path = '/beta/transactions/v1/enhance' + local_var_path = '/transfer/sweep/list' # query parameters query_params = opts[:query_params] || {} @@ -6559,16 +8314,16 @@ def transactions_enhance_with_http_info(transactions_enhance_get_request, opts = form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_enhance_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_sweep_list_request) # return_type - return_type = opts[:debug_return_type] || 'TransactionsEnhanceGetResponse' + return_type = opts[:debug_return_type] || 'TransferSweepListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transactions_enhance", + :operation => :"PlaidApi.transfer_sweep_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -6579,36 +8334,36 @@ def transactions_enhance_with_http_info(transactions_enhance_get_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#transactions_enhance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#transfer_sweep_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get transaction data - # The `/transactions/get` endpoint allows developers to receive user-authorized transaction data for credit, depository, and some loan-type accounts (only those with account subtype `student`; coverage may be limited). For transaction history from investments accounts, use the [Investments endpoint](https://plaid.com/docs/api/products/investments/) instead. Transaction data is standardized across financial institutions, and in many cases transactions are linked to a clean name, entity type, location, and category. Similarly, account data is standardized and returned with a clean name, number, balance, and other meta information where available. Transactions are returned in reverse-chronological order, and the sequence of transaction ordering is stable and will not shift. Transactions are not immutable and can also be removed altogether by the institution; a removed transaction will no longer appear in `/transactions/get`. For more details, see [Pending and posted transactions](https://plaid.com/docs/transactions/transactions-data/#pending-and-posted-transactions). Due to the potentially large number of transactions associated with an Item, results are paginated. Manipulate the `count` and `offset` parameters in conjunction with the `total_transactions` response body field to fetch all available transactions. Data returned by `/transactions/get` will be the data available for the Item as of the most recent successful check for new transactions. Plaid typically checks for new data multiple times a day, but these checks may occur less frequently, such as once a day, depending on the institution. An Item's `status.transactions.last_successful_update` field will show the timestamp of the most recent successful update. To force Plaid to check for new transactions, you can use the `/transactions/refresh` endpoint. Note that data may not be immediately available to `/transactions/get`. Plaid will begin to prepare transactions data upon Item link, if Link was initialized with `transactions`, or upon the first call to `/transactions/get`, if it wasn't. To be alerted when transaction data is ready to be fetched, listen for the [`INITIAL_UPDATE`](https://plaid.com/docs/api/products/transactions/#initial_update) and [`HISTORICAL_UPDATE`](https://plaid.com/docs/api/products/transactions/#historical_update) webhooks. If no transaction history is ready when `/transactions/get` is called, it will return a `PRODUCT_NOT_READY` error. - # @param transactions_get_request [TransactionsGetRequest] + # 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. + # @param user_create_request [UserCreateRequest] # @param [Hash] opts the optional parameters - # @return [TransactionsGetResponse] - def transactions_get(transactions_get_request, opts = {}) - data, _status_code, _headers = transactions_get_with_http_info(transactions_get_request, opts) + # @return [UserCreateResponse] + def user_create(user_create_request, opts = {}) + data, _status_code, _headers = user_create_with_http_info(user_create_request, opts) data end - # Get transaction data - # The `/transactions/get` endpoint allows developers to receive user-authorized transaction data for credit, depository, and some loan-type accounts (only those with account subtype `student`; coverage may be limited). For transaction history from investments accounts, use the [Investments endpoint](https://plaid.com/docs/api/products/investments/) instead. Transaction data is standardized across financial institutions, and in many cases transactions are linked to a clean name, entity type, location, and category. Similarly, account data is standardized and returned with a clean name, number, balance, and other meta information where available. Transactions are returned in reverse-chronological order, and the sequence of transaction ordering is stable and will not shift. Transactions are not immutable and can also be removed altogether by the institution; a removed transaction will no longer appear in `/transactions/get`. For more details, see [Pending and posted transactions](https://plaid.com/docs/transactions/transactions-data/#pending-and-posted-transactions). Due to the potentially large number of transactions associated with an Item, results are paginated. Manipulate the `count` and `offset` parameters in conjunction with the `total_transactions` response body field to fetch all available transactions. Data returned by `/transactions/get` will be the data available for the Item as of the most recent successful check for new transactions. Plaid typically checks for new data multiple times a day, but these checks may occur less frequently, such as once a day, depending on the institution. An Item's `status.transactions.last_successful_update` field will show the timestamp of the most recent successful update. To force Plaid to check for new transactions, you can use the `/transactions/refresh` endpoint. Note that data may not be immediately available to `/transactions/get`. Plaid will begin to prepare transactions data upon Item link, if Link was initialized with `transactions`, or upon the first call to `/transactions/get`, if it wasn't. To be alerted when transaction data is ready to be fetched, listen for the [`INITIAL_UPDATE`](https://plaid.com/docs/api/products/transactions/#initial_update) and [`HISTORICAL_UPDATE`](https://plaid.com/docs/api/products/transactions/#historical_update) webhooks. If no transaction history is ready when `/transactions/get` is called, it will return a `PRODUCT_NOT_READY` error. - # @param transactions_get_request [TransactionsGetRequest] + # 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. + # @param user_create_request [UserCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(TransactionsGetResponse, Integer, Hash)>] TransactionsGetResponse data, response status code and response headers - def transactions_get_with_http_info(transactions_get_request, opts = {}) + # @return [Array<(UserCreateResponse, Integer, Hash)>] UserCreateResponse data, response status code and response headers + def user_create_with_http_info(user_create_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.user_create ...' end - # verify the required parameter 'transactions_get_request' is set - if @api_client.config.client_side_validation && transactions_get_request.nil? - fail ArgumentError, "Missing the required parameter 'transactions_get_request' when calling PlaidApi.transactions_get" + # verify the required parameter 'user_create_request' is set + if @api_client.config.client_side_validation && user_create_request.nil? + fail ArgumentError, "Missing the required parameter 'user_create_request' when calling PlaidApi.user_create" end # resource path - local_var_path = '/transactions/get' + local_var_path = '/user/create' # query parameters query_params = opts[:query_params] || {} @@ -6624,16 +8379,16 @@ def transactions_get_with_http_info(transactions_get_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(user_create_request) # return_type - return_type = opts[:debug_return_type] || 'TransactionsGetResponse' + return_type = opts[:debug_return_type] || 'UserCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transactions_get", + :operation => :"PlaidApi.user_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -6644,36 +8399,36 @@ def transactions_get_with_http_info(transactions_get_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#transactions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#user_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Deactivate recurring transactions product for Item - # The `/transactions/recurring/deactivate` endpoint returns returns a message indicating the success in removing the product from the Item or returns an error. The product is currently in beta. To request access, contact transactions-feedback@plaid.com. - # @param transactions_recurring_deactivate_request [TransactionsRecurringDeactivateRequest] + # Create an e-wallet + # Create an e-wallet. The response is the newly created e-wallet object. + # @param wallet_create_request [WalletCreateRequest] # @param [Hash] opts the optional parameters - # @return [TransactionsRecurringDeactivateResponse] - def transactions_recurring_deactivate(transactions_recurring_deactivate_request, opts = {}) - data, _status_code, _headers = transactions_recurring_deactivate_with_http_info(transactions_recurring_deactivate_request, opts) + # @return [WalletCreateResponse] + def wallet_create(wallet_create_request, opts = {}) + data, _status_code, _headers = wallet_create_with_http_info(wallet_create_request, opts) data end - # Deactivate recurring transactions product for Item - # The `/transactions/recurring/deactivate` endpoint returns returns a message indicating the success in removing the product from the Item or returns an error. The product is currently in beta. To request access, contact transactions-feedback@plaid.com. - # @param transactions_recurring_deactivate_request [TransactionsRecurringDeactivateRequest] + # Create an e-wallet + # Create an e-wallet. The response is the newly created e-wallet object. + # @param wallet_create_request [WalletCreateRequest] # @param [Hash] opts the optional parameters - # @return [Array<(TransactionsRecurringDeactivateResponse, Integer, Hash)>] TransactionsRecurringDeactivateResponse data, response status code and response headers - def transactions_recurring_deactivate_with_http_info(transactions_recurring_deactivate_request, opts = {}) + # @return [Array<(WalletCreateResponse, Integer, Hash)>] WalletCreateResponse data, response status code and response headers + def wallet_create_with_http_info(wallet_create_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_recurring_deactivate ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.wallet_create ...' end - # verify the required parameter 'transactions_recurring_deactivate_request' is set - if @api_client.config.client_side_validation && transactions_recurring_deactivate_request.nil? - fail ArgumentError, "Missing the required parameter 'transactions_recurring_deactivate_request' when calling PlaidApi.transactions_recurring_deactivate" + # verify the required parameter 'wallet_create_request' is set + if @api_client.config.client_side_validation && wallet_create_request.nil? + fail ArgumentError, "Missing the required parameter 'wallet_create_request' when calling PlaidApi.wallet_create" end # resource path - local_var_path = '/transactions/recurring/deactivate' + local_var_path = '/wallet/create' # query parameters query_params = opts[:query_params] || {} @@ -6689,16 +8444,16 @@ def transactions_recurring_deactivate_with_http_info(transactions_recurring_deac form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_recurring_deactivate_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(wallet_create_request) # return_type - return_type = opts[:debug_return_type] || 'TransactionsRecurringDeactivateResponse' + return_type = opts[:debug_return_type] || 'WalletCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transactions_recurring_deactivate", + :operation => :"PlaidApi.wallet_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -6709,36 +8464,36 @@ def transactions_recurring_deactivate_with_http_info(transactions_recurring_deac 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#transactions_recurring_deactivate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#wallet_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get streams of recurring transactions - # The `/transactions/recurring/get` endpoint identifies and returns groups of transactions that occur on a regular basis for the inputted Item and accounts. The product is currently in beta. To request access, contact transactions-feedback@plaid.com. - # @param transactions_recurring_get_request [TransactionsRecurringGetRequest] + # Fetch an e-wallet + # Fetch an e-wallet. The response includes the current balance. + # @param wallet_get_request [WalletGetRequest] # @param [Hash] opts the optional parameters - # @return [TransactionsRecurringGetResponse] - def transactions_recurring_get(transactions_recurring_get_request, opts = {}) - data, _status_code, _headers = transactions_recurring_get_with_http_info(transactions_recurring_get_request, opts) + # @return [WalletGetResponse] + def wallet_get(wallet_get_request, opts = {}) + data, _status_code, _headers = wallet_get_with_http_info(wallet_get_request, opts) data end - # Get streams of recurring transactions - # The `/transactions/recurring/get` endpoint identifies and returns groups of transactions that occur on a regular basis for the inputted Item and accounts. The product is currently in beta. To request access, contact transactions-feedback@plaid.com. - # @param transactions_recurring_get_request [TransactionsRecurringGetRequest] + # Fetch an e-wallet + # Fetch an e-wallet. The response includes the current balance. + # @param wallet_get_request [WalletGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(TransactionsRecurringGetResponse, Integer, Hash)>] TransactionsRecurringGetResponse data, response status code and response headers - def transactions_recurring_get_with_http_info(transactions_recurring_get_request, opts = {}) + # @return [Array<(WalletGetResponse, Integer, Hash)>] WalletGetResponse data, response status code and response headers + def wallet_get_with_http_info(wallet_get_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_recurring_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.wallet_get ...' end - # verify the required parameter 'transactions_recurring_get_request' is set - if @api_client.config.client_side_validation && transactions_recurring_get_request.nil? - fail ArgumentError, "Missing the required parameter 'transactions_recurring_get_request' when calling PlaidApi.transactions_recurring_get" + # verify the required parameter 'wallet_get_request' is set + if @api_client.config.client_side_validation && wallet_get_request.nil? + fail ArgumentError, "Missing the required parameter 'wallet_get_request' when calling PlaidApi.wallet_get" end # resource path - local_var_path = '/transactions/recurring/get' + local_var_path = '/wallet/get' # query parameters query_params = opts[:query_params] || {} @@ -6754,16 +8509,16 @@ def transactions_recurring_get_with_http_info(transactions_recurring_get_request form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_recurring_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(wallet_get_request) # return_type - return_type = opts[:debug_return_type] || 'TransactionsRecurringGetResponse' + return_type = opts[:debug_return_type] || 'WalletGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transactions_recurring_get", + :operation => :"PlaidApi.wallet_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -6774,36 +8529,36 @@ def transactions_recurring_get_with_http_info(transactions_recurring_get_request 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#transactions_recurring_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#wallet_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Refresh transaction data - # `/transactions/refresh` is an optional endpoint for users of the Transactions product. It initiates an on-demand extraction to fetch the newest transactions for an Item. This on-demand extraction takes place in addition to the periodic extractions that automatically occur multiple times a day for any Transactions-enabled Item. If changes to transactions are discovered after calling `/transactions/refresh`, Plaid will fire a webhook: [`TRANSACTIONS_REMOVED`](https://plaid.com/docs/api/products/transactions/#transactions_removed) will be fired if any removed transactions are detected, and [`DEFAULT_UPDATE`](https://plaid.com/docs/api/products/transactions/#default_update) will be fired if any new transactions are detected. New transactions can be fetched by calling `/transactions/get`. Access to `/transactions/refresh` in Production is specific to certain pricing plans. If you cannot access `/transactions/refresh` in Production, [contact Sales](https://www.plaid.com/contact) for assistance. - # @param transactions_refresh_request [TransactionsRefreshRequest] + # 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. + # @param wallet_transaction_execute_request [WalletTransactionExecuteRequest] # @param [Hash] opts the optional parameters - # @return [TransactionsRefreshResponse] - def transactions_refresh(transactions_refresh_request, opts = {}) - data, _status_code, _headers = transactions_refresh_with_http_info(transactions_refresh_request, opts) + # @return [WalletTransactionExecuteResponse] + def wallet_transaction_execute(wallet_transaction_execute_request, opts = {}) + data, _status_code, _headers = wallet_transaction_execute_with_http_info(wallet_transaction_execute_request, opts) data end - # Refresh transaction data - # `/transactions/refresh` is an optional endpoint for users of the Transactions product. It initiates an on-demand extraction to fetch the newest transactions for an Item. This on-demand extraction takes place in addition to the periodic extractions that automatically occur multiple times a day for any Transactions-enabled Item. If changes to transactions are discovered after calling `/transactions/refresh`, Plaid will fire a webhook: [`TRANSACTIONS_REMOVED`](https://plaid.com/docs/api/products/transactions/#transactions_removed) will be fired if any removed transactions are detected, and [`DEFAULT_UPDATE`](https://plaid.com/docs/api/products/transactions/#default_update) will be fired if any new transactions are detected. New transactions can be fetched by calling `/transactions/get`. Access to `/transactions/refresh` in Production is specific to certain pricing plans. If you cannot access `/transactions/refresh` in Production, [contact Sales](https://www.plaid.com/contact) for assistance. - # @param transactions_refresh_request [TransactionsRefreshRequest] + # 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. + # @param wallet_transaction_execute_request [WalletTransactionExecuteRequest] # @param [Hash] opts the optional parameters - # @return [Array<(TransactionsRefreshResponse, Integer, Hash)>] TransactionsRefreshResponse data, response status code and response headers - def transactions_refresh_with_http_info(transactions_refresh_request, opts = {}) + # @return [Array<(WalletTransactionExecuteResponse, Integer, Hash)>] WalletTransactionExecuteResponse data, response status code and response headers + def wallet_transaction_execute_with_http_info(wallet_transaction_execute_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_refresh ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.wallet_transaction_execute ...' end - # verify the required parameter 'transactions_refresh_request' is set - if @api_client.config.client_side_validation && transactions_refresh_request.nil? - fail ArgumentError, "Missing the required parameter 'transactions_refresh_request' when calling PlaidApi.transactions_refresh" + # verify the required parameter 'wallet_transaction_execute_request' is set + if @api_client.config.client_side_validation && wallet_transaction_execute_request.nil? + fail ArgumentError, "Missing the required parameter 'wallet_transaction_execute_request' when calling PlaidApi.wallet_transaction_execute" end # resource path - local_var_path = '/transactions/refresh' + local_var_path = '/wallet/transaction/execute' # query parameters query_params = opts[:query_params] || {} @@ -6819,16 +8574,16 @@ def transactions_refresh_with_http_info(transactions_refresh_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_refresh_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(wallet_transaction_execute_request) # return_type - return_type = opts[:debug_return_type] || 'TransactionsRefreshResponse' + return_type = opts[:debug_return_type] || 'WalletTransactionExecuteResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transactions_refresh", + :operation => :"PlaidApi.wallet_transaction_execute", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -6839,36 +8594,34 @@ def transactions_refresh_with_http_info(transactions_refresh_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#transactions_refresh\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#wallet_transaction_execute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create transaction category rule - # The `/transactions/rules/create` endpoint creates transaction categorization rules. Rules will be applied on the Item's transactions returned in `/transactions/get` response. The product is currently in beta. To request access, contact transactions-feedback@plaid.com. - # @param transactions_rules_create_request [TransactionsRulesCreateRequest] + # Fetch a specific e-wallet transaction + # @param wallet_transaction_get_request [WalletTransactionGetRequest] # @param [Hash] opts the optional parameters - # @return [TransactionsRulesCreateResponse] - def transactions_rules_create(transactions_rules_create_request, opts = {}) - data, _status_code, _headers = transactions_rules_create_with_http_info(transactions_rules_create_request, opts) + # @return [WalletTransactionGetResponse] + def wallet_transaction_get(wallet_transaction_get_request, opts = {}) + data, _status_code, _headers = wallet_transaction_get_with_http_info(wallet_transaction_get_request, opts) data end - # Create transaction category rule - # The `/transactions/rules/create` endpoint creates transaction categorization rules. Rules will be applied on the Item's transactions returned in `/transactions/get` response. The product is currently in beta. To request access, contact transactions-feedback@plaid.com. - # @param transactions_rules_create_request [TransactionsRulesCreateRequest] + # Fetch a specific e-wallet transaction + # @param wallet_transaction_get_request [WalletTransactionGetRequest] # @param [Hash] opts the optional parameters - # @return [Array<(TransactionsRulesCreateResponse, Integer, Hash)>] TransactionsRulesCreateResponse data, response status code and response headers - def transactions_rules_create_with_http_info(transactions_rules_create_request, opts = {}) + # @return [Array<(WalletTransactionGetResponse, Integer, Hash)>] WalletTransactionGetResponse data, response status code and response headers + def wallet_transaction_get_with_http_info(wallet_transaction_get_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_rules_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.wallet_transaction_get ...' end - # verify the required parameter 'transactions_rules_create_request' is set - if @api_client.config.client_side_validation && transactions_rules_create_request.nil? - fail ArgumentError, "Missing the required parameter 'transactions_rules_create_request' when calling PlaidApi.transactions_rules_create" + # verify the required parameter 'wallet_transaction_get_request' is set + if @api_client.config.client_side_validation && wallet_transaction_get_request.nil? + fail ArgumentError, "Missing the required parameter 'wallet_transaction_get_request' when calling PlaidApi.wallet_transaction_get" end # resource path - local_var_path = '/beta/transactions/rules/create' + local_var_path = '/wallet/transaction/get' # query parameters query_params = opts[:query_params] || {} @@ -6884,16 +8637,16 @@ def transactions_rules_create_with_http_info(transactions_rules_create_request, form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_rules_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(wallet_transaction_get_request) # return_type - return_type = opts[:debug_return_type] || 'TransactionsRulesCreateResponse' + return_type = opts[:debug_return_type] || 'WalletTransactionGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transactions_rules_create", + :operation => :"PlaidApi.wallet_transaction_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -6904,36 +8657,36 @@ def transactions_rules_create_with_http_info(transactions_rules_create_request, 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#transactions_rules_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#wallet_transaction_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Return a list of rules created for the Item associated with the access token. - # The `/transactions/rules/list` returns a list of transaction rules created for the Item associated with the access token. - # @param transactions_rules_list_request [TransactionsRulesListRequest] + # List e-wallet transactions + # This endpoint lists the latest transactions of the specified e-wallet. Transactions are returned in descending order by the `created_at` time. + # @param wallet_transactions_list_request [WalletTransactionsListRequest] # @param [Hash] opts the optional parameters - # @return [TransactionsRulesListResponse] - def transactions_rules_list(transactions_rules_list_request, opts = {}) - data, _status_code, _headers = transactions_rules_list_with_http_info(transactions_rules_list_request, opts) + # @return [WalletTransactionsListResponse] + def wallet_transactions_list(wallet_transactions_list_request, opts = {}) + data, _status_code, _headers = wallet_transactions_list_with_http_info(wallet_transactions_list_request, opts) data end - # Return a list of rules created for the Item associated with the access token. - # The `/transactions/rules/list` returns a list of transaction rules created for the Item associated with the access token. - # @param transactions_rules_list_request [TransactionsRulesListRequest] + # List e-wallet transactions + # This endpoint lists the latest transactions of the specified e-wallet. Transactions are returned in descending order by the `created_at` time. + # @param wallet_transactions_list_request [WalletTransactionsListRequest] # @param [Hash] opts the optional parameters - # @return [Array<(TransactionsRulesListResponse, Integer, Hash)>] TransactionsRulesListResponse data, response status code and response headers - def transactions_rules_list_with_http_info(transactions_rules_list_request, opts = {}) + # @return [Array<(WalletTransactionsListResponse, Integer, Hash)>] WalletTransactionsListResponse data, response status code and response headers + def wallet_transactions_list_with_http_info(wallet_transactions_list_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_rules_list ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.wallet_transactions_list ...' end - # verify the required parameter 'transactions_rules_list_request' is set - if @api_client.config.client_side_validation && transactions_rules_list_request.nil? - fail ArgumentError, "Missing the required parameter 'transactions_rules_list_request' when calling PlaidApi.transactions_rules_list" + # verify the required parameter 'wallet_transactions_list_request' is set + if @api_client.config.client_side_validation && wallet_transactions_list_request.nil? + fail ArgumentError, "Missing the required parameter 'wallet_transactions_list_request' when calling PlaidApi.wallet_transactions_list" end # resource path - local_var_path = '/beta/transactions/rules/list' + local_var_path = '/wallet/transactions/list' # query parameters query_params = opts[:query_params] || {} @@ -6949,16 +8702,16 @@ def transactions_rules_list_with_http_info(transactions_rules_list_request, opts form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_rules_list_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(wallet_transactions_list_request) # return_type - return_type = opts[:debug_return_type] || 'TransactionsRulesListResponse' + return_type = opts[:debug_return_type] || 'WalletTransactionsListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transactions_rules_list", + :operation => :"PlaidApi.wallet_transactions_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -6969,36 +8722,36 @@ def transactions_rules_list_with_http_info(transactions_rules_list_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#transactions_rules_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#wallet_transactions_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Remove transaction rule - # The `/transactions/rules/remove` endpoint is used to remove a transaction rule. - # @param transactions_rules_remove_request [TransactionsRulesRemoveRequest] + # 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 [Hash] opts the optional parameters - # @return [TransactionsRulesRemoveResponse] - def transactions_rules_remove(transactions_rules_remove_request, opts = {}) - data, _status_code, _headers = transactions_rules_remove_with_http_info(transactions_rules_remove_request, opts) + # @return [EntityWatchlistScreening] + 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) data end - # Remove transaction rule - # The `/transactions/rules/remove` endpoint is used to remove a transaction rule. - # @param transactions_rules_remove_request [TransactionsRulesRemoveRequest] + # 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 [Hash] opts the optional parameters - # @return [Array<(TransactionsRulesRemoveResponse, Integer, Hash)>] TransactionsRulesRemoveResponse data, response status code and response headers - def transactions_rules_remove_with_http_info(transactions_rules_remove_request, opts = {}) + # @return [Array<(EntityWatchlistScreening, Integer, Hash)>] EntityWatchlistScreening data, response status code and response headers + def watchlist_screening_entity_create_with_http_info(create_entity_screening_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_rules_remove ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_create ...' end - # verify the required parameter 'transactions_rules_remove_request' is set - if @api_client.config.client_side_validation && transactions_rules_remove_request.nil? - fail ArgumentError, "Missing the required parameter 'transactions_rules_remove_request' when calling PlaidApi.transactions_rules_remove" + # 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" end # resource path - local_var_path = '/beta/transactions/rules/remove' + local_var_path = '/watchlist_screening/entity/create' # query parameters query_params = opts[:query_params] || {} @@ -7014,16 +8767,16 @@ def transactions_rules_remove_with_http_info(transactions_rules_remove_request, form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_rules_remove_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(create_entity_screening_request) # return_type - return_type = opts[:debug_return_type] || 'TransactionsRulesRemoveResponse' + return_type = opts[:debug_return_type] || 'EntityWatchlistScreening' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transactions_rules_remove", + :operation => :"PlaidApi.watchlist_screening_entity_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -7034,36 +8787,36 @@ def transactions_rules_remove_with_http_info(transactions_rules_remove_request, 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#transactions_rules_remove\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_entity_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get incremental transaction updates on an Item - # The `/transactions/sync` endpoint returns item transactions as a set of delta updates. Subsequent calls to the endpoint using the cursor returned in the response will return new added, modified, and removed transactions since the last call to the endpoint The product is currently in beta. To request access, contact transactions-feedback@plaid.com. - # @param transactions_sync_request [TransactionsSyncRequest] + # Get an entity screening + # Retrieve an entity watchlist screening. + # @param get_entity_watchlist_screening_request [GetEntityWatchlistScreeningRequest] # @param [Hash] opts the optional parameters - # @return [TransactionsSyncResponse] - def transactions_sync(transactions_sync_request, opts = {}) - data, _status_code, _headers = transactions_sync_with_http_info(transactions_sync_request, opts) + # @return [EntityWatchlistScreening] + 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) data end - # Get incremental transaction updates on an Item - # The `/transactions/sync` endpoint returns item transactions as a set of delta updates. Subsequent calls to the endpoint using the cursor returned in the response will return new added, modified, and removed transactions since the last call to the endpoint The product is currently in beta. To request access, contact transactions-feedback@plaid.com. - # @param transactions_sync_request [TransactionsSyncRequest] + # Get an entity screening + # Retrieve an entity watchlist screening. + # @param get_entity_watchlist_screening_request [GetEntityWatchlistScreeningRequest] # @param [Hash] opts the optional parameters - # @return [Array<(TransactionsSyncResponse, Integer, Hash)>] TransactionsSyncResponse data, response status code and response headers - def transactions_sync_with_http_info(transactions_sync_request, opts = {}) + # @return [Array<(EntityWatchlistScreening, Integer, Hash)>] EntityWatchlistScreening data, response status code and response headers + def watchlist_screening_entity_get_with_http_info(get_entity_watchlist_screening_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transactions_sync ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_get ...' end - # verify the required parameter 'transactions_sync_request' is set - if @api_client.config.client_side_validation && transactions_sync_request.nil? - fail ArgumentError, "Missing the required parameter 'transactions_sync_request' when calling PlaidApi.transactions_sync" + # 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" end # resource path - local_var_path = '/transactions/sync' + local_var_path = '/watchlist_screening/entity/get' # query parameters query_params = opts[:query_params] || {} @@ -7079,16 +8832,16 @@ def transactions_sync_with_http_info(transactions_sync_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions_sync_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(get_entity_watchlist_screening_request) # return_type - return_type = opts[:debug_return_type] || 'TransactionsSyncResponse' + return_type = opts[:debug_return_type] || 'EntityWatchlistScreening' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transactions_sync", + :operation => :"PlaidApi.watchlist_screening_entity_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -7099,36 +8852,36 @@ def transactions_sync_with_http_info(transactions_sync_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#transactions_sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_entity_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers 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. - # @param transfer_authorization_create_request [TransferAuthorizationCreateRequest] + # 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 [Hash] opts the optional parameters - # @return [TransferAuthorizationCreateResponse] - def transfer_authorization_create(transfer_authorization_create_request, opts = {}) - data, _status_code, _headers = transfer_authorization_create_with_http_info(transfer_authorization_create_request, opts) + # @return [PaginatedEntityWatchlistScreeningList] + 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) data 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. - # @param transfer_authorization_create_request [TransferAuthorizationCreateRequest] + # 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 [Hash] opts the optional parameters - # @return [Array<(TransferAuthorizationCreateResponse, Integer, Hash)>] TransferAuthorizationCreateResponse data, response status code and response headers - def transfer_authorization_create_with_http_info(transfer_authorization_create_request, opts = {}) + # @return [Array<(PaginatedEntityWatchlistScreeningList, Integer, Hash)>] PaginatedEntityWatchlistScreeningList data, response status code and response headers + def watchlist_screening_entity_history_list_with_http_info(list_watchlist_screening_entity_history_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_authorization_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_history_list ...' end - # verify the required parameter 'transfer_authorization_create_request' is set - if @api_client.config.client_side_validation && transfer_authorization_create_request.nil? - fail ArgumentError, "Missing the required parameter 'transfer_authorization_create_request' when calling PlaidApi.transfer_authorization_create" + # 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" end # resource path - local_var_path = '/transfer/authorization/create' + local_var_path = '/watchlist_screening/entity/history/list' # query parameters query_params = opts[:query_params] || {} @@ -7144,16 +8897,16 @@ def transfer_authorization_create_with_http_info(transfer_authorization_create_r form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_authorization_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_entity_history_request) # return_type - return_type = opts[:debug_return_type] || 'TransferAuthorizationCreateResponse' + return_type = opts[:debug_return_type] || 'PaginatedEntityWatchlistScreeningList' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transfer_authorization_create", + :operation => :"PlaidApi.watchlist_screening_entity_history_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -7164,36 +8917,36 @@ def transfer_authorization_create_with_http_info(transfer_authorization_create_r 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#transfer_authorization_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_entity_history_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers 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`. - # @param transfer_cancel_request [TransferCancelRequest] + # List hits for entity watchlist screenings + # List all hits for the entity watchlist screening. + # @param list_watchlist_screening_entity_hit_request [ListWatchlistScreeningEntityHitRequest] # @param [Hash] opts the optional parameters - # @return [TransferCancelResponse] - def transfer_cancel(transfer_cancel_request, opts = {}) - data, _status_code, _headers = transfer_cancel_with_http_info(transfer_cancel_request, opts) + # @return [PaginatedEntityWatchlistScreeningHitList] + 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) data 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`. - # @param transfer_cancel_request [TransferCancelRequest] + # List hits for entity watchlist screenings + # List all hits for the entity watchlist screening. + # @param list_watchlist_screening_entity_hit_request [ListWatchlistScreeningEntityHitRequest] # @param [Hash] opts the optional parameters - # @return [Array<(TransferCancelResponse, Integer, Hash)>] TransferCancelResponse data, response status code and response headers - def transfer_cancel_with_http_info(transfer_cancel_request, opts = {}) + # @return [Array<(PaginatedEntityWatchlistScreeningHitList, Integer, Hash)>] PaginatedEntityWatchlistScreeningHitList data, response status code and response headers + def watchlist_screening_entity_hits_list_with_http_info(list_watchlist_screening_entity_hit_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_cancel ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_hits_list ...' end - # verify the required parameter 'transfer_cancel_request' is set - if @api_client.config.client_side_validation && transfer_cancel_request.nil? - fail ArgumentError, "Missing the required parameter 'transfer_cancel_request' when calling PlaidApi.transfer_cancel" + # 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" end # resource path - local_var_path = '/transfer/cancel' + local_var_path = '/watchlist_screening/entity/hit/list' # query parameters query_params = opts[:query_params] || {} @@ -7209,16 +8962,16 @@ def transfer_cancel_with_http_info(transfer_cancel_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_cancel_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_entity_hit_request) # return_type - return_type = opts[:debug_return_type] || 'TransferCancelResponse' + return_type = opts[:debug_return_type] || 'PaginatedEntityWatchlistScreeningHitList' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transfer_cancel", + :operation => :"PlaidApi.watchlist_screening_entity_hits_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -7229,36 +8982,36 @@ def transfer_cancel_with_http_info(transfer_cancel_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#transfer_cancel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_entity_hits_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a transfer - # Use the `/transfer/create` endpoint to initiate a new transfer. - # @param transfer_create_request [TransferCreateRequest] + # List entity watchlist screenings + # List all entity screenings. + # @param list_entity_watchlist_screening_request [ListEntityWatchlistScreeningRequest] # @param [Hash] opts the optional parameters - # @return [TransferCreateResponse] - def transfer_create(transfer_create_request, opts = {}) - data, _status_code, _headers = transfer_create_with_http_info(transfer_create_request, opts) + # @return [PaginatedEntityWatchlistScreeningList] + 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) data end - # Create a transfer - # Use the `/transfer/create` endpoint to initiate a new transfer. - # @param transfer_create_request [TransferCreateRequest] + # List entity watchlist screenings + # List all entity screenings. + # @param list_entity_watchlist_screening_request [ListEntityWatchlistScreeningRequest] # @param [Hash] opts the optional parameters - # @return [Array<(TransferCreateResponse, Integer, Hash)>] TransferCreateResponse data, response status code and response headers - def transfer_create_with_http_info(transfer_create_request, opts = {}) + # @return [Array<(PaginatedEntityWatchlistScreeningList, Integer, Hash)>] PaginatedEntityWatchlistScreeningList data, response status code and response headers + def watchlist_screening_entity_list_with_http_info(list_entity_watchlist_screening_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_list ...' end - # verify the required parameter 'transfer_create_request' is set - if @api_client.config.client_side_validation && transfer_create_request.nil? - fail ArgumentError, "Missing the required parameter 'transfer_create_request' when calling PlaidApi.transfer_create" + # 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" end # resource path - local_var_path = '/transfer/create' + local_var_path = '/watchlist_screening/entity/list' # query parameters query_params = opts[:query_params] || {} @@ -7274,16 +9027,16 @@ def transfer_create_with_http_info(transfer_create_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(list_entity_watchlist_screening_request) # return_type - return_type = opts[:debug_return_type] || 'TransferCreateResponse' + return_type = opts[:debug_return_type] || 'PaginatedEntityWatchlistScreeningList' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transfer_create", + :operation => :"PlaidApi.watchlist_screening_entity_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -7294,36 +9047,36 @@ def transfer_create_with_http_info(transfer_create_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#transfer_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_entity_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List transfer events - # Use the `/transfer/event/list` endpoint to get a list of transfer events based on specified filter criteria. - # @param transfer_event_list_request [TransferEventListRequest] + # Get entity watchlist screening program + # Get an entity watchlist screening program + # @param get_watchlist_screening_entity_program_request [GetWatchlistScreeningEntityProgramRequest] # @param [Hash] opts the optional parameters - # @return [TransferEventListResponse] - def transfer_event_list(transfer_event_list_request, opts = {}) - data, _status_code, _headers = transfer_event_list_with_http_info(transfer_event_list_request, opts) + # @return [EntityWatchlistProgram] + 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) data end - # List transfer events - # Use the `/transfer/event/list` endpoint to get a list of transfer events based on specified filter criteria. - # @param transfer_event_list_request [TransferEventListRequest] + # Get entity watchlist screening program + # Get an entity watchlist screening program + # @param get_watchlist_screening_entity_program_request [GetWatchlistScreeningEntityProgramRequest] # @param [Hash] opts the optional parameters - # @return [Array<(TransferEventListResponse, Integer, Hash)>] TransferEventListResponse data, response status code and response headers - def transfer_event_list_with_http_info(transfer_event_list_request, opts = {}) + # @return [Array<(EntityWatchlistProgram, Integer, Hash)>] EntityWatchlistProgram data, response status code and response headers + def watchlist_screening_entity_program_get_with_http_info(get_watchlist_screening_entity_program_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_event_list ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_program_get ...' end - # verify the required parameter 'transfer_event_list_request' is set - if @api_client.config.client_side_validation && transfer_event_list_request.nil? - fail ArgumentError, "Missing the required parameter 'transfer_event_list_request' when calling PlaidApi.transfer_event_list" + # 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" end # resource path - local_var_path = '/transfer/event/list' + local_var_path = '/watchlist_screening/entity/program/get' # query parameters query_params = opts[:query_params] || {} @@ -7339,16 +9092,16 @@ def transfer_event_list_with_http_info(transfer_event_list_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_event_list_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(get_watchlist_screening_entity_program_request) # return_type - return_type = opts[:debug_return_type] || 'TransferEventListResponse' + return_type = opts[:debug_return_type] || 'EntityWatchlistProgram' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transfer_event_list", + :operation => :"PlaidApi.watchlist_screening_entity_program_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -7359,36 +9112,36 @@ def transfer_event_list_with_http_info(transfer_event_list_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#transfer_event_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_entity_program_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Sync transfer events - # `/transfer/event/sync` allows you to request up to the next 25 transfer events that happened after a specific `event_id`. Use the `/transfer/event/sync` endpoint to guarantee you have seen all transfer events. - # @param transfer_event_sync_request [TransferEventSyncRequest] + # List entity watchlist screening programs + # List all entity watchlist screening programs + # @param list_watchlist_screening_entity_programs_request [ListWatchlistScreeningEntityProgramsRequest] # @param [Hash] opts the optional parameters - # @return [TransferEventSyncResponse] - def transfer_event_sync(transfer_event_sync_request, opts = {}) - data, _status_code, _headers = transfer_event_sync_with_http_info(transfer_event_sync_request, opts) + # @return [PaginatedEntityWatchlistProgramList] + 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) data end - # Sync transfer events - # `/transfer/event/sync` allows you to request up to the next 25 transfer events that happened after a specific `event_id`. Use the `/transfer/event/sync` endpoint to guarantee you have seen all transfer events. - # @param transfer_event_sync_request [TransferEventSyncRequest] + # List entity watchlist screening programs + # List all entity watchlist screening programs + # @param list_watchlist_screening_entity_programs_request [ListWatchlistScreeningEntityProgramsRequest] # @param [Hash] opts the optional parameters - # @return [Array<(TransferEventSyncResponse, Integer, Hash)>] TransferEventSyncResponse data, response status code and response headers - def transfer_event_sync_with_http_info(transfer_event_sync_request, opts = {}) + # @return [Array<(PaginatedEntityWatchlistProgramList, Integer, Hash)>] PaginatedEntityWatchlistProgramList data, response status code and response headers + def watchlist_screening_entity_program_list_with_http_info(list_watchlist_screening_entity_programs_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_event_sync ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_program_list ...' end - # verify the required parameter 'transfer_event_sync_request' is set - if @api_client.config.client_side_validation && transfer_event_sync_request.nil? - fail ArgumentError, "Missing the required parameter 'transfer_event_sync_request' when calling PlaidApi.transfer_event_sync" + # 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" end # resource path - local_var_path = '/transfer/event/sync' + local_var_path = '/watchlist_screening/entity/program/list' # query parameters query_params = opts[:query_params] || {} @@ -7404,16 +9157,16 @@ def transfer_event_sync_with_http_info(transfer_event_sync_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_event_sync_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_entity_programs_request) # return_type - return_type = opts[:debug_return_type] || 'TransferEventSyncResponse' + return_type = opts[:debug_return_type] || 'PaginatedEntityWatchlistProgramList' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transfer_event_sync", + :operation => :"PlaidApi.watchlist_screening_entity_program_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -7424,36 +9177,36 @@ def transfer_event_sync_with_http_info(transfer_event_sync_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#transfer_event_sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_entity_program_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Retrieve a transfer - # The `/transfer/get` fetches information about the transfer corresponding to the given `transfer_id`. - # @param transfer_get_request [TransferGetRequest] + # 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 [Hash] opts the optional parameters - # @return [TransferGetResponse] - def transfer_get(transfer_get_request, opts = {}) - data, _status_code, _headers = transfer_get_with_http_info(transfer_get_request, opts) + # @return [EntityWatchlistScreeningReview] + 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) data end - # Retrieve a transfer - # The `/transfer/get` fetches information about the transfer corresponding to the given `transfer_id`. - # @param transfer_get_request [TransferGetRequest] + # 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 [Hash] opts the optional parameters - # @return [Array<(TransferGetResponse, Integer, Hash)>] TransferGetResponse data, response status code and response headers - def transfer_get_with_http_info(transfer_get_request, opts = {}) + # @return [Array<(EntityWatchlistScreeningReview, Integer, Hash)>] EntityWatchlistScreeningReview data, response status code and response headers + def watchlist_screening_entity_review_create_with_http_info(create_entity_watchlist_screening_review_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_review_create ...' end - # verify the required parameter 'transfer_get_request' is set - if @api_client.config.client_side_validation && transfer_get_request.nil? - fail ArgumentError, "Missing the required parameter 'transfer_get_request' when calling PlaidApi.transfer_get" + # 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" end # resource path - local_var_path = '/transfer/get' + local_var_path = '/watchlist_screening/entity/review/create' # query parameters query_params = opts[:query_params] || {} @@ -7469,16 +9222,16 @@ def transfer_get_with_http_info(transfer_get_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(create_entity_watchlist_screening_review_request) # return_type - return_type = opts[:debug_return_type] || 'TransferGetResponse' + return_type = opts[:debug_return_type] || 'EntityWatchlistScreeningReview' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transfer_get", + :operation => :"PlaidApi.watchlist_screening_entity_review_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -7489,36 +9242,36 @@ def transfer_get_with_http_info(transfer_get_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#transfer_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_entity_review_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a transfer intent object to invoke the Transfer UI - # Use the `/transfer/intent/create` endpoint to generate a transfer intent object and invoke the Transfer UI. - # @param transfer_intent_create_request [TransferIntentCreateRequest] + # 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 [Hash] opts the optional parameters - # @return [TransferIntentCreateResponse] - def transfer_intent_create(transfer_intent_create_request, opts = {}) - data, _status_code, _headers = transfer_intent_create_with_http_info(transfer_intent_create_request, opts) + # @return [PaginatedEntityWatchlistScreeningReviewList] + 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) data end - # Create a transfer intent object to invoke the Transfer UI - # Use the `/transfer/intent/create` endpoint to generate a transfer intent object and invoke the Transfer UI. - # @param transfer_intent_create_request [TransferIntentCreateRequest] + # 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 [Hash] opts the optional parameters - # @return [Array<(TransferIntentCreateResponse, Integer, Hash)>] TransferIntentCreateResponse data, response status code and response headers - def transfer_intent_create_with_http_info(transfer_intent_create_request, opts = {}) + # @return [Array<(PaginatedEntityWatchlistScreeningReviewList, Integer, Hash)>] PaginatedEntityWatchlistScreeningReviewList data, response status code and response headers + def watchlist_screening_entity_review_list_with_http_info(list_watchlist_screening_entity_reviews_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_intent_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_review_list ...' end - # verify the required parameter 'transfer_intent_create_request' is set - if @api_client.config.client_side_validation && transfer_intent_create_request.nil? - fail ArgumentError, "Missing the required parameter 'transfer_intent_create_request' when calling PlaidApi.transfer_intent_create" + # 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" end # resource path - local_var_path = '/transfer/intent/create' + local_var_path = '/watchlist_screening/entity/review/list' # query parameters query_params = opts[:query_params] || {} @@ -7534,16 +9287,16 @@ def transfer_intent_create_with_http_info(transfer_intent_create_request, opts = form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_intent_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_entity_reviews_request) # return_type - return_type = opts[:debug_return_type] || 'TransferIntentCreateResponse' + return_type = opts[:debug_return_type] || 'PaginatedEntityWatchlistScreeningReviewList' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transfer_intent_create", + :operation => :"PlaidApi.watchlist_screening_entity_review_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -7554,36 +9307,36 @@ def transfer_intent_create_with_http_info(transfer_intent_create_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#transfer_intent_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_entity_review_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Retrieve more information about a transfer intent - # Use the `/transfer/intent/get` endpoint to retrieve more information about a transfer intent. - # @param request_body [Hash] + # Update an entity screening + # Update an entity watchlist screening. + # @param update_entity_screening_request [UpdateEntityScreeningRequest] The entity screening was successfully updated. # @param [Hash] opts the optional parameters - # @return [TransferIntentGetResponse] - def transfer_intent_get(request_body, opts = {}) - data, _status_code, _headers = transfer_intent_get_with_http_info(request_body, opts) + # @return [EntityWatchlistScreening] + 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) data end - # Retrieve more information about a transfer intent - # Use the `/transfer/intent/get` endpoint to retrieve more information about a transfer intent. - # @param request_body [Hash] + # Update an entity screening + # Update an entity watchlist screening. + # @param update_entity_screening_request [UpdateEntityScreeningRequest] The entity screening was successfully updated. # @param [Hash] opts the optional parameters - # @return [Array<(TransferIntentGetResponse, Integer, Hash)>] TransferIntentGetResponse data, response status code and response headers - def transfer_intent_get_with_http_info(request_body, opts = {}) + # @return [Array<(EntityWatchlistScreening, Integer, Hash)>] EntityWatchlistScreening data, response status code and response headers + def watchlist_screening_entity_update_with_http_info(update_entity_screening_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_intent_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_entity_update ...' 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.transfer_intent_get" + # 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" end # resource path - local_var_path = '/transfer/intent/get' + local_var_path = '/watchlist_screening/entity/update' # query parameters query_params = opts[:query_params] || {} @@ -7599,16 +9352,16 @@ def transfer_intent_get_with_http_info(request_body, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) + post_body = opts[:debug_body] || @api_client.object_to_http_body(update_entity_screening_request) # return_type - return_type = opts[:debug_return_type] || 'TransferIntentGetResponse' + return_type = opts[:debug_return_type] || 'EntityWatchlistScreening' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transfer_intent_get", + :operation => :"PlaidApi.watchlist_screening_entity_update", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -7619,36 +9372,36 @@ def transfer_intent_get_with_http_info(request_body, 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#transfer_intent_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_entity_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List transfers - # Use the `/transfer/list` endpoint to see a list of all your transfers and their statuses. Results are paginated; use the `count` and `offset` query parameters to retrieve the desired transfers. - # @param transfer_list_request [TransferListRequest] + # 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 [Hash] opts the optional parameters - # @return [TransferListResponse] - def transfer_list(transfer_list_request, opts = {}) - data, _status_code, _headers = transfer_list_with_http_info(transfer_list_request, opts) + # @return [WatchlistScreeningIndividual] + 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) data end - # List transfers - # Use the `/transfer/list` endpoint to see a list of all your transfers and their statuses. Results are paginated; use the `count` and `offset` query parameters to retrieve the desired transfers. - # @param transfer_list_request [TransferListRequest] + # 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 [Hash] opts the optional parameters - # @return [Array<(TransferListResponse, Integer, Hash)>] TransferListResponse data, response status code and response headers - def transfer_list_with_http_info(transfer_list_request, opts = {}) + # @return [Array<(WatchlistScreeningIndividual, Integer, Hash)>] WatchlistScreeningIndividual data, response status code and response headers + def watchlist_screening_individual_create_with_http_info(watchlist_screening_create_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_list ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_create ...' end - # verify the required parameter 'transfer_list_request' is set - if @api_client.config.client_side_validation && transfer_list_request.nil? - fail ArgumentError, "Missing the required parameter 'transfer_list_request' when calling PlaidApi.transfer_list" + # 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" end # resource path - local_var_path = '/transfer/list' + local_var_path = '/watchlist_screening/individual/create' # query parameters query_params = opts[:query_params] || {} @@ -7664,16 +9417,16 @@ def transfer_list_with_http_info(transfer_list_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_list_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(watchlist_screening_create_request) # return_type - return_type = opts[:debug_return_type] || 'TransferListResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividual' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transfer_list", + :operation => :"PlaidApi.watchlist_screening_individual_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -7684,36 +9437,36 @@ def transfer_list_with_http_info(transfer_list_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#transfer_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_individual_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Migrate account into Transfers - # As an alternative to adding Items via Link, you can also use the `/transfer/migrate_account` endpoint to migrate known account and routing numbers to Plaid Items. Note that Items created in this way are not compatible with endpoints for other products, such as `/accounts/balance/get`, and can only be used with Transfer endpoints. If you require access to other endpoints, create the Item through Link instead. Access to `/transfer/migrate_account` is not enabled by default; to obtain access, contact your Plaid Account Manager. - # @param transfer_migrate_account_request [TransferMigrateAccountRequest] + # Retrieve an individual watchlist screening + # Retrieve a previously created individual watchlist screening + # @param get_individual_watchlist_screening_request [GetIndividualWatchlistScreeningRequest] # @param [Hash] opts the optional parameters - # @return [TransferMigrateAccountResponse] - def transfer_migrate_account(transfer_migrate_account_request, opts = {}) - data, _status_code, _headers = transfer_migrate_account_with_http_info(transfer_migrate_account_request, opts) + # @return [WatchlistScreeningIndividual] + 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) data end - # Migrate account into Transfers - # As an alternative to adding Items via Link, you can also use the `/transfer/migrate_account` endpoint to migrate known account and routing numbers to Plaid Items. Note that Items created in this way are not compatible with endpoints for other products, such as `/accounts/balance/get`, and can only be used with Transfer endpoints. If you require access to other endpoints, create the Item through Link instead. Access to `/transfer/migrate_account` is not enabled by default; to obtain access, contact your Plaid Account Manager. - # @param transfer_migrate_account_request [TransferMigrateAccountRequest] + # Retrieve an individual watchlist screening + # Retrieve a previously created individual watchlist screening + # @param get_individual_watchlist_screening_request [GetIndividualWatchlistScreeningRequest] # @param [Hash] opts the optional parameters - # @return [Array<(TransferMigrateAccountResponse, Integer, Hash)>] TransferMigrateAccountResponse data, response status code and response headers - def transfer_migrate_account_with_http_info(transfer_migrate_account_request, opts = {}) + # @return [Array<(WatchlistScreeningIndividual, Integer, Hash)>] WatchlistScreeningIndividual data, response status code and response headers + def watchlist_screening_individual_get_with_http_info(get_individual_watchlist_screening_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_migrate_account ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_get ...' end - # verify the required parameter 'transfer_migrate_account_request' is set - if @api_client.config.client_side_validation && transfer_migrate_account_request.nil? - fail ArgumentError, "Missing the required parameter 'transfer_migrate_account_request' when calling PlaidApi.transfer_migrate_account" + # 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" end # resource path - local_var_path = '/transfer/migrate_account' + local_var_path = '/watchlist_screening/individual/get' # query parameters query_params = opts[:query_params] || {} @@ -7729,16 +9482,16 @@ def transfer_migrate_account_with_http_info(transfer_migrate_account_request, op form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_migrate_account_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(get_individual_watchlist_screening_request) # return_type - return_type = opts[:debug_return_type] || 'TransferMigrateAccountResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividual' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transfer_migrate_account", + :operation => :"PlaidApi.watchlist_screening_individual_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -7749,36 +9502,36 @@ def transfer_migrate_account_with_http_info(transfer_migrate_account_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#transfer_migrate_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_individual_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Lists historical repayments - # The `/transfer/repayment/list` endpoint fetches repayments matching the given filters. Repayments are returned in reverse-chronological order (most recent first) starting at the given `start_time`. - # @param transfer_repayment_list_request [TransferRepaymentListRequest] + # 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 [Hash] opts the optional parameters - # @return [TransferRepaymentListResponse] - def transfer_repayment_list(transfer_repayment_list_request, opts = {}) - data, _status_code, _headers = transfer_repayment_list_with_http_info(transfer_repayment_list_request, opts) + # @return [PaginatedIndividualWatchlistScreeningList] + 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) data end - # Lists historical repayments - # The `/transfer/repayment/list` endpoint fetches repayments matching the given filters. Repayments are returned in reverse-chronological order (most recent first) starting at the given `start_time`. - # @param transfer_repayment_list_request [TransferRepaymentListRequest] + # 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 [Hash] opts the optional parameters - # @return [Array<(TransferRepaymentListResponse, Integer, Hash)>] TransferRepaymentListResponse data, response status code and response headers - def transfer_repayment_list_with_http_info(transfer_repayment_list_request, opts = {}) + # @return [Array<(PaginatedIndividualWatchlistScreeningList, Integer, Hash)>] PaginatedIndividualWatchlistScreeningList data, response status code and response headers + def watchlist_screening_individual_history_list_with_http_info(list_watchlist_screening_individual_history_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_repayment_list ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_history_list ...' end - # verify the required parameter 'transfer_repayment_list_request' is set - if @api_client.config.client_side_validation && transfer_repayment_list_request.nil? - fail ArgumentError, "Missing the required parameter 'transfer_repayment_list_request' when calling PlaidApi.transfer_repayment_list" + # 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" end # resource path - local_var_path = '/transfer/repayment/list' + local_var_path = '/watchlist_screening/individual/history/list' # query parameters query_params = opts[:query_params] || {} @@ -7794,16 +9547,16 @@ def transfer_repayment_list_with_http_info(transfer_repayment_list_request, opts form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_repayment_list_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_individual_history_request) # return_type - return_type = opts[:debug_return_type] || 'TransferRepaymentListResponse' + return_type = opts[:debug_return_type] || 'PaginatedIndividualWatchlistScreeningList' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transfer_repayment_list", + :operation => :"PlaidApi.watchlist_screening_individual_history_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -7814,36 +9567,36 @@ def transfer_repayment_list_with_http_info(transfer_repayment_list_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#transfer_repayment_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_individual_history_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List the returns included in a repayment - # The `/transfer/repayment/return/list` endpoint retrieves the set of returns that were batched together into the specified repayment. The sum of amounts of returns retrieved by this request equals the amount of the repayment. - # @param transfer_repayment_return_list_request [TransferRepaymentReturnListRequest] + # 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 [Hash] opts the optional parameters - # @return [TransferRepaymentReturnListResponse] - def transfer_repayment_return_list(transfer_repayment_return_list_request, opts = {}) - data, _status_code, _headers = transfer_repayment_return_list_with_http_info(transfer_repayment_return_list_request, opts) + # @return [PaginatedIndividualWatchlistScreeningHitList] + 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) data end - # List the returns included in a repayment - # The `/transfer/repayment/return/list` endpoint retrieves the set of returns that were batched together into the specified repayment. The sum of amounts of returns retrieved by this request equals the amount of the repayment. - # @param transfer_repayment_return_list_request [TransferRepaymentReturnListRequest] + # 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 [Hash] opts the optional parameters - # @return [Array<(TransferRepaymentReturnListResponse, Integer, Hash)>] TransferRepaymentReturnListResponse data, response status code and response headers - def transfer_repayment_return_list_with_http_info(transfer_repayment_return_list_request, opts = {}) + # @return [Array<(PaginatedIndividualWatchlistScreeningHitList, Integer, Hash)>] PaginatedIndividualWatchlistScreeningHitList data, response status code and response headers + def watchlist_screening_individual_hit_list_with_http_info(list_watchlist_screening_individual_hit_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_repayment_return_list ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_hit_list ...' end - # verify the required parameter 'transfer_repayment_return_list_request' is set - if @api_client.config.client_side_validation && transfer_repayment_return_list_request.nil? - fail ArgumentError, "Missing the required parameter 'transfer_repayment_return_list_request' when calling PlaidApi.transfer_repayment_return_list" + # 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" end # resource path - local_var_path = '/transfer/repayment/return/list' + local_var_path = '/watchlist_screening/individual/hit/list' # query parameters query_params = opts[:query_params] || {} @@ -7859,16 +9612,16 @@ def transfer_repayment_return_list_with_http_info(transfer_repayment_return_list form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_repayment_return_list_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_individual_hit_request) # return_type - return_type = opts[:debug_return_type] || 'TransferRepaymentReturnListResponse' + return_type = opts[:debug_return_type] || 'PaginatedIndividualWatchlistScreeningHitList' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transfer_repayment_return_list", + :operation => :"PlaidApi.watchlist_screening_individual_hit_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -7879,36 +9632,36 @@ def transfer_repayment_return_list_with_http_info(transfer_repayment_return_list 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#transfer_repayment_return_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_individual_hit_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Retrieve a sweep - # The `/transfer/sweep/get` endpoint fetches a sweep corresponding to the given `sweep_id`. - # @param transfer_sweep_get_request [TransferSweepGetRequest] + # List Individual Watchlist Screenings + # List previously created watchlist screenings for individuals + # @param list_individual_watchlist_screening_request [ListIndividualWatchlistScreeningRequest] # @param [Hash] opts the optional parameters - # @return [TransferSweepGetResponse] - def transfer_sweep_get(transfer_sweep_get_request, opts = {}) - data, _status_code, _headers = transfer_sweep_get_with_http_info(transfer_sweep_get_request, opts) + # @return [PaginatedIndividualWatchlistScreeningList] + 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) data end - # Retrieve a sweep - # The `/transfer/sweep/get` endpoint fetches a sweep corresponding to the given `sweep_id`. - # @param transfer_sweep_get_request [TransferSweepGetRequest] + # List Individual Watchlist Screenings + # List previously created watchlist screenings for individuals + # @param list_individual_watchlist_screening_request [ListIndividualWatchlistScreeningRequest] # @param [Hash] opts the optional parameters - # @return [Array<(TransferSweepGetResponse, Integer, Hash)>] TransferSweepGetResponse data, response status code and response headers - def transfer_sweep_get_with_http_info(transfer_sweep_get_request, opts = {}) + # @return [Array<(PaginatedIndividualWatchlistScreeningList, Integer, Hash)>] PaginatedIndividualWatchlistScreeningList data, response status code and response headers + def watchlist_screening_individual_list_with_http_info(list_individual_watchlist_screening_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_sweep_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_list ...' end - # verify the required parameter 'transfer_sweep_get_request' is set - if @api_client.config.client_side_validation && transfer_sweep_get_request.nil? - fail ArgumentError, "Missing the required parameter 'transfer_sweep_get_request' when calling PlaidApi.transfer_sweep_get" + # 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" end # resource path - local_var_path = '/transfer/sweep/get' + local_var_path = '/watchlist_screening/individual/list' # query parameters query_params = opts[:query_params] || {} @@ -7924,16 +9677,16 @@ def transfer_sweep_get_with_http_info(transfer_sweep_get_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_sweep_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(list_individual_watchlist_screening_request) # return_type - return_type = opts[:debug_return_type] || 'TransferSweepGetResponse' + return_type = opts[:debug_return_type] || 'PaginatedIndividualWatchlistScreeningList' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transfer_sweep_get", + :operation => :"PlaidApi.watchlist_screening_individual_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -7944,36 +9697,36 @@ def transfer_sweep_get_with_http_info(transfer_sweep_get_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#transfer_sweep_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_individual_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List sweeps - # The `/transfer/sweep/list` endpoint fetches sweeps matching the given filters. - # @param transfer_sweep_list_request [TransferSweepListRequest] + # Get individual watchlist screening program + # Get an individual watchlist screening program + # @param get_watchlist_screening_individual_program_request [GetWatchlistScreeningIndividualProgramRequest] # @param [Hash] opts the optional parameters - # @return [TransferSweepListResponse] - def transfer_sweep_list(transfer_sweep_list_request, opts = {}) - data, _status_code, _headers = transfer_sweep_list_with_http_info(transfer_sweep_list_request, opts) + # @return [IndividualWatchlistProgram] + 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) data end - # List sweeps - # The `/transfer/sweep/list` endpoint fetches sweeps matching the given filters. - # @param transfer_sweep_list_request [TransferSweepListRequest] + # Get individual watchlist screening program + # Get an individual watchlist screening program + # @param get_watchlist_screening_individual_program_request [GetWatchlistScreeningIndividualProgramRequest] # @param [Hash] opts the optional parameters - # @return [Array<(TransferSweepListResponse, Integer, Hash)>] TransferSweepListResponse data, response status code and response headers - def transfer_sweep_list_with_http_info(transfer_sweep_list_request, opts = {}) + # @return [Array<(IndividualWatchlistProgram, Integer, Hash)>] IndividualWatchlistProgram data, response status code and response headers + def watchlist_screening_individual_program_get_with_http_info(get_watchlist_screening_individual_program_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.transfer_sweep_list ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_program_get ...' end - # verify the required parameter 'transfer_sweep_list_request' is set - if @api_client.config.client_side_validation && transfer_sweep_list_request.nil? - fail ArgumentError, "Missing the required parameter 'transfer_sweep_list_request' when calling PlaidApi.transfer_sweep_list" + # 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" end # resource path - local_var_path = '/transfer/sweep/list' + local_var_path = '/watchlist_screening/individual/program/get' # query parameters query_params = opts[:query_params] || {} @@ -7989,16 +9742,16 @@ def transfer_sweep_list_with_http_info(transfer_sweep_list_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_sweep_list_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(get_watchlist_screening_individual_program_request) # return_type - return_type = opts[:debug_return_type] || 'TransferSweepListResponse' + return_type = opts[:debug_return_type] || 'IndividualWatchlistProgram' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.transfer_sweep_list", + :operation => :"PlaidApi.watchlist_screening_individual_program_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -8009,36 +9762,36 @@ def transfer_sweep_list_with_http_info(transfer_sweep_list_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#transfer_sweep_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_individual_program_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers 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. - # @param user_create_request [UserCreateRequest] + # List individual watchlist screening programs + # List all individual watchlist screening programs + # @param list_watchlist_screening_individual_programs_request [ListWatchlistScreeningIndividualProgramsRequest] # @param [Hash] opts the optional parameters - # @return [UserCreateResponse] - def user_create(user_create_request, opts = {}) - data, _status_code, _headers = user_create_with_http_info(user_create_request, opts) + # @return [PaginatedIndividualWatchlistProgramList] + 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) data 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. - # @param user_create_request [UserCreateRequest] + # List individual watchlist screening programs + # List all individual watchlist screening programs + # @param list_watchlist_screening_individual_programs_request [ListWatchlistScreeningIndividualProgramsRequest] # @param [Hash] opts the optional parameters - # @return [Array<(UserCreateResponse, Integer, Hash)>] UserCreateResponse data, response status code and response headers - def user_create_with_http_info(user_create_request, opts = {}) + # @return [Array<(PaginatedIndividualWatchlistProgramList, Integer, Hash)>] PaginatedIndividualWatchlistProgramList data, response status code and response headers + def watchlist_screening_individual_program_list_with_http_info(list_watchlist_screening_individual_programs_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.user_create ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_program_list ...' end - # verify the required parameter 'user_create_request' is set - if @api_client.config.client_side_validation && user_create_request.nil? - fail ArgumentError, "Missing the required parameter 'user_create_request' when calling PlaidApi.user_create" + # 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" end # resource path - local_var_path = '/user/create' + local_var_path = '/watchlist_screening/individual/program/list' # query parameters query_params = opts[:query_params] || {} @@ -8054,16 +9807,16 @@ def user_create_with_http_info(user_create_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(user_create_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_individual_programs_request) # return_type - return_type = opts[:debug_return_type] || 'UserCreateResponse' + return_type = opts[:debug_return_type] || 'PaginatedIndividualWatchlistProgramList' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.user_create", + :operation => :"PlaidApi.watchlist_screening_individual_program_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -8074,36 +9827,36 @@ def user_create_with_http_info(user_create_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#user_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_individual_program_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Fetch an e-wallet - # Fetch an e-wallet. The response includes the current balance. - # @param wallet_get_request [WalletGetRequest] + # 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 [Hash] opts the optional parameters - # @return [WalletGetResponse] - def wallet_get(wallet_get_request, opts = {}) - data, _status_code, _headers = wallet_get_with_http_info(wallet_get_request, opts) + # @return [WatchlistScreeningReview] + 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) data end - # Fetch an e-wallet - # Fetch an e-wallet. The response includes the current balance. - # @param wallet_get_request [WalletGetRequest] + # 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 [Hash] opts the optional parameters - # @return [Array<(WalletGetResponse, Integer, Hash)>] WalletGetResponse data, response status code and response headers - def wallet_get_with_http_info(wallet_get_request, opts = {}) + # @return [Array<(WatchlistScreeningReview, Integer, Hash)>] WatchlistScreeningReview data, response status code and response headers + def watchlist_screening_individual_review_create_with_http_info(create_individual_watchlist_screening_review_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.wallet_get ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_review_create ...' end - # verify the required parameter 'wallet_get_request' is set - if @api_client.config.client_side_validation && wallet_get_request.nil? - fail ArgumentError, "Missing the required parameter 'wallet_get_request' when calling PlaidApi.wallet_get" + # 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" end # resource path - local_var_path = '/wallet/get' + local_var_path = '/watchlist_screening/individual/review/create' # query parameters query_params = opts[:query_params] || {} @@ -8119,16 +9872,16 @@ def wallet_get_with_http_info(wallet_get_request, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(wallet_get_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(create_individual_watchlist_screening_review_request) # return_type - return_type = opts[:debug_return_type] || 'WalletGetResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningReview' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.wallet_get", + :operation => :"PlaidApi.watchlist_screening_individual_review_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -8139,36 +9892,36 @@ def wallet_get_with_http_info(wallet_get_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#wallet_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_individual_review_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers 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. - # @param wallet_transaction_execute_request [WalletTransactionExecuteRequest] + # List reviews for individual watchlist screenings + # List all reviews for the individual watchlist screening. + # @param list_watchlist_screening_individual_reviews_request [ListWatchlistScreeningIndividualReviewsRequest] # @param [Hash] opts the optional parameters - # @return [WalletTransactionExecuteResponse] - def wallet_transaction_execute(wallet_transaction_execute_request, opts = {}) - data, _status_code, _headers = wallet_transaction_execute_with_http_info(wallet_transaction_execute_request, opts) + # @return [PaginatedIndividualWatchlistScreeningReviewList] + 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) data 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. - # @param wallet_transaction_execute_request [WalletTransactionExecuteRequest] + # List reviews for individual watchlist screenings + # List all reviews for the individual watchlist screening. + # @param list_watchlist_screening_individual_reviews_request [ListWatchlistScreeningIndividualReviewsRequest] # @param [Hash] opts the optional parameters - # @return [Array<(WalletTransactionExecuteResponse, Integer, Hash)>] WalletTransactionExecuteResponse data, response status code and response headers - def wallet_transaction_execute_with_http_info(wallet_transaction_execute_request, opts = {}) + # @return [Array<(PaginatedIndividualWatchlistScreeningReviewList, Integer, Hash)>] PaginatedIndividualWatchlistScreeningReviewList data, response status code and response headers + def watchlist_screening_individual_reviews_list_with_http_info(list_watchlist_screening_individual_reviews_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.wallet_transaction_execute ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_reviews_list ...' end - # verify the required parameter 'wallet_transaction_execute_request' is set - if @api_client.config.client_side_validation && wallet_transaction_execute_request.nil? - fail ArgumentError, "Missing the required parameter 'wallet_transaction_execute_request' when calling PlaidApi.wallet_transaction_execute" + # 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" end # resource path - local_var_path = '/wallet/transaction/execute' + local_var_path = '/watchlist_screening/individual/review/list' # query parameters query_params = opts[:query_params] || {} @@ -8184,16 +9937,16 @@ def wallet_transaction_execute_with_http_info(wallet_transaction_execute_request form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(wallet_transaction_execute_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(list_watchlist_screening_individual_reviews_request) # return_type - return_type = opts[:debug_return_type] || 'WalletTransactionExecuteResponse' + return_type = opts[:debug_return_type] || 'PaginatedIndividualWatchlistScreeningReviewList' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.wallet_transaction_execute", + :operation => :"PlaidApi.watchlist_screening_individual_reviews_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -8204,36 +9957,36 @@ def wallet_transaction_execute_with_http_info(wallet_transaction_execute_request 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#wallet_transaction_execute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_individual_reviews_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List e-wallet transactions - # This endpoint lists the latest transactions of the specified e-wallet. Transactions are returned in descending order by the `created_at` time. - # @param wallet_transactions_list_request [WalletTransactionsListRequest] + # 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 [Hash] opts the optional parameters - # @return [WalletTransactionsListResponse] - def wallet_transactions_list(wallet_transactions_list_request, opts = {}) - data, _status_code, _headers = wallet_transactions_list_with_http_info(wallet_transactions_list_request, opts) + # @return [WatchlistScreeningIndividual] + 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) data end - # List e-wallet transactions - # This endpoint lists the latest transactions of the specified e-wallet. Transactions are returned in descending order by the `created_at` time. - # @param wallet_transactions_list_request [WalletTransactionsListRequest] + # 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 [Hash] opts the optional parameters - # @return [Array<(WalletTransactionsListResponse, Integer, Hash)>] WalletTransactionsListResponse data, response status code and response headers - def wallet_transactions_list_with_http_info(wallet_transactions_list_request, opts = {}) + # @return [Array<(WatchlistScreeningIndividual, Integer, Hash)>] WatchlistScreeningIndividual data, response status code and response headers + def watchlist_screening_individual_update_with_http_info(update_individual_screening_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PlaidApi.wallet_transactions_list ...' + @api_client.config.logger.debug 'Calling API: PlaidApi.watchlist_screening_individual_update ...' end - # verify the required parameter 'wallet_transactions_list_request' is set - if @api_client.config.client_side_validation && wallet_transactions_list_request.nil? - fail ArgumentError, "Missing the required parameter 'wallet_transactions_list_request' when calling PlaidApi.wallet_transactions_list" + # 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" end # resource path - local_var_path = '/wallet/transactions/list' + local_var_path = '/watchlist_screening/individual/update' # query parameters query_params = opts[:query_params] || {} @@ -8249,16 +10002,16 @@ def wallet_transactions_list_with_http_info(wallet_transactions_list_request, op form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(wallet_transactions_list_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(update_individual_screening_request) # return_type - return_type = opts[:debug_return_type] || 'WalletTransactionsListResponse' + return_type = opts[:debug_return_type] || 'WatchlistScreeningIndividual' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] new_options = opts.merge( - :operation => :"PlaidApi.wallet_transactions_list", + :operation => :"PlaidApi.watchlist_screening_individual_update", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -8269,7 +10022,7 @@ def wallet_transactions_list_with_http_info(wallet_transactions_list_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#wallet_transactions_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PlaidApi#watchlist_screening_individual_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/lib/plaid/api_client.rb b/lib/plaid/api_client.rb index 0a2ff369e..80bd43511 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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.4.0" + @user_agent = "Plaid Ruby v15.5.0" @default_headers = { 'Content-Type' => 'application/json', 'User-Agent' => @user_agent, @@ -42,8 +42,8 @@ def initialize(config = Configuration.default) end def create_connection - connection = Faraday.new(url: config.base_url) do |conn| - conn.adapter(Faraday.default_adapter) + @connection = Faraday.new(url: config.base_url) do |builder| + block_given? ? yield(builder) : builder.adapter(Faraday.default_adapter) end end diff --git a/lib/plaid/api_error.rb b/lib/plaid/api_error.rb index a3c073573..60c495679 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b3190d112..1b9b88cc5 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 9dabb2a37..d68bc2895 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 4e6c3ab3b..d2f7e9612 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/account_assets_all_of.rb b/lib/plaid/models/account_assets_all_of.rb index 720ba8f7b..1b55c5584 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/account_balance.rb b/lib/plaid/models/account_balance.rb index f8d7b722d..9b98b18e5 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 7585b723b..908e89e8b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 31316f3ac..22c6dc4eb 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 fd0e92b72..b96da23b0 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 38a756f34..f8acf2b2d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 4983184ac..4999f25b2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/account_product_access.rb b/lib/plaid/models/account_product_access.rb index 6f024ab93..f83812a92 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 7fa00b883..f8729319b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 9f832c11a..87c42cb82 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b3e0e6493..045756458 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b39ae4bad..1b17f16f8 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 1e7dfbba4..017a5a907 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 3af75fb0e..681e51aea 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 5dde84e11..f4f7fd37d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 0a1bf1eaa..de6983134 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ae4d31619..fc6df189a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ba2efde1c..3b1045178 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -15,19 +15,8 @@ module Plaid class ACHClass - ARC = "arc".freeze - CBR = "cbr".freeze CCD = "ccd".freeze - CIE = "cie".freeze - COR = "cor".freeze - CTX = "ctx".freeze - IAT = "iat".freeze - MTE = "mte".freeze - PBR = "pbr".freeze - POP = "pop".freeze - POS = "pos".freeze PPD = "ppd".freeze - RCK = "rck".freeze TEL = "tel".freeze WEB = "web".freeze diff --git a/lib/plaid/models/address.rb b/lib/plaid/models/address.rb index 587c2a059..18f89191b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ebb67197e..1fb98f465 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 89b98fa69..9a51f164b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/address_nullable.rb b/lib/plaid/models/address_nullable.rb index dcad4aa42..45dabbd99 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..9fb42af4d --- /dev/null +++ b/lib/plaid/models/address_purpose_label.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class AddressPurposeLabel + RESIDENTIAL = "residential".freeze + COMMERCIAL = "commercial".freeze + NO_DATA = "no_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/application.rb b/lib/plaid/models/application.rb index b9c5beb28..0e63ee3e7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -22,8 +22,8 @@ class Application # The name of the application attr_accessor :name - # The date this application was linked in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) (YYYY-MM-DD) format in UTC. - attr_accessor :created_at + # A human-readable name of the application for display purposes + attr_accessor :display_name # The date this application was granted production access at Plaid in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) (YYYY-MM-DD) format in UTC. attr_accessor :join_date @@ -60,7 +60,7 @@ def self.attribute_map { :'application_id' => :'application_id', :'name' => :'name', - :'created_at' => :'created_at', + :'display_name' => :'display_name', :'join_date' => :'join_date', :'logo_url' => :'logo_url', :'application_url' => :'application_url', @@ -84,7 +84,7 @@ def self.openapi_types { :'application_id' => :'String', :'name' => :'String', - :'created_at' => :'Date', + :'display_name' => :'String', :'join_date' => :'Date', :'logo_url' => :'String', :'application_url' => :'String', @@ -101,6 +101,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'display_name', :'logo_url', :'application_url', :'reason_for_access', @@ -136,8 +137,8 @@ def initialize(attributes = {}) self.name = attributes[:'name'] end - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] end if attributes.key?(:'join_date') @@ -216,7 +217,7 @@ def ==(o) self.class == o.class && application_id == o.application_id && name == o.name && - created_at == o.created_at && + display_name == o.display_name && join_date == o.join_date && logo_url == o.logo_url && application_url == o.application_url && @@ -238,7 +239,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [application_id, name, created_at, join_date, logo_url, application_url, reason_for_access, use_case, company_legal_name, city, region, postal_code, country_code].hash + [application_id, name, display_name, join_date, logo_url, application_url, reason_for_access, use_case, company_legal_name, city, region, postal_code, country_code].hash end # Builds the object from hash diff --git a/lib/plaid/models/application_get_request.rb b/lib/plaid/models/application_get_request.rb index 103e6ba97..710ea4207 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 397e6e3ae..166a205f7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 81c41bffc..11a47fd7a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report.rb b/lib/plaid/models/asset_report.rb index 33b600f11..73dc4616f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 659282914..0721179e7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b8dce23e5..da856c50e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 0517259b8..84f5df576 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 540fc5a06..481196ca2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 3a6f24f86..b1b141c35 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b74a8c38e..61598be28 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,7 +25,7 @@ class AssetReportCreateRequest # An array of access tokens corresponding to the Items that will be included in the report. The `assets` product must have been initialized for the Items during link; the Assets product cannot be added after initialization. attr_accessor :access_tokens - # The maximum integer number of days of history to include in the Asset Report. If using Fannie Mae Day 1 Certainty, `days_requested` must be at least 61 for new originations or at least 31 for refinancings. + # The maximum integer number of days of history to include in the Asset Report. If using Fannie Mae Day 1 Certainty, `days_requested` must be at least 61 for new originations or at least 31 for refinancings. An Asset Report requested with \"Additional History\" (that is, with more than 61 days of transaction history) will incur an Additional History fee. attr_accessor :days_requested attr_accessor :options diff --git a/lib/plaid/models/asset_report_create_request_options.rb b/lib/plaid/models/asset_report_create_request_options.rb index 781930916..ea7da2ead 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 14f1e5396..b5822acba 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 50e7e8481..fa903f279 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 9c9a3a713..4b8e6b750 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_get_request.rb b/lib/plaid/models/asset_report_get_request.rb index 5cf273c70..aae94ede9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_get_response.rb b/lib/plaid/models/asset_report_get_response.rb index d6743c846..bd9927994 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 421d66d1e..f1e843b1b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e6596164e..a7161bc7e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_refresh_request.rb b/lib/plaid/models/asset_report_refresh_request.rb index 719e8f9a9..e73d93af2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 fda790dd0..5a800bcad 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 82707a548..4d71620c7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 index d612aa5e2..e983880e8 100644 --- a/lib/plaid/models/asset_report_relay_create_request.rb +++ b/lib/plaid/models/asset_report_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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_relay_create_response.rb b/lib/plaid/models/asset_report_relay_create_response.rb index 8f61b4bb4..feaed6e3a 100644 --- a/lib/plaid/models/asset_report_relay_create_response.rb +++ b/lib/plaid/models/asset_report_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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_relay_get_request.rb b/lib/plaid/models/asset_report_relay_get_request.rb index 460dee099..18f44dcd9 100644 --- a/lib/plaid/models/asset_report_relay_get_request.rb +++ b/lib/plaid/models/asset_report_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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_relay_refresh_request.rb b/lib/plaid/models/asset_report_relay_refresh_request.rb index 290beca26..8bcb24c38 100644 --- a/lib/plaid/models/asset_report_relay_refresh_request.rb +++ b/lib/plaid/models/asset_report_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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_relay_refresh_response.rb b/lib/plaid/models/asset_report_relay_refresh_response.rb index cd6325952..403194ff1 100644 --- a/lib/plaid/models/asset_report_relay_refresh_response.rb +++ b/lib/plaid/models/asset_report_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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_relay_remove_request.rb b/lib/plaid/models/asset_report_relay_remove_request.rb index fb246e172..5da34b642 100644 --- a/lib/plaid/models/asset_report_relay_remove_request.rb +++ b/lib/plaid/models/asset_report_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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_relay_remove_response.rb b/lib/plaid/models/asset_report_relay_remove_response.rb index f537de846..cb38406fe 100644 --- a/lib/plaid/models/asset_report_relay_remove_response.rb +++ b/lib/plaid/models/asset_report_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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_remove_request.rb b/lib/plaid/models/asset_report_remove_request.rb index 442dc33ab..330a6c6bd 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 58fe06d7b..7479692fa 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 13c065c4b..1e87f1608 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_transaction_all_of.rb b/lib/plaid/models/asset_report_transaction_all_of.rb index 41f111b4e..22a7f1152 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/asset_report_user.rb b/lib/plaid/models/asset_report_user.rb index 47f30b8b2..371cf40a4 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/assets_error_webhook.rb b/lib/plaid/models/assets_error_webhook.rb index 3ecac3ea5..9bfe2c039 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 9d59293e0..6b0b2bb18 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/assets_relay_webhook.rb b/lib/plaid/models/assets_relay_webhook.rb index 517dda4e3..15bc304f6 100644 --- a/lib/plaid/models/assets_relay_webhook.rb +++ b/lib/plaid/models/assets_relay_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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 4c3d656b2..9cc6d7bb5 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 66e75f31e..93e81fecf 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 eb72696d7..ea00119ca 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a10539b20..d6b78e5f4 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f73455826..5bc8b6b52 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 cd6207409..1b7010c8e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 08fc53fa5..09d6f2ced 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_initiated_return_risk.rb b/lib/plaid/models/bank_initiated_return_risk.rb index a66fd380c..4c03165f6 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/bank_transfer.rb b/lib/plaid/models/bank_transfer.rb index 0065d6eed..450ddb4d3 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 22e6bca31..e3b0d1c99 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 41b2e6b97..118a58db1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 054358aac..d2a8ba659 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 fee7718e0..f3ad0164e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8fa6d1992..f2fafffac 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a8e34ebd0..0c8f756a7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 4760689c2..e21da7791 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ca734472e..4f239cd27 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b700255ac..76ae0b445 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8bea51381..a41735f3b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 eab783049..d97f207aa 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 3e9058121..3c9ca939f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 357c1b63f..1ab949223 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 1e793f183..0bfe028a7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 4f76b4cf7..3e5f797e3 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2342cd6a0..1c6979cfd 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ce78ca378..df3196df1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 9fccdd16c..63b0cddb7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a49e16467..3a11886e8 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 eba010c90..3d9153135 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 aba40aeb2..6ba131be2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 c634f53cb..1d1ed5eec 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b9c077654..eb2e9a9fc 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 0e14fa711..550b0a053 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 fbd226a8b..66e04f23f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 adb9d2ceb..b2c4e2a6a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a17b3dc49..d7390be9b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 1c52a4693..753a01249 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ba093d04c..267b3e7c5 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f33695818..9f4be7466 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 66d1df63f..d6b7e6d83 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8c9db27fc..f0f9ccbfa 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 7743f26c6..dff58c64e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/categories_get_response.rb b/lib/plaid/models/categories_get_response.rb index e25c45621..095894d4b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 bd4f2c0f7..f6eb050b9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 315601cd0..cf902ff99 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -110,6 +110,7 @@ def self.openapi_nullable Set.new([ :'display_message', :'status', + :'suggested_action', ]) end diff --git a/lib/plaid/models/cause_all_of.rb b/lib/plaid/models/cause_all_of.rb index 6f3e7cdd8..ad181e2a2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 707035474..368ec3c20 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e08aeb540..fbd60f512 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 842803574..29cd0fd4a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -22,6 +22,9 @@ class ConnectedApplication # The name of the application attr_accessor :name + # A human-readable name of the application for display purposes + attr_accessor :display_name + # A URL that links to the application logo image. attr_accessor :logo_url @@ -41,6 +44,7 @@ def self.attribute_map { :'application_id' => :'application_id', :'name' => :'name', + :'display_name' => :'display_name', :'logo_url' => :'logo_url', :'application_url' => :'application_url', :'reason_for_access' => :'reason_for_access', @@ -59,6 +63,7 @@ def self.openapi_types { :'application_id' => :'String', :'name' => :'String', + :'display_name' => :'String', :'logo_url' => :'String', :'application_url' => :'String', :'reason_for_access' => :'String', @@ -70,6 +75,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'display_name', :'logo_url', :'application_url', :'reason_for_access', @@ -100,6 +106,10 @@ def initialize(attributes = {}) self.name = attributes[:'name'] end + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + if attributes.key?(:'logo_url') self.logo_url = attributes[:'logo_url'] end @@ -156,6 +166,7 @@ def ==(o) self.class == o.class && application_id == o.application_id && name == o.name && + display_name == o.display_name && logo_url == o.logo_url && application_url == o.application_url && reason_for_access == o.reason_for_access && @@ -172,7 +183,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [application_id, name, logo_url, application_url, reason_for_access, created_at, scopes].hash + [application_id, name, display_name, logo_url, application_url, reason_for_access, created_at, scopes].hash end # Builds the object from hash diff --git a/lib/plaid/models/country_code.rb b/lib/plaid/models/country_code.rb index bae4dca47..aa0a94f56 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_recurring_deactivate_request.rb b/lib/plaid/models/create_entity_screening_request.rb similarity index 83% rename from lib/plaid/models/transactions_recurring_deactivate_request.rb rename to lib/plaid/models/create_entity_screening_request.rb index ae5969a55..14679f49d 100644 --- a/lib/plaid/models/transactions_recurring_deactivate_request.rb +++ b/lib/plaid/models/create_entity_screening_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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,22 +14,24 @@ require 'time' module Plaid - # TransactionsRecurringDeactivateRequest defines the request schema for `/transactions/recurring/deactivate` - class TransactionsRecurringDeactivateRequest + # Request input for creating an entity screening review + class CreateEntityScreeningRequest + attr_accessor :search_terms + + 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. attr_accessor :client_id - # The access token associated with the Item data is being requested for. - attr_accessor :access_token - # 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 { + :'search_terms' => :'search_terms', + :'client_user_id' => :'client_user_id', :'client_id' => :'client_id', - :'access_token' => :'access_token', :'secret' => :'secret' } end @@ -42,8 +44,9 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'search_terms' => :'EntityWatchlistSearchTerms', + :'client_user_id' => :'String', :'client_id' => :'String', - :'access_token' => :'String', :'secret' => :'String' } end @@ -51,6 +54,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'client_user_id', ]) end @@ -58,23 +62,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::TransactionsRecurringDeactivateRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::CreateEntityScreeningRequest` 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::TransactionsRecurringDeactivateRequest`. 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::CreateEntityScreeningRequest`. 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'] + if attributes.key?(:'search_terms') + self.search_terms = attributes[:'search_terms'] end - if attributes.key?(:'access_token') - self.access_token = attributes[:'access_token'] + if attributes.key?(:'client_user_id') + self.client_user_id = attributes[:'client_user_id'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] end if attributes.key?(:'secret') @@ -86,16 +94,8 @@ 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.') + if @search_terms.nil? + invalid_properties.push('invalid value for "search_terms", search_terms cannot be nil.') end invalid_properties @@ -104,9 +104,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 @search_terms.nil? true end @@ -115,8 +113,9 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + search_terms == o.search_terms && + client_user_id == o.client_user_id && client_id == o.client_id && - access_token == o.access_token && secret == o.secret end @@ -129,7 +128,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, access_token, secret].hash + [search_terms, client_user_id, client_id, secret].hash end # Builds the object from hash diff --git a/lib/plaid/models/create_entity_watchlist_screening_review_request.rb b/lib/plaid/models/create_entity_watchlist_screening_review_request.rb new file mode 100644 index 000000000..02759d4b2 --- /dev/null +++ b/lib/plaid/models/create_entity_watchlist_screening_review_request.rb @@ -0,0 +1,307 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for creating a review for an entity screening + class CreateEntityWatchlistScreeningReviewRequest + # 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 + + # Hits to mark as a false positive after thorough manual review. These hits will never recur or be updated once dismissed. + attr_accessor :dismissed_hits + + # A comment submitted by a team member as part of reviewing a watchlist screening. + attr_accessor :comment + + # 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 + + # ID of the associated entity screening. + attr_accessor :entity_watchlist_screening_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'confirmed_hits' => :'confirmed_hits', + :'dismissed_hits' => :'dismissed_hits', + :'comment' => :'comment', + :'client_id' => :'client_id', + :'secret' => :'secret', + :'entity_watchlist_screening_id' => :'entity_watchlist_screening_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 + { + :'confirmed_hits' => :'Array', + :'dismissed_hits' => :'Array', + :'comment' => :'String', + :'client_id' => :'String', + :'secret' => :'String', + :'entity_watchlist_screening_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'comment', + ]) + 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::CreateEntityWatchlistScreeningReviewRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'confirmed_hits') + if (value = attributes[:'confirmed_hits']).is_a?(Array) + self.confirmed_hits = value + end + end + + if attributes.key?(:'dismissed_hits') + if (value = attributes[:'dismissed_hits']).is_a?(Array) + self.dismissed_hits = value + end + end + + if attributes.key?(:'comment') + self.comment = attributes[:'comment'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'entity_watchlist_screening_id') + self.entity_watchlist_screening_id = attributes[:'entity_watchlist_screening_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 @confirmed_hits.nil? + invalid_properties.push('invalid value for "confirmed_hits", confirmed_hits cannot be nil.') + end + + if @dismissed_hits.nil? + invalid_properties.push('invalid value for "dismissed_hits", dismissed_hits cannot be nil.') + end + + if !@comment.nil? && @comment.to_s.length < 1 + invalid_properties.push('invalid value for "comment", the character length must be great than or equal to 1.') + end + + + if @entity_watchlist_screening_id.nil? + invalid_properties.push('invalid value for "entity_watchlist_screening_id", entity_watchlist_screening_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 @confirmed_hits.nil? + return false if @dismissed_hits.nil? + return false if !@comment.nil? && @comment.to_s.length < 1 + return false if @entity_watchlist_screening_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] comment Value to be assigned + def comment=(comment) + if !comment.nil? && comment.to_s.length < 1 + fail ArgumentError, 'invalid value for "comment", the character length must be great than or equal to 1.' + end + + + @comment = comment + 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 && + confirmed_hits == o.confirmed_hits && + dismissed_hits == o.dismissed_hits && + comment == o.comment && + client_id == o.client_id && + secret == o.secret && + entity_watchlist_screening_id == o.entity_watchlist_screening_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 + [confirmed_hits, dismissed_hits, comment, client_id, secret, entity_watchlist_screening_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/create_individual_watchlist_screening_review_request.rb b/lib/plaid/models/create_individual_watchlist_screening_review_request.rb new file mode 100644 index 000000000..3934c4667 --- /dev/null +++ b/lib/plaid/models/create_individual_watchlist_screening_review_request.rb @@ -0,0 +1,307 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for creating a screening review + class CreateIndividualWatchlistScreeningReviewRequest + # 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 + + # Hits to mark as a false positive after thorough manual review. These hits will never recur or be updated once dismissed. + attr_accessor :dismissed_hits + + # A comment submitted by a team member as part of reviewing a watchlist screening. + attr_accessor :comment + + # 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 + + # ID of the associated screening. + attr_accessor :watchlist_screening_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'confirmed_hits' => :'confirmed_hits', + :'dismissed_hits' => :'dismissed_hits', + :'comment' => :'comment', + :'client_id' => :'client_id', + :'secret' => :'secret', + :'watchlist_screening_id' => :'watchlist_screening_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 + { + :'confirmed_hits' => :'Array', + :'dismissed_hits' => :'Array', + :'comment' => :'String', + :'client_id' => :'String', + :'secret' => :'String', + :'watchlist_screening_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'comment', + ]) + 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::CreateIndividualWatchlistScreeningReviewRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'confirmed_hits') + if (value = attributes[:'confirmed_hits']).is_a?(Array) + self.confirmed_hits = value + end + end + + if attributes.key?(:'dismissed_hits') + if (value = attributes[:'dismissed_hits']).is_a?(Array) + self.dismissed_hits = value + end + end + + if attributes.key?(:'comment') + self.comment = attributes[:'comment'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'watchlist_screening_id') + self.watchlist_screening_id = attributes[:'watchlist_screening_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 @confirmed_hits.nil? + invalid_properties.push('invalid value for "confirmed_hits", confirmed_hits cannot be nil.') + end + + if @dismissed_hits.nil? + invalid_properties.push('invalid value for "dismissed_hits", dismissed_hits cannot be nil.') + end + + if !@comment.nil? && @comment.to_s.length < 1 + invalid_properties.push('invalid value for "comment", the character length must be great than or equal to 1.') + end + + + if @watchlist_screening_id.nil? + invalid_properties.push('invalid value for "watchlist_screening_id", watchlist_screening_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 @confirmed_hits.nil? + return false if @dismissed_hits.nil? + return false if !@comment.nil? && @comment.to_s.length < 1 + return false if @watchlist_screening_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] comment Value to be assigned + def comment=(comment) + if !comment.nil? && comment.to_s.length < 1 + fail ArgumentError, 'invalid value for "comment", the character length must be great than or equal to 1.' + end + + + @comment = comment + 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 && + confirmed_hits == o.confirmed_hits && + dismissed_hits == o.dismissed_hits && + comment == o.comment && + client_id == o.client_id && + secret == o.secret && + watchlist_screening_id == o.watchlist_screening_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 + [confirmed_hits, dismissed_hits, comment, client_id, secret, watchlist_screening_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_account_subtype.rb b/lib/plaid/models/credit_account_subtype.rb index e765f4eec..f8b785058 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 5432c17e4..15230bb80 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 989fec7b2..c461ebd97 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a3f463ab6..22dea7953 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8c8f0506c..f0adf5928 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_cause.rb b/lib/plaid/models/credit_bank_income_cause.rb index 926061fb5..e939dbed0 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ef1de77fc..6cc438a68 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 af89eeeb9..50aa8cf78 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 59d305c4d..179ece742 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 42040251e..90345defa 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 c6dc13c52..4e276a0b7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 680538b16..108a48422 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -29,7 +29,7 @@ class CreditBankIncomeItem attr_accessor :institution_id # The name of the institution associated with the Item. - attr_accessor :insitution_name + attr_accessor :institution_name # The unique identifier for the Item. attr_accessor :item_id @@ -41,7 +41,7 @@ def self.attribute_map :'bank_income_sources' => :'bank_income_sources', :'last_updated_time' => :'last_updated_time', :'institution_id' => :'institution_id', - :'insitution_name' => :'insitution_name', + :'institution_name' => :'institution_name', :'item_id' => :'item_id' } end @@ -58,7 +58,7 @@ def self.openapi_types :'bank_income_sources' => :'Array', :'last_updated_time' => :'Time', :'institution_id' => :'String', - :'insitution_name' => :'String', + :'institution_name' => :'String', :'item_id' => :'String' } end @@ -104,8 +104,8 @@ def initialize(attributes = {}) self.institution_id = attributes[:'institution_id'] end - if attributes.key?(:'insitution_name') - self.insitution_name = attributes[:'insitution_name'] + if attributes.key?(:'institution_name') + self.institution_name = attributes[:'institution_name'] end if attributes.key?(:'item_id') @@ -135,7 +135,7 @@ def ==(o) bank_income_sources == o.bank_income_sources && last_updated_time == o.last_updated_time && institution_id == o.institution_id && - insitution_name == o.insitution_name && + institution_name == o.institution_name && item_id == o.item_id end @@ -148,7 +148,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [bank_income_accounts, bank_income_sources, last_updated_time, institution_id, insitution_name, item_id].hash + [bank_income_accounts, bank_income_sources, last_updated_time, institution_id, institution_name, item_id].hash end # Builds the object from hash diff --git a/lib/plaid/models/credit_bank_income_pay_frequency.rb b/lib/plaid/models/credit_bank_income_pay_frequency.rb index c78bb9f1c..8bdb2dac5 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a524a6ea5..871bb9195 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 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 961980330..39ddc68c8 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d4f0af7c0..c69830d9f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 cadbc92c0..bdcb929d5 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_bank_income_summary.rb b/lib/plaid/models/credit_bank_income_summary.rb index b31202c2e..975b455e9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ca5492184..f1bd9bb10 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 c5632bee1..fade8e3a7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 7ebe5b7a8..b9d79c498 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 75e799e0b..5340b17c8 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 eb9e62ab2..e876f768a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_document_metadata.rb b/lib/plaid/models/credit_document_metadata.rb index 876465480..31ccfd03f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f9825f65f..d53e32e49 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ef57a4710..2dd8dd58b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_employment_get_response.rb b/lib/plaid/models/credit_employment_get_response.rb index d1c246e72..dcdc129dd 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 25e959120..79ac19aa2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_employment_verification.rb b/lib/plaid/models/credit_employment_verification.rb index 369466cba..2145a7c5c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 35ac336f4..132eccf0e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 bdc56d2e7..77f63df3f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_pay_stub_address.rb b/lib/plaid/models/credit_pay_stub_address.rb index 0d1b67fbf..37cfd1d3a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 c767ef562..466b44504 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 4b9b951a7..7b96f33a9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8cccc880b..67bc65ffe 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d7799b876..5fabbc713 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f71ca76c5..c9f2331b4 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 index 26a8ca9a0..c49e5cda2 100644 --- a/lib/plaid/models/credit_pay_stub_verification.rb +++ b/lib/plaid/models/credit_pay_stub_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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_payroll_income_get_request.rb b/lib/plaid/models/credit_payroll_income_get_request.rb index ebb60e7f0..78fe1f4cd 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 abe568fd1..5fd5277da 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -24,12 +24,16 @@ class CreditPayrollIncomeGetResponse # 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 + # A token to reference what payroll data was returned from this endpoint + attr_accessor :income_report_token + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'items' => :'items', :'error' => :'error', - :'request_id' => :'request_id' + :'request_id' => :'request_id', + :'income_report_token' => :'income_report_token' } end @@ -43,7 +47,8 @@ def self.openapi_types { :'items' => :'Array', :'error' => :'PlaidError', - :'request_id' => :'String' + :'request_id' => :'String', + :'income_report_token' => :'String' } end @@ -81,6 +86,10 @@ def initialize(attributes = {}) if attributes.key?(:'request_id') self.request_id = attributes[:'request_id'] end + + if attributes.key?(:'income_report_token') + self.income_report_token = attributes[:'income_report_token'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -95,6 +104,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "request_id", request_id cannot be nil.') end + if @income_report_token.nil? + invalid_properties.push('invalid value for "income_report_token", income_report_token cannot be nil.') + end + invalid_properties end @@ -103,6 +116,7 @@ def list_invalid_properties def valid? return false if @items.nil? return false if @request_id.nil? + return false if @income_report_token.nil? true end @@ -113,7 +127,8 @@ def ==(o) self.class == o.class && items == o.items && error == o.error && - request_id == o.request_id + request_id == o.request_id && + income_report_token == o.income_report_token end # @see the `==` method @@ -125,7 +140,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [items, error, request_id].hash + [items, error, request_id, income_report_token].hash end # Builds the object from hash diff --git a/lib/plaid/models/credit_payroll_income_precheck_request.rb b/lib/plaid/models/credit_payroll_income_precheck_request.rb index ee52cf9ed..b199f00fc 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_payroll_income_precheck_response.rb b/lib/plaid/models/credit_payroll_income_precheck_response.rb index dc8b59d7f..889328846 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 20c24b0e4..aeb2b841b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 cc1f95395..f27e7c805 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..36aa85748 --- /dev/null +++ b/lib/plaid/models/credit_payroll_income_risk_signals_get_request.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # CreditPayrollIncomeRiskSignalsGetRequest defines the request schema for `/beta/credit/payroll_income/risk_signals/get` + class CreditPayrollIncomeRiskSignalsGetRequest + # 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 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', + :'user_token' => :'user_token' + } + 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', + :'user_token' => :'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::CreditPayrollIncomeRiskSignalsGetRequest` 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::CreditPayrollIncomeRiskSignalsGetRequest`. 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?(:'user_token') + self.user_token = attributes[:'user_token'] + 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 && + secret == o.secret && + user_token == o.user_token + 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, user_token].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_risk_signals_get_response.rb b/lib/plaid/models/credit_payroll_income_risk_signals_get_response.rb new file mode 100644 index 000000000..00839e5c1 --- /dev/null +++ b/lib/plaid/models/credit_payroll_income_risk_signals_get_response.rb @@ -0,0 +1,251 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # CreditPayrollIncomeRiskSignalsGetRequest defines the response schema for `/beta/credit/payroll_income/risk_signals/get` + class CreditPayrollIncomeRiskSignalsGetResponse + # Array of payroll items. + attr_accessor :items + + attr_accessor :error + + # 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 + { + :'items' => :'items', + :'error' => :'error', + :'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 + { + :'items' => :'Array', + :'error' => :'PlaidError', + :'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::CreditPayrollIncomeRiskSignalsGetResponse` 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::CreditPayrollIncomeRiskSignalsGetResponse`. 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?(:'items') + if (value = attributes[:'items']).is_a?(Array) + self.items = value + end + end + + if attributes.key?(:'error') + self.error = attributes[:'error'] + 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 @items.nil? + invalid_properties.push('invalid value for "items", items 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 @items.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 && + items == o.items && + error == o.error && + 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 + [items, error, 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/credit_platform_ids.rb b/lib/plaid/models/credit_platform_ids.rb index 0a7ed76b4..5baf2835d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/credit_w2.rb b/lib/plaid/models/credit_w2.rb index 1824031b6..c511eaa86 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 63555f3b9..ff28296b2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/dashboard_user.rb b/lib/plaid/models/dashboard_user.rb new file mode 100644 index 000000000..7aae16a83 --- /dev/null +++ b/lib/plaid/models/dashboard_user.rb @@ -0,0 +1,269 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Account information associated with a team member with access to the Plaid dashboard. + class DashboardUser + # ID of the associated user. + attr_accessor :id + + # An ISO8601 formatted timestamp. + attr_accessor :created_at + + # A valid email address. + attr_accessor :email_address + + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'created_at' => :'created_at', + :'email_address' => :'email_address', + :'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 + { + :'id' => :'String', + :'created_at' => :'Time', + :'email_address' => :'String', + :'status' => :'DashboardUserStatus' + } + 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::DashboardUser` 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::DashboardUser`. 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?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'email_address') + self.email_address = attributes[:'email_address'] + end + + 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 @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @email_address.nil? + invalid_properties.push('invalid value for "email_address", email_address cannot be nil.') + end + + 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 @id.nil? + return false if @created_at.nil? + return false if @email_address.nil? + 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 && + id == o.id && + created_at == o.created_at && + email_address == o.email_address && + 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 + [id, created_at, email_address, 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/dashboard_user_list.rb b/lib/plaid/models/dashboard_user_list.rb new file mode 100644 index 000000000..28cb14a72 --- /dev/null +++ b/lib/plaid/models/dashboard_user_list.rb @@ -0,0 +1,242 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # List of dashboard users + class DashboardUserList + # List of dashboard users + attr_accessor :dashboard_users + + # 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 + { + :'dashboard_users' => :'dashboard_users', + :'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 + { + :'dashboard_users' => :'Array', + :'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::DashboardUserList` 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::DashboardUserList`. 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?(:'dashboard_users') + if (value = attributes[:'dashboard_users']).is_a?(Array) + self.dashboard_users = value + end + 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 @dashboard_users.nil? + invalid_properties.push('invalid value for "dashboard_users", dashboard_users 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 @dashboard_users.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 && + dashboard_users == o.dashboard_users && + 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 + [dashboard_users, 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/dashboard_user_status.rb b/lib/plaid/models/dashboard_user_status.rb new file mode 100644 index 000000000..36b666f41 --- /dev/null +++ b/lib/plaid/models/dashboard_user_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class DashboardUserStatus + INVITED = "invited".freeze + ACTIVE = "active".freeze + DEACTIVATED = "deactivated".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/date_range.rb b/lib/plaid/models/date_range.rb new file mode 100644 index 000000000..b13e9a39c --- /dev/null +++ b/lib/plaid/models/date_range.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # A date range with a start and end date + class DateRange + # A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). + attr_accessor :beginning + + # A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). + attr_accessor :ending + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'beginning' => :'beginning', + :'ending' => :'ending' + } + 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 + { + :'beginning' => :'Date', + :'ending' => :'Date' + } + 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::DateRange` 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::DateRange`. 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?(:'beginning') + self.beginning = attributes[:'beginning'] + end + + if attributes.key?(:'ending') + self.ending = attributes[:'ending'] + 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 @beginning.nil? + invalid_properties.push('invalid value for "beginning", beginning cannot be nil.') + end + + if @ending.nil? + invalid_properties.push('invalid value for "ending", ending 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 @beginning.nil? + return false if @ending.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 && + beginning == o.beginning && + ending == o.ending + 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 + [beginning, ending].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/deductions.rb b/lib/plaid/models/deductions.rb index 813d033c9..0a3cdf859 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 77467e809..237941917 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d41a8d71d..fac651689 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2c7a512b6..a894f3d5b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deposit_switch_address_data.rb b/lib/plaid/models/deposit_switch_address_data.rb index 1d037be00..849c4898d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 4be159484..119b5c4fd 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 59ba28e55..8d9bad001 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 95afa8506..3cd87781d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a6e57c7da..de88e04c0 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 eae3fbd9b..4bc82ef8b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2aa4b60a1..ce4bd3cce 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ce66bf0c2..7b418eaa7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 0694317f5..04a52e9ee 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/deposit_switch_target_account.rb b/lib/plaid/models/deposit_switch_target_account.rb index f21361c34..200013653 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ab79e9bb2..f07381667 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f196d0bc3..895eb0286 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b8b5bc96a..614e1bbf9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 860b64f8c..335988874 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 fca696308..499dba948 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f54e0763a..33f166053 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 83d218e67..5fe1ff631 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/document_analysis.rb b/lib/plaid/models/document_analysis.rb new file mode 100644 index 000000000..b14eb5b2b --- /dev/null +++ b/lib/plaid/models/document_analysis.rb @@ -0,0 +1,248 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # High level descriptions of how the associated document was processed. If a document fails verification, the details in the `analysis` object should help clarify why the document was rejected. + class DocumentAnalysis + attr_accessor :authenticity + + attr_accessor :image_quality + + attr_accessor :extracted_data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'authenticity' => :'authenticity', + :'image_quality' => :'image_quality', + :'extracted_data' => :'extracted_data' + } + 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 + { + :'authenticity' => :'DocumentAuthenticityMatchCode', + :'image_quality' => :'ImageQuality', + :'extracted_data' => :'PhysicalDocumentExtractedDataAnalysis' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'extracted_data' + ]) + 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::DocumentAnalysis` 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::DocumentAnalysis`. 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?(:'authenticity') + self.authenticity = attributes[:'authenticity'] + end + + if attributes.key?(:'image_quality') + self.image_quality = attributes[:'image_quality'] + end + + if attributes.key?(:'extracted_data') + self.extracted_data = attributes[:'extracted_data'] + 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 @authenticity.nil? + invalid_properties.push('invalid value for "authenticity", authenticity cannot be nil.') + end + + if @image_quality.nil? + invalid_properties.push('invalid value for "image_quality", image_quality 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 @authenticity.nil? + return false if @image_quality.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 && + authenticity == o.authenticity && + image_quality == o.image_quality && + extracted_data == o.extracted_data + 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 + [authenticity, image_quality, extracted_data].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/document_authenticity_match_code.rb b/lib/plaid/models/document_authenticity_match_code.rb new file mode 100644 index 000000000..0a0fa027e --- /dev/null +++ b/lib/plaid/models/document_authenticity_match_code.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class DocumentAuthenticityMatchCode + MATCH = "match".freeze + PARTIAL_MATCH = "partial_match".freeze + NO_MATCH = "no_match".freeze + NO_DATA = "no_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/document_date_of_birth_match_code.rb b/lib/plaid/models/document_date_of_birth_match_code.rb new file mode 100644 index 000000000..7ad5fec3c --- /dev/null +++ b/lib/plaid/models/document_date_of_birth_match_code.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class DocumentDateOfBirthMatchCode + MATCH = "match".freeze + PARTIAL_MATCH = "partial_match".freeze + NO_MATCH = "no_match".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/document_metadata.rb b/lib/plaid/models/document_metadata.rb index 64ecf57b9..105afa6e4 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..9cc5eaca4 --- /dev/null +++ b/lib/plaid/models/document_name_match_code.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class DocumentNameMatchCode + MATCH = "match".freeze + PARTIAL_MATCH = "partial_match".freeze + NO_MATCH = "no_match".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/document_risk_signal.rb b/lib/plaid/models/document_risk_signal.rb new file mode 100644 index 000000000..000276f72 --- /dev/null +++ b/lib/plaid/models/document_risk_signal.rb @@ -0,0 +1,274 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Details about a certain reason as to why a document could potentially be fraudulent. + class DocumentRiskSignal + # The result from the risk signal check. + attr_accessor :type + + # The field which the risk signal was computed for + attr_accessor :field + + # A flag used to quickly identify if the signal indicates that this field is authentic or fraudulent + attr_accessor :has_fraud_risk + + attr_accessor :institution_metadata + + # The expected value of the field, as seen on the document + attr_accessor :expected_value + + # The derived value obtained in the risk signal calculation process for this field + attr_accessor :actual_value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'field' => :'field', + :'has_fraud_risk' => :'has_fraud_risk', + :'institution_metadata' => :'institution_metadata', + :'expected_value' => :'expected_value', + :'actual_value' => :'actual_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 + { + :'type' => :'String', + :'field' => :'String', + :'has_fraud_risk' => :'Boolean', + :'institution_metadata' => :'DocumentRiskSignalInstitutionMetadata', + :'expected_value' => :'String', + :'actual_value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'type', + :'field', + :'has_fraud_risk', + :'expected_value', + :'actual_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::DocumentRiskSignal` 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::DocumentRiskSignal`. 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'] + end + + if attributes.key?(:'field') + self.field = attributes[:'field'] + end + + if attributes.key?(:'has_fraud_risk') + self.has_fraud_risk = attributes[:'has_fraud_risk'] + end + + if attributes.key?(:'institution_metadata') + self.institution_metadata = attributes[:'institution_metadata'] + end + + if attributes.key?(:'expected_value') + self.expected_value = attributes[:'expected_value'] + end + + if attributes.key?(:'actual_value') + self.actual_value = attributes[:'actual_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 && + type == o.type && + field == o.field && + has_fraud_risk == o.has_fraud_risk && + institution_metadata == o.institution_metadata && + expected_value == o.expected_value && + actual_value == o.actual_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 + [type, field, has_fraud_risk, institution_metadata, expected_value, actual_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/transactions_recurring_deactivate_response.rb b/lib/plaid/models/document_risk_signal_institution_metadata.rb similarity index 86% rename from lib/plaid/models/transactions_recurring_deactivate_response.rb rename to lib/plaid/models/document_risk_signal_institution_metadata.rb index 3dbaea09b..4bf9647fb 100644 --- a/lib/plaid/models/transactions_recurring_deactivate_response.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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,15 +14,15 @@ require 'time' module Plaid - # TransactionsRecurringDeactivateResponse defines the response schema for `/transactions/recurring/deactivate` - class TransactionsRecurringDeactivateResponse - # Message indicating that the deactivation of the product was successful. - attr_accessor :message + # An object which contains additional metadata about the instutution used to compute the verification attribute + class DocumentRiskSignalInstitutionMetadata + # The `item_id` of the Item associated with this webhook, warning, or error + attr_accessor :item_id # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'message' => :'message' + :'item_id' => :'item_id' } end @@ -34,7 +34,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'message' => :'String' + :'item_id' => :'String' } end @@ -48,19 +48,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::TransactionsRecurringDeactivateResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::DocumentRiskSignalInstitutionMetadata` 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::TransactionsRecurringDeactivateResponse`. 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::DocumentRiskSignalInstitutionMetadata`. 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?(:'message') - self.message = attributes[:'message'] + if attributes.key?(:'item_id') + self.item_id = attributes[:'item_id'] end end @@ -68,8 +68,8 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @message.nil? - invalid_properties.push('invalid value for "message", message cannot be nil.') + if @item_id.nil? + invalid_properties.push('invalid value for "item_id", item_id cannot be nil.') end invalid_properties @@ -78,7 +78,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 @message.nil? + return false if @item_id.nil? true end @@ -87,7 +87,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - message == o.message + item_id == o.item_id end # @see the `==` method @@ -99,7 +99,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [message].hash + [item_id].hash end # Builds the object from hash diff --git a/lib/plaid/models/document_risk_signals_object.rb b/lib/plaid/models/document_risk_signals_object.rb new file mode 100644 index 000000000..d04236799 --- /dev/null +++ b/lib/plaid/models/document_risk_signals_object.rb @@ -0,0 +1,255 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Object containing fraud risk data for a set of income documents + class DocumentRiskSignalsObject + # ID of the payroll provider account. + attr_accessor :account_id + + # Array of document metadata and associated risk signals per document + attr_accessor :single_document_risk_signals + + # Array of risk signals computed from a set of uploaded documents and the associated documents' metadata + attr_accessor :multi_document_risk_signals + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_id' => :'account_id', + :'single_document_risk_signals' => :'single_document_risk_signals', + :'multi_document_risk_signals' => :'multi_document_risk_signals' + } + 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', + :'single_document_risk_signals' => :'Array', + :'multi_document_risk_signals' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'account_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::DocumentRiskSignalsObject` 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::DocumentRiskSignalsObject`. 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?(:'single_document_risk_signals') + if (value = attributes[:'single_document_risk_signals']).is_a?(Array) + self.single_document_risk_signals = value + end + end + + if attributes.key?(:'multi_document_risk_signals') + if (value = attributes[:'multi_document_risk_signals']).is_a?(Array) + self.multi_document_risk_signals = 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 @single_document_risk_signals.nil? + invalid_properties.push('invalid value for "single_document_risk_signals", single_document_risk_signals cannot be nil.') + end + + if @multi_document_risk_signals.nil? + invalid_properties.push('invalid value for "multi_document_risk_signals", multi_document_risk_signals 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 @single_document_risk_signals.nil? + return false if @multi_document_risk_signals.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 && + account_id == o.account_id && + single_document_risk_signals == o.single_document_risk_signals && + multi_document_risk_signals == o.multi_document_risk_signals + 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, single_document_risk_signals, multi_document_risk_signals].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/document_status.rb b/lib/plaid/models/document_status.rb new file mode 100644 index 000000000..cf4fba239 --- /dev/null +++ b/lib/plaid/models/document_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class DocumentStatus + SUCCESS = "success".freeze + FAILED = "failed".freeze + MANUALLY_APPROVED = "manually_approved".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/payment_initiation_refund.rb b/lib/plaid/models/documentary_verification.rb similarity index 77% rename from lib/plaid/models/payment_initiation_refund.rb rename to lib/plaid/models/documentary_verification.rb index 1df1d8293..907462733 100644 --- a/lib/plaid/models/payment_initiation_refund.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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,25 +14,19 @@ require 'time' module Plaid - # PaymentInitiationRefund defines a payment initiation refund - class PaymentInitiationRefund - # The ID of the refund. Like all Plaid identifiers, the `refund_id` is case sensitive. - attr_accessor :refund_id - - attr_accessor :amount - + # data, images, analysis, and results from the `documentary_verification` step. + 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 - # The date and time of the last time the `status` was updated, in IS0 8601 format - attr_accessor :last_status_update + # An array of documents submitted to the `documentary_verification` step. Each entry represents one user submission, where each submission will contain both a front and back image, or just a front image, depending on the document type. Note: Plaid will automatically let a user submit a new set of document images up to three times if we detect that a previous attempt might have failed due to user error. For example, if the first set of document images are blurry or obscured by glare, the user will be asked to capture their documents again, resulting in at least two separate entries within `documents`. If the overall `documentary_verification` is `failed`, the user has exhausted their retry attempts. + attr_accessor :documents # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'refund_id' => :'refund_id', - :'amount' => :'amount', :'status' => :'status', - :'last_status_update' => :'last_status_update' + :'documents' => :'documents' } end @@ -44,10 +38,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'refund_id' => :'String', - :'amount' => :'PaymentAmount', - :'status' => :'PaymentInitiationRefundStatus', - :'last_status_update' => :'Time' + :'status' => :'String', + :'documents' => :'Array' } end @@ -61,31 +53,25 @@ 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::PaymentInitiationRefund` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::DocumentaryVerification` 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::PaymentInitiationRefund`. 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::DocumentaryVerification`. 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?(:'refund_id') - self.refund_id = attributes[:'refund_id'] - end - - if attributes.key?(:'amount') - self.amount = attributes[:'amount'] - end - if attributes.key?(:'status') self.status = attributes[:'status'] end - if attributes.key?(:'last_status_update') - self.last_status_update = attributes[:'last_status_update'] + if attributes.key?(:'documents') + if (value = attributes[:'documents']).is_a?(Array) + self.documents = value + end end end @@ -93,20 +79,12 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @refund_id.nil? - invalid_properties.push('invalid value for "refund_id", refund_id cannot be nil.') - end - - if @amount.nil? - invalid_properties.push('invalid value for "amount", amount cannot be nil.') - end - if @status.nil? invalid_properties.push('invalid value for "status", status cannot be nil.') end - if @last_status_update.nil? - invalid_properties.push('invalid value for "last_status_update", last_status_update cannot be nil.') + if @documents.nil? + invalid_properties.push('invalid value for "documents", documents cannot be nil.') end invalid_properties @@ -115,10 +93,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 @refund_id.nil? - return false if @amount.nil? return false if @status.nil? - return false if @last_status_update.nil? + return false if @documents.nil? true end @@ -127,10 +103,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - refund_id == o.refund_id && - amount == o.amount && status == o.status && - last_status_update == o.last_status_update + documents == o.documents end # @see the `==` method @@ -142,7 +116,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [refund_id, amount, status, last_status_update].hash + [status, documents].hash end # Builds the object from hash diff --git a/lib/plaid/models/documentary_verification_document.rb b/lib/plaid/models/documentary_verification_document.rb new file mode 100644 index 000000000..50b53b51c --- /dev/null +++ b/lib/plaid/models/documentary_verification_document.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Images, extracted data, and analysis from a user's identity document + class DocumentaryVerificationDocument + attr_accessor :status + + # The `attempt` field begins with 1 and increments with each subsequent document upload. + attr_accessor :attempt + + attr_accessor :images + + attr_accessor :extracted_data + + attr_accessor :analysis + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'attempt' => :'attempt', + :'images' => :'images', + :'extracted_data' => :'extracted_data', + :'analysis' => :'analysis' + } + 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' => :'DocumentStatus', + :'attempt' => :'Float', + :'images' => :'PhysicalDocumentImages', + :'extracted_data' => :'PhysicalDocumentExtractedData', + :'analysis' => :'DocumentAnalysis' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'extracted_data', + ]) + 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::DocumentaryVerificationDocument` 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::DocumentaryVerificationDocument`. 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?(:'attempt') + self.attempt = attributes[:'attempt'] + end + + if attributes.key?(:'images') + self.images = attributes[:'images'] + end + + if attributes.key?(:'extracted_data') + self.extracted_data = attributes[:'extracted_data'] + end + + if attributes.key?(:'analysis') + self.analysis = attributes[:'analysis'] + 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 @attempt.nil? + invalid_properties.push('invalid value for "attempt", attempt cannot be nil.') + end + + if @images.nil? + invalid_properties.push('invalid value for "images", images cannot be nil.') + end + + if @analysis.nil? + invalid_properties.push('invalid value for "analysis", analysis 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 @attempt.nil? + return false if @images.nil? + return false if @analysis.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 && + attempt == o.attempt && + images == o.images && + extracted_data == o.extracted_data && + analysis == o.analysis + 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, attempt, images, extracted_data, analysis].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/earnings.rb b/lib/plaid/models/earnings.rb index 227ce2792..b49efb065 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 beb05bcd1..313ba767a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6fb6c45e7..e2dfe322f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 3d3aec25f..9660ba48c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 470286be4..d5d13ef85 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/employee.rb b/lib/plaid/models/employee.rb index db9b8dbf6..be2ddfa09 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 088efc0f1..97e59b2ea 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 4dc205a62..fde0ab1fa 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ad2964655..6add00210 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 735fb389f..ae86f5c6e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 0d014d0ce..8cfdc7da3 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 083795b85..d22e2173e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 af9c147a2..3246a5d33 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 373e96446..a3c8d8ac4 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 24bcfb66f..18473c3cc 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b0f947ec3..a023c1506 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 04ce1cb3b..640217fa4 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6edbab20a..01a91a031 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/entity_document.rb b/lib/plaid/models/entity_document.rb new file mode 100644 index 000000000..8da4ecbce --- /dev/null +++ b/lib/plaid/models/entity_document.rb @@ -0,0 +1,271 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # An official document, usually issued by a governing body or institution, with an associated identifier. + class EntityDocument + attr_accessor :type + + # The numeric or alphanumeric identifier associated with this document. + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'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 + { + :'type' => :'EntityDocumentType', + :'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::EntityDocument` 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::EntityDocument`. 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'] + 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 + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @value.nil? + invalid_properties.push('invalid value for "value", value cannot be nil.') + end + + if @value.to_s.length < 4 + invalid_properties.push('invalid value for "value", the character length must be great than or equal to 4.') + end + + pattern = Regexp.new(/^\S+(\s+\S+)*$/) + if @value !~ pattern + invalid_properties.push("invalid value for \"value\", 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 @type.nil? + return false if @value.nil? + return false if @value.to_s.length < 4 + return false if @value !~ Regexp.new(/^\S+(\s+\S+)*$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] value Value to be assigned + def value=(value) + if value.nil? + fail ArgumentError, 'value cannot be nil' + end + + if value.to_s.length < 4 + fail ArgumentError, 'invalid value for "value", the character length must be great than or equal to 4.' + end + + pattern = Regexp.new(/^\S+(\s+\S+)*$/) + if value !~ pattern + fail ArgumentError, "invalid value for \"value\", must conform to the pattern #{pattern}." + end + + + @value = value + 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 && + 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 + [type, 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/entity_document_type.rb b/lib/plaid/models/entity_document_type.rb new file mode 100644 index 000000000..96c33ab83 --- /dev/null +++ b/lib/plaid/models/entity_document_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class EntityDocumentType + BIK = "bik".freeze + BUSINESS_NUMBER = "business_number".freeze + IMO = "imo".freeze + OTHER = "other".freeze + SWIFT = "swift".freeze + TAX_ID = "tax_id".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/entity_screening_hit_analysis.rb b/lib/plaid/models/entity_screening_hit_analysis.rb new file mode 100644 index 000000000..f53f22507 --- /dev/null +++ b/lib/plaid/models/entity_screening_hit_analysis.rb @@ -0,0 +1,279 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Analysis information describing why a screening hit matched the provided entity information + class EntityScreeningHitAnalysis + attr_accessor :documents + + attr_accessor :email_addresses + + attr_accessor :locations + + attr_accessor :names + + attr_accessor :phone_numbers + + attr_accessor :urls + + # The version of the entity screening's `search_terms` that were compared when the entity screening hit was added. entity screening hits are immutable once they have been reviewed. If changes are detected due to updates to the entity screening's `search_terms`, the associated entity program, or the list's source data prior to review, the entity screening hit will be updated to reflect those changes. + attr_accessor :search_terms_version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'documents' => :'documents', + :'email_addresses' => :'email_addresses', + :'locations' => :'locations', + :'names' => :'names', + :'phone_numbers' => :'phone_numbers', + :'urls' => :'urls', + :'search_terms_version' => :'search_terms_version' + } + 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 + { + :'documents' => :'MatchSummaryCode', + :'email_addresses' => :'MatchSummaryCode', + :'locations' => :'MatchSummaryCode', + :'names' => :'MatchSummaryCode', + :'phone_numbers' => :'MatchSummaryCode', + :'urls' => :'MatchSummaryCode', + :'search_terms_version' => :'Float' + } + 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::EntityScreeningHitAnalysis` 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::EntityScreeningHitAnalysis`. 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?(:'documents') + self.documents = attributes[:'documents'] + end + + if attributes.key?(:'email_addresses') + self.email_addresses = attributes[:'email_addresses'] + end + + if attributes.key?(:'locations') + self.locations = attributes[:'locations'] + end + + if attributes.key?(:'names') + self.names = attributes[:'names'] + end + + if attributes.key?(:'phone_numbers') + self.phone_numbers = attributes[:'phone_numbers'] + end + + if attributes.key?(:'urls') + self.urls = attributes[:'urls'] + end + + if attributes.key?(:'search_terms_version') + self.search_terms_version = attributes[:'search_terms_version'] + 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 @search_terms_version.nil? + invalid_properties.push('invalid value for "search_terms_version", search_terms_version 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 @search_terms_version.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 && + documents == o.documents && + email_addresses == o.email_addresses && + locations == o.locations && + names == o.names && + phone_numbers == o.phone_numbers && + urls == o.urls && + search_terms_version == o.search_terms_version + 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 + [documents, email_addresses, locations, names, phone_numbers, urls, search_terms_version].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/entity_screening_hit_data.rb b/lib/plaid/models/entity_screening_hit_data.rb new file mode 100644 index 000000000..aad3887e3 --- /dev/null +++ b/lib/plaid/models/entity_screening_hit_data.rb @@ -0,0 +1,282 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Information associated with the entity watchlist hit + class EntityScreeningHitData + # Documents associated with the watchlist hit + attr_accessor :documents + + # Email addresses associated with the watchlist hit + attr_accessor :email_addresses + + # Locations associated with the watchlist hit + attr_accessor :locations + + # Names associated with the watchlist hit + attr_accessor :names + + # Phone numbers associated with the watchlist hit + attr_accessor :phone_numbers + + # URLs associated with the watchlist hit + attr_accessor :urls + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'documents' => :'documents', + :'email_addresses' => :'email_addresses', + :'locations' => :'locations', + :'names' => :'names', + :'phone_numbers' => :'phone_numbers', + :'urls' => :'urls' + } + 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 + { + :'documents' => :'Array', + :'email_addresses' => :'Array', + :'locations' => :'Array', + :'names' => :'Array', + :'phone_numbers' => :'Array', + :'urls' => :'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::EntityScreeningHitData` 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::EntityScreeningHitData`. 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?(:'documents') + if (value = attributes[:'documents']).is_a?(Array) + self.documents = value + end + end + + if attributes.key?(:'email_addresses') + if (value = attributes[:'email_addresses']).is_a?(Array) + self.email_addresses = value + end + end + + if attributes.key?(:'locations') + if (value = attributes[:'locations']).is_a?(Array) + self.locations = value + end + end + + if attributes.key?(:'names') + if (value = attributes[:'names']).is_a?(Array) + self.names = value + end + end + + if attributes.key?(:'phone_numbers') + if (value = attributes[:'phone_numbers']).is_a?(Array) + self.phone_numbers = value + end + end + + if attributes.key?(:'urls') + if (value = attributes[:'urls']).is_a?(Array) + self.urls = 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 && + documents == o.documents && + email_addresses == o.email_addresses && + locations == o.locations && + names == o.names && + phone_numbers == o.phone_numbers && + urls == o.urls + 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 + [documents, email_addresses, locations, names, phone_numbers, urls].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/entity_screening_hit_documents_items.rb b/lib/plaid/models/entity_screening_hit_documents_items.rb new file mode 100644 index 000000000..1385ea9f4 --- /dev/null +++ b/lib/plaid/models/entity_screening_hit_documents_items.rb @@ -0,0 +1,228 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Analyzed documents for the associated hit + class EntityScreeningHitDocumentsItems + attr_accessor :analysis + + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'analysis' => :'analysis', + :'data' => :'data' + } + 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 + { + :'analysis' => :'MatchSummary', + :'data' => :'EntityDocument' + } + 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::EntityScreeningHitDocumentsItems` 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::EntityScreeningHitDocumentsItems`. 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?(:'analysis') + self.analysis = attributes[:'analysis'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + 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 && + analysis == o.analysis && + data == o.data + 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 + [analysis, data].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/entity_screening_hit_emails.rb b/lib/plaid/models/entity_screening_hit_emails.rb new file mode 100644 index 000000000..7d6a0e3bd --- /dev/null +++ b/lib/plaid/models/entity_screening_hit_emails.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Email address information for the associated entity watchlist hit + class EntityScreeningHitEmails + # A valid email address. + attr_accessor :email_address + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email_address' => :'email_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 + { + :'email_address' => :'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::EntityScreeningHitEmails` 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::EntityScreeningHitEmails`. 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?(:'email_address') + self.email_address = attributes[:'email_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 @email_address.nil? + invalid_properties.push('invalid value for "email_address", email_address 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 @email_address.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 && + email_address == o.email_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 + [email_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/entity_screening_hit_emails_items.rb b/lib/plaid/models/entity_screening_hit_emails_items.rb new file mode 100644 index 000000000..f44480af8 --- /dev/null +++ b/lib/plaid/models/entity_screening_hit_emails_items.rb @@ -0,0 +1,228 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Analyzed emails for the associated hit + class EntityScreeningHitEmailsItems + attr_accessor :analysis + + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'analysis' => :'analysis', + :'data' => :'data' + } + 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 + { + :'analysis' => :'MatchSummary', + :'data' => :'EntityScreeningHitEmails' + } + 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::EntityScreeningHitEmailsItems` 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::EntityScreeningHitEmailsItems`. 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?(:'analysis') + self.analysis = attributes[:'analysis'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + 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 && + analysis == o.analysis && + data == o.data + 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 + [analysis, data].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/entity_screening_hit_names.rb b/lib/plaid/models/entity_screening_hit_names.rb new file mode 100644 index 000000000..213409daf --- /dev/null +++ b/lib/plaid/models/entity_screening_hit_names.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Name information for the associated entity watchlist hit + class EntityScreeningHitNames + # The full name of the entity. + attr_accessor :full + + # Primary names are those most commonly used to refer to this entity. Only one name will ever be marked as primary. + attr_accessor :primary + + attr_accessor :weak_alias_determination + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'full' => :'full', + :'primary' => :'primary', + :'weak_alias_determination' => :'weak_alias_determination' + } + 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' => :'String', + :'primary' => :'Boolean', + :'weak_alias_determination' => :'WeakAliasDetermination' + } + 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::EntityScreeningHitNames` 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::EntityScreeningHitNames`. 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') + self.full = attributes[:'full'] + end + + if attributes.key?(:'primary') + self.primary = attributes[:'primary'] + end + + if attributes.key?(:'weak_alias_determination') + self.weak_alias_determination = attributes[:'weak_alias_determination'] + 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.nil? + invalid_properties.push('invalid value for "full", full cannot be nil.') + end + + if @primary.nil? + invalid_properties.push('invalid value for "primary", primary cannot be nil.') + end + + if @weak_alias_determination.nil? + invalid_properties.push('invalid value for "weak_alias_determination", weak_alias_determination 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.nil? + return false if @primary.nil? + return false if @weak_alias_determination.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 == o.full && + primary == o.primary && + weak_alias_determination == o.weak_alias_determination + 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, primary, weak_alias_determination].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/entity_screening_hit_names_items.rb b/lib/plaid/models/entity_screening_hit_names_items.rb new file mode 100644 index 000000000..dbad6f067 --- /dev/null +++ b/lib/plaid/models/entity_screening_hit_names_items.rb @@ -0,0 +1,228 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Analyzed names for the associated hit + class EntityScreeningHitNamesItems + attr_accessor :analysis + + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'analysis' => :'analysis', + :'data' => :'data' + } + 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 + { + :'analysis' => :'MatchSummary', + :'data' => :'EntityScreeningHitNames' + } + 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::EntityScreeningHitNamesItems` 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::EntityScreeningHitNamesItems`. 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?(:'analysis') + self.analysis = attributes[:'analysis'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + 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 && + analysis == o.analysis && + data == o.data + 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 + [analysis, data].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/entity_screening_hit_phone_numbers.rb b/lib/plaid/models/entity_screening_hit_phone_numbers.rb new file mode 100644 index 000000000..1b1e0c35f --- /dev/null +++ b/lib/plaid/models/entity_screening_hit_phone_numbers.rb @@ -0,0 +1,262 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Phone number information associated with the entity screening hit + class EntityScreeningHitPhoneNumbers + attr_accessor :type + + # A phone number in E.164 format. + attr_accessor :phone_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'phone_number' => :'phone_number' + } + 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 + { + :'type' => :'PhoneType', + :'phone_number' => :'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::EntityScreeningHitPhoneNumbers` 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::EntityScreeningHitPhoneNumbers`. 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'] + end + + if attributes.key?(:'phone_number') + self.phone_number = attributes[:'phone_number'] + 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 @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @phone_number.nil? + 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 + + # 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 @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) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + phone_number == o.phone_number + 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 + [type, phone_number].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/entity_screening_hit_urls.rb b/lib/plaid/models/entity_screening_hit_urls.rb new file mode 100644 index 000000000..72806707f --- /dev/null +++ b/lib/plaid/models/entity_screening_hit_urls.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # URLs associated with the entity screening hit + class EntityScreeningHitUrls + # An 'http' or 'https' URL (must begin with either of those). + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'url' => :'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::EntityScreeningHitUrls` 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::EntityScreeningHitUrls`. 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?(:'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 @url.nil? + invalid_properties.push('invalid value for "url", url 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 @url.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 && + 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 + [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/entity_screening_hit_urls_items.rb b/lib/plaid/models/entity_screening_hit_urls_items.rb new file mode 100644 index 000000000..495a94c62 --- /dev/null +++ b/lib/plaid/models/entity_screening_hit_urls_items.rb @@ -0,0 +1,228 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Analyzed URLs for the associated hit + class EntityScreeningHitUrlsItems + attr_accessor :analysis + + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'analysis' => :'analysis', + :'data' => :'data' + } + 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 + { + :'analysis' => :'MatchSummary', + :'data' => :'EntityScreeningHitUrls' + } + 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::EntityScreeningHitUrlsItems` 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::EntityScreeningHitUrlsItems`. 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?(:'analysis') + self.analysis = attributes[:'analysis'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + 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 && + analysis == o.analysis && + data == o.data + 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 + [analysis, data].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/entity_screening_hits_phone_number_items.rb b/lib/plaid/models/entity_screening_hits_phone_number_items.rb new file mode 100644 index 000000000..1ea8a1a45 --- /dev/null +++ b/lib/plaid/models/entity_screening_hits_phone_number_items.rb @@ -0,0 +1,228 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Analyzed phone numbers for the associated hit + class EntityScreeningHitsPhoneNumberItems + attr_accessor :analysis + + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'analysis' => :'analysis', + :'data' => :'data' + } + 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 + { + :'analysis' => :'MatchSummary', + :'data' => :'EntityScreeningHitPhoneNumbers' + } + 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::EntityScreeningHitsPhoneNumberItems` 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::EntityScreeningHitsPhoneNumberItems`. 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?(:'analysis') + self.analysis = attributes[:'analysis'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + 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 && + analysis == o.analysis && + data == o.data + 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 + [analysis, data].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/entity_screening_status_updated_webhook.rb b/lib/plaid/models/entity_screening_status_updated_webhook.rb new file mode 100644 index 000000000..f8854f84d --- /dev/null +++ b/lib/plaid/models/entity_screening_status_updated_webhook.rb @@ -0,0 +1,251 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Fired when an entity screening status has changed, which can occur manually via the dashboard or during ongoing monitoring. + class EntityScreeningStatusUpdatedWebhook + # `ENTITY_SCREENING` + attr_accessor :webhook_type + + # `STATUS_UPDATED` + attr_accessor :webhook_code + + # The ID of the associated screening. + attr_accessor :screening_id + + # 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' + } + 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 + { + :'webhook_type' => :'String', + :'webhook_code' => :'String', + :'screening_id' => :'AnyType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'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::EntityScreeningStatusUpdatedWebhook` 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::EntityScreeningStatusUpdatedWebhook`. 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?(:'webhook_type') + self.webhook_type = attributes[:'webhook_type'] + end + + if attributes.key?(:'webhook_code') + self.webhook_code = attributes[:'webhook_code'] + end + + if attributes.key?(:'screening_id') + self.screening_id = attributes[:'screening_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 @webhook_type.nil? + invalid_properties.push('invalid value for "webhook_type", webhook_type cannot be nil.') + end + + if @webhook_code.nil? + invalid_properties.push('invalid value for "webhook_code", webhook_code 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 @webhook_type.nil? + return false if @webhook_code.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 && + webhook_type == o.webhook_type && + webhook_code == o.webhook_code && + screening_id == o.screening_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 + [webhook_type, webhook_code, screening_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/entity_watchlist_code.rb b/lib/plaid/models/entity_watchlist_code.rb new file mode 100644 index 000000000..845a88218 --- /dev/null +++ b/lib/plaid/models/entity_watchlist_code.rb @@ -0,0 +1,50 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class EntityWatchlistCode + CA_CON = "CA_CON".freeze + EU_CON = "EU_CON".freeze + IZ_SOE = "IZ_SOE".freeze + IZ_UNC = "IZ_UNC".freeze + US_CAP = "US_CAP".freeze + US_FSE = "US_FSE".freeze + US_MBS = "US_MBS".freeze + US_SDN = "US_SDN".freeze + US_SSI = "US_SSI".freeze + US_CMC = "US_CMC".freeze + US_UVL = "US_UVL".freeze + AU_CON = "AU_CON".freeze + UK_HMC = "UK_HMC".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/entity_watchlist_program.rb b/lib/plaid/models/entity_watchlist_program.rb new file mode 100644 index 000000000..5e193756d --- /dev/null +++ b/lib/plaid/models/entity_watchlist_program.rb @@ -0,0 +1,374 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # A program that configures the active lists, search parameters, and other behavior for initial and ongoing screening of entities. + class EntityWatchlistProgram + # ID of the associated entity program. + attr_accessor :id + + # An ISO8601 formatted timestamp. + attr_accessor :created_at + + # Indicator specifying whether the program is enabled and can be used to screen entities. + attr_accessor :enabled + + # Watchlists enabled for the associated program + attr_accessor :lists_enabled + + # A name for the entity program to define its purpose. For example, \"High Risk Organizations\" or \"Applicants\". + attr_accessor :name + + attr_accessor :name_sensitivity + + attr_accessor :audit_trail + + # Archived programs are read-only and cannot screen new customers nor participate in ongoing monitoring. + attr_accessor :archived + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'created_at' => :'created_at', + :'enabled' => :'enabled', + :'lists_enabled' => :'lists_enabled', + :'name' => :'name', + :'name_sensitivity' => :'name_sensitivity', + :'audit_trail' => :'audit_trail', + :'archived' => :'archived' + } + 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', + :'created_at' => :'Time', + :'enabled' => :'Boolean', + :'lists_enabled' => :'Array', + :'name' => :'String', + :'name_sensitivity' => :'ProgramNameSensitivity', + :'audit_trail' => :'WatchlistScreeningAuditTrail', + :'archived' => :'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::EntityWatchlistProgram` 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::EntityWatchlistProgram`. 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?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'lists_enabled') + if (value = attributes[:'lists_enabled']).is_a?(Array) + self.lists_enabled = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'name_sensitivity') + self.name_sensitivity = attributes[:'name_sensitivity'] + end + + if attributes.key?(:'audit_trail') + self.audit_trail = attributes[:'audit_trail'] + end + + if attributes.key?(:'archived') + self.archived = attributes[:'archived'] + 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 @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @enabled.nil? + invalid_properties.push('invalid value for "enabled", enabled cannot be nil.') + end + + if @lists_enabled.nil? + invalid_properties.push('invalid value for "lists_enabled", lists_enabled cannot be nil.') + end + + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @name.to_s.length < 1 + 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.') + end + + if @audit_trail.nil? + invalid_properties.push('invalid value for "audit_trail", audit_trail cannot be nil.') + end + + if @archived.nil? + invalid_properties.push('invalid value for "archived", archived 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 @created_at.nil? + return false if @enabled.nil? + 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 @archived.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] lists_enabled Value to be assigned + def lists_enabled=(lists_enabled) + if lists_enabled.nil? + fail ArgumentError, 'lists_enabled cannot be nil' + end + + + @lists_enabled = lists_enabled + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + if name.to_s.length < 1 + 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 + + # 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 && + created_at == o.created_at && + enabled == o.enabled && + lists_enabled == o.lists_enabled && + name == o.name && + name_sensitivity == o.name_sensitivity && + audit_trail == o.audit_trail && + archived == o.archived + 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, created_at, enabled, lists_enabled, name, name_sensitivity, audit_trail, archived].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/entity_watchlist_screening.rb b/lib/plaid/models/entity_watchlist_screening.rb new file mode 100644 index 000000000..48faa24f7 --- /dev/null +++ b/lib/plaid/models/entity_watchlist_screening.rb @@ -0,0 +1,287 @@ +=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.115.2 + +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 EntityWatchlistScreening + # ID of the associated entity screening. + attr_accessor :id + + attr_accessor :search_terms + + attr_accessor :assignee + + attr_accessor :status + + attr_accessor :client_user_id + + attr_accessor :audit_trail + + # 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' + } + 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' + } + 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::EntityWatchlistScreening` 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::EntityWatchlistScreening`. 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 + 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 @audit_trail.nil? + invalid_properties.push('invalid value for "audit_trail", audit_trail 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 @audit_trail.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 && + 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 + 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].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/entity_watchlist_screening_hit.rb b/lib/plaid/models/entity_watchlist_screening_hit.rb new file mode 100644 index 000000000..d5a431f36 --- /dev/null +++ b/lib/plaid/models/entity_watchlist_screening_hit.rb @@ -0,0 +1,349 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Data from a government watchlist that has been attached to the screening. + class EntityWatchlistScreeningHit + # ID of the associated entity screening hit. + attr_accessor :id + + attr_accessor :review_status + + # An ISO8601 formatted timestamp. + attr_accessor :first_active + + attr_accessor :inactive_since + + attr_accessor :historical_since + + attr_accessor :entity_list_code + + # A universal identifier for a watchlist individual that is stable across searches and updates. + attr_accessor :plaid_uid + + # The identifier provided by the source sanction or watchlist. When one is not provided by the source, this is `null`. + attr_accessor :source_uid + + attr_accessor :analysis + + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'review_status' => :'review_status', + :'first_active' => :'first_active', + :'inactive_since' => :'inactive_since', + :'historical_since' => :'historical_since', + :'entity_list_code' => :'entity_list_code', + :'plaid_uid' => :'plaid_uid', + :'source_uid' => :'source_uid', + :'analysis' => :'analysis', + :'data' => :'data' + } + 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', + :'review_status' => :'WatchlistScreeningHitStatus', + :'first_active' => :'Time', + :'inactive_since' => :'Time', + :'historical_since' => :'Time', + :'entity_list_code' => :'EntityWatchlistCode', + :'plaid_uid' => :'String', + :'source_uid' => :'String', + :'analysis' => :'EntityScreeningHitAnalysis', + :'data' => :'EntityScreeningHitData' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'inactive_since', + :'historical_since', + :'source_uid', + ]) + 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::EntityWatchlistScreeningHit` 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::EntityWatchlistScreeningHit`. 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?(:'review_status') + self.review_status = attributes[:'review_status'] + end + + if attributes.key?(:'first_active') + self.first_active = attributes[:'first_active'] + end + + if attributes.key?(:'inactive_since') + self.inactive_since = attributes[:'inactive_since'] + end + + if attributes.key?(:'historical_since') + self.historical_since = attributes[:'historical_since'] + end + + if attributes.key?(:'entity_list_code') + self.entity_list_code = attributes[:'entity_list_code'] + end + + if attributes.key?(:'plaid_uid') + self.plaid_uid = attributes[:'plaid_uid'] + end + + if attributes.key?(:'source_uid') + self.source_uid = attributes[:'source_uid'] + end + + if attributes.key?(:'analysis') + self.analysis = attributes[:'analysis'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + 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 @review_status.nil? + invalid_properties.push('invalid value for "review_status", review_status cannot be nil.') + end + + if @first_active.nil? + invalid_properties.push('invalid value for "first_active", first_active cannot be nil.') + end + + if @entity_list_code.nil? + invalid_properties.push('invalid value for "entity_list_code", entity_list_code cannot be nil.') + end + + if @plaid_uid.nil? + invalid_properties.push('invalid value for "plaid_uid", plaid_uid cannot be nil.') + end + + if @source_uid.to_s.length < 1 + invalid_properties.push('invalid value for "source_uid", the character length must be great than or equal to 1.') + 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 @review_status.nil? + return false if @first_active.nil? + return false if @entity_list_code.nil? + return false if @plaid_uid.nil? + return false if @source_uid.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] source_uid Value to be assigned + def source_uid=(source_uid) + if source_uid.to_s.length < 1 + fail ArgumentError, 'invalid value for "source_uid", the character length must be great than or equal to 1.' + end + + + @source_uid = source_uid + 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 && + review_status == o.review_status && + first_active == o.first_active && + inactive_since == o.inactive_since && + historical_since == o.historical_since && + entity_list_code == o.entity_list_code && + plaid_uid == o.plaid_uid && + source_uid == o.source_uid && + analysis == o.analysis && + data == o.data + 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, review_status, first_active, inactive_since, historical_since, entity_list_code, plaid_uid, source_uid, analysis, data].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/entity_watchlist_screening_hit_list.rb b/lib/plaid/models/entity_watchlist_screening_hit_list.rb new file mode 100644 index 000000000..3be0073c2 --- /dev/null +++ b/lib/plaid/models/entity_watchlist_screening_hit_list.rb @@ -0,0 +1,242 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # List of entity watchlist screening hits + class EntityWatchlistScreeningHitList + # List of entity watchlist screening hits + attr_accessor :entity_watchlist_screening_hits + + # 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_screening_hits' => :'entity_watchlist_screening_hits', + :'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_screening_hits' => :'Array', + :'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::EntityWatchlistScreeningHitList` 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::EntityWatchlistScreeningHitList`. 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_screening_hits') + if (value = attributes[:'entity_watchlist_screening_hits']).is_a?(Array) + self.entity_watchlist_screening_hits = value + end + 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_screening_hits.nil? + invalid_properties.push('invalid value for "entity_watchlist_screening_hits", entity_watchlist_screening_hits 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_screening_hits.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_screening_hits == o.entity_watchlist_screening_hits && + 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_screening_hits, 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/entity_watchlist_screening_list.rb b/lib/plaid/models/entity_watchlist_screening_list.rb new file mode 100644 index 000000000..8f5a70d01 --- /dev/null +++ b/lib/plaid/models/entity_watchlist_screening_list.rb @@ -0,0 +1,242 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # List of entity watchlist screening + class EntityWatchlistScreeningList + # List of entity watchlist screening + attr_accessor :entity_watchlist_screenings + + # 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', + :'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', + :'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::EntityWatchlistScreeningList` 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::EntityWatchlistScreeningList`. 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?(:'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 && + 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, 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/entity_watchlist_screening_program_list.rb b/lib/plaid/models/entity_watchlist_screening_program_list.rb new file mode 100644 index 000000000..c2b517fb3 --- /dev/null +++ b/lib/plaid/models/entity_watchlist_screening_program_list.rb @@ -0,0 +1,242 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # List of entity watchlist screening programs + class EntityWatchlistScreeningProgramList + # List of entity watchlist screening programs + attr_accessor :entity_watchlist_programs + + # 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_programs' => :'entity_watchlist_programs', + :'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_programs' => :'Array', + :'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::EntityWatchlistScreeningProgramList` 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::EntityWatchlistScreeningProgramList`. 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_programs') + if (value = attributes[:'entity_watchlist_programs']).is_a?(Array) + self.entity_watchlist_programs = value + end + 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_programs.nil? + invalid_properties.push('invalid value for "entity_watchlist_programs", entity_watchlist_programs 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_programs.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_programs == o.entity_watchlist_programs && + 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_programs, 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/entity_watchlist_screening_review.rb b/lib/plaid/models/entity_watchlist_screening_review.rb new file mode 100644 index 000000000..06e0971c4 --- /dev/null +++ b/lib/plaid/models/entity_watchlist_screening_review.rb @@ -0,0 +1,301 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +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 EntityWatchlistScreeningReview + # ID of the associated entity review. + attr_accessor :id + + # Hits marked 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 + + # Hits marked as a false positive after thorough manual review. These hits will never recur or be updated once dismissed. + attr_accessor :dismissed_hits + + # A comment submitted by a team member as part of reviewing a watchlist screening. + attr_accessor :comment + + attr_accessor :audit_trail + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'confirmed_hits' => :'confirmed_hits', + :'dismissed_hits' => :'dismissed_hits', + :'comment' => :'comment', + :'audit_trail' => :'audit_trail' + } + 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', + :'confirmed_hits' => :'Array', + :'dismissed_hits' => :'Array', + :'comment' => :'String', + :'audit_trail' => :'WatchlistScreeningAuditTrail' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'comment', + ]) + 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::EntityWatchlistScreeningReview` 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::EntityWatchlistScreeningReview`. 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?(:'confirmed_hits') + if (value = attributes[:'confirmed_hits']).is_a?(Array) + self.confirmed_hits = value + end + end + + if attributes.key?(:'dismissed_hits') + if (value = attributes[:'dismissed_hits']).is_a?(Array) + self.dismissed_hits = value + end + end + + if attributes.key?(:'comment') + self.comment = attributes[:'comment'] + end + + if attributes.key?(:'audit_trail') + self.audit_trail = attributes[:'audit_trail'] + 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 @confirmed_hits.nil? + invalid_properties.push('invalid value for "confirmed_hits", confirmed_hits cannot be nil.') + end + + if @dismissed_hits.nil? + invalid_properties.push('invalid value for "dismissed_hits", dismissed_hits cannot be nil.') + end + + if @comment.to_s.length < 1 + invalid_properties.push('invalid value for "comment", 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 + + 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 @confirmed_hits.nil? + return false if @dismissed_hits.nil? + return false if @comment.to_s.length < 1 + return false if @audit_trail.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] comment Value to be assigned + def comment=(comment) + if comment.to_s.length < 1 + fail ArgumentError, 'invalid value for "comment", the character length must be great than or equal to 1.' + end + + + @comment = comment + 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 && + confirmed_hits == o.confirmed_hits && + dismissed_hits == o.dismissed_hits && + comment == o.comment && + audit_trail == o.audit_trail + 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, confirmed_hits, dismissed_hits, comment, audit_trail].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/entity_watchlist_screening_search_terms.rb b/lib/plaid/models/entity_watchlist_screening_search_terms.rb new file mode 100644 index 000000000..a29df080f --- /dev/null +++ b/lib/plaid/models/entity_watchlist_screening_search_terms.rb @@ -0,0 +1,337 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Search terms associated with an entity used for searching against watchlists + class EntityWatchlistScreeningSearchTerms + # ID of the associated entity program. + attr_accessor :entity_watchlist_program_id + + # The name of the organization being screened. + attr_accessor :legal_name + + attr_accessor :document + + attr_accessor :email_address + + attr_accessor :country + + attr_accessor :phone_number + + attr_accessor :url + + # The current version of the search terms. Starts at `1` and increments with each edit to `search_terms`. + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'entity_watchlist_program_id' => :'entity_watchlist_program_id', + :'legal_name' => :'legal_name', + :'document' => :'document', + :'email_address' => :'email_address', + :'country' => :'country', + :'phone_number' => :'phone_number', + :'url' => :'url', + :'version' => :'version' + } + 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_program_id' => :'String', + :'legal_name' => :'String', + :'document' => :'String', + :'email_address' => :'String', + :'country' => :'String', + :'phone_number' => :'String', + :'url' => :'String', + :'version' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'document', + :'email_address', + :'country', + :'phone_number', + :'url', + ]) + 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::EntityWatchlistScreeningSearchTerms` 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::EntityWatchlistScreeningSearchTerms`. 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_program_id') + self.entity_watchlist_program_id = attributes[:'entity_watchlist_program_id'] + end + + if attributes.key?(:'legal_name') + self.legal_name = attributes[:'legal_name'] + end + + if attributes.key?(:'document') + self.document = attributes[:'document'] + end + + if attributes.key?(:'email_address') + self.email_address = attributes[:'email_address'] + end + + if attributes.key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.key?(:'phone_number') + self.phone_number = attributes[:'phone_number'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + 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_program_id.nil? + invalid_properties.push('invalid value for "entity_watchlist_program_id", entity_watchlist_program_id cannot be nil.') + end + + if @legal_name.nil? + invalid_properties.push('invalid value for "legal_name", legal_name cannot be nil.') + end + + if @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 + + pattern = Regexp.new(/^\S+(\s+\S+)*$/) + if @legal_name !~ pattern + invalid_properties.push("invalid value for \"legal_name\", must conform to the pattern #{pattern}.") + end + + + if @version.nil? + invalid_properties.push('invalid value for "version", version 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_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 @version.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? + fail ArgumentError, 'legal_name cannot be nil' + end + + if 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 + + pattern = Regexp.new(/^\S+(\s+\S+)*$/) + if legal_name !~ pattern + fail ArgumentError, "invalid value for \"legal_name\", must conform to the pattern #{pattern}." + end + + + @legal_name = legal_name + 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_program_id == o.entity_watchlist_program_id && + legal_name == o.legal_name && + document == o.document && + email_address == o.email_address && + country == o.country && + phone_number == o.phone_number && + url == o.url && + version == o.version + 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_program_id, legal_name, document, email_address, country, phone_number, url, version].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/entity_watchlist_search_terms.rb b/lib/plaid/models/entity_watchlist_search_terms.rb new file mode 100644 index 000000000..b82a79463 --- /dev/null +++ b/lib/plaid/models/entity_watchlist_search_terms.rb @@ -0,0 +1,322 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Search inputs for creating an entity watchlist screening + class EntityWatchlistSearchTerms + # ID of the associated entity program. + attr_accessor :entity_watchlist_program_id + + # The name of the organization being screened. + attr_accessor :legal_name + + attr_accessor :document + + attr_accessor :email_address + + attr_accessor :country + + attr_accessor :phone_number + + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'entity_watchlist_program_id' => :'entity_watchlist_program_id', + :'legal_name' => :'legal_name', + :'document' => :'document', + :'email_address' => :'email_address', + :'country' => :'country', + :'phone_number' => :'phone_number', + :'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 + { + :'entity_watchlist_program_id' => :'String', + :'legal_name' => :'String', + :'document' => :'String', + :'email_address' => :'String', + :'country' => :'String', + :'phone_number' => :'String', + :'url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'document', + :'email_address', + :'country', + :'phone_number', + :'url' + ]) + 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::EntityWatchlistSearchTerms` 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::EntityWatchlistSearchTerms`. 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_program_id') + self.entity_watchlist_program_id = attributes[:'entity_watchlist_program_id'] + end + + if attributes.key?(:'legal_name') + self.legal_name = attributes[:'legal_name'] + end + + if attributes.key?(:'document') + self.document = attributes[:'document'] + end + + if attributes.key?(:'email_address') + self.email_address = attributes[:'email_address'] + end + + if attributes.key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.key?(:'phone_number') + self.phone_number = attributes[:'phone_number'] + 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 @entity_watchlist_program_id.nil? + invalid_properties.push('invalid value for "entity_watchlist_program_id", entity_watchlist_program_id cannot be nil.') + end + + if @legal_name.nil? + invalid_properties.push('invalid value for "legal_name", legal_name cannot be nil.') + end + + if @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 + + pattern = Regexp.new(/^\S+(\s+\S+)*$/) + if @legal_name !~ pattern + invalid_properties.push("invalid value for \"legal_name\", 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 @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+)*$/) + 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? + fail ArgumentError, 'legal_name cannot be nil' + end + + if 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 + + pattern = Regexp.new(/^\S+(\s+\S+)*$/) + if legal_name !~ pattern + fail ArgumentError, "invalid value for \"legal_name\", must conform to the pattern #{pattern}." + end + + + @legal_name = legal_name + 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_program_id == o.entity_watchlist_program_id && + legal_name == o.legal_name && + document == o.document && + email_address == o.email_address && + country == o.country && + phone_number == o.phone_number && + 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 + [entity_watchlist_program_id, legal_name, document, email_address, country, phone_number, 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/error.rb b/lib/plaid/models/error.rb index 875d031d7..ef23d8524 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -105,6 +105,7 @@ def self.openapi_nullable Set.new([ :'display_message', :'status', + :'suggested_action' ]) end diff --git a/lib/plaid/models/expiration_date.rb b/lib/plaid/models/expiration_date.rb new file mode 100644 index 000000000..df405b4d6 --- /dev/null +++ b/lib/plaid/models/expiration_date.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class ExpirationDate + NOT_EXPIRED = "not_expired".freeze + EXPIRED = "expired".freeze + NO_DATA = "no_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/external_payment_initiation_consent_options.rb b/lib/plaid/models/external_payment_initiation_consent_options.rb index 4853a2c89..bb18afd81 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -22,11 +22,18 @@ class ExternalPaymentInitiationConsentOptions # When `true`, Plaid will attempt to request refund details from the payee's financial institution. Support varies between financial institutions and will not always be available. If refund details could be retrieved, they will be available in the `/payment_initiation/payment/get` response. attr_accessor :request_refund_details + # The International Bank Account Number (IBAN) for the payer's account. If provided, the end user will be able to set up payment consent using only the specified bank account. + attr_accessor :iban + + attr_accessor :bacs + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'wallet_id' => :'wallet_id', - :'request_refund_details' => :'request_refund_details' + :'request_refund_details' => :'request_refund_details', + :'iban' => :'iban', + :'bacs' => :'bacs' } end @@ -39,7 +46,9 @@ def self.acceptable_attributes def self.openapi_types { :'wallet_id' => :'String', - :'request_refund_details' => :'Boolean' + :'request_refund_details' => :'Boolean', + :'iban' => :'String', + :'bacs' => :'PaymentInitiationOptionalRestrictionBacs' } end @@ -47,7 +56,9 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'wallet_id', - :'request_refund_details' + :'request_refund_details', + :'iban', + :'bacs' ]) end @@ -73,6 +84,14 @@ def initialize(attributes = {}) if attributes.key?(:'request_refund_details') self.request_refund_details = attributes[:'request_refund_details'] end + + if attributes.key?(:'iban') + self.iban = attributes[:'iban'] + end + + if attributes.key?(:'bacs') + self.bacs = attributes[:'bacs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -84,6 +103,15 @@ def list_invalid_properties end + if !@iban.nil? && @iban.to_s.length > 34 + invalid_properties.push('invalid value for "iban", the character length must be smaller than or equal to 34.') + end + + if !@iban.nil? && @iban.to_s.length < 15 + invalid_properties.push('invalid value for "iban", the character length must be great than or equal to 15.') + end + + invalid_properties end @@ -91,6 +119,8 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if !@wallet_id.nil? && @wallet_id.to_s.length < 1 + return false if !@iban.nil? && @iban.to_s.length > 34 + return false if !@iban.nil? && @iban.to_s.length < 15 true end @@ -105,13 +135,30 @@ def wallet_id=(wallet_id) @wallet_id = wallet_id end + # Custom attribute writer method with validation + # @param [Object] iban Value to be assigned + def iban=(iban) + if !iban.nil? && iban.to_s.length > 34 + fail ArgumentError, 'invalid value for "iban", the character length must be smaller than or equal to 34.' + end + + if !iban.nil? && iban.to_s.length < 15 + fail ArgumentError, 'invalid value for "iban", the character length must be great than or equal to 15.' + end + + + @iban = iban + 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 && wallet_id == o.wallet_id && - request_refund_details == o.request_refund_details + request_refund_details == o.request_refund_details && + iban == o.iban && + bacs == o.bacs end # @see the `==` method @@ -123,7 +170,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [wallet_id, request_refund_details].hash + [wallet_id, request_refund_details, iban, bacs].hash end # Builds the object from hash diff --git a/lib/plaid/models/external_payment_options.rb b/lib/plaid/models/external_payment_options.rb index ea428d0fd..920f807fb 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e1b69a144..250209c6e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b425d16f7..2592ea0e1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 48fb7610a..f5841113f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2e57efcba..e4f337cef 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..886ada988 --- /dev/null +++ b/lib/plaid/models/generic_screening_hit_location_items.rb @@ -0,0 +1,228 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Analyzed location information for the associated hit + class GenericScreeningHitLocationItems + attr_accessor :analysis + + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'analysis' => :'analysis', + :'data' => :'data' + } + 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 + { + :'analysis' => :'MatchSummary', + :'data' => :'WatchlistScreeningHitLocations' + } + 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::GenericScreeningHitLocationItems` 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::GenericScreeningHitLocationItems`. 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?(:'analysis') + self.analysis = attributes[:'analysis'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + 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 && + analysis == o.analysis && + data == o.data + 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 + [analysis, data].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_dashboard_user_request.rb b/lib/plaid/models/get_dashboard_user_request.rb new file mode 100644 index 000000000..c7c6b7654 --- /dev/null +++ b/lib/plaid/models/get_dashboard_user_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for fetching a dashboard user + class GetDashboardUserRequest + # ID of the associated user. + attr_accessor :dashboard_user_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 + + # 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 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'dashboard_user_id' => :'dashboard_user_id', + :'secret' => :'secret', + :'client_id' => :'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 + { + :'dashboard_user_id' => :'String', + :'secret' => :'String', + :'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::GetDashboardUserRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'dashboard_user_id') + self.dashboard_user_id = attributes[:'dashboard_user_id'] + end + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'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 @dashboard_user_id.nil? + invalid_properties.push('invalid value for "dashboard_user_id", dashboard_user_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 @dashboard_user_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 && + dashboard_user_id == o.dashboard_user_id && + secret == o.secret && + client_id == o.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 + [dashboard_user_id, secret, 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/get_entity_watchlist_screening_request.rb b/lib/plaid/models/get_entity_watchlist_screening_request.rb new file mode 100644 index 000000000..322123212 --- /dev/null +++ b/lib/plaid/models/get_entity_watchlist_screening_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for fetching a entity watchlist screening + class GetEntityWatchlistScreeningRequest + # ID of the associated entity screening. + attr_accessor :entity_watchlist_screening_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 + + # 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 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'entity_watchlist_screening_id' => :'entity_watchlist_screening_id', + :'secret' => :'secret', + :'client_id' => :'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 + { + :'entity_watchlist_screening_id' => :'String', + :'secret' => :'String', + :'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::GetEntityWatchlistScreeningRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'entity_watchlist_screening_id') + self.entity_watchlist_screening_id = attributes[:'entity_watchlist_screening_id'] + end + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'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 @entity_watchlist_screening_id.nil? + invalid_properties.push('invalid value for "entity_watchlist_screening_id", entity_watchlist_screening_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_screening_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_screening_id == o.entity_watchlist_screening_id && + secret == o.secret && + client_id == o.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 + [entity_watchlist_screening_id, secret, 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/get_identity_verification_request.rb b/lib/plaid/models/get_identity_verification_request.rb new file mode 100644 index 000000000..042c35204 --- /dev/null +++ b/lib/plaid/models/get_identity_verification_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for fetching an identity verification + class GetIdentityVerificationRequest + # ID of the associated Identity Verification attempt. + attr_accessor :identity_verification_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 + + # 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 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'identity_verification_id' => :'identity_verification_id', + :'secret' => :'secret', + :'client_id' => :'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 + { + :'identity_verification_id' => :'String', + :'secret' => :'String', + :'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::GetIdentityVerificationRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'identity_verification_id') + self.identity_verification_id = attributes[:'identity_verification_id'] + end + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'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 @identity_verification_id.nil? + invalid_properties.push('invalid value for "identity_verification_id", identity_verification_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 @identity_verification_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 && + identity_verification_id == o.identity_verification_id && + secret == o.secret && + client_id == o.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 + [identity_verification_id, secret, 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/get_individual_watchlist_screening_request.rb b/lib/plaid/models/get_individual_watchlist_screening_request.rb new file mode 100644 index 000000000..2c30412ad --- /dev/null +++ b/lib/plaid/models/get_individual_watchlist_screening_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for fetching an individual watchlist screening + class GetIndividualWatchlistScreeningRequest + # ID of the associated screening. + attr_accessor :watchlist_screening_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 + + # 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 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'watchlist_screening_id' => :'watchlist_screening_id', + :'secret' => :'secret', + :'client_id' => :'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 + { + :'watchlist_screening_id' => :'String', + :'secret' => :'String', + :'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::GetIndividualWatchlistScreeningRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'watchlist_screening_id') + self.watchlist_screening_id = attributes[:'watchlist_screening_id'] + end + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'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 @watchlist_screening_id.nil? + invalid_properties.push('invalid value for "watchlist_screening_id", watchlist_screening_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_screening_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_screening_id == o.watchlist_screening_id && + secret == o.secret && + client_id == o.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 + [watchlist_screening_id, secret, 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/get_watchlist_screening_entity_program_request.rb b/lib/plaid/models/get_watchlist_screening_entity_program_request.rb new file mode 100644 index 000000000..f2353941c --- /dev/null +++ b/lib/plaid/models/get_watchlist_screening_entity_program_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for fetching an entity watchlist program + class GetWatchlistScreeningEntityProgramRequest + # ID of the associated entity program. + attr_accessor :entity_watchlist_program_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 + + # 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 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'entity_watchlist_program_id' => :'entity_watchlist_program_id', + :'secret' => :'secret', + :'client_id' => :'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 + { + :'entity_watchlist_program_id' => :'String', + :'secret' => :'String', + :'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::GetWatchlistScreeningEntityProgramRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'entity_watchlist_program_id') + self.entity_watchlist_program_id = attributes[:'entity_watchlist_program_id'] + end + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'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 @entity_watchlist_program_id.nil? + invalid_properties.push('invalid value for "entity_watchlist_program_id", entity_watchlist_program_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_program_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_program_id == o.entity_watchlist_program_id && + secret == o.secret && + client_id == o.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 + [entity_watchlist_program_id, secret, 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/get_watchlist_screening_individual_program_request.rb b/lib/plaid/models/get_watchlist_screening_individual_program_request.rb new file mode 100644 index 000000000..3f6c44245 --- /dev/null +++ b/lib/plaid/models/get_watchlist_screening_individual_program_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for fetching an individual watchlist program + class GetWatchlistScreeningIndividualProgramRequest + # ID of the associated program. + attr_accessor :watchlist_program_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 + + # 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 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'watchlist_program_id' => :'watchlist_program_id', + :'secret' => :'secret', + :'client_id' => :'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 + { + :'watchlist_program_id' => :'String', + :'secret' => :'String', + :'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::GetWatchlistScreeningIndividualProgramRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'watchlist_program_id') + self.watchlist_program_id = attributes[:'watchlist_program_id'] + end + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'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 @watchlist_program_id.nil? + invalid_properties.push('invalid value for "watchlist_program_id", watchlist_program_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_program_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_program_id == o.watchlist_program_id && + secret == o.secret && + client_id == o.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 + [watchlist_program_id, secret, 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/health_incident.rb b/lib/plaid/models/health_incident.rb index 59185b3ed..f30cd24aa 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 4939e3a5c..1c0d422d8 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 14c4e44c7..250fe52de 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/holding.rb b/lib/plaid/models/holding.rb index 2a1755a3e..695d39e44 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 5a576c30b..0a1afc4e6 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/holdings_override.rb b/lib/plaid/models/holdings_override.rb index 71afb8ee2..79919c5cc 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..be74493a3 --- /dev/null +++ b/lib/plaid/models/id_number_type.rb @@ -0,0 +1,72 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class IDNumberType + AR_DNI = "ar_dni".freeze + AU_DRIVERS_LICENSE = "au_drivers_license".freeze + AU_PASSPORT = "au_passport".freeze + BR_CPF = "br_cpf".freeze + CA_SIN = "ca_sin".freeze + CL_RUN = "cl_run".freeze + CN_RESIDENT_CARD = "cn_resident_card".freeze + CO_NIT = "co_nit".freeze + DK_CPR = "dk_cpr".freeze + EG_NATIONAL_ID = "eg_national_id".freeze + ES_DNI = "es_dni".freeze + ES_NIE = "es_nie".freeze + HK_HKID = "hk_hkid".freeze + IN_PAN = "in_pan".freeze + IT_CF = "it_cf".freeze + JO_CIVIL_ID = "jo_civil_id".freeze + JP_MY_NUMBER = "jp_my_number".freeze + KE_HUDUMA_NAMBA = "ke_huduma_namba".freeze + KW_CIVIL_ID = "kw_civil_id".freeze + MX_CURP = "mx_curp".freeze + MX_RFC = "mx_rfc".freeze + MY_NRIC = "my_nric".freeze + NG_NIN = "ng_nin".freeze + NZ_DRIVERS_LICENSE = "nz_drivers_license".freeze + OM_CIVIL_ID = "om_civil_id".freeze + PH_PSN = "ph_psn".freeze + PL_PESEL = "pl_pesel".freeze + RO_CNP = "ro_cnp".freeze + SA_NATIONAL_ID = "sa_national_id".freeze + SE_PIN = "se_pin".freeze + SG_NRIC = "sg_nric".freeze + TR_TC_KIMLIK = "tr_tc_kimlik".freeze + US_SSN = "us_ssn".freeze + US_SSN_LAST_4 = "us_ssn_last_4".freeze + ZA_SMART_ID = "za_smart_id".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/identity_default_update_webhook.rb b/lib/plaid/models/identity_default_update_webhook.rb index 15ece8928..732882e43 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/identity_get_request.rb b/lib/plaid/models/identity_get_request.rb index 344d3998b..e4e289d7e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 335d7bf2a..52ab218d1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 705b3df00..fe5db7413 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 fad253e20..5d0902206 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..bd0630557 --- /dev/null +++ b/lib/plaid/models/identity_verification.rb @@ -0,0 +1,420 @@ +=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.115.2 + +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 IdentityVerification + # 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 + + 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 + + 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::IdentityVerification` 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::IdentityVerification`. 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 + + 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.') + 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 @client_user_id !~ Regexp.new(/^\S+(\s+\S+)*$/) + 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 + + 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 + + # 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_create_request.rb b/lib/plaid/models/identity_verification_create_request.rb new file mode 100644 index 000000000..b6253ea60 --- /dev/null +++ b/lib/plaid/models/identity_verification_create_request.rb @@ -0,0 +1,302 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request schema for '/identity_verification/create' + class IdentityVerificationCreateRequest + # A flag specifying whether you would like Plaid to expose a shareable URL for the verification being created. + attr_accessor :shareable + + # ID of the associated Identity Verification template. + attr_accessor :template_id + + # A flag specifying whether the end user has already agreed to a privacy policy specifying that their data will be shared with Plaid for verification purposes. If `consent` is set to `true`, the `accept_tos` step will be marked as `skipped` and the end user's session will start at the next step requirement. + attr_accessor :consent + + attr_accessor :user + + # 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 + + # An optional flag specifying how you would like Plaid to handle attempts to create an Identity Verification when an Identity Verification already exists for the provided `client_user_id` and `template_id`. If idempotency is enabled, Plaid will return the existing Identity Verification. If idempotency is disabled, Plaid will reject the request with a `400 Bad Request` status code if an Identity Verification already exists for the supplied `client_user_id` and `template_id`. + attr_accessor :idempotent + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'shareable' => :'shareable', + :'template_id' => :'template_id', + :'consent' => :'consent', + :'user' => :'user', + :'client_id' => :'client_id', + :'secret' => :'secret', + :'idempotent' => :'idempotent' + } + 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 + { + :'shareable' => :'Boolean', + :'template_id' => :'String', + :'consent' => :'Boolean', + :'user' => :'IdentityVerificationRequestUser', + :'client_id' => :'String', + :'secret' => :'String', + :'idempotent' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'idempotent' + ]) + 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::IdentityVerificationCreateRequest` 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::IdentityVerificationCreateRequest`. 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?(:'shareable') + self.shareable = attributes[:'shareable'] + end + + if attributes.key?(:'template_id') + self.template_id = attributes[:'template_id'] + end + + if attributes.key?(:'consent') + self.consent = attributes[:'consent'] + else + self.consent = true + end + + if attributes.key?(:'user') + self.user = attributes[:'user'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'idempotent') + self.idempotent = attributes[:'idempotent'] + 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 @shareable.nil? + invalid_properties.push('invalid value for "shareable", shareable cannot be nil.') + end + + if @template_id.nil? + invalid_properties.push('invalid value for "template_id", template_id cannot be nil.') + end + + if @consent.nil? + invalid_properties.push('invalid value for "consent", consent cannot be nil.') + end + + if @user.nil? + invalid_properties.push('invalid value for "user", user 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 @shareable.nil? + return false if @template_id.nil? + return false if @consent.nil? + return false if @user.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 && + shareable == o.shareable && + template_id == o.template_id && + consent == o.consent && + user == o.user && + client_id == o.client_id && + secret == o.secret && + idempotent == o.idempotent + 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 + [shareable, template_id, consent, user, client_id, secret, idempotent].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_list.rb b/lib/plaid/models/identity_verification_list.rb new file mode 100644 index 000000000..0913421da --- /dev/null +++ b/lib/plaid/models/identity_verification_list.rb @@ -0,0 +1,242 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # List of Plaid sessions + class IdentityVerificationList + # List of Plaid sessions + attr_accessor :identity_verifications + + # 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 + { + :'identity_verifications' => :'identity_verifications', + :'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 + { + :'identity_verifications' => :'Array', + :'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::IdentityVerificationList` 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::IdentityVerificationList`. 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?(:'identity_verifications') + if (value = attributes[:'identity_verifications']).is_a?(Array) + self.identity_verifications = value + end + 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 @identity_verifications.nil? + invalid_properties.push('invalid value for "identity_verifications", identity_verifications 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 @identity_verifications.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 && + identity_verifications == o.identity_verifications && + 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 + [identity_verifications, 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_request_user.rb b/lib/plaid/models/identity_verification_request_user.rb new file mode 100644 index 000000000..3c59b8082 --- /dev/null +++ b/lib/plaid/models/identity_verification_request_user.rb @@ -0,0 +1,338 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # User information collected outside of Link, most likely via your own onboarding process. Each of the following identity fields are optional: `email_address` `phone_number` `date_of_birth` `name` `address` `id_number` Specifically, these fields are optional in that they can either be fully provided (satisfying every required field in their subschema) or omitted from the request entirely by not providing the key or value. Providing these fields via the API will result in Link skipping the data collection process for the associated user. All verification steps enabled in the associated Identity Verification Template will still be run. Verification steps will either be run immediately, or once the user completes the `accept_tos` step, depending on the value provided to the `consent` field. + 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 + + attr_accessor :email_address + + # A phone number in E.164 format. + attr_accessor :phone_number + + # A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). + attr_accessor :date_of_birth + + attr_accessor :name + + attr_accessor :address + + attr_accessor :id_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_user_id' => :'client_user_id', + :'email_address' => :'email_address', + :'phone_number' => :'phone_number', + :'date_of_birth' => :'date_of_birth', + :'name' => :'name', + :'address' => :'address', + :'id_number' => :'id_number' + } + 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_user_id' => :'String', + :'email_address' => :'String', + :'phone_number' => :'String', + :'date_of_birth' => :'Date', + :'name' => :'UserName', + :'address' => :'UserAddress', + :'id_number' => :'UserIDNumber' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'email_address', + :'phone_number', + :'date_of_birth', + :'name', + :'address', + :'id_number' + ]) + 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::IdentityVerificationRequestUser` 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::IdentityVerificationRequestUser`. 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_user_id') + self.client_user_id = attributes[:'client_user_id'] + end + + if attributes.key?(:'email_address') + self.email_address = attributes[:'email_address'] + end + + if attributes.key?(:'phone_number') + self.phone_number = attributes[:'phone_number'] + end + + if attributes.key?(:'date_of_birth') + self.date_of_birth = attributes[:'date_of_birth'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'id_number') + self.id_number = attributes[:'id_number'] + 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 @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 + + 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 + + # 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_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 + + # 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 + + 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) + return true if self.equal?(o) + self.class == o.class && + client_user_id == o.client_user_id && + email_address == o.email_address && + phone_number == o.phone_number && + date_of_birth == o.date_of_birth && + name == o.name && + address == o.address && + id_number == o.id_number + 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_user_id, email_address, phone_number, date_of_birth, name, address, id_number].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_retried_webhook.rb b/lib/plaid/models/identity_verification_retried_webhook.rb new file mode 100644 index 000000000..4421d59da --- /dev/null +++ b/lib/plaid/models/identity_verification_retried_webhook.rb @@ -0,0 +1,251 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Fired when identity verification has been retried, which can be triggered via the dashboard or the API. + class IdentityVerificationRetriedWebhook + # `IDENTITY_VERIFICATION` + attr_accessor :webhook_type + + # `RETRIED` + attr_accessor :webhook_code + + # The ID of the associated Identity Verification attempt. + attr_accessor :identity_verification_id + + # 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' + } + 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 + { + :'webhook_type' => :'String', + :'webhook_code' => :'String', + :'identity_verification_id' => :'AnyType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'identity_verification_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::IdentityVerificationRetriedWebhook` 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::IdentityVerificationRetriedWebhook`. 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?(:'webhook_type') + self.webhook_type = attributes[:'webhook_type'] + end + + if attributes.key?(:'webhook_code') + self.webhook_code = attributes[:'webhook_code'] + end + + if attributes.key?(:'identity_verification_id') + self.identity_verification_id = attributes[:'identity_verification_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 @webhook_type.nil? + invalid_properties.push('invalid value for "webhook_type", webhook_type cannot be nil.') + end + + if @webhook_code.nil? + invalid_properties.push('invalid value for "webhook_code", webhook_code 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 @webhook_type.nil? + return false if @webhook_code.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 && + webhook_type == o.webhook_type && + webhook_code == o.webhook_code && + identity_verification_id == o.identity_verification_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 + [webhook_type, webhook_code, identity_verification_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_retry_request.rb b/lib/plaid/models/identity_verification_retry_request.rb new file mode 100644 index 000000000..1c3e4c0a6 --- /dev/null +++ b/lib/plaid/models/identity_verification_retry_request.rb @@ -0,0 +1,316 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for retrying a identity verification attempt + class IdentityVerificationRetryRequest + # 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 + + # ID of the associated Identity Verification template. + attr_accessor :template_id + + attr_accessor :strategy + + attr_accessor :steps + + # 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 + { + :'client_user_id' => :'client_user_id', + :'template_id' => :'template_id', + :'strategy' => :'strategy', + :'steps' => :'steps', + :'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 + { + :'client_user_id' => :'String', + :'template_id' => :'String', + :'strategy' => :'Strategy', + :'steps' => :'IdentityVerificationRetryRequestStepsObject', + :'client_id' => :'String', + :'secret' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'steps', + ]) + 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::IdentityVerificationRetryRequest` 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::IdentityVerificationRetryRequest`. 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_user_id') + self.client_user_id = attributes[:'client_user_id'] + end + + if attributes.key?(:'template_id') + self.template_id = attributes[:'template_id'] + end + + if attributes.key?(:'strategy') + self.strategy = attributes[:'strategy'] + end + + if attributes.key?(:'steps') + self.steps = attributes[:'steps'] + 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 @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 + + 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.') + end + + if @strategy.nil? + invalid_properties.push('invalid value for "strategy", strategy 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_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 + 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 + + 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 + + # 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_user_id == o.client_user_id && + template_id == o.template_id && + strategy == o.strategy && + steps == o.steps && + 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 + [client_user_id, template_id, strategy, steps, 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/identity_verification_retry_request_steps_object.rb b/lib/plaid/models/identity_verification_retry_request_steps_object.rb new file mode 100644 index 000000000..0cbd91a10 --- /dev/null +++ b/lib/plaid/models/identity_verification_retry_request_steps_object.rb @@ -0,0 +1,270 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Instructions for the `custom` retry strategy specifying which steps should be required or skipped. Note: This field must be provided when the retry strategy is `custom` and must be omitted otherwise. Custom retries override settings in your Plaid Template. For example, if your Plaid Template has `verify_sms` disabled, a custom retry with `verify_sms` enabled will still require the step. The `selfie_check` step is currently not supported on the sandbox server. Sandbox requests will silently disable the `selfie_check` step when provided. + class IdentityVerificationRetryRequestStepsObject + # A boolean field specifying whether the new session should require or skip the `verify_sms` step. + attr_accessor :verify_sms + + # A boolean field specifying whether the new session should require or skip the `kyc_check` step. + attr_accessor :kyc_check + + # A boolean field specifying whether the new session should require or skip the `documentary_verification` step. + attr_accessor :documentary_verification + + # A boolean field specifying whether the new session should require or skip the `selfie_check` step. + attr_accessor :selfie_check + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'verify_sms' => :'verify_sms', + :'kyc_check' => :'kyc_check', + :'documentary_verification' => :'documentary_verification', + :'selfie_check' => :'selfie_check' + } + 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 + { + :'verify_sms' => :'Boolean', + :'kyc_check' => :'Boolean', + :'documentary_verification' => :'Boolean', + :'selfie_check' => :'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::IdentityVerificationRetryRequestStepsObject` 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::IdentityVerificationRetryRequestStepsObject`. 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?(:'verify_sms') + self.verify_sms = attributes[:'verify_sms'] + end + + if attributes.key?(:'kyc_check') + self.kyc_check = attributes[:'kyc_check'] + end + + if attributes.key?(:'documentary_verification') + self.documentary_verification = attributes[:'documentary_verification'] + end + + if attributes.key?(:'selfie_check') + self.selfie_check = attributes[:'selfie_check'] + 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 @verify_sms.nil? + invalid_properties.push('invalid value for "verify_sms", verify_sms cannot be nil.') + end + + if @kyc_check.nil? + invalid_properties.push('invalid value for "kyc_check", kyc_check cannot be nil.') + end + + if @documentary_verification.nil? + invalid_properties.push('invalid value for "documentary_verification", documentary_verification cannot be nil.') + end + + if @selfie_check.nil? + invalid_properties.push('invalid value for "selfie_check", selfie_check 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 @verify_sms.nil? + return false if @kyc_check.nil? + return false if @documentary_verification.nil? + return false if @selfie_check.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 && + verify_sms == o.verify_sms && + kyc_check == o.kyc_check && + documentary_verification == o.documentary_verification && + selfie_check == o.selfie_check + 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 + [verify_sms, kyc_check, documentary_verification, selfie_check].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 new file mode 100644 index 000000000..fa8037442 --- /dev/null +++ b/lib/plaid/models/identity_verification_status.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class IdentityVerificationStatus + ACTIVE = "active".freeze + SUCCESS = "success".freeze + FAILED = "failed".freeze + EXPIRED = "expired".freeze + CANCELED = "canceled".freeze + PENDING_REVIEW = "pending_review".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/identity_verification_status_updated_webhook.rb b/lib/plaid/models/identity_verification_status_updated_webhook.rb new file mode 100644 index 000000000..08c090dc9 --- /dev/null +++ b/lib/plaid/models/identity_verification_status_updated_webhook.rb @@ -0,0 +1,251 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Fired when the status of an identity verification has been updated, which can be triggered via the dashboard or the API. + class IdentityVerificationStatusUpdatedWebhook + # `IDENTITY_VERIFICATION` + attr_accessor :webhook_type + + # `STATUS_UPDATED` + attr_accessor :webhook_code + + # The ID of the associated Identity Verification attempt. + attr_accessor :identity_verification_id + + # 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' + } + 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 + { + :'webhook_type' => :'String', + :'webhook_code' => :'String', + :'identity_verification_id' => :'AnyType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'identity_verification_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::IdentityVerificationStatusUpdatedWebhook` 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::IdentityVerificationStatusUpdatedWebhook`. 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?(:'webhook_type') + self.webhook_type = attributes[:'webhook_type'] + end + + if attributes.key?(:'webhook_code') + self.webhook_code = attributes[:'webhook_code'] + end + + if attributes.key?(:'identity_verification_id') + self.identity_verification_id = attributes[:'identity_verification_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 @webhook_type.nil? + invalid_properties.push('invalid value for "webhook_type", webhook_type cannot be nil.') + end + + if @webhook_code.nil? + invalid_properties.push('invalid value for "webhook_code", webhook_code 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 @webhook_type.nil? + return false if @webhook_code.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 && + webhook_type == o.webhook_type && + webhook_code == o.webhook_code && + identity_verification_id == o.identity_verification_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 + [webhook_type, webhook_code, identity_verification_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_step_status.rb b/lib/plaid/models/identity_verification_step_status.rb new file mode 100644 index 000000000..b3114e774 --- /dev/null +++ b/lib/plaid/models/identity_verification_step_status.rb @@ -0,0 +1,48 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class IdentityVerificationStepStatus + SUCCESS = "success".freeze + ACTIVE = "active".freeze + FAILED = "failed".freeze + WAITING_FOR_PREREQUISITE = "waiting_for_prerequisite".freeze + NOT_APPLICABLE = "not_applicable".freeze + SKIPPED = "skipped".freeze + EXPIRED = "expired".freeze + CANCELED = "canceled".freeze + PENDING_REVIEW = "pending_review".freeze + MANUALLY_APPROVED = "manually_approved".freeze + MANUALLY_REJECTED = "manually_rejected".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/identity_verification_step_summary.rb b/lib/plaid/models/identity_verification_step_summary.rb new file mode 100644 index 000000000..0e14b5a40 --- /dev/null +++ b/lib/plaid/models/identity_verification_step_summary.rb @@ -0,0 +1,308 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Each step will be one of the following values: `active` - This step is the user's current step. They are either in the process of completing this step, or they recently closed their Identity Verification attempt while in the middle of this step. Only one step will be marked as `active` at any given point. `success` - The Identity Verification attempt has completed this step. `failed` - The user failed this step. This can either call the user to fail the session as a whole, or cause them to fallback to another step depending on how the Identity Verification template is configured. A failed step does not imply a failed session. `waiting_for_prerequisite` - The user needs to complete another step first, before they progress to this step. This step may never run, depending on if the user fails an earlier step or if the step is only run as a fallback. `not_applicable` - This step will not be run for this session. `skipped` - The retry instructions that created this Identity Verification attempt specified that this step should be skipped. `expired` - This step had not yet been completed when the Identity Verification attempt as a whole expired. `canceled` - The Identity Verification attempt was canceled before the user completed this step. `pending_review` - The Identity Verification attempt template was configured to perform a screening that had one or more hits needing review. `manually_approved` - The step was manually overridden to pass by a team member in the dashboard. `manually_rejected` - The step was manually overridden to fail by a team member in the dashboard. + class IdentityVerificationStepSummary + attr_accessor :accept_tos + + attr_accessor :verify_sms + + attr_accessor :kyc_check + + attr_accessor :documentary_verification + + attr_accessor :selfie_check + + attr_accessor :watchlist_screening + + attr_accessor :risk_check + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'accept_tos' => :'accept_tos', + :'verify_sms' => :'verify_sms', + :'kyc_check' => :'kyc_check', + :'documentary_verification' => :'documentary_verification', + :'selfie_check' => :'selfie_check', + :'watchlist_screening' => :'watchlist_screening', + :'risk_check' => :'risk_check' + } + 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 + { + :'accept_tos' => :'IdentityVerificationStepStatus', + :'verify_sms' => :'IdentityVerificationStepStatus', + :'kyc_check' => :'IdentityVerificationStepStatus', + :'documentary_verification' => :'IdentityVerificationStepStatus', + :'selfie_check' => :'IdentityVerificationStepStatus', + :'watchlist_screening' => :'IdentityVerificationStepStatus', + :'risk_check' => :'IdentityVerificationStepStatus' + } + 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::IdentityVerificationStepSummary` 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::IdentityVerificationStepSummary`. 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?(:'accept_tos') + self.accept_tos = attributes[:'accept_tos'] + end + + if attributes.key?(:'verify_sms') + self.verify_sms = attributes[:'verify_sms'] + end + + if attributes.key?(:'kyc_check') + self.kyc_check = attributes[:'kyc_check'] + end + + if attributes.key?(:'documentary_verification') + self.documentary_verification = attributes[:'documentary_verification'] + end + + if attributes.key?(:'selfie_check') + self.selfie_check = attributes[:'selfie_check'] + end + + if attributes.key?(:'watchlist_screening') + self.watchlist_screening = attributes[:'watchlist_screening'] + end + + if attributes.key?(:'risk_check') + self.risk_check = attributes[:'risk_check'] + 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 @accept_tos.nil? + invalid_properties.push('invalid value for "accept_tos", accept_tos cannot be nil.') + end + + if @verify_sms.nil? + invalid_properties.push('invalid value for "verify_sms", verify_sms cannot be nil.') + end + + if @kyc_check.nil? + invalid_properties.push('invalid value for "kyc_check", kyc_check cannot be nil.') + end + + if @documentary_verification.nil? + invalid_properties.push('invalid value for "documentary_verification", documentary_verification cannot be nil.') + end + + if @selfie_check.nil? + invalid_properties.push('invalid value for "selfie_check", selfie_check cannot be nil.') + end + + if @watchlist_screening.nil? + invalid_properties.push('invalid value for "watchlist_screening", watchlist_screening cannot be nil.') + end + + if @risk_check.nil? + invalid_properties.push('invalid value for "risk_check", risk_check 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 @accept_tos.nil? + return false if @verify_sms.nil? + return false if @kyc_check.nil? + return false if @documentary_verification.nil? + return false if @selfie_check.nil? + return false if @watchlist_screening.nil? + return false if @risk_check.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 && + accept_tos == o.accept_tos && + verify_sms == o.verify_sms && + kyc_check == o.kyc_check && + documentary_verification == o.documentary_verification && + selfie_check == o.selfie_check && + watchlist_screening == o.watchlist_screening && + risk_check == o.risk_check + 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 + [accept_tos, verify_sms, kyc_check, documentary_verification, selfie_check, watchlist_screening, risk_check].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_step_updated_webhook.rb b/lib/plaid/models/identity_verification_step_updated_webhook.rb new file mode 100644 index 000000000..5da9d9c9e --- /dev/null +++ b/lib/plaid/models/identity_verification_step_updated_webhook.rb @@ -0,0 +1,251 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Fired when an end user has completed a step of the Identity Verification process. + class IdentityVerificationStepUpdatedWebhook + # `IDENTITY_VERIFCATION` + attr_accessor :webhook_type + + # `STEP_UPDATED` + attr_accessor :webhook_code + + # The ID of the associated Identity Verification attempt. + attr_accessor :identity_verification_id + + # 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' + } + 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 + { + :'webhook_type' => :'String', + :'webhook_code' => :'String', + :'identity_verification_id' => :'AnyType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'identity_verification_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::IdentityVerificationStepUpdatedWebhook` 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::IdentityVerificationStepUpdatedWebhook`. 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?(:'webhook_type') + self.webhook_type = attributes[:'webhook_type'] + end + + if attributes.key?(:'webhook_code') + self.webhook_code = attributes[:'webhook_code'] + end + + if attributes.key?(:'identity_verification_id') + self.identity_verification_id = attributes[:'identity_verification_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 @webhook_type.nil? + invalid_properties.push('invalid value for "webhook_type", webhook_type cannot be nil.') + end + + if @webhook_code.nil? + invalid_properties.push('invalid value for "webhook_code", webhook_code 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 @webhook_type.nil? + return false if @webhook_code.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 && + webhook_type == o.webhook_type && + webhook_code == o.webhook_code && + identity_verification_id == o.identity_verification_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 + [webhook_type, webhook_code, identity_verification_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_template_reference.rb b/lib/plaid/models/identity_verification_template_reference.rb new file mode 100644 index 000000000..6c78f6cb5 --- /dev/null +++ b/lib/plaid/models/identity_verification_template_reference.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The resource ID and version number of the template configuring the behavior of a given identity verification. + class IdentityVerificationTemplateReference + # ID of the associated Identity Verification template. + attr_accessor :id + + # Version of the associated Identity Verification template. + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'version' => :'version' + } + 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', + :'version' => :'Float' + } + 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::IdentityVerificationTemplateReference` 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::IdentityVerificationTemplateReference`. 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?(:'version') + self.version = attributes[:'version'] + 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 @version.nil? + invalid_properties.push('invalid value for "version", version 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 @version.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 && + id == o.id && + version == o.version + 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, version].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_user_address.rb b/lib/plaid/models/identity_verification_user_address.rb new file mode 100644 index 000000000..0d24aacd1 --- /dev/null +++ b/lib/plaid/models/identity_verification_user_address.rb @@ -0,0 +1,308 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +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 + class IdentityVerificationUserAddress + attr_accessor :street + + # Extra street information, like an apartment or suite number. + attr_accessor :street2 + + attr_accessor :city + + attr_accessor :region + + 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. + attr_accessor :country + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'street' => :'street', + :'street2' => :'street2', + :'city' => :'city', + :'region' => :'region', + :'postal_code' => :'postal_code', + :'country' => :'country' + } + 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 + { + :'street' => :'String', + :'street2' => :'String', + :'city' => :'String', + :'region' => :'String', + :'postal_code' => :'String', + :'country' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'street', + :'street2', + :'city', + :'region', + :'postal_code', + ]) + 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::IdentityVerificationUserAddress` 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::IdentityVerificationUserAddress`. 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?(:'street') + self.street = attributes[:'street'] + end + + if attributes.key?(:'street2') + self.street2 = attributes[:'street2'] + end + + if attributes.key?(:'city') + self.city = attributes[:'city'] + 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') + self.country = attributes[:'country'] + 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 @country.nil? + invalid_properties.push('invalid value for "country", country cannot be nil.') + 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 + + 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 + + # 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 @country.nil? + return false if @country.to_s.length < 2 + return false if @country !~ Regexp.new(/^[A-Z]{2}$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] country Value to be assigned + def country=(country) + if country.nil? + fail ArgumentError, 'country cannot be nil' + end + + if country.to_s.length < 2 + 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 + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + street == o.street && + street2 == o.street2 && + city == o.city && + region == o.region && + postal_code == o.postal_code && + country == o.country + 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 + [street, street2, city, region, postal_code, country].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_user_data.rb b/lib/plaid/models/identity_verification_user_data.rb new file mode 100644 index 000000000..0a6f330b3 --- /dev/null +++ b/lib/plaid/models/identity_verification_user_data.rb @@ -0,0 +1,302 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The identity data that was either collected from the user or provided via API in order to perform an identity verification. + class IdentityVerificationUserData + # A phone number in E.164 format. + attr_accessor :phone_number + + # A date in the format YYYY-MM-DD (RFC 3339 Section 5.6). + attr_accessor :date_of_birth + + # An IPv4 or IPV6 address. + attr_accessor :ip_address + + attr_accessor :email_address + + attr_accessor :name + + attr_accessor :address + + attr_accessor :id_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'phone_number' => :'phone_number', + :'date_of_birth' => :'date_of_birth', + :'ip_address' => :'ip_address', + :'email_address' => :'email_address', + :'name' => :'name', + :'address' => :'address', + :'id_number' => :'id_number' + } + 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 + { + :'phone_number' => :'String', + :'date_of_birth' => :'Date', + :'ip_address' => :'String', + :'email_address' => :'String', + :'name' => :'UserName', + :'address' => :'IdentityVerificationUserAddress', + :'id_number' => :'UserIDNumber' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'phone_number', + :'date_of_birth', + :'ip_address', + :'email_address', + :'name', + :'address', + :'id_number' + ]) + 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::IdentityVerificationUserData` 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::IdentityVerificationUserData`. 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?(:'phone_number') + self.phone_number = attributes[:'phone_number'] + end + + if attributes.key?(:'date_of_birth') + self.date_of_birth = attributes[:'date_of_birth'] + end + + if attributes.key?(:'ip_address') + self.ip_address = attributes[:'ip_address'] + end + + if attributes.key?(:'email_address') + self.email_address = attributes[:'email_address'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'id_number') + self.id_number = attributes[:'id_number'] + 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(/^\+[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) + return true if self.equal?(o) + self.class == o.class && + phone_number == o.phone_number && + date_of_birth == o.date_of_birth && + ip_address == o.ip_address && + email_address == o.email_address && + name == o.name && + address == o.address && + id_number == o.id_number + 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 + [phone_number, date_of_birth, ip_address, email_address, name, address, id_number].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/image_quality.rb b/lib/plaid/models/image_quality.rb new file mode 100644 index 000000000..bf964ccf2 --- /dev/null +++ b/lib/plaid/models/image_quality.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class ImageQuality + 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/incident_update.rb b/lib/plaid/models/incident_update.rb index 909c255d8..f5efc0f66 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e4ed24238..7b740a351 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 09a9fe3ed..1c31fa22b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 50d3b90a9..aa2ca18a0 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e0a1489ce..4998e1809 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 58e596f78..ba442e3a9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b1716e7e1..c6d558f70 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 90d0b2aa5..2453a99ae 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 dbaf2cd47..41fd8d49a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 dd9ebd68d..f33ccec69 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e2ce6158a..85ea37cca 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f1041c0b8..72d9db307 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 95250a6f5..b48dc4547 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 5a40cbf26..f9421efbc 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 61f6cdd4e..00a4caf8f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e5f8141a7..98fa63367 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 667efeb58..0fe09b95d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 992d06de2..0e7dc133c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 836420d24..7d2b2cd5a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_precheck_request.rb b/lib/plaid/models/income_verification_precheck_request.rb index fd09423cf..8643451aa 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/income_verification_precheck_response.rb b/lib/plaid/models/income_verification_precheck_response.rb index 34460014f..711b3e095 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d1598b1e1..af7e67bfc 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 73607fa96..4872f206d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 21fcefb45..e9f5c8e5c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ee382396e..43677fc9d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 616165bab..177a262c1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,6 +25,9 @@ class IncomeVerificationStatusWebhook # The Item ID associated with the verification. attr_accessor :item_id + # The Plaid `user_id` of the User associated with this webhook, warning, or error. + attr_accessor :user_id + # `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 @@ -34,6 +37,7 @@ def self.attribute_map :'webhook_type' => :'webhook_type', :'webhook_code' => :'webhook_code', :'item_id' => :'item_id', + :'user_id' => :'user_id', :'verification_status' => :'verification_status' } end @@ -49,6 +53,7 @@ def self.openapi_types :'webhook_type' => :'String', :'webhook_code' => :'String', :'item_id' => :'String', + :'user_id' => :'String', :'verification_status' => :'String' } end @@ -86,6 +91,10 @@ def initialize(attributes = {}) self.item_id = attributes[:'item_id'] end + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + if attributes.key?(:'verification_status') self.verification_status = attributes[:'verification_status'] end @@ -132,6 +141,7 @@ def ==(o) webhook_type == o.webhook_type && webhook_code == o.webhook_code && item_id == o.item_id && + user_id == o.user_id && verification_status == o.verification_status end @@ -144,7 +154,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [webhook_type, webhook_code, item_id, verification_status].hash + [webhook_type, webhook_code, item_id, user_id, verification_status].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 b08826240..e4d2ac19f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 088cf6fe6..42827cd2c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8252de4b0..6632b5435 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/individual_screening_hit_names.rb b/lib/plaid/models/individual_screening_hit_names.rb new file mode 100644 index 000000000..a61557fdb --- /dev/null +++ b/lib/plaid/models/individual_screening_hit_names.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Name information for the associated individual watchlist hit + class IndividualScreeningHitNames + # The full name of the individual, including all parts. + attr_accessor :full + + # Primary names are those most commonly used to refer to this person. Only one name will ever be marked as primary. + attr_accessor :primary + + attr_accessor :weak_alias_determination + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'full' => :'full', + :'primary' => :'primary', + :'weak_alias_determination' => :'weak_alias_determination' + } + 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' => :'String', + :'primary' => :'Boolean', + :'weak_alias_determination' => :'WeakAliasDetermination' + } + 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::IndividualScreeningHitNames` 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::IndividualScreeningHitNames`. 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') + self.full = attributes[:'full'] + end + + if attributes.key?(:'primary') + self.primary = attributes[:'primary'] + end + + if attributes.key?(:'weak_alias_determination') + self.weak_alias_determination = attributes[:'weak_alias_determination'] + 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.nil? + invalid_properties.push('invalid value for "full", full cannot be nil.') + end + + if @primary.nil? + invalid_properties.push('invalid value for "primary", primary cannot be nil.') + end + + if @weak_alias_determination.nil? + invalid_properties.push('invalid value for "weak_alias_determination", weak_alias_determination 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.nil? + return false if @primary.nil? + return false if @weak_alias_determination.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 == o.full && + primary == o.primary && + weak_alias_determination == o.weak_alias_determination + 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, primary, weak_alias_determination].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_watchlist_code.rb b/lib/plaid/models/individual_watchlist_code.rb new file mode 100644 index 000000000..e53c0ac42 --- /dev/null +++ b/lib/plaid/models/individual_watchlist_code.rb @@ -0,0 +1,59 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class IndividualWatchlistCode + AU_CON = "AU_CON".freeze + CA_CON = "CA_CON".freeze + EU_CON = "EU_CON".freeze + IZ_CIA = "IZ_CIA".freeze + IZ_IPL = "IZ_IPL".freeze + IZ_PEP = "IZ_PEP".freeze + IZ_UNC = "IZ_UNC".freeze + UK_HMC = "UK_HMC".freeze + US_DPL = "US_DPL".freeze + US_DTC = "US_DTC".freeze + US_FBI = "US_FBI".freeze + US_FSE = "US_FSE".freeze + US_ISN = "US_ISN".freeze + US_MBC = "US_MBC".freeze + US_PLC = "US_PLC".freeze + US_SDN = "US_SDN".freeze + US_SSI = "US_SSI".freeze + SG_SOF = "SG_SOF".freeze + TR_TWL = "TR_TWL".freeze + TR_DFD = "TR_DFD".freeze + TR_FOR = "TR_FOR".freeze + TR_WMD = "TR_WMD".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/individual_watchlist_program.rb b/lib/plaid/models/individual_watchlist_program.rb new file mode 100644 index 000000000..062c2b340 --- /dev/null +++ b/lib/plaid/models/individual_watchlist_program.rb @@ -0,0 +1,374 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # A program that configures the active lists, search parameters, and other behavior for initial and ongoing screening of individuals. + class IndividualWatchlistProgram + # ID of the associated program. + attr_accessor :id + + # An ISO8601 formatted timestamp. + attr_accessor :created_at + + # Indicator specifying whether the program is enabled and can be used to screen customers. + attr_accessor :enabled + + # Watchlists enabled for the associated program + attr_accessor :lists_enabled + + # A name for the program to define its purpose. For example, \"High Risk Individuals\", \"US Cardholders\", or \"Applicants\". + attr_accessor :name + + attr_accessor :name_sensitivity + + attr_accessor :audit_trail + + # Archived programs are read-only and cannot screen new customers nor participate in ongoing monitoring. + attr_accessor :archived + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'created_at' => :'created_at', + :'enabled' => :'enabled', + :'lists_enabled' => :'lists_enabled', + :'name' => :'name', + :'name_sensitivity' => :'name_sensitivity', + :'audit_trail' => :'audit_trail', + :'archived' => :'archived' + } + 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', + :'created_at' => :'Time', + :'enabled' => :'Boolean', + :'lists_enabled' => :'Array', + :'name' => :'String', + :'name_sensitivity' => :'ProgramNameSensitivity', + :'audit_trail' => :'WatchlistScreeningAuditTrail', + :'archived' => :'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::IndividualWatchlistProgram` 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::IndividualWatchlistProgram`. 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?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'lists_enabled') + if (value = attributes[:'lists_enabled']).is_a?(Array) + self.lists_enabled = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'name_sensitivity') + self.name_sensitivity = attributes[:'name_sensitivity'] + end + + if attributes.key?(:'audit_trail') + self.audit_trail = attributes[:'audit_trail'] + end + + if attributes.key?(:'archived') + self.archived = attributes[:'archived'] + 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 @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @enabled.nil? + invalid_properties.push('invalid value for "enabled", enabled cannot be nil.') + end + + if @lists_enabled.nil? + invalid_properties.push('invalid value for "lists_enabled", lists_enabled cannot be nil.') + end + + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @name.to_s.length < 1 + 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.') + end + + if @audit_trail.nil? + invalid_properties.push('invalid value for "audit_trail", audit_trail cannot be nil.') + end + + if @archived.nil? + invalid_properties.push('invalid value for "archived", archived 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 @created_at.nil? + return false if @enabled.nil? + 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 @archived.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] lists_enabled Value to be assigned + def lists_enabled=(lists_enabled) + if lists_enabled.nil? + fail ArgumentError, 'lists_enabled cannot be nil' + end + + + @lists_enabled = lists_enabled + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + if name.to_s.length < 1 + 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 + + # 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 && + created_at == o.created_at && + enabled == o.enabled && + lists_enabled == o.lists_enabled && + name == o.name && + name_sensitivity == o.name_sensitivity && + audit_trail == o.audit_trail && + archived == o.archived + 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, created_at, enabled, lists_enabled, name, name_sensitivity, audit_trail, archived].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_watchlist_program_list.rb b/lib/plaid/models/individual_watchlist_program_list.rb new file mode 100644 index 000000000..8310ae6bf --- /dev/null +++ b/lib/plaid/models/individual_watchlist_program_list.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # List of individual watchlist screening programs + class IndividualWatchlistProgramList + # List of individual watchlist screening programs + attr_accessor :individual_watchlist_programs + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'individual_watchlist_programs' => :'individual_watchlist_programs' + } + 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_watchlist_programs' => :'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::IndividualWatchlistProgramList` 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::IndividualWatchlistProgramList`. 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_watchlist_programs') + if (value = attributes[:'individual_watchlist_programs']).is_a?(Array) + self.individual_watchlist_programs = 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 @individual_watchlist_programs.nil? + invalid_properties.push('invalid value for "individual_watchlist_programs", individual_watchlist_programs 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_watchlist_programs.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_watchlist_programs == o.individual_watchlist_programs + 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_watchlist_programs].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/inflow_model.rb b/lib/plaid/models/inflow_model.rb index 7cf69d2b6..0f4a42e6f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6f0327317..bd38cbf5a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/institution.rb b/lib/plaid/models/institution.rb index 5cb7b9a12..5e0ab6e9b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 71a10885c..ea6ccbde5 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 294986723..c43c808fc 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 3648c184c..f75144daa 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 59b3c44f8..c526bbf1a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8c98a510c..e87bbdf59 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6a124cd3e..4c488e29a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 cdfeaf425..8a4afdf42 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8448d63f4..e3c78a927 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ab9e555d5..43e0a8912 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 0bcc43245..e5386b7a3 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 7ddfc8fb4..ee7e1dec7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 63d283343..4cb57954b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 95d683738..fa84750d9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6379cc28f..ef9254a04 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a3115cccc..c621da898 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f26a7a863..90af06186 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 7d07df29a..cd995566f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8c9222b26..6f6e23fd8 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 c770e1e70..5d4184de3 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/investments_holdings_get_request.rb b/lib/plaid/models/investments_holdings_get_request.rb index f559fef76..305caf19f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 429d06fc3..a492540ca 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b788f7c19..bf20fa87c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 48fca4e26..b8807dc31 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 3db3ea410..52936982b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6f6557d6e..ff93fdc3c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..9a20b8e25 --- /dev/null +++ b/lib/plaid/models/issuing_country.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class IssuingCountry + MATCH = "match".freeze + NO_MATCH = "no_match".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/item.rb b/lib/plaid/models/item.rb index d61f984e1..3db83af5a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d8951fc8c..f76c19dc6 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6fcf21f6e..fe8a4b5d4 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 9a5ab2ea3..fd49b2f1e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b8e133db5..05bb6207d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 4e99ad384..1b43c80f0 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 fe423dbf7..e471f5aed 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 c80448d1a..b084720de 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 3cef90aa9..96ebd7e44 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_get_request.rb b/lib/plaid/models/item_get_request.rb index 045dc9ada..6efaeeefe 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 3c92c3c97..2d87d045e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e05188920..e30f8551b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6ef218c21..eef5ba1cb 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 882f7d650..f0b04e747 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 3c7da6489..cce904a8d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 3432a5ee3..e4743a18d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/item_public_token_create_request.rb b/lib/plaid/models/item_public_token_create_request.rb index c12cbae55..49587991e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a3cce3ba2..e55e60a24 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a95b95bfe..0270e6e10 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 fe22a6d61..6bf364e5f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 57931e975..195e25c36 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 92fcce6a9..b02e953fe 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a405c0a6b..fd02320e8 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 45b9f9421..dc7e5b5e1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 54132a83d..da6a22150 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 95675d519..df791a037 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 592eb6363..9e110840b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 72e397a1f..bd4764d9f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 dd2063114..927197b18 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 357830889..5ccf5368a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e2d7c3e60..307722dc9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..843d497c9 --- /dev/null +++ b/lib/plaid/models/kyc_check_address_summary.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Result summary object specifying how the `address` field matched. + class KYCCheckAddressSummary + attr_accessor :summary + + attr_accessor :po_box + + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'summary' => :'summary', + :'po_box' => :'po_box', + :'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 + { + :'summary' => :'MatchSummaryCode', + :'po_box' => :'POBoxStatus', + :'type' => :'AddressPurposeLabel' + } + 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::KYCCheckAddressSummary` 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::KYCCheckAddressSummary`. 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?(:'summary') + self.summary = attributes[:'summary'] + end + + if attributes.key?(:'po_box') + self.po_box = attributes[:'po_box'] + 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 @summary.nil? + invalid_properties.push('invalid value for "summary", summary cannot be nil.') + end + + if @po_box.nil? + invalid_properties.push('invalid value for "po_box", po_box 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 @summary.nil? + return false if @po_box.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 && + summary == o.summary && + po_box == o.po_box && + 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 + [summary, po_box, 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/kyc_check_date_of_birth_summary.rb b/lib/plaid/models/kyc_check_date_of_birth_summary.rb new file mode 100644 index 000000000..0048391c6 --- /dev/null +++ b/lib/plaid/models/kyc_check_date_of_birth_summary.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Result summary object specifying how the `date_of_birth` field matched. + class KYCCheckDateOfBirthSummary + attr_accessor :summary + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'summary' => :'summary' + } + 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 + { + :'summary' => :'MatchSummaryCode' + } + 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::KYCCheckDateOfBirthSummary` 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::KYCCheckDateOfBirthSummary`. 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?(:'summary') + self.summary = attributes[:'summary'] + 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 @summary.nil? + invalid_properties.push('invalid value for "summary", summary 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 @summary.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 && + summary == o.summary + 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 + [summary].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/kyc_check_details.rb b/lib/plaid/models/kyc_check_details.rb new file mode 100644 index 000000000..10301b91e --- /dev/null +++ b/lib/plaid/models/kyc_check_details.rb @@ -0,0 +1,295 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The outcome of the `kyc_check` step. + 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 + + attr_accessor :address + + attr_accessor :name + + attr_accessor :date_of_birth + + attr_accessor :id_number + + attr_accessor :phone_number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'address' => :'address', + :'name' => :'name', + :'date_of_birth' => :'date_of_birth', + :'id_number' => :'id_number', + :'phone_number' => :'phone_number' + } + 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' => :'String', + :'address' => :'KYCCheckAddressSummary', + :'name' => :'KYCCheckNameSummary', + :'date_of_birth' => :'KYCCheckDateOfBirthSummary', + :'id_number' => :'KYCCheckIDNumberSummary', + :'phone_number' => :'KYCCheckPhoneSummary' + } + 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::KYCCheckDetails` 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::KYCCheckDetails`. 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?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'date_of_birth') + self.date_of_birth = attributes[:'date_of_birth'] + end + + if attributes.key?(:'id_number') + self.id_number = attributes[:'id_number'] + end + + if attributes.key?(:'phone_number') + self.phone_number = attributes[:'phone_number'] + 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 @address.nil? + invalid_properties.push('invalid value for "address", address cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @date_of_birth.nil? + invalid_properties.push('invalid value for "date_of_birth", date_of_birth cannot be nil.') + end + + if @id_number.nil? + invalid_properties.push('invalid value for "id_number", id_number cannot be nil.') + end + + if @phone_number.nil? + invalid_properties.push('invalid value for "phone_number", phone_number 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 @address.nil? + return false if @name.nil? + return false if @date_of_birth.nil? + return false if @id_number.nil? + return false if @phone_number.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 && + address == o.address && + name == o.name && + date_of_birth == o.date_of_birth && + id_number == o.id_number && + phone_number == o.phone_number + 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, address, name, date_of_birth, id_number, phone_number].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/kyc_check_id_number_summary.rb b/lib/plaid/models/kyc_check_id_number_summary.rb new file mode 100644 index 000000000..2538193d8 --- /dev/null +++ b/lib/plaid/models/kyc_check_id_number_summary.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Result summary object specifying how the `id_number` field matched. + class KYCCheckIDNumberSummary + attr_accessor :summary + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'summary' => :'summary' + } + 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 + { + :'summary' => :'MatchSummaryCode' + } + 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::KYCCheckIDNumberSummary` 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::KYCCheckIDNumberSummary`. 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?(:'summary') + self.summary = attributes[:'summary'] + 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 @summary.nil? + invalid_properties.push('invalid value for "summary", summary 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 @summary.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 && + summary == o.summary + 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 + [summary].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/kyc_check_name_summary.rb b/lib/plaid/models/kyc_check_name_summary.rb new file mode 100644 index 000000000..360c9e16b --- /dev/null +++ b/lib/plaid/models/kyc_check_name_summary.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Result summary object specifying how the `name` field matched. + class KYCCheckNameSummary + attr_accessor :summary + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'summary' => :'summary' + } + 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 + { + :'summary' => :'MatchSummaryCode' + } + 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::KYCCheckNameSummary` 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::KYCCheckNameSummary`. 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?(:'summary') + self.summary = attributes[:'summary'] + 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 @summary.nil? + invalid_properties.push('invalid value for "summary", summary 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 @summary.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 && + summary == o.summary + 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 + [summary].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/kyc_check_phone_summary.rb b/lib/plaid/models/kyc_check_phone_summary.rb new file mode 100644 index 000000000..9750724b4 --- /dev/null +++ b/lib/plaid/models/kyc_check_phone_summary.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Result summary object specifying how the `phone` field matched. + class KYCCheckPhoneSummary + attr_accessor :summary + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'summary' => :'summary' + } + 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 + { + :'summary' => :'MatchSummaryCode' + } + 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::KYCCheckPhoneSummary` 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::KYCCheckPhoneSummary`. 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?(:'summary') + self.summary = attributes[:'summary'] + 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 @summary.nil? + invalid_properties.push('invalid value for "summary", summary 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 @summary.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 && + summary == o.summary + 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 + [summary].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/liabilities_default_update_webhook.rb b/lib/plaid/models/liabilities_default_update_webhook.rb index 25fbcd892..9225eff0e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/liabilities_get_request.rb b/lib/plaid/models/liabilities_get_request.rb index 36a1f4f93..9e7b19020 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e82ae0c54..aba02182a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 018100f53..e31d2f731 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 5a9346946..0496d1be2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 205a4032c..edebb4f05 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/link_token_account_filters.rb b/lib/plaid/models/link_token_account_filters.rb index ae369c945..1fc2b9d4b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 0b8943ef8..37ea7246c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 1259df30a..4369412b6 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d0f6159c0..20bc92b38 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 5eeb53c80..1b43d85f1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 db485a58d..c7ee3ff08 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 5dbcd0570..aaf48a604 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -36,6 +36,9 @@ class LinkTokenCreateRequest # List of Plaid product(s) you wish to use. If launching Link in update mode, should be omitted; required otherwise. `balance` is *not* a valid value, the Balance product does not require explicit initialization and will automatically be initialized when any other product is initialized. Only institutions that support *all* requested products will be shown in Link; to maximize the number of institutions listed, it is recommended to initialize Link with the minimal product set required for your use case. Additional products can be added after Link initialization by calling the relevant endpoints. For details and exceptions, see [Choosing when to initialize products](https://plaid.com/docs/link/best-practices/#choosing-when-to-initialize-products). Note that, unless you have opted to disable Instant Match support, institutions that support Instant Match will also be shown in Link if `auth` is specified as a product, even though these institutions do not contain `auth` in their product array. In Production, you will be billed for each product that you specify when initializing Link. Note that a product cannot be removed from an Item once the Item has been initialized with that product. To stop billing on an Item for subscription-based products, such as Liabilities, Investments, and Transactions, remove the Item via `/item/remove`. attr_accessor :products + # (Beta) This field has no effect unless you are participating in the Product Scope Transparency beta program. List of additional Plaid product(s) you wish to collect consent for. These products will not be billed until you start using them by calling the relevant endpoints. `balance` is *not* a valid value, the Balance product does not require explicit initialization and will automatically have consent collected. Institutions that do not support these products will still be shown in Link + attr_accessor :additional_consented_products + # The destination URL to which any webhooks should be sent. attr_accessor :webhook @@ -85,6 +88,7 @@ def self.attribute_map :'country_codes' => :'country_codes', :'user' => :'user', :'products' => :'products', + :'additional_consented_products' => :'additional_consented_products', :'webhook' => :'webhook', :'access_token' => :'access_token', :'link_customization_name' => :'link_customization_name', @@ -119,6 +123,7 @@ def self.openapi_types :'country_codes' => :'Array', :'user' => :'LinkTokenCreateRequestUser', :'products' => :'Array', + :'additional_consented_products' => :'Array', :'webhook' => :'String', :'access_token' => :'String', :'link_customization_name' => :'String', @@ -191,6 +196,12 @@ def initialize(attributes = {}) end end + if attributes.key?(:'additional_consented_products') + if (value = attributes[:'additional_consented_products']).is_a?(Array) + self.additional_consented_products = value + end + end + if attributes.key?(:'webhook') self.webhook = attributes[:'webhook'] end @@ -322,6 +333,7 @@ def ==(o) country_codes == o.country_codes && user == o.user && products == o.products && + additional_consented_products == o.additional_consented_products && webhook == o.webhook && access_token == o.access_token && link_customization_name == o.link_customization_name && @@ -349,7 +361,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, 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, 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, user_token].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 1580e937a..f3df6f67b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 737de3911..9415717d2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 de210fbb6..611e0c1e6 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d0c1e990b..741be012f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 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 86f32abba..a29c37706 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -19,10 +19,14 @@ class LinkTokenCreateRequestIncomeVerificationBankIncome # The number of days of data to request for the Bank Income product attr_accessor :days_requested + # Whether to enable multiple items to be added in the link session + attr_accessor :enable_multiple_items + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'days_requested' => :'days_requested' + :'days_requested' => :'days_requested', + :'enable_multiple_items' => :'enable_multiple_items' } end @@ -34,13 +38,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'days_requested' => :'Integer' + :'days_requested' => :'Integer', + :'enable_multiple_items' => :'Boolean' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'enable_multiple_items' ]) end @@ -62,6 +68,12 @@ def initialize(attributes = {}) if attributes.key?(:'days_requested') self.days_requested = attributes[:'days_requested'] end + + if attributes.key?(:'enable_multiple_items') + self.enable_multiple_items = attributes[:'enable_multiple_items'] + else + self.enable_multiple_items = false + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -82,7 +94,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - days_requested == o.days_requested + days_requested == o.days_requested && + enable_multiple_items == o.enable_multiple_items end # @see the `==` method @@ -94,7 +107,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [days_requested].hash + [days_requested, enable_multiple_items].hash end # Builds the object from hash 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 e43daf7f4..445c50be5 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -19,10 +19,14 @@ class LinkTokenCreateRequestIncomeVerificationPayrollIncome # The types of payroll income verification to enable for the link session. If none are specified, then users will see both document and digital payroll income. attr_accessor :flow_types + # An identifier to indicate whether the income verification link token will be used for an update or not + attr_accessor :is_update_mode + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'flow_types' => :'flow_types' + :'flow_types' => :'flow_types', + :'is_update_mode' => :'is_update_mode' } end @@ -34,14 +38,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'flow_types' => :'Array' + :'flow_types' => :'Array', + :'is_update_mode' => :'Boolean' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'flow_types' + :'flow_types', ]) end @@ -65,6 +70,10 @@ def initialize(attributes = {}) self.flow_types = value end end + + if attributes.key?(:'is_update_mode') + self.is_update_mode = attributes[:'is_update_mode'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -85,7 +94,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - flow_types == o.flow_types + flow_types == o.flow_types && + is_update_mode == o.is_update_mode end # @see the `==` method @@ -97,7 +107,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [flow_types].hash + [flow_types, is_update_mode].hash end # Builds the object from hash 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 18bcef0b4..d77e28c20 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6d1193d9c..63a4b4251 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 fb8e67420..72951f20d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 520438bef..5a7abb1b9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 7d303e654..5b7adfd31 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 26db2aba7..130b5b7fb 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 19405b852..10212949a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 86e0c22d8..161728897 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 1b07d11d4..ced1fbadb 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/list_dashboard_user_request.rb b/lib/plaid/models/list_dashboard_user_request.rb new file mode 100644 index 000000000..3a8f7d2b3 --- /dev/null +++ b/lib/plaid/models/list_dashboard_user_request.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for listing dashboard users + class ListDashboardUserRequest + # 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 + + # 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 + + # An identifier that determines which page of results you receive. + attr_accessor :cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'secret' => :'secret', + :'client_id' => :'client_id', + :'cursor' => :'cursor' + } + 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 + { + :'secret' => :'String', + :'client_id' => :'String', + :'cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'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::ListDashboardUserRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'cursor') + self.cursor = attributes[:'cursor'] + 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 && + secret == o.secret && + client_id == o.client_id && + cursor == o.cursor + 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 + [secret, client_id, cursor].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_entity_watchlist_screening_request.rb b/lib/plaid/models/list_entity_watchlist_screening_request.rb new file mode 100644 index 000000000..026e62b88 --- /dev/null +++ b/lib/plaid/models/list_entity_watchlist_screening_request.rb @@ -0,0 +1,286 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for listing entity watchlist screenings + class ListEntityWatchlistScreeningRequest + # 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 + + # 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 + + # ID of the associated entity program. + attr_accessor :entity_watchlist_program_id + + attr_accessor :client_user_id + + attr_accessor :status + + attr_accessor :assignee + + # An identifier that determines which page of results you receive. + attr_accessor :cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'secret' => :'secret', + :'client_id' => :'client_id', + :'entity_watchlist_program_id' => :'entity_watchlist_program_id', + :'client_user_id' => :'client_user_id', + :'status' => :'status', + :'assignee' => :'assignee', + :'cursor' => :'cursor' + } + 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 + { + :'secret' => :'String', + :'client_id' => :'String', + :'entity_watchlist_program_id' => :'String', + :'client_user_id' => :'String', + :'status' => :'WatchlistScreeningStatus', + :'assignee' => :'String', + :'cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'client_user_id', + :'status', + :'assignee', + :'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::ListEntityWatchlistScreeningRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'entity_watchlist_program_id') + self.entity_watchlist_program_id = attributes[:'entity_watchlist_program_id'] + end + + if attributes.key?(:'client_user_id') + self.client_user_id = attributes[:'client_user_id'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'assignee') + self.assignee = attributes[:'assignee'] + end + + if attributes.key?(:'cursor') + self.cursor = attributes[:'cursor'] + 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_program_id.nil? + invalid_properties.push('invalid value for "entity_watchlist_program_id", entity_watchlist_program_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_program_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 && + secret == o.secret && + client_id == o.client_id && + entity_watchlist_program_id == o.entity_watchlist_program_id && + client_user_id == o.client_user_id && + status == o.status && + assignee == o.assignee && + cursor == o.cursor + 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 + [secret, client_id, entity_watchlist_program_id, client_user_id, status, assignee, cursor].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/list_identity_verification_request.rb new file mode 100644 index 000000000..d3837c265 --- /dev/null +++ b/lib/plaid/models/list_identity_verification_request.rb @@ -0,0 +1,303 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for listing identity verifications + class ListIdentityVerificationRequest + # 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 + + # 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 + + # ID of the associated Identity Verification template. + attr_accessor :template_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 identifier that determines which page of results you receive. + attr_accessor :cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'secret' => :'secret', + :'client_id' => :'client_id', + :'template_id' => :'template_id', + :'client_user_id' => :'client_user_id', + :'cursor' => :'cursor' + } + 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 + { + :'secret' => :'String', + :'client_id' => :'String', + :'template_id' => :'String', + :'client_user_id' => :'String', + :'cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'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::ListIdentityVerificationRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'template_id') + self.template_id = attributes[:'template_id'] + end + + if attributes.key?(:'client_user_id') + self.client_user_id = attributes[:'client_user_id'] + end + + if attributes.key?(:'cursor') + self.cursor = attributes[:'cursor'] + 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 @template_id.nil? + invalid_properties.push('invalid value for "template_id", template_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 + + 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 + + # 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 @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 + + # 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 + + 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 + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + secret == o.secret && + client_id == o.client_id && + template_id == o.template_id && + client_user_id == o.client_user_id && + cursor == o.cursor + 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 + [secret, client_id, template_id, client_user_id, cursor].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_individual_watchlist_screening_request.rb b/lib/plaid/models/list_individual_watchlist_screening_request.rb new file mode 100644 index 000000000..777ab1e2f --- /dev/null +++ b/lib/plaid/models/list_individual_watchlist_screening_request.rb @@ -0,0 +1,286 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for listinging watchlist screenings for individuals + class ListIndividualWatchlistScreeningRequest + # 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 + + # 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 + + # ID of the associated program. + attr_accessor :watchlist_program_id + + attr_accessor :client_user_id + + attr_accessor :status + + attr_accessor :assignee + + # An identifier that determines which page of results you receive. + attr_accessor :cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'secret' => :'secret', + :'client_id' => :'client_id', + :'watchlist_program_id' => :'watchlist_program_id', + :'client_user_id' => :'client_user_id', + :'status' => :'status', + :'assignee' => :'assignee', + :'cursor' => :'cursor' + } + 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 + { + :'secret' => :'String', + :'client_id' => :'String', + :'watchlist_program_id' => :'String', + :'client_user_id' => :'String', + :'status' => :'WatchlistScreeningStatus', + :'assignee' => :'String', + :'cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'client_user_id', + :'status', + :'assignee', + :'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::ListIndividualWatchlistScreeningRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'watchlist_program_id') + self.watchlist_program_id = attributes[:'watchlist_program_id'] + end + + if attributes.key?(:'client_user_id') + self.client_user_id = attributes[:'client_user_id'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'assignee') + self.assignee = attributes[:'assignee'] + end + + if attributes.key?(:'cursor') + self.cursor = attributes[:'cursor'] + 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_program_id.nil? + invalid_properties.push('invalid value for "watchlist_program_id", watchlist_program_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_program_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 && + secret == o.secret && + client_id == o.client_id && + watchlist_program_id == o.watchlist_program_id && + client_user_id == o.client_user_id && + status == o.status && + assignee == o.assignee && + cursor == o.cursor + 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 + [secret, client_id, watchlist_program_id, client_user_id, status, assignee, cursor].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_pagination.rb b/lib/plaid/models/list_pagination.rb new file mode 100644 index 000000000..f7a2b32e3 --- /dev/null +++ b/lib/plaid/models/list_pagination.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # A response that contains 0-20 records and, optionally, links for the next and/or previous page. + class ListPagination + # An identifier that determines which page of results you receive. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'next_cursor' => :'next_cursor' + } + 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 + { + :'next_cursor' => :'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::ListPagination` 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::ListPagination`. 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?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + 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 && + next_cursor == o.next_cursor + 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 + [next_cursor].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_watchlist_screening_entity_history_request.rb b/lib/plaid/models/list_watchlist_screening_entity_history_request.rb new file mode 100644 index 000000000..22ad1c1f7 --- /dev/null +++ b/lib/plaid/models/list_watchlist_screening_entity_history_request.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for listing changes to entity watchlist screenings + class ListWatchlistScreeningEntityHistoryRequest + # 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 + + # 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 + + # ID of the associated entity screening. + attr_accessor :entity_watchlist_screening_id + + # An identifier that determines which page of results you receive. + attr_accessor :cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'secret' => :'secret', + :'client_id' => :'client_id', + :'entity_watchlist_screening_id' => :'entity_watchlist_screening_id', + :'cursor' => :'cursor' + } + 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 + { + :'secret' => :'String', + :'client_id' => :'String', + :'entity_watchlist_screening_id' => :'String', + :'cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'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::ListWatchlistScreeningEntityHistoryRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'entity_watchlist_screening_id') + self.entity_watchlist_screening_id = attributes[:'entity_watchlist_screening_id'] + end + + if attributes.key?(:'cursor') + self.cursor = attributes[:'cursor'] + 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_screening_id.nil? + invalid_properties.push('invalid value for "entity_watchlist_screening_id", entity_watchlist_screening_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_screening_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 && + secret == o.secret && + client_id == o.client_id && + entity_watchlist_screening_id == o.entity_watchlist_screening_id && + cursor == o.cursor + 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 + [secret, client_id, entity_watchlist_screening_id, cursor].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_watchlist_screening_entity_hit_request.rb b/lib/plaid/models/list_watchlist_screening_entity_hit_request.rb new file mode 100644 index 000000000..9162a4054 --- /dev/null +++ b/lib/plaid/models/list_watchlist_screening_entity_hit_request.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for listing hits for an entity watchlist screening + class ListWatchlistScreeningEntityHitRequest + # 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 + + # 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 + + # ID of the associated entity screening. + attr_accessor :entity_watchlist_screening_id + + # An identifier that determines which page of results you receive. + attr_accessor :cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'secret' => :'secret', + :'client_id' => :'client_id', + :'entity_watchlist_screening_id' => :'entity_watchlist_screening_id', + :'cursor' => :'cursor' + } + 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 + { + :'secret' => :'String', + :'client_id' => :'String', + :'entity_watchlist_screening_id' => :'String', + :'cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'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::ListWatchlistScreeningEntityHitRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'entity_watchlist_screening_id') + self.entity_watchlist_screening_id = attributes[:'entity_watchlist_screening_id'] + end + + if attributes.key?(:'cursor') + self.cursor = attributes[:'cursor'] + 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_screening_id.nil? + invalid_properties.push('invalid value for "entity_watchlist_screening_id", entity_watchlist_screening_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_screening_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 && + secret == o.secret && + client_id == o.client_id && + entity_watchlist_screening_id == o.entity_watchlist_screening_id && + cursor == o.cursor + 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 + [secret, client_id, entity_watchlist_screening_id, cursor].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_watchlist_screening_entity_programs_request.rb b/lib/plaid/models/list_watchlist_screening_entity_programs_request.rb new file mode 100644 index 000000000..855016c5a --- /dev/null +++ b/lib/plaid/models/list_watchlist_screening_entity_programs_request.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for listing entity watchlist screening programs + class ListWatchlistScreeningEntityProgramsRequest + # 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 + + # 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 + + # An identifier that determines which page of results you receive. + attr_accessor :cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'secret' => :'secret', + :'client_id' => :'client_id', + :'cursor' => :'cursor' + } + 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 + { + :'secret' => :'String', + :'client_id' => :'String', + :'cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'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::ListWatchlistScreeningEntityProgramsRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'cursor') + self.cursor = attributes[:'cursor'] + 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 && + secret == o.secret && + client_id == o.client_id && + cursor == o.cursor + 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 + [secret, client_id, cursor].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_watchlist_screening_entity_reviews_request.rb b/lib/plaid/models/list_watchlist_screening_entity_reviews_request.rb new file mode 100644 index 000000000..1abf3b977 --- /dev/null +++ b/lib/plaid/models/list_watchlist_screening_entity_reviews_request.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for listing reviews for an entity watchlist screening + class ListWatchlistScreeningEntityReviewsRequest + # 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 + + # 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 + + # ID of the associated entity screening. + attr_accessor :entity_watchlist_screening_id + + # An identifier that determines which page of results you receive. + attr_accessor :cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'secret' => :'secret', + :'client_id' => :'client_id', + :'entity_watchlist_screening_id' => :'entity_watchlist_screening_id', + :'cursor' => :'cursor' + } + 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 + { + :'secret' => :'String', + :'client_id' => :'String', + :'entity_watchlist_screening_id' => :'String', + :'cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'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::ListWatchlistScreeningEntityReviewsRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'entity_watchlist_screening_id') + self.entity_watchlist_screening_id = attributes[:'entity_watchlist_screening_id'] + end + + if attributes.key?(:'cursor') + self.cursor = attributes[:'cursor'] + 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_screening_id.nil? + invalid_properties.push('invalid value for "entity_watchlist_screening_id", entity_watchlist_screening_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_screening_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 && + secret == o.secret && + client_id == o.client_id && + entity_watchlist_screening_id == o.entity_watchlist_screening_id && + cursor == o.cursor + 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 + [secret, client_id, entity_watchlist_screening_id, cursor].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_watchlist_screening_individual_history_request.rb b/lib/plaid/models/list_watchlist_screening_individual_history_request.rb new file mode 100644 index 000000000..81a9010a7 --- /dev/null +++ b/lib/plaid/models/list_watchlist_screening_individual_history_request.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for listing changes to watchlist screenings for individuals + class ListWatchlistScreeningIndividualHistoryRequest + # 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 + + # 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 + + # ID of the associated screening. + attr_accessor :watchlist_screening_id + + # An identifier that determines which page of results you receive. + attr_accessor :cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'secret' => :'secret', + :'client_id' => :'client_id', + :'watchlist_screening_id' => :'watchlist_screening_id', + :'cursor' => :'cursor' + } + 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 + { + :'secret' => :'String', + :'client_id' => :'String', + :'watchlist_screening_id' => :'String', + :'cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'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::ListWatchlistScreeningIndividualHistoryRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'watchlist_screening_id') + self.watchlist_screening_id = attributes[:'watchlist_screening_id'] + end + + if attributes.key?(:'cursor') + self.cursor = attributes[:'cursor'] + 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_screening_id.nil? + invalid_properties.push('invalid value for "watchlist_screening_id", watchlist_screening_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_screening_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 && + secret == o.secret && + client_id == o.client_id && + watchlist_screening_id == o.watchlist_screening_id && + cursor == o.cursor + 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 + [secret, client_id, watchlist_screening_id, cursor].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_watchlist_screening_individual_hit_request.rb b/lib/plaid/models/list_watchlist_screening_individual_hit_request.rb new file mode 100644 index 000000000..bc6ade2e0 --- /dev/null +++ b/lib/plaid/models/list_watchlist_screening_individual_hit_request.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for listing hits for an individual watchlist screening + class ListWatchlistScreeningIndividualHitRequest + # 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 + + # 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 + + # ID of the associated screening. + attr_accessor :watchlist_screening_id + + # An identifier that determines which page of results you receive. + attr_accessor :cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'secret' => :'secret', + :'client_id' => :'client_id', + :'watchlist_screening_id' => :'watchlist_screening_id', + :'cursor' => :'cursor' + } + 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 + { + :'secret' => :'String', + :'client_id' => :'String', + :'watchlist_screening_id' => :'String', + :'cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'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::ListWatchlistScreeningIndividualHitRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'watchlist_screening_id') + self.watchlist_screening_id = attributes[:'watchlist_screening_id'] + end + + if attributes.key?(:'cursor') + self.cursor = attributes[:'cursor'] + 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_screening_id.nil? + invalid_properties.push('invalid value for "watchlist_screening_id", watchlist_screening_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_screening_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 && + secret == o.secret && + client_id == o.client_id && + watchlist_screening_id == o.watchlist_screening_id && + cursor == o.cursor + 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 + [secret, client_id, watchlist_screening_id, cursor].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_watchlist_screening_individual_programs_request.rb b/lib/plaid/models/list_watchlist_screening_individual_programs_request.rb new file mode 100644 index 000000000..7200f2ef0 --- /dev/null +++ b/lib/plaid/models/list_watchlist_screening_individual_programs_request.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for listing watchlist screening programs for individuals + class ListWatchlistScreeningIndividualProgramsRequest + # 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 + + # 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 + + # An identifier that determines which page of results you receive. + attr_accessor :cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'secret' => :'secret', + :'client_id' => :'client_id', + :'cursor' => :'cursor' + } + 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 + { + :'secret' => :'String', + :'client_id' => :'String', + :'cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'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::ListWatchlistScreeningIndividualProgramsRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'cursor') + self.cursor = attributes[:'cursor'] + 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 && + secret == o.secret && + client_id == o.client_id && + cursor == o.cursor + 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 + [secret, client_id, cursor].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_watchlist_screening_individual_reviews_request.rb b/lib/plaid/models/list_watchlist_screening_individual_reviews_request.rb new file mode 100644 index 000000000..f11a12500 --- /dev/null +++ b/lib/plaid/models/list_watchlist_screening_individual_reviews_request.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for listing reviews for an individual watchlist screening + class ListWatchlistScreeningIndividualReviewsRequest + # 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 + + # 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 + + # ID of the associated screening. + attr_accessor :watchlist_screening_id + + # An identifier that determines which page of results you receive. + attr_accessor :cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'secret' => :'secret', + :'client_id' => :'client_id', + :'watchlist_screening_id' => :'watchlist_screening_id', + :'cursor' => :'cursor' + } + 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 + { + :'secret' => :'String', + :'client_id' => :'String', + :'watchlist_screening_id' => :'String', + :'cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'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::ListWatchlistScreeningIndividualReviewsRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'watchlist_screening_id') + self.watchlist_screening_id = attributes[:'watchlist_screening_id'] + end + + if attributes.key?(:'cursor') + self.cursor = attributes[:'cursor'] + 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_screening_id.nil? + invalid_properties.push('invalid value for "watchlist_screening_id", watchlist_screening_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_screening_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 && + secret == o.secret && + client_id == o.client_id && + watchlist_screening_id == o.watchlist_screening_id && + cursor == o.cursor + 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 + [secret, client_id, watchlist_screening_id, cursor].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 f6652027d..9cd3f29cf 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 7bb2430a2..96047d2b8 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/location.rb b/lib/plaid/models/location.rb index 0b7546541..b6a55a60c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..609676348 --- /dev/null +++ b/lib/plaid/models/match_summary.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Summary object reflecting the match result of the associated data + class MatchSummary + attr_accessor :summary + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'summary' => :'summary' + } + 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 + { + :'summary' => :'MatchSummaryCode' + } + 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::MatchSummary` 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::MatchSummary`. 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?(:'summary') + self.summary = attributes[:'summary'] + 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 @summary.nil? + invalid_properties.push('invalid value for "summary", summary 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 @summary.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 && + summary == o.summary + 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 + [summary].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/match_summary_code.rb b/lib/plaid/models/match_summary_code.rb new file mode 100644 index 000000000..0d4b38175 --- /dev/null +++ b/lib/plaid/models/match_summary_code.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class MatchSummaryCode + MATCH = "match".freeze + PARTIAL_MATCH = "partial_match".freeze + NO_MATCH = "no_match".freeze + NO_DATA = "no_data".freeze + NO_INPUT = "no_input".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/meta.rb b/lib/plaid/models/meta.rb index 66fabb9e1..d741a7730 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/mfa.rb b/lib/plaid/models/mfa.rb index 0cfb9cfef..8a707dd8b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 bb83df570..bd95bcec1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 055ac3402..56b31908c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 1ff41fb9d..05850efb2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..677636961 --- /dev/null +++ b/lib/plaid/models/multi_document_risk_signal.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Object containing risk signals and relevant metadata for a set of uploaded documents + class MultiDocumentRiskSignal + # Array of objects containing attributes that could indicate if a document is fraudulent + attr_accessor :document_references + + # Array of attributes that indicate whether or not there is fraud risk with a set of documents + attr_accessor :risk_signals + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'document_references' => :'document_references', + :'risk_signals' => :'risk_signals' + } + 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 + { + :'document_references' => :'Array', + :'risk_signals' => :'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::MultiDocumentRiskSignal` 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::MultiDocumentRiskSignal`. 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?(:'document_references') + if (value = attributes[:'document_references']).is_a?(Array) + self.document_references = value + end + end + + if attributes.key?(:'risk_signals') + if (value = attributes[:'risk_signals']).is_a?(Array) + self.risk_signals = 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 @document_references.nil? + invalid_properties.push('invalid value for "document_references", document_references cannot be nil.') + end + + if @risk_signals.nil? + invalid_properties.push('invalid value for "risk_signals", risk_signals 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 @document_references.nil? + return false if @risk_signals.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 && + document_references == o.document_references && + risk_signals == o.risk_signals + 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 + [document_references, risk_signals].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 c03b64b50..f1c953f43 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 80f84dc11..7ae4ce99d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/numbers.rb b/lib/plaid/models/numbers.rb index 54ad8d7f9..2ae035d8d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 fec13eb88..955aca0f8 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b9964df01..c7eb3dc59 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 1dea17c92..1638f3135 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 0e6b7ca34..afa7520a1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a5ea4d741..6574cbb69 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 3b58553fb..fd85bb9c7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a8499500e..ef0f8269b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f2a2a31d8..e1cbf3090 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 af19cc3ba..a0d9e7550 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 1ac180e2d..4d9895648 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b1480f5ba..e92383947 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/owner_override.rb b/lib/plaid/models/owner_override.rb index 5b9d99914..3119ea10d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/paginated_dashboard_user_list.rb b/lib/plaid/models/paginated_dashboard_user_list.rb new file mode 100644 index 000000000..f8bcc0352 --- /dev/null +++ b/lib/plaid/models/paginated_dashboard_user_list.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Paginated list of dashboard users + class PaginatedDashboardUserList + # List of dashboard users + attr_accessor :dashboard_users + + # 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 + + # An identifier that determines which page of results you receive. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'dashboard_users' => :'dashboard_users', + :'request_id' => :'request_id', + :'next_cursor' => :'next_cursor' + } + 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 + { + :'dashboard_users' => :'Array', + :'request_id' => :'String', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_cursor' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'DashboardUserList', + :'ListPagination' + ] + 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::PaginatedDashboardUserList` 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::PaginatedDashboardUserList`. 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?(:'dashboard_users') + if (value = attributes[:'dashboard_users']).is_a?(Array) + self.dashboard_users = value + end + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + 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 @dashboard_users.nil? + invalid_properties.push('invalid value for "dashboard_users", dashboard_users 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 @dashboard_users.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 && + dashboard_users == o.dashboard_users && + request_id == o.request_id && + next_cursor == o.next_cursor + 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 + [dashboard_users, request_id, next_cursor].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/paginated_entity_watchlist_program_list.rb b/lib/plaid/models/paginated_entity_watchlist_program_list.rb new file mode 100644 index 000000000..2dadb01e8 --- /dev/null +++ b/lib/plaid/models/paginated_entity_watchlist_program_list.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Paginated list of entity watchlist screening programs + class PaginatedEntityWatchlistProgramList + # List of entity watchlist screening programs + attr_accessor :entity_watchlist_programs + + # 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 + + # An identifier that determines which page of results you receive. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'entity_watchlist_programs' => :'entity_watchlist_programs', + :'request_id' => :'request_id', + :'next_cursor' => :'next_cursor' + } + 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_programs' => :'Array', + :'request_id' => :'String', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_cursor' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'EntityWatchlistScreeningProgramList', + :'ListPagination' + ] + 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::PaginatedEntityWatchlistProgramList` 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::PaginatedEntityWatchlistProgramList`. 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_programs') + if (value = attributes[:'entity_watchlist_programs']).is_a?(Array) + self.entity_watchlist_programs = value + end + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + 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_programs.nil? + invalid_properties.push('invalid value for "entity_watchlist_programs", entity_watchlist_programs 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_programs.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_programs == o.entity_watchlist_programs && + request_id == o.request_id && + next_cursor == o.next_cursor + 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_programs, request_id, next_cursor].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/paginated_entity_watchlist_screening_hit_list.rb b/lib/plaid/models/paginated_entity_watchlist_screening_hit_list.rb new file mode 100644 index 000000000..a606d1e93 --- /dev/null +++ b/lib/plaid/models/paginated_entity_watchlist_screening_hit_list.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Paginated list of entity watchlist screening hits + class PaginatedEntityWatchlistScreeningHitList + # List of entity watchlist screening hits + attr_accessor :entity_watchlist_screening_hits + + # 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 + + # An identifier that determines which page of results you receive. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'entity_watchlist_screening_hits' => :'entity_watchlist_screening_hits', + :'request_id' => :'request_id', + :'next_cursor' => :'next_cursor' + } + 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_screening_hits' => :'Array', + :'request_id' => :'String', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_cursor' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'EntityWatchlistScreeningHitList', + :'ListPagination' + ] + 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::PaginatedEntityWatchlistScreeningHitList` 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::PaginatedEntityWatchlistScreeningHitList`. 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_screening_hits') + if (value = attributes[:'entity_watchlist_screening_hits']).is_a?(Array) + self.entity_watchlist_screening_hits = value + end + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + 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_screening_hits.nil? + invalid_properties.push('invalid value for "entity_watchlist_screening_hits", entity_watchlist_screening_hits 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_screening_hits.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_screening_hits == o.entity_watchlist_screening_hits && + request_id == o.request_id && + next_cursor == o.next_cursor + 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_screening_hits, request_id, next_cursor].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/paginated_entity_watchlist_screening_list.rb b/lib/plaid/models/paginated_entity_watchlist_screening_list.rb new file mode 100644 index 000000000..d09c61e7e --- /dev/null +++ b/lib/plaid/models/paginated_entity_watchlist_screening_list.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.115.2 + +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 PaginatedEntityWatchlistScreeningList + # List of entity watchlist screening + attr_accessor :entity_watchlist_screenings + + # 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 + + # An identifier that determines which page of results you receive. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'entity_watchlist_screenings' => :'entity_watchlist_screenings', + :'request_id' => :'request_id', + :'next_cursor' => :'next_cursor' + } + 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', + :'request_id' => :'String', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_cursor' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'EntityWatchlistScreeningList', + :'ListPagination' + ] + 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::PaginatedEntityWatchlistScreeningList` 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::PaginatedEntityWatchlistScreeningList`. 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?(:'request_id') + self.request_id = attributes[:'request_id'] + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + 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 && + request_id == o.request_id && + next_cursor == o.next_cursor + 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, request_id, next_cursor].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/paginated_entity_watchlist_screening_review_list.rb b/lib/plaid/models/paginated_entity_watchlist_screening_review_list.rb new file mode 100644 index 000000000..36b1c68ec --- /dev/null +++ b/lib/plaid/models/paginated_entity_watchlist_screening_review_list.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Paginated list of entity watchlist screening reviews + class PaginatedEntityWatchlistScreeningReviewList + # List of entity watchlist screening reviews + attr_accessor :entity_watchlist_screening_reviews + + # 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 + + # An identifier that determines which page of results you receive. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'entity_watchlist_screening_reviews' => :'entity_watchlist_screening_reviews', + :'request_id' => :'request_id', + :'next_cursor' => :'next_cursor' + } + 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_screening_reviews' => :'Array', + :'request_id' => :'String', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_cursor' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'ListPagination', + :'WatchlistScreeningEntityReviewList' + ] + 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::PaginatedEntityWatchlistScreeningReviewList` 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::PaginatedEntityWatchlistScreeningReviewList`. 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_screening_reviews') + if (value = attributes[:'entity_watchlist_screening_reviews']).is_a?(Array) + self.entity_watchlist_screening_reviews = value + end + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + 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_screening_reviews.nil? + invalid_properties.push('invalid value for "entity_watchlist_screening_reviews", entity_watchlist_screening_reviews 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_screening_reviews.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_screening_reviews == o.entity_watchlist_screening_reviews && + request_id == o.request_id && + next_cursor == o.next_cursor + 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_screening_reviews, request_id, next_cursor].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/paginated_identity_verification_paginated_list.rb b/lib/plaid/models/paginated_identity_verification_paginated_list.rb new file mode 100644 index 000000000..f468b9d0f --- /dev/null +++ b/lib/plaid/models/paginated_identity_verification_paginated_list.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Paginated list of Plaid sessions. + class PaginatedIdentityVerificationPaginatedList + # List of Plaid sessions + attr_accessor :identity_verifications + + # 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 + + # An identifier that determines which page of results you receive. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'identity_verifications' => :'identity_verifications', + :'request_id' => :'request_id', + :'next_cursor' => :'next_cursor' + } + 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 + { + :'identity_verifications' => :'Array', + :'request_id' => :'String', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_cursor' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'IdentityVerificationList', + :'ListPagination' + ] + 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::PaginatedIdentityVerificationPaginatedList` 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::PaginatedIdentityVerificationPaginatedList`. 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?(:'identity_verifications') + if (value = attributes[:'identity_verifications']).is_a?(Array) + self.identity_verifications = value + end + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + 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 @identity_verifications.nil? + invalid_properties.push('invalid value for "identity_verifications", identity_verifications 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 @identity_verifications.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 && + identity_verifications == o.identity_verifications && + request_id == o.request_id && + next_cursor == o.next_cursor + 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 + [identity_verifications, request_id, next_cursor].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/paginated_individual_watchlist_program_list.rb b/lib/plaid/models/paginated_individual_watchlist_program_list.rb new file mode 100644 index 000000000..08e22205e --- /dev/null +++ b/lib/plaid/models/paginated_individual_watchlist_program_list.rb @@ -0,0 +1,246 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Paginated list of individual watchlist screening programs + class PaginatedIndividualWatchlistProgramList + # List of individual watchlist screening programs + attr_accessor :individual_watchlist_programs + + # An identifier that determines which page of results you receive. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'individual_watchlist_programs' => :'individual_watchlist_programs', + :'next_cursor' => :'next_cursor' + } + 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_watchlist_programs' => :'Array', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_cursor' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'IndividualWatchlistProgramList', + :'ListPagination' + ] + 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::PaginatedIndividualWatchlistProgramList` 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::PaginatedIndividualWatchlistProgramList`. 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_watchlist_programs') + if (value = attributes[:'individual_watchlist_programs']).is_a?(Array) + self.individual_watchlist_programs = value + end + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + 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_watchlist_programs.nil? + invalid_properties.push('invalid value for "individual_watchlist_programs", individual_watchlist_programs 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_watchlist_programs.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_watchlist_programs == o.individual_watchlist_programs && + next_cursor == o.next_cursor + 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_watchlist_programs, next_cursor].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/paginated_individual_watchlist_screening_hit_list.rb b/lib/plaid/models/paginated_individual_watchlist_screening_hit_list.rb new file mode 100644 index 000000000..ac1e74d1f --- /dev/null +++ b/lib/plaid/models/paginated_individual_watchlist_screening_hit_list.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Paginated list of individual watchlist screening hits + class PaginatedIndividualWatchlistScreeningHitList + # List of individual watchlist screening hits + attr_accessor :watchlist_screening_hits + + # 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 + + # An identifier that determines which page of results you receive. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'watchlist_screening_hits' => :'watchlist_screening_hits', + :'request_id' => :'request_id', + :'next_cursor' => :'next_cursor' + } + 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_screening_hits' => :'Array', + :'request_id' => :'String', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_cursor' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'ListPagination', + :'WatchlistScreeningHitList' + ] + 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::PaginatedIndividualWatchlistScreeningHitList` 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::PaginatedIndividualWatchlistScreeningHitList`. 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_screening_hits') + if (value = attributes[:'watchlist_screening_hits']).is_a?(Array) + self.watchlist_screening_hits = value + end + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + 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_screening_hits.nil? + invalid_properties.push('invalid value for "watchlist_screening_hits", watchlist_screening_hits 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_screening_hits.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_screening_hits == o.watchlist_screening_hits && + request_id == o.request_id && + next_cursor == o.next_cursor + 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_screening_hits, request_id, next_cursor].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/paginated_individual_watchlist_screening_list.rb b/lib/plaid/models/paginated_individual_watchlist_screening_list.rb new file mode 100644 index 000000000..0cadd70e6 --- /dev/null +++ b/lib/plaid/models/paginated_individual_watchlist_screening_list.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.115.2 + +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 PaginatedIndividualWatchlistScreeningList + # List of individual watchlist screenings + attr_accessor :watchlist_screenings + + # 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 + + # An identifier that determines which page of results you receive. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'watchlist_screenings' => :'watchlist_screenings', + :'request_id' => :'request_id', + :'next_cursor' => :'next_cursor' + } + 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', + :'request_id' => :'String', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_cursor' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'ListPagination', + :'WatchlistScreeningList' + ] + 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::PaginatedIndividualWatchlistScreeningList` 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::PaginatedIndividualWatchlistScreeningList`. 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?(:'request_id') + self.request_id = attributes[:'request_id'] + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + 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 && + request_id == o.request_id && + next_cursor == o.next_cursor + 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, request_id, next_cursor].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/paginated_individual_watchlist_screening_review_list.rb b/lib/plaid/models/paginated_individual_watchlist_screening_review_list.rb new file mode 100644 index 000000000..88a9c016b --- /dev/null +++ b/lib/plaid/models/paginated_individual_watchlist_screening_review_list.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Paginated list of screening reviews + class PaginatedIndividualWatchlistScreeningReviewList + # List of screening reviews + attr_accessor :watchlist_screening_reviews + + # 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 + + # An identifier that determines which page of results you receive. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'watchlist_screening_reviews' => :'watchlist_screening_reviews', + :'request_id' => :'request_id', + :'next_cursor' => :'next_cursor' + } + 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_screening_reviews' => :'Array', + :'request_id' => :'String', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'next_cursor' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'ListPagination', + :'WatchlistScreeningReviewList' + ] + 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::PaginatedIndividualWatchlistScreeningReviewList` 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::PaginatedIndividualWatchlistScreeningReviewList`. 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_screening_reviews') + if (value = attributes[:'watchlist_screening_reviews']).is_a?(Array) + self.watchlist_screening_reviews = value + end + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + 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_screening_reviews.nil? + invalid_properties.push('invalid value for "watchlist_screening_reviews", watchlist_screening_reviews 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_screening_reviews.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_screening_reviews == o.watchlist_screening_reviews && + request_id == o.request_id && + next_cursor == o.next_cursor + 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_screening_reviews, request_id, next_cursor].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.rb b/lib/plaid/models/pay.rb index 506223a41..3c72c865d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 17b9fbf19..813d7c766 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2e248bc57..14cf298da 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d7dc471b1..2851aabae 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 de8e167ac..193bb3d70 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 cdb876e58..548655e78 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8a51d7385..1637877fc 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f2008918b..21090c06e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 fb2974608..aae9155c1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 485c7046f..9313df178 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 29f3d79ac..ae50c59ab 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/pay_stub_verification_attribute.rb b/lib/plaid/models/pay_stub_verification_attribute.rb index d3e7bf0d8..41fbea4a0 100644 --- a/lib/plaid/models/pay_stub_verification_attribute.rb +++ b/lib/plaid/models/pay_stub_verification_attribute.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 74644b3c0..70ca4909f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 38add2354..7229e0854 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_channel.rb b/lib/plaid/models/payment_channel.rb index 1343f6bd8..ae47f0107 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 fd247f8c6..d7b2bf1cd 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ee3bb5993..180dd56cf 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 135878f42..cad196262 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8a5a50279..52b594255 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 84c50b2e4..9067ceca3 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2ab91d22a..60c40dcbe 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f333c1f32..8777055e1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 03316c585..4a4964d70 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f94cbbf89..67b993921 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 aaa5219e2..74177514e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 bd034fbe5..456e67205 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 07ee7601d..4b65eb7a4 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6edd3b5c5..923457eb9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6660d22a9..0aa749852 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8fc946690..f2be472a3 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 9d89da4d7..f437fd828 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 7e43cd07a..fd9d3deab 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 82e840f4f..e8f842f2b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 51b7153ac..3bf1a8a59 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f0e313e6d..96d73b226 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -19,6 +19,9 @@ class PaymentInitiationMetadata # Indicates whether the institution supports payments from a different country. attr_accessor :supports_international_payments + # Indicates whether the institution supports SEPA Instant payments. + attr_accessor :supports_sepa_instant + # A mapping of currency to maximum payment amount (denominated in the smallest unit of currency) supported by the institution. Example: `{\"GBP\": \"10000\"}` attr_accessor :maximum_payment_amount @@ -31,6 +34,7 @@ class PaymentInitiationMetadata def self.attribute_map { :'supports_international_payments' => :'supports_international_payments', + :'supports_sepa_instant' => :'supports_sepa_instant', :'maximum_payment_amount' => :'maximum_payment_amount', :'supports_refund_details' => :'supports_refund_details', :'standing_order_metadata' => :'standing_order_metadata' @@ -46,6 +50,7 @@ def self.acceptable_attributes def self.openapi_types { :'supports_international_payments' => :'Boolean', + :'supports_sepa_instant' => :'Boolean', :'maximum_payment_amount' => :'Hash', :'supports_refund_details' => :'Boolean', :'standing_order_metadata' => :'PaymentInitiationStandingOrderMetadata' @@ -78,6 +83,10 @@ def initialize(attributes = {}) self.supports_international_payments = attributes[:'supports_international_payments'] end + if attributes.key?(:'supports_sepa_instant') + self.supports_sepa_instant = attributes[:'supports_sepa_instant'] + end + if attributes.key?(:'maximum_payment_amount') if (value = attributes[:'maximum_payment_amount']).is_a?(Hash) self.maximum_payment_amount = value @@ -101,6 +110,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "supports_international_payments", supports_international_payments cannot be nil.') end + if @supports_sepa_instant.nil? + invalid_properties.push('invalid value for "supports_sepa_instant", supports_sepa_instant cannot be nil.') + end + if @maximum_payment_amount.nil? invalid_properties.push('invalid value for "maximum_payment_amount", maximum_payment_amount cannot be nil.') end @@ -116,6 +129,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @supports_international_payments.nil? + return false if @supports_sepa_instant.nil? return false if @maximum_payment_amount.nil? return false if @supports_refund_details.nil? true @@ -127,6 +141,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && supports_international_payments == o.supports_international_payments && + supports_sepa_instant == o.supports_sepa_instant && maximum_payment_amount == o.maximum_payment_amount && supports_refund_details == o.supports_refund_details && standing_order_metadata == o.standing_order_metadata @@ -141,7 +156,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [supports_international_payments, maximum_payment_amount, supports_refund_details, standing_order_metadata].hash + [supports_international_payments, supports_sepa_instant, maximum_payment_amount, supports_refund_details, standing_order_metadata].hash end # Builds the object from hash diff --git a/lib/plaid/models/payment_initiation_optional_restriction_bacs.rb b/lib/plaid/models/payment_initiation_optional_restriction_bacs.rb index d2a0b656d..8bde37243 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 03d472c0c..e0146410d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -44,8 +44,8 @@ class PaymentInitiationPayment # The International Bank Account Number (IBAN) for the sender, if specified in the `/payment_initiation/payment/create` call. attr_accessor :iban - # Initiated refunds associated with the payment. - attr_accessor :initiated_refunds + # Refund IDs associated with the payment. + attr_accessor :refund_ids # The EMI (E-Money Institution) wallet that this payment is associated with, if any. This wallet is used as an intermediary account to enable Plaid to reconcile the settlement of funds for Payment Initiation requests. attr_accessor :wallet_id @@ -71,7 +71,7 @@ def self.attribute_map :'refund_details' => :'refund_details', :'bacs' => :'bacs', :'iban' => :'iban', - :'initiated_refunds' => :'initiated_refunds', + :'refund_ids' => :'refund_ids', :'wallet_id' => :'wallet_id', :'scheme' => :'scheme', :'adjusted_scheme' => :'adjusted_scheme', @@ -98,7 +98,7 @@ def self.openapi_types :'refund_details' => :'ExternalPaymentRefundDetails', :'bacs' => :'SenderBACSNullable', :'iban' => :'String', - :'initiated_refunds' => :'Array', + :'refund_ids' => :'Array', :'wallet_id' => :'String', :'scheme' => :'PaymentScheme', :'adjusted_scheme' => :'PaymentScheme', @@ -117,6 +117,7 @@ def self.openapi_nullable :'wallet_id', :'scheme', :'adjusted_scheme', + :'consent_id' ]) end @@ -179,9 +180,9 @@ def initialize(attributes = {}) self.iban = attributes[:'iban'] end - if attributes.key?(:'initiated_refunds') - if (value = attributes[:'initiated_refunds']).is_a?(Array) - self.initiated_refunds = value + if attributes.key?(:'refund_ids') + if (value = attributes[:'refund_ids']).is_a?(Array) + self.refund_ids = value end end @@ -261,7 +262,7 @@ def ==(o) refund_details == o.refund_details && bacs == o.bacs && iban == o.iban && - initiated_refunds == o.initiated_refunds && + refund_ids == o.refund_ids && wallet_id == o.wallet_id && scheme == o.scheme && adjusted_scheme == o.adjusted_scheme && @@ -277,7 +278,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [payment_id, amount, status, recipient_id, reference, adjusted_reference, last_status_update, schedule, refund_details, bacs, iban, initiated_refunds, wallet_id, scheme, adjusted_scheme, consent_id].hash + [payment_id, amount, status, recipient_id, reference, adjusted_reference, last_status_update, schedule, refund_details, bacs, iban, refund_ids, wallet_id, scheme, adjusted_scheme, consent_id].hash end # Builds the object from hash diff --git a/lib/plaid/models/payment_initiation_payment_create_request.rb b/lib/plaid/models/payment_initiation_payment_create_request.rb index a1cb393c7..cff6ada70 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_payment_create_response.rb b/lib/plaid/models/payment_initiation_payment_create_response.rb index e14ecb401..56b100424 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d4f5d838d..b4a46de32 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 daa1ba70f..bd63b424a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f45f496a1..ddb5d4e24 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -44,8 +44,8 @@ class PaymentInitiationPaymentGetResponse # The International Bank Account Number (IBAN) for the sender, if specified in the `/payment_initiation/payment/create` call. attr_accessor :iban - # Initiated refunds associated with the payment. - attr_accessor :initiated_refunds + # Refund IDs associated with the payment. + attr_accessor :refund_ids # The EMI (E-Money Institution) wallet that this payment is associated with, if any. This wallet is used as an intermediary account to enable Plaid to reconcile the settlement of funds for Payment Initiation requests. attr_accessor :wallet_id @@ -74,7 +74,7 @@ def self.attribute_map :'refund_details' => :'refund_details', :'bacs' => :'bacs', :'iban' => :'iban', - :'initiated_refunds' => :'initiated_refunds', + :'refund_ids' => :'refund_ids', :'wallet_id' => :'wallet_id', :'scheme' => :'scheme', :'adjusted_scheme' => :'adjusted_scheme', @@ -102,7 +102,7 @@ def self.openapi_types :'refund_details' => :'ExternalPaymentRefundDetails', :'bacs' => :'SenderBACSNullable', :'iban' => :'String', - :'initiated_refunds' => :'Array', + :'refund_ids' => :'Array', :'wallet_id' => :'String', :'scheme' => :'PaymentScheme', :'adjusted_scheme' => :'PaymentScheme', @@ -122,6 +122,7 @@ def self.openapi_nullable :'wallet_id', :'scheme', :'adjusted_scheme', + :'consent_id', ]) end @@ -192,9 +193,9 @@ def initialize(attributes = {}) self.iban = attributes[:'iban'] end - if attributes.key?(:'initiated_refunds') - if (value = attributes[:'initiated_refunds']).is_a?(Array) - self.initiated_refunds = value + if attributes.key?(:'refund_ids') + if (value = attributes[:'refund_ids']).is_a?(Array) + self.refund_ids = value end end @@ -283,7 +284,7 @@ def ==(o) refund_details == o.refund_details && bacs == o.bacs && iban == o.iban && - initiated_refunds == o.initiated_refunds && + refund_ids == o.refund_ids && wallet_id == o.wallet_id && scheme == o.scheme && adjusted_scheme == o.adjusted_scheme && @@ -300,7 +301,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [payment_id, amount, status, recipient_id, reference, adjusted_reference, last_status_update, schedule, refund_details, bacs, iban, initiated_refunds, wallet_id, scheme, adjusted_scheme, consent_id, request_id].hash + [payment_id, amount, status, recipient_id, reference, adjusted_reference, last_status_update, schedule, refund_details, bacs, iban, refund_ids, wallet_id, scheme, adjusted_scheme, consent_id, request_id].hash end # Builds the object from hash diff --git a/lib/plaid/models/payment_initiation_payment_list_request.rb b/lib/plaid/models/payment_initiation_payment_list_request.rb index 22d986f54..25231467b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 145e679c6..aeda38900 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b9f0f0509..5a65408a5 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,12 +25,20 @@ class PaymentInitiationPaymentReverseRequest # The ID of the payment to reverse attr_accessor :payment_id + # A random key provided by the client, per unique wallet transaction. Maximum of 128 characters. The API supports idempotency for safely retrying requests without accidentally performing the same operation twice. If a request to execute a wallet transaction fails due to a network connection error, then after a minimum delay of one minute, you can retry the request with the same idempotency key to guarantee that only a single wallet transaction is created. If the request was successfully processed, it will prevent any transaction that uses the same idempotency key, and was received within 24 hours of the first request, from being processed. + attr_accessor :idempotency_key + + # A reference for the refund. This must be an alphanumeric string with at most 18 characters and must not contain any special characters or spaces. + attr_accessor :reference + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'client_id' => :'client_id', :'secret' => :'secret', - :'payment_id' => :'payment_id' + :'payment_id' => :'payment_id', + :'idempotency_key' => :'idempotency_key', + :'reference' => :'reference' } end @@ -44,7 +52,9 @@ def self.openapi_types { :'client_id' => :'String', :'secret' => :'String', - :'payment_id' => :'String' + :'payment_id' => :'String', + :'idempotency_key' => :'String', + :'reference' => :'String' } end @@ -80,6 +90,14 @@ def initialize(attributes = {}) if attributes.key?(:'payment_id') self.payment_id = attributes[:'payment_id'] end + + if attributes.key?(:'idempotency_key') + self.idempotency_key = attributes[:'idempotency_key'] + end + + if attributes.key?(:'reference') + self.reference = attributes[:'reference'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -95,6 +113,32 @@ def list_invalid_properties end + if @idempotency_key.nil? + invalid_properties.push('invalid value for "idempotency_key", idempotency_key cannot be nil.') + end + + if @idempotency_key.to_s.length > 128 + invalid_properties.push('invalid value for "idempotency_key", the character length must be smaller than or equal to 128.') + end + + if @idempotency_key.to_s.length < 1 + invalid_properties.push('invalid value for "idempotency_key", the character length must be great than or equal to 1.') + end + + + if @reference.nil? + invalid_properties.push('invalid value for "reference", reference cannot be nil.') + end + + if @reference.to_s.length > 18 + invalid_properties.push('invalid value for "reference", the character length must be smaller than or equal to 18.') + end + + if @reference.to_s.length < 1 + invalid_properties.push('invalid value for "reference", the character length must be great than or equal to 1.') + end + + invalid_properties end @@ -103,6 +147,12 @@ def list_invalid_properties def valid? return false if @payment_id.nil? return false if @payment_id.to_s.length < 1 + return false if @idempotency_key.nil? + return false if @idempotency_key.to_s.length > 128 + return false if @idempotency_key.to_s.length < 1 + return false if @reference.nil? + return false if @reference.to_s.length > 18 + return false if @reference.to_s.length < 1 true end @@ -121,6 +171,44 @@ def payment_id=(payment_id) @payment_id = payment_id end + # Custom attribute writer method with validation + # @param [Object] idempotency_key Value to be assigned + def idempotency_key=(idempotency_key) + if idempotency_key.nil? + fail ArgumentError, 'idempotency_key cannot be nil' + end + + if idempotency_key.to_s.length > 128 + fail ArgumentError, 'invalid value for "idempotency_key", the character length must be smaller than or equal to 128.' + end + + if idempotency_key.to_s.length < 1 + fail ArgumentError, 'invalid value for "idempotency_key", the character length must be great than or equal to 1.' + end + + + @idempotency_key = idempotency_key + end + + # Custom attribute writer method with validation + # @param [Object] reference Value to be assigned + def reference=(reference) + if reference.nil? + fail ArgumentError, 'reference cannot be nil' + end + + if reference.to_s.length > 18 + fail ArgumentError, 'invalid value for "reference", the character length must be smaller than or equal to 18.' + end + + if reference.to_s.length < 1 + fail ArgumentError, 'invalid value for "reference", the character length must be great than or equal to 1.' + end + + + @reference = reference + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -128,7 +216,9 @@ def ==(o) self.class == o.class && client_id == o.client_id && secret == o.secret && - payment_id == o.payment_id + payment_id == o.payment_id && + idempotency_key == o.idempotency_key && + reference == o.reference end # @see the `==` method @@ -140,7 +230,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, secret, payment_id].hash + [client_id, secret, payment_id, idempotency_key, reference].hash end # Builds the object from hash diff --git a/lib/plaid/models/payment_initiation_payment_reverse_response.rb b/lib/plaid/models/payment_initiation_payment_reverse_response.rb index 592a3d416..696d9eeca 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_payment_status.rb b/lib/plaid/models/payment_initiation_payment_status.rb index d5dd0d55f..6afdd24de 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 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 f18d50c96..ebe133b2a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ba41886c4..b80adc329 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e446fbc64..396f22d3d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -29,9 +29,6 @@ class PaymentInitiationRecipient attr_accessor :bacs - # The EMI (E-Money Institution) recipient that this recipient is associated with, if any. This EMI recipient is used as an intermediary account to enable Plaid to reconcile the settlement of funds for Payment Initiation requests. - attr_accessor :emi_recipient_id - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -39,8 +36,7 @@ def self.attribute_map :'name' => :'name', :'address' => :'address', :'iban' => :'iban', - :'bacs' => :'bacs', - :'emi_recipient_id' => :'emi_recipient_id' + :'bacs' => :'bacs' } end @@ -56,8 +52,7 @@ def self.openapi_types :'name' => :'String', :'address' => :'PaymentInitiationAddress', :'iban' => :'String', - :'bacs' => :'RecipientBACSNullable', - :'emi_recipient_id' => :'String' + :'bacs' => :'RecipientBACSNullable' } end @@ -66,8 +61,7 @@ def self.openapi_nullable Set.new([ :'address', :'iban', - :'bacs', - :'emi_recipient_id' + :'bacs' ]) end @@ -105,10 +99,6 @@ def initialize(attributes = {}) if attributes.key?(:'bacs') self.bacs = attributes[:'bacs'] end - - if attributes.key?(:'emi_recipient_id') - self.emi_recipient_id = attributes[:'emi_recipient_id'] - end end # Show invalid properties with the reasons. Usually used together with valid? @@ -143,8 +133,7 @@ def ==(o) name == o.name && address == o.address && iban == o.iban && - bacs == o.bacs && - emi_recipient_id == o.emi_recipient_id + bacs == o.bacs end # @see the `==` method @@ -156,7 +145,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [recipient_id, name, address, iban, bacs, emi_recipient_id].hash + [recipient_id, name, address, iban, bacs].hash end # Builds the object from hash diff --git a/lib/plaid/models/payment_initiation_recipient_create_request.rb b/lib/plaid/models/payment_initiation_recipient_create_request.rb index 29139da64..f278e6517 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 3bd359147..c22674781 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 1dd2c274b..c0ffa069f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 950aaf3bc..15629fe5a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -29,9 +29,6 @@ class PaymentInitiationRecipientGetResponse attr_accessor :bacs - # The EMI (E-Money Institution) recipient that this recipient is associated with, if any. This EMI recipient is used as an intermediary account to enable Plaid to reconcile the settlement of funds for Payment Initiation requests. - attr_accessor :emi_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 @@ -43,7 +40,6 @@ def self.attribute_map :'address' => :'address', :'iban' => :'iban', :'bacs' => :'bacs', - :'emi_recipient_id' => :'emi_recipient_id', :'request_id' => :'request_id' } end @@ -61,7 +57,6 @@ def self.openapi_types :'address' => :'PaymentInitiationAddress', :'iban' => :'String', :'bacs' => :'RecipientBACSNullable', - :'emi_recipient_id' => :'String', :'request_id' => :'String' } end @@ -72,7 +67,6 @@ def self.openapi_nullable :'address', :'iban', :'bacs', - :'emi_recipient_id', ]) end @@ -119,10 +113,6 @@ def initialize(attributes = {}) self.bacs = attributes[:'bacs'] end - if attributes.key?(:'emi_recipient_id') - self.emi_recipient_id = attributes[:'emi_recipient_id'] - end - if attributes.key?(:'request_id') self.request_id = attributes[:'request_id'] end @@ -166,7 +156,6 @@ def ==(o) address == o.address && iban == o.iban && bacs == o.bacs && - emi_recipient_id == o.emi_recipient_id && request_id == o.request_id end @@ -179,7 +168,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [recipient_id, name, address, iban, bacs, emi_recipient_id, request_id].hash + [recipient_id, name, address, iban, bacs, request_id].hash end # Builds the object from hash 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 a40575676..b2cbefad0 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e8362df40..8658020c7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 935f5ab93..aca07f84b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payment_initiation_refund_status.rb b/lib/plaid/models/payment_initiation_refund_status.rb index a73209f30..932df0739 100644 --- a/lib/plaid/models/payment_initiation_refund_status.rb +++ b/lib/plaid/models/payment_initiation_refund_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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 36cc2980b..b98f0c199 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 48917888f..134a7b9d0 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 5a9c6a998..4149ac2f9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 01374d4f8..cc9ec9770 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 092c3f3d2..74d339619 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 5a075a256..1413b3521 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6af0d4d02..f35d5f17c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/payroll_item_status.rb b/lib/plaid/models/payroll_item_status.rb index 5b9d94d78..dcd66962a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..bf2a266f9 --- /dev/null +++ b/lib/plaid/models/payroll_risk_signals_item.rb @@ -0,0 +1,242 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Object containing fraud risk data pertaining to the item linked as part of the verification + class PayrollRiskSignalsItem + # The `item_id` of the Item associated with this webhook, warning, or error + attr_accessor :item_id + + # Array of payroll income document authenticity data retrieved for each of the user's accounts + attr_accessor :verification_risk_signals + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'item_id' => :'item_id', + :'verification_risk_signals' => :'verification_risk_signals' + } + 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', + :'verification_risk_signals' => :'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::PayrollRiskSignalsItem` 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::PayrollRiskSignalsItem`. 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?(:'verification_risk_signals') + if (value = attributes[:'verification_risk_signals']).is_a?(Array) + self.verification_risk_signals = 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 @item_id.nil? + invalid_properties.push('invalid value for "item_id", item_id cannot be nil.') + end + + if @verification_risk_signals.nil? + invalid_properties.push('invalid value for "verification_risk_signals", verification_risk_signals 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 @item_id.nil? + return false if @verification_risk_signals.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 && + item_id == o.item_id && + verification_risk_signals == o.verification_risk_signals + 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, verification_risk_signals].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/paystub.rb b/lib/plaid/models/paystub.rb index eee204e95..2dbf9c37f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/paystub_address.rb b/lib/plaid/models/paystub_address.rb index 64f913d25..c915cd452 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 88674e5b8..49925dfd2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 34bc1b250..c98a8bfa8 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ba53f3df0..e107ce676 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d28e6dd1b..e2c71ce99 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a83c022d3..ee9f5295d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 62b6c2614..96a4c3320 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2c389a686..eb1ce5ad8 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e6b5b7a3f..d64dcafd2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/paystub_verification.rb b/lib/plaid/models/paystub_verification.rb index cfd66b707..822fd7170 100644 --- a/lib/plaid/models/paystub_verification.rb +++ b/lib/plaid/models/paystub_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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 index 2e792b044..4ea624f68 100644 --- a/lib/plaid/models/paystub_verification_status.rb +++ b/lib/plaid/models/paystub_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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/paystub_ytd_details.rb b/lib/plaid/models/paystub_ytd_details.rb index e8125bd4e..936824c20 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 93d5dc243..25178a907 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/personal_finance_category.rb b/lib/plaid/models/personal_finance_category.rb index c5b3ae110..5fffc49b7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 9df92b24c..2d3b53f1e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/phone_type.rb b/lib/plaid/models/phone_type.rb new file mode 100644 index 000000000..a0d9d07e8 --- /dev/null +++ b/lib/plaid/models/phone_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class PhoneType + PHONE = "phone".freeze + FAX = "fax".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/physical_document_category.rb b/lib/plaid/models/physical_document_category.rb new file mode 100644 index 000000000..df2865431 --- /dev/null +++ b/lib/plaid/models/physical_document_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class PhysicalDocumentCategory + DRIVERS_LICENSE = "drivers_license".freeze + ID_CARD = "id_card".freeze + PASSPORT = "passport".freeze + RESIDENCE_PERMIT_CARD = "residence_permit_card".freeze + RESIDENT_CARD = "resident_card".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/physical_document_extracted_data.rb b/lib/plaid/models/physical_document_extracted_data.rb new file mode 100644 index 000000000..bdc8a9755 --- /dev/null +++ b/lib/plaid/models/physical_document_extracted_data.rb @@ -0,0 +1,311 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Data extracted from a user-submitted document. + class PhysicalDocumentExtractedData + # Alpha-numeric ID number extracted via OCR from the user's document image. + attr_accessor :id_number + + attr_accessor :category + + 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 + + # 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' + } + 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_number' => :'String', + :'category' => :'PhysicalDocumentCategory', + :'expiration_date' => :'Date', + :'issuing_country' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'id_number', + :'expiration_date', + ]) + 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::PhysicalDocumentExtractedData` 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::PhysicalDocumentExtractedData`. 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_number') + self.id_number = attributes[:'id_number'] + end + + if attributes.key?(:'category') + self.category = attributes[:'category'] + end + + if attributes.key?(:'expiration_date') + self.expiration_date = attributes[:'expiration_date'] + end + + if attributes.key?(:'issuing_country') + self.issuing_country = attributes[:'issuing_country'] + 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 + + if @issuing_country.nil? + invalid_properties.push('invalid value for "issuing_country", issuing_country cannot be nil.') + end + + if @issuing_country.to_s.length < 2 + 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 + + # 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) + if issuing_country.nil? + fail ArgumentError, 'issuing_country cannot be nil' + end + + if issuing_country.to_s.length < 2 + 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 + + # 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_number == o.id_number && + category == o.category && + expiration_date == o.expiration_date && + issuing_country == o.issuing_country + 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_number, category, expiration_date, issuing_country].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/physical_document_extracted_data_analysis.rb b/lib/plaid/models/physical_document_extracted_data_analysis.rb new file mode 100644 index 000000000..44736ace9 --- /dev/null +++ b/lib/plaid/models/physical_document_extracted_data_analysis.rb @@ -0,0 +1,266 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Analysis of the data extracted from the submitted document. + class PhysicalDocumentExtractedDataAnalysis + attr_accessor :name + + attr_accessor :date_of_birth + + attr_accessor :expiration_date + + attr_accessor :issuing_country + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'date_of_birth' => :'date_of_birth', + :'expiration_date' => :'expiration_date', + :'issuing_country' => :'issuing_country' + } + 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' => :'DocumentNameMatchCode', + :'date_of_birth' => :'DocumentDateOfBirthMatchCode', + :'expiration_date' => :'ExpirationDate', + :'issuing_country' => :'IssuingCountry' + } + 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::PhysicalDocumentExtractedDataAnalysis` 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::PhysicalDocumentExtractedDataAnalysis`. 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?(:'date_of_birth') + self.date_of_birth = attributes[:'date_of_birth'] + end + + if attributes.key?(:'expiration_date') + self.expiration_date = attributes[:'expiration_date'] + end + + if attributes.key?(:'issuing_country') + self.issuing_country = attributes[:'issuing_country'] + 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 @date_of_birth.nil? + invalid_properties.push('invalid value for "date_of_birth", date_of_birth cannot be nil.') + end + + if @expiration_date.nil? + invalid_properties.push('invalid value for "expiration_date", expiration_date cannot be nil.') + end + + if @issuing_country.nil? + invalid_properties.push('invalid value for "issuing_country", issuing_country 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 @date_of_birth.nil? + return false if @expiration_date.nil? + return false if @issuing_country.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 && + date_of_birth == o.date_of_birth && + expiration_date == o.expiration_date && + issuing_country == o.issuing_country + 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, date_of_birth, expiration_date, issuing_country].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/physical_document_images.rb b/lib/plaid/models/physical_document_images.rb new file mode 100644 index 000000000..8b90c270f --- /dev/null +++ b/lib/plaid/models/physical_document_images.rb @@ -0,0 +1,269 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # URLs for downloading original and cropped images for this document submission. The URLs are designed to only allow downloading, not hot linking, so the URL will only serve the document image for 60 seconds before expiring. The expiration time is 60 seconds after the `GET` request for the associated Identity Verification attempt. A new expiring URL is generated with each request, so you can always rerequest the Identity Verification attempt if one of your URLs expires. + class PhysicalDocumentImages + # Temporary URL that expires after 60 seconds for downloading the uncropped original image of the front of the document. + attr_accessor :original_front + + # Temporary URL that expires after 60 seconds for downloading the original image of the back of the document. Might be null if the back of the document was not collected. + attr_accessor :original_back + + # Temporary URL that expires after 60 seconds for downloading a cropped image containing just the front of the document. + attr_accessor :cropped_front + + # Temporary URL that expires after 60 seconds for downloading a cropped image containing just the back of the document. Might be null if the back of the document was not collected. + attr_accessor :cropped_back + + # Temporary URL that expires after 60 seconds for downloading a crop of just the user's face from the document image. Might be null if the document does not contain a face photo. + attr_accessor :face + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'original_front' => :'original_front', + :'original_back' => :'original_back', + :'cropped_front' => :'cropped_front', + :'cropped_back' => :'cropped_back', + :'face' => :'face' + } + 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 + { + :'original_front' => :'String', + :'original_back' => :'String', + :'cropped_front' => :'String', + :'cropped_back' => :'String', + :'face' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'original_back', + :'cropped_front', + :'cropped_back', + :'face' + ]) + 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::PhysicalDocumentImages` 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::PhysicalDocumentImages`. 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?(:'original_front') + self.original_front = attributes[:'original_front'] + end + + if attributes.key?(:'original_back') + self.original_back = attributes[:'original_back'] + end + + if attributes.key?(:'cropped_front') + self.cropped_front = attributes[:'cropped_front'] + end + + if attributes.key?(:'cropped_back') + self.cropped_back = attributes[:'cropped_back'] + end + + if attributes.key?(:'face') + self.face = attributes[:'face'] + 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 @original_front.nil? + invalid_properties.push('invalid value for "original_front", original_front 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 @original_front.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 && + original_front == o.original_front && + original_back == o.original_back && + cropped_front == o.cropped_front && + cropped_back == o.cropped_back && + face == o.face + 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 + [original_front, original_back, cropped_front, cropped_back, face].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/plaid_error.rb b/lib/plaid/models/plaid_error.rb index f19fcb81b..e28d33e55 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -105,6 +105,7 @@ def self.openapi_nullable Set.new([ :'display_message', :'status', + :'suggested_action' ]) end diff --git a/lib/plaid/models/platform_ids.rb b/lib/plaid/models/platform_ids.rb index 183fd4568..d645bfcf8 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..e0c52f1dc --- /dev/null +++ b/lib/plaid/models/po_box_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class POBoxStatus + YES = "yes".freeze + NO = "no".freeze + NO_DATA = "no_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/processor_apex_processor_token_create_request.rb b/lib/plaid/models/processor_apex_processor_token_create_request.rb index 7e456b5f6..eb16dcfd9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d67de3020..280c4b57f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 532ef49a6..78dc08301 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 be3331635..eadbe197e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 dc8dcd55a..9a09eed26 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2e3c5cc16..1a688f829 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 799ab958a..300c3464c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 635d07a08..c69309c61 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e09630be9..f0e10b38c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 882982d02..d37185d47 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 bd6414f28..c3cf22a54 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2c3526195..777692314 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 5b566364e..75d1d3c10 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 c645319f5..85e5857d7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/processor_token_create_response.rb b/lib/plaid/models/processor_token_create_response.rb index 44c8d040b..698c158f1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 af2076866..6cca35693 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a01c38b93..6f728a4dd 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 056ad5533..f37855548 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/products.rb b/lib/plaid/models/products.rb index 5ba480981..38d97b5eb 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..431782743 --- /dev/null +++ b/lib/plaid/models/program_name_sensitivity.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class ProgramNameSensitivity + COARSE = "coarse".freeze + BALANCED = "balanced".freeze + STRICT = "strict".freeze + EXACT = "exact".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/projected_income_summary_field_number.rb b/lib/plaid/models/projected_income_summary_field_number.rb index b950a2614..0fb02f105 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a8e5574a4..212e6bb8d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/recaptcha_required_error.rb b/lib/plaid/models/recaptcha_required_error.rb index defec1fd3..1903603c3 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 0800b3e3f..041f60388 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 c246e5365..16789cd08 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 409b3547b..67f0e1820 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/relay_event.rb b/lib/plaid/models/relay_event.rb index 4d9129908..6058ed134 100644 --- a/lib/plaid/models/relay_event.rb +++ b/lib/plaid/models/relay_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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/removed_transaction.rb b/lib/plaid/models/removed_transaction.rb index 3e37c1506..07374ce2a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/risk_signal_document_reference.rb b/lib/plaid/models/risk_signal_document_reference.rb new file mode 100644 index 000000000..0e0203fb7 --- /dev/null +++ b/lib/plaid/models/risk_signal_document_reference.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Object containing metadata for the document + class RiskSignalDocumentReference + # An identifier of the document referenced by the document metadata. + attr_accessor :document_id + + # The name of the document + attr_accessor :document_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'document_id' => :'document_id', + :'document_name' => :'document_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 + { + :'document_id' => :'String', + :'document_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'document_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::RiskSignalDocumentReference` 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::RiskSignalDocumentReference`. 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?(:'document_id') + self.document_id = attributes[:'document_id'] + end + + if attributes.key?(:'document_name') + self.document_name = attributes[:'document_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 && + document_id == o.document_id && + document_name == o.document_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 + [document_id, document_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/sandbox_bank_transfer_fire_webhook_request.rb b/lib/plaid/models/sandbox_bank_transfer_fire_webhook_request.rb index c0f05ce44..c3f989799 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b7728fd10..38eb014eb 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 110a7a562..6c84870cf 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 1d5d8b812..88913bc88 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6c9111af9..fe39f356c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -25,6 +25,9 @@ class SandboxIncomeFireWebhookRequest # The Item ID associated with the verification. attr_accessor :item_id + # The Plaid `user_id` of the User associated with this webhook, warning, or error. + attr_accessor :user_id + # The URL to which the webhook should be sent. attr_accessor :webhook @@ -59,6 +62,7 @@ def self.attribute_map :'client_id' => :'client_id', :'secret' => :'secret', :'item_id' => :'item_id', + :'user_id' => :'user_id', :'webhook' => :'webhook', :'verification_status' => :'verification_status' } @@ -75,6 +79,7 @@ def self.openapi_types :'client_id' => :'String', :'secret' => :'String', :'item_id' => :'String', + :'user_id' => :'String', :'webhook' => :'String', :'verification_status' => :'String' } @@ -113,6 +118,10 @@ def initialize(attributes = {}) self.item_id = attributes[:'item_id'] end + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + if attributes.key?(:'webhook') self.webhook = attributes[:'webhook'] end @@ -170,6 +179,7 @@ def ==(o) client_id == o.client_id && secret == o.secret && item_id == o.item_id && + user_id == o.user_id && webhook == o.webhook && verification_status == o.verification_status end @@ -183,7 +193,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, secret, item_id, webhook, verification_status].hash + [client_id, secret, item_id, user_id, webhook, verification_status].hash end # Builds the object from hash diff --git a/lib/plaid/models/sandbox_income_fire_webhook_response.rb b/lib/plaid/models/sandbox_income_fire_webhook_response.rb index 4717d43a2..fac7ef59a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 88ef76c26..445915c1e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -27,7 +27,7 @@ class SandboxItemFireWebhookRequest attr_accessor :webhook_type - # The following values for `webhook_code` are supported: * `DEFAULT_UPDATE` * `NEW_ACCOUNTS_AVAILABLE` * `AUTH_DATA_UPDATE` + # The webhook codes that can be fired by this test endpoint. attr_accessor :webhook_code class EnumAttributeValidator diff --git a/lib/plaid/models/sandbox_item_fire_webhook_response.rb b/lib/plaid/models/sandbox_item_fire_webhook_response.rb index 58c453f1e..88ba317b2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 89be94860..0c90e614f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a53d50d38..714666d29 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 c602b90f4..fc7aacca9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6836a2236..a167a8064 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 93aac8c60..09a2f6376 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 394c4b4c8..7e22ff2be 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2624af4db..c08cc6ec1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 683fb7767..8758a3249 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2de44ab8f..ca79f21bb 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a667d6ca2..0c1a2ec58 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 72b4c165f..6848dec4f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 7e48bfc39..19a2ecbee 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d731705ee..5566f6460 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 4f0a18a4b..010afcaa2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6a4f0770f..1fc9b1323 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6b06e91b0..2a924400a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e00d679af..4b00a10d6 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/sandbox_transfer_simulate_response.rb b/lib/plaid/models/sandbox_transfer_simulate_response.rb index bd6d50a89..ea1ce4765 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 fdbc8fe26..595891af5 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d5dac1dd8..b83dda378 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8796aff73..e0cc4e8d7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 912647a4b..84cfe3e3d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 06b745e4d..66b8af54a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..add14e028 --- /dev/null +++ b/lib/plaid/models/screening_hit_analysis.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Analysis information describing why a screening hit matched the provided user information + class ScreeningHitAnalysis + attr_accessor :dates_of_birth + + attr_accessor :documents + + attr_accessor :locations + + attr_accessor :names + + # The version of the screening's `search_terms` that were compared when the screening hit was added. screening hits are immutable once they have been reviewed. If changes are detected due to updates to the screening's `search_terms`, the associated program, or the list's source data prior to review, the screening hit will be updated to reflect those changes. + attr_accessor :search_terms_version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'dates_of_birth' => :'dates_of_birth', + :'documents' => :'documents', + :'locations' => :'locations', + :'names' => :'names', + :'search_terms_version' => :'search_terms_version' + } + 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 + { + :'dates_of_birth' => :'MatchSummaryCode', + :'documents' => :'MatchSummaryCode', + :'locations' => :'MatchSummaryCode', + :'names' => :'MatchSummaryCode', + :'search_terms_version' => :'Float' + } + 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::ScreeningHitAnalysis` 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::ScreeningHitAnalysis`. 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?(:'dates_of_birth') + self.dates_of_birth = attributes[:'dates_of_birth'] + end + + if attributes.key?(:'documents') + self.documents = attributes[:'documents'] + end + + if attributes.key?(:'locations') + self.locations = attributes[:'locations'] + end + + if attributes.key?(:'names') + self.names = attributes[:'names'] + end + + if attributes.key?(:'search_terms_version') + self.search_terms_version = attributes[:'search_terms_version'] + 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 @search_terms_version.nil? + invalid_properties.push('invalid value for "search_terms_version", search_terms_version 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 @search_terms_version.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 && + dates_of_birth == o.dates_of_birth && + documents == o.documents && + locations == o.locations && + names == o.names && + search_terms_version == o.search_terms_version + 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 + [dates_of_birth, documents, locations, names, search_terms_version].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/screening_hit_data.rb b/lib/plaid/models/screening_hit_data.rb new file mode 100644 index 000000000..676deaf2c --- /dev/null +++ b/lib/plaid/models/screening_hit_data.rb @@ -0,0 +1,258 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Information associated with the watchlist hit + class ScreeningHitData + # Dates of birth associated with the watchlist hit + attr_accessor :dates_of_birth + + # Documents associated with the watchlist hit + attr_accessor :documents + + # Locations associated with the watchlist hit + attr_accessor :locations + + # Names associated with the watchlist hit + attr_accessor :names + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'dates_of_birth' => :'dates_of_birth', + :'documents' => :'documents', + :'locations' => :'locations', + :'names' => :'names' + } + 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 + { + :'dates_of_birth' => :'Array', + :'documents' => :'Array', + :'locations' => :'Array', + :'names' => :'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::ScreeningHitData` 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::ScreeningHitData`. 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?(:'dates_of_birth') + if (value = attributes[:'dates_of_birth']).is_a?(Array) + self.dates_of_birth = value + end + end + + if attributes.key?(:'documents') + if (value = attributes[:'documents']).is_a?(Array) + self.documents = value + end + end + + if attributes.key?(:'locations') + if (value = attributes[:'locations']).is_a?(Array) + self.locations = value + end + end + + if attributes.key?(:'names') + if (value = attributes[:'names']).is_a?(Array) + self.names = 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 && + dates_of_birth == o.dates_of_birth && + documents == o.documents && + locations == o.locations && + names == o.names + 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 + [dates_of_birth, documents, locations, names].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/screening_hit_date_of_birth_item.rb b/lib/plaid/models/screening_hit_date_of_birth_item.rb new file mode 100644 index 000000000..41d131068 --- /dev/null +++ b/lib/plaid/models/screening_hit_date_of_birth_item.rb @@ -0,0 +1,228 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Analyzed date of birth for the associated hit + class ScreeningHitDateOfBirthItem + attr_accessor :analysis + + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'analysis' => :'analysis', + :'data' => :'data' + } + 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 + { + :'analysis' => :'MatchSummary', + :'data' => :'DateRange' + } + 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::ScreeningHitDateOfBirthItem` 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::ScreeningHitDateOfBirthItem`. 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?(:'analysis') + self.analysis = attributes[:'analysis'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + 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 && + analysis == o.analysis && + data == o.data + 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 + [analysis, data].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/screening_hit_documents_items.rb b/lib/plaid/models/screening_hit_documents_items.rb new file mode 100644 index 000000000..c7e488b0e --- /dev/null +++ b/lib/plaid/models/screening_hit_documents_items.rb @@ -0,0 +1,228 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Analyzed document information for the associated hit + class ScreeningHitDocumentsItems + attr_accessor :analysis + + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'analysis' => :'analysis', + :'data' => :'data' + } + 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 + { + :'analysis' => :'MatchSummary', + :'data' => :'WatchlistScreeningDocument' + } + 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::ScreeningHitDocumentsItems` 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::ScreeningHitDocumentsItems`. 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?(:'analysis') + self.analysis = attributes[:'analysis'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + 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 && + analysis == o.analysis && + data == o.data + 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 + [analysis, data].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/screening_hit_names_items.rb b/lib/plaid/models/screening_hit_names_items.rb new file mode 100644 index 000000000..e18f656f8 --- /dev/null +++ b/lib/plaid/models/screening_hit_names_items.rb @@ -0,0 +1,228 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Analyzed name information for the associated hit + class ScreeningHitNamesItems + attr_accessor :analysis + + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'analysis' => :'analysis', + :'data' => :'data' + } + 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 + { + :'analysis' => :'MatchSummary', + :'data' => :'IndividualScreeningHitNames' + } + 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::ScreeningHitNamesItems` 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::ScreeningHitNamesItems`. 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?(:'analysis') + self.analysis = attributes[:'analysis'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + 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 && + analysis == o.analysis && + data == o.data + 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 + [analysis, data].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/screening_status_updated_webhook.rb b/lib/plaid/models/screening_status_updated_webhook.rb new file mode 100644 index 000000000..b181f96eb --- /dev/null +++ b/lib/plaid/models/screening_status_updated_webhook.rb @@ -0,0 +1,251 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Fired when an individual screening status has changed, which can occur manually via the dashboard or during ongoing monitoring. + class ScreeningStatusUpdatedWebhook + # `SCREENING` + attr_accessor :webhook_type + + # `STATUS_UPDATED` + attr_accessor :webhook_code + + # The ID of the associated screening. + attr_accessor :screening_id + + # 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' + } + 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 + { + :'webhook_type' => :'String', + :'webhook_code' => :'String', + :'screening_id' => :'AnyType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'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::ScreeningStatusUpdatedWebhook` 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::ScreeningStatusUpdatedWebhook`. 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?(:'webhook_type') + self.webhook_type = attributes[:'webhook_type'] + end + + if attributes.key?(:'webhook_code') + self.webhook_code = attributes[:'webhook_code'] + end + + if attributes.key?(:'screening_id') + self.screening_id = attributes[:'screening_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 @webhook_type.nil? + invalid_properties.push('invalid value for "webhook_type", webhook_type cannot be nil.') + end + + if @webhook_code.nil? + invalid_properties.push('invalid value for "webhook_code", webhook_code 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 @webhook_type.nil? + return false if @webhook_code.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 && + webhook_type == o.webhook_type && + webhook_code == o.webhook_code && + screening_id == o.screening_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 + [webhook_type, webhook_code, screening_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/security.rb b/lib/plaid/models/security.rb index 7d2f6a3d6..25333f68c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/security_override.rb b/lib/plaid/models/security_override.rb index c2c9bc410..c7bca28de 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 64a77fd0c..54a366373 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/servicer_address_data.rb b/lib/plaid/models/servicer_address_data.rb index 8ed6c669a..9300bb02f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/signal_address_data.rb b/lib/plaid/models/signal_address_data.rb index f186c933c..15b26abbc 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d6cc63267..c5dce0c4c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8636fa291..74f8530cc 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 15640cda7..b1741414c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 384ab6340..24c554d80 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/signal_evaluate_request.rb b/lib/plaid/models/signal_evaluate_request.rb index e0d78aa0b..e800bac73 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 791c6cf1c..13da79cb3 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 3a64802a7..1acc15620 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 7f35ce0de..c7e517dd2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ec204bf65..c06c79d7a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 3e0a1c246..64e9c37fc 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a2585984c..718fb19c0 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a365face1..4050e8093 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 42949aa07..1eea40a5c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 cabd3f20b..1b965b3cf 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/single_document_risk_signal.rb b/lib/plaid/models/single_document_risk_signal.rb new file mode 100644 index 000000000..0dab070a1 --- /dev/null +++ b/lib/plaid/models/single_document_risk_signal.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Object containing all risk signals and relevant metadata for a single document + class SingleDocumentRiskSignal + attr_accessor :document_reference + + # Array of attributes that indicate whether or not there is fraud risk with a document + attr_accessor :risk_signals + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'document_reference' => :'document_reference', + :'risk_signals' => :'risk_signals' + } + 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 + { + :'document_reference' => :'RiskSignalDocumentReference', + :'risk_signals' => :'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::SingleDocumentRiskSignal` 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::SingleDocumentRiskSignal`. 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?(:'document_reference') + self.document_reference = attributes[:'document_reference'] + end + + if attributes.key?(:'risk_signals') + if (value = attributes[:'risk_signals']).is_a?(Array) + self.risk_signals = 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 @document_reference.nil? + invalid_properties.push('invalid value for "document_reference", document_reference cannot be nil.') + end + + if @risk_signals.nil? + invalid_properties.push('invalid value for "risk_signals", risk_signals 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 @document_reference.nil? + return false if @risk_signals.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 && + document_reference == o.document_reference && + risk_signals == o.risk_signals + 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 + [document_reference, risk_signals].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/source.rb b/lib/plaid/models/source.rb new file mode 100644 index 000000000..2bca86c2f --- /dev/null +++ b/lib/plaid/models/source.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class Source + DASHBOARD = "dashboard".freeze + LINK = "link".freeze + API = "api".freeze + SYSTEM = "system".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/standalone_account_type.rb b/lib/plaid/models/standalone_account_type.rb index 004833568..c1a8d701c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2bf67eddc..13ddc9ece 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 56adbaf0c..9e1a8cb90 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/strategy.rb b/lib/plaid/models/strategy.rb new file mode 100644 index 000000000..16872a6ff --- /dev/null +++ b/lib/plaid/models/strategy.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class Strategy + RESET = "reset".freeze + INCOMPLETE = "incomplete".freeze + INFER = "infer".freeze + CUSTOM = "custom".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/student_loan.rb b/lib/plaid/models/student_loan.rb index e423f5b3e..d897d3b16 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 33e267cda..4d53aec4e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 416778c02..1a04ea722 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 bd6cd00c8..f9c469892 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..cb118b953 --- /dev/null +++ b/lib/plaid/models/sync_updates_available_webhook.rb @@ -0,0 +1,285 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Fired when an Item's transactions change. This can be due to any event resulting in new changes, such as an initial, historical, or default pull. After receipt of this webhook, the new changes can be fetched for the Item from `/transactions/sync`. Note that to receive this webhook for an Item, `/transactions/sync` must have been called at least once on that Item. + class SyncUpdatesAvailableWebhook + # `TRANSACTIONS` + attr_accessor :webhook_type + + # `SYNC_UPDATES_AVAILABLE` + attr_accessor :webhook_code + + # The `item_id` of the Item associated with this webhook, warning, or error + attr_accessor :item_id + + # Indicates if initial pull information is available. + attr_accessor :initial_update_complete + + # Indicates if historical pull information is available. + attr_accessor :historical_update_complete + + # 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', + :'initial_update_complete' => :'initial_update_complete', + :'historical_update_complete' => :'historical_update_complete' + } + 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 + { + :'webhook_type' => :'String', + :'webhook_code' => :'String', + :'item_id' => :'String', + :'initial_update_complete' => :'Boolean', + :'historical_update_complete' => :'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::SyncUpdatesAvailableWebhook` 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::SyncUpdatesAvailableWebhook`. 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?(:'webhook_type') + self.webhook_type = attributes[:'webhook_type'] + end + + if attributes.key?(:'webhook_code') + self.webhook_code = attributes[:'webhook_code'] + end + + if attributes.key?(:'item_id') + self.item_id = attributes[:'item_id'] + end + + if attributes.key?(:'initial_update_complete') + self.initial_update_complete = attributes[:'initial_update_complete'] + end + + if attributes.key?(:'historical_update_complete') + self.historical_update_complete = attributes[:'historical_update_complete'] + 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 @webhook_type.nil? + invalid_properties.push('invalid value for "webhook_type", webhook_type cannot be nil.') + end + + if @webhook_code.nil? + invalid_properties.push('invalid value for "webhook_code", webhook_code cannot be nil.') + end + + if @item_id.nil? + invalid_properties.push('invalid value for "item_id", item_id cannot be nil.') + end + + if @initial_update_complete.nil? + invalid_properties.push('invalid value for "initial_update_complete", initial_update_complete cannot be nil.') + end + + if @historical_update_complete.nil? + invalid_properties.push('invalid value for "historical_update_complete", historical_update_complete 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 @webhook_type.nil? + return false if @webhook_code.nil? + return false if @item_id.nil? + return false if @initial_update_complete.nil? + return false if @historical_update_complete.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 && + webhook_type == o.webhook_type && + webhook_code == o.webhook_code && + item_id == o.item_id && + initial_update_complete == o.initial_update_complete && + historical_update_complete == o.historical_update_complete + 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 + [webhook_type, webhook_code, item_id, initial_update_complete, historical_update_complete].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/taxform.rb b/lib/plaid/models/taxform.rb index b2fa32394..23d352d05 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 3b26c1676..37de47b1c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/total.rb b/lib/plaid/models/total.rb index e76c94dad..25bafaf5f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2b842c9fc..60a573f3d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 600c00f38..8fb29284d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 9fc2498be..e62255414 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ee8215107..b8bc7153f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d57de8e80..fe49d3104 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 bd69adeb5..a21bff057 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 01fab4438..a2e9526b1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 5c389c5ae..c25f37acc 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -106,6 +106,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'merchant_name', :'personal_finance_category' ]) end @@ -214,10 +215,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "description", description cannot be nil.') end - if @merchant_name.nil? - invalid_properties.push('invalid value for "merchant_name", merchant_name cannot be nil.') - end - if @first_date.nil? invalid_properties.push('invalid value for "first_date", first_date cannot be nil.') end @@ -261,7 +258,6 @@ def valid? return false if @category_id.nil? return false if @category.nil? return false if @description.nil? - return false if @merchant_name.nil? return false if @first_date.nil? return false if @last_date.nil? return false if @frequency.nil? diff --git a/lib/plaid/models/transaction_stream_amount.rb b/lib/plaid/models/transaction_stream_amount.rb index 03d772562..643d4670e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 60d6d1838..9c34a7603 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 579c05229..b0de9c045 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8884efbc2..a38d63718 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 c43b1a396..cda468398 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 bf0f0a41d..d36e14eb9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 107734a50..ff8ff721a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e825f2eb5..5210721e1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 28e4110ec..f57e81a20 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 cc3d9ae3b..a058f878c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 1d9d9a68e..b3918afd4 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 737d33c56..f956973a1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 7629c3558..b1b14612a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 af9931ce3..8dd97ad43 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transactions_rule_details.rb b/lib/plaid/models/transactions_rule_details.rb index 2b68943c4..8e08f1e21 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 1703628ea..3c786db1f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d514bb740..9afcb6429 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 bb0efda8a..ea99e85b8 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - # TransactionsRulesCreateRequest defines the request schema for `/transactions/rules/create` + # TransactionsRulesCreateRequest defines the request schema for `beta/transactions/rules/v1/create` class TransactionsRulesCreateRequest # 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 diff --git a/lib/plaid/models/transactions_rules_create_response.rb b/lib/plaid/models/transactions_rules_create_response.rb index 0eb65cd27..47b3de69b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - # TransactionsRulesCreateResponse defines the response schema for `/transactions/rules/create` + # TransactionsRulesCreateResponse defines the response schema for `/beta/transactions/rules/v1/create` class TransactionsRulesCreateResponse attr_accessor :rule diff --git a/lib/plaid/models/transactions_rules_list_request.rb b/lib/plaid/models/transactions_rules_list_request.rb index 0e08bbff2..190129124 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - # TransactionsRulesListRequest defines the request schema for `/transactions/rules/list` + # TransactionsRulesListRequest defines the request schema for `/beta/transactions/rules/v1/list` class TransactionsRulesListRequest # 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 diff --git a/lib/plaid/models/transactions_rules_list_response.rb b/lib/plaid/models/transactions_rules_list_response.rb index 9248b095c..648557590 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - # TransactionsRulesListResponse defines the response schema for `/transactions/rules/list` + # TransactionsRulesListResponse defines the response schema for `/beta/transactions/rules/v1/list` class TransactionsRulesListResponse # A list of the Item's transaction rules attr_accessor :rules diff --git a/lib/plaid/models/transactions_rules_remove_request.rb b/lib/plaid/models/transactions_rules_remove_request.rb index 673f95ec4..f0b6ca76d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - # TransactionsRulesRemoveRequest defines the request schema for `/transactions/rules/remove` + # TransactionsRulesRemoveRequest defines the request schema for `/beta/transactions/rules/v1/remove` class TransactionsRulesRemoveRequest # 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 diff --git a/lib/plaid/models/transactions_rules_remove_response.rb b/lib/plaid/models/transactions_rules_remove_response.rb index 46cd7406f..9946cae33 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -14,7 +14,7 @@ require 'time' module Plaid - # TransactionsRulesRemoveResponse defines the response schema for `/transactions/rules/remove` + # TransactionsRulesRemoveResponse defines the response schema for `/beta/transactions/rules/v1/remove` class TransactionsRulesRemoveResponse # 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 diff --git a/lib/plaid/models/transactions_sync_request.rb b/lib/plaid/models/transactions_sync_request.rb index 8f2d5f81c..5fcab2112 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 66b479d47..c1f5500e2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 54a378a8e..8b2fb0c42 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6f5cd29e5..8cb7b7b1b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_authorization.rb b/lib/plaid/models/transfer_authorization.rb index 1f1ebf40c..52978d881 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d8c0b6d26..76146c68e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_authorization_create_response.rb b/lib/plaid/models/transfer_authorization_create_response.rb index 9add44144..f8a0eec58 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d6d0b3cb7..6760709e6 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 16c963089..3cf23dd06 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 af8b9006c..18ab39cbd 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_authorization_device.rb b/lib/plaid/models/transfer_authorization_device.rb index ae965f164..a8d4c1ceb 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_authorization_guarantee_decision.rb b/lib/plaid/models/transfer_authorization_guarantee_decision.rb index 0779b11a2..bd2a3a32e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 062bfec50..0815013fb 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a22a85c13..06ccd51d8 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 0872e2c0b..453efdb58 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 c111659fd..970f7bbc1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 4956f3756..a879a8779 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ff9379d81..59ec621b0 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -22,7 +22,7 @@ class TransferCreateRequest # 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 - # Deprecated. `authorization_id` is now for used idempotency instead. A random key provided by the client, per unique transfer. 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 a transfer fails due to a network connection error, you can retry the request with the same idempotency key to guarantee that only a single transfer is created. + # Deprecated. `authorization_id` is now used as idempotency instead. A random key provided by the client, per unique transfer. 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 a transfer fails due to a network connection error, you can retry the request with the same idempotency key to guarantee that only a single transfer is created. attr_accessor :idempotency_key # The Plaid `access_token` for the account that will be debited or credited. diff --git a/lib/plaid/models/transfer_create_response.rb b/lib/plaid/models/transfer_create_response.rb index e69ba60c7..87be8aa98 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 c026ff099..54c662e27 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ede935a93..509a87258 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_event_list_response.rb b/lib/plaid/models/transfer_event_list_response.rb index 1adac7fe1..e0a38dcc1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 56f6601d5..f1ace3033 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 94f52b746..1e2b48003 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 8adf61527..088f4dbde 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 54ead02cf..681cb45f1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_events_update_webhook.rb b/lib/plaid/models/transfer_events_update_webhook.rb index fc109181b..972f60332 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_failure.rb b/lib/plaid/models/transfer_failure.rb index 0ceb0d0ee..d8ea0898c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f42abfb19..aa05fe812 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f6a233fec..1dc3df6b9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 cdc72b00f..c4ad09d0b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e49f5a727..0277c90b4 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -48,6 +48,9 @@ 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). + attr_accessor :require_guarantee + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -62,7 +65,8 @@ def self.attribute_map :'user' => :'user', :'description' => :'description', :'metadata' => :'metadata', - :'iso_currency_code' => :'iso_currency_code' + :'iso_currency_code' => :'iso_currency_code', + :'require_guarantee' => :'require_guarantee' } end @@ -85,7 +89,8 @@ def self.openapi_types :'user' => :'TransferUserInResponse', :'description' => :'String', :'metadata' => :'Hash', - :'iso_currency_code' => :'String' + :'iso_currency_code' => :'String', + :'require_guarantee' => :'Boolean' } end @@ -94,6 +99,7 @@ def self.openapi_nullable Set.new([ :'account_id', :'metadata', + :'require_guarantee' ]) end @@ -161,6 +167,10 @@ def initialize(attributes = {}) if attributes.key?(:'iso_currency_code') self.iso_currency_code = attributes[:'iso_currency_code'] end + + if attributes.key?(:'require_guarantee') + self.require_guarantee = attributes[:'require_guarantee'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -251,7 +261,8 @@ def ==(o) user == o.user && description == o.description && metadata == o.metadata && - iso_currency_code == o.iso_currency_code + iso_currency_code == o.iso_currency_code && + require_guarantee == o.require_guarantee end # @see the `==` method @@ -263,7 +274,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created, status, account_id, origination_account_id, amount, mode, ach_class, user, description, metadata, iso_currency_code].hash + [id, created, status, account_id, origination_account_id, amount, mode, ach_class, user, description, metadata, iso_currency_code, require_guarantee].hash end # Builds the object from hash diff --git a/lib/plaid/models/transfer_intent_create_mode.rb b/lib/plaid/models/transfer_intent_create_mode.rb index fe8810144..3fba9389b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 48557621a..2e3693a83 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -46,6 +46,9 @@ 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). + attr_accessor :require_guarantee + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -59,7 +62,8 @@ def self.attribute_map :'origination_account_id' => :'origination_account_id', :'user' => :'user', :'metadata' => :'metadata', - :'iso_currency_code' => :'iso_currency_code' + :'iso_currency_code' => :'iso_currency_code', + :'require_guarantee' => :'require_guarantee' } end @@ -81,7 +85,8 @@ def self.openapi_types :'origination_account_id' => :'String', :'user' => :'TransferUserInRequest', :'metadata' => :'Hash', - :'iso_currency_code' => :'String' + :'iso_currency_code' => :'String', + :'require_guarantee' => :'Boolean' } end @@ -91,6 +96,7 @@ def self.openapi_nullable :'account_id', :'origination_account_id', :'metadata', + :'require_guarantee' ]) end @@ -154,6 +160,12 @@ def initialize(attributes = {}) if attributes.key?(:'iso_currency_code') self.iso_currency_code = attributes[:'iso_currency_code'] end + + if attributes.key?(:'require_guarantee') + self.require_guarantee = attributes[:'require_guarantee'] + else + self.require_guarantee = false + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -248,7 +260,8 @@ def ==(o) origination_account_id == o.origination_account_id && user == o.user && metadata == o.metadata && - iso_currency_code == o.iso_currency_code + iso_currency_code == o.iso_currency_code && + require_guarantee == o.require_guarantee end # @see the `==` method @@ -260,7 +273,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, secret, account_id, mode, amount, description, ach_class, origination_account_id, user, metadata, iso_currency_code].hash + [client_id, secret, account_id, mode, amount, description, ach_class, origination_account_id, user, metadata, iso_currency_code, require_guarantee].hash end # Builds the object from hash diff --git a/lib/plaid/models/transfer_intent_create_response.rb b/lib/plaid/models/transfer_intent_create_response.rb index 8153d27d9..3dd07892a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 38393dcad..f1e60a026 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -57,6 +57,13 @@ 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). + attr_accessor :require_guarantee + + attr_accessor :guarantee_decision + + attr_accessor :guarantee_decision_rationale + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -75,7 +82,10 @@ def self.attribute_map :'user' => :'user', :'description' => :'description', :'metadata' => :'metadata', - :'iso_currency_code' => :'iso_currency_code' + :'iso_currency_code' => :'iso_currency_code', + :'require_guarantee' => :'require_guarantee', + :'guarantee_decision' => :'guarantee_decision', + :'guarantee_decision_rationale' => :'guarantee_decision_rationale' } end @@ -102,7 +112,10 @@ def self.openapi_types :'user' => :'TransferUserInResponse', :'description' => :'String', :'metadata' => :'Hash', - :'iso_currency_code' => :'String' + :'iso_currency_code' => :'String', + :'require_guarantee' => :'Boolean', + :'guarantee_decision' => :'TransferAuthorizationGuaranteeDecision', + :'guarantee_decision_rationale' => :'TransferAuthorizationGuaranteeDecisionRationale' } end @@ -115,6 +128,9 @@ def self.openapi_nullable :'authorization_decision_rationale', :'account_id', :'metadata', + :'require_guarantee', + :'guarantee_decision', + :'guarantee_decision_rationale' ]) end @@ -198,6 +214,18 @@ def initialize(attributes = {}) if attributes.key?(:'iso_currency_code') self.iso_currency_code = attributes[:'iso_currency_code'] end + + if attributes.key?(:'require_guarantee') + self.require_guarantee = attributes[:'require_guarantee'] + end + + if attributes.key?(:'guarantee_decision') + self.guarantee_decision = attributes[:'guarantee_decision'] + end + + if attributes.key?(:'guarantee_decision_rationale') + self.guarantee_decision_rationale = attributes[:'guarantee_decision_rationale'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -292,7 +320,10 @@ def ==(o) user == o.user && description == o.description && metadata == o.metadata && - iso_currency_code == o.iso_currency_code + iso_currency_code == o.iso_currency_code && + require_guarantee == o.require_guarantee && + guarantee_decision == o.guarantee_decision && + guarantee_decision_rationale == o.guarantee_decision_rationale end # @see the `==` method @@ -304,7 +335,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created, status, transfer_id, failure_reason, authorization_decision, authorization_decision_rationale, account_id, origination_account_id, amount, mode, ach_class, user, description, metadata, iso_currency_code].hash + [id, created, status, transfer_id, failure_reason, authorization_decision, authorization_decision_rationale, account_id, origination_account_id, amount, mode, ach_class, user, description, metadata, iso_currency_code, require_guarantee, guarantee_decision, guarantee_decision_rationale].hash end # Builds the object from hash diff --git a/lib/plaid/models/transfer_intent_get_failure_reason.rb b/lib/plaid/models/transfer_intent_get_failure_reason.rb index 7ae44f8d1..d58832576 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_intent_get_request.rb b/lib/plaid/models/transfer_intent_get_request.rb index 9c5833e9c..e4508937d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2e76acada..ad4e8d34d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 ce9d82cbf..f61fc4d57 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 0c35b2067..797ec44a0 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 aabb7c2fc..3935e3b2b 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6f9899280..5ce4048f3 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 24bfdb6b9..45ca305ec 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 245e3cb68..e72e2a2ff 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b53a8e75e..4aae858cb 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 473c28e70..5475ee26f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 dd76f4cea..bf3b0be49 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 4cce307cd..ef716adfb 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2a55d9635..493cd9c13 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a0e3cc925..e161b1071 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e7fb285cc..5797a5b41 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_sweep.rb b/lib/plaid/models/transfer_sweep.rb index d48c89127..10f506a3a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_sweep_get_request.rb b/lib/plaid/models/transfer_sweep_get_request.rb index ccf7adf1c..084b5a369 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 e31790047..2432bc116 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f4b95c913..8c3f4bee2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 de595553d..b8d3b7de0 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 fc75e9d90..a99b3d815 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_type.rb b/lib/plaid/models/transfer_type.rb index d658f38c5..00b2a8ea7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 23886c774..2e45e5df1 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 14cd36ff4..89053d9b7 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 84505e65f..1011c749e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/transfer_user_in_response.rb b/lib/plaid/models/transfer_user_in_response.rb index 34633a6ac..a10f94462 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/update_entity_screening_request.rb b/lib/plaid/models/update_entity_screening_request.rb new file mode 100644 index 000000000..902a0a287 --- /dev/null +++ b/lib/plaid/models/update_entity_screening_request.rb @@ -0,0 +1,285 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for editing an entity watchlist screening + class UpdateEntityScreeningRequest + # ID of the associated entity screening. + attr_accessor :entity_watchlist_screening_id + + attr_accessor :search_terms + + attr_accessor :assignee + + attr_accessor :status + + 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. + 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 + { + :'entity_watchlist_screening_id' => :'entity_watchlist_screening_id', + :'search_terms' => :'search_terms', + :'assignee' => :'assignee', + :'status' => :'status', + :'client_user_id' => :'client_user_id', + :'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 + { + :'entity_watchlist_screening_id' => :'String', + :'search_terms' => :'UpdateEntityScreeningRequestSearchTerms', + :'assignee' => :'String', + :'status' => :'WatchlistScreeningStatus', + :'client_user_id' => :'String', + :'client_id' => :'String', + :'secret' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'search_terms', + :'assignee', + :'status', + :'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::UpdateEntityScreeningRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'entity_watchlist_screening_id') + self.entity_watchlist_screening_id = attributes[:'entity_watchlist_screening_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?(:'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 @entity_watchlist_screening_id.nil? + invalid_properties.push('invalid value for "entity_watchlist_screening_id", entity_watchlist_screening_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_screening_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_screening_id == o.entity_watchlist_screening_id && + search_terms == o.search_terms && + assignee == o.assignee && + status == o.status && + client_user_id == o.client_user_id && + 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 + [entity_watchlist_screening_id, search_terms, assignee, status, client_user_id, 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/update_entity_screening_request_search_terms.rb b/lib/plaid/models/update_entity_screening_request_search_terms.rb new file mode 100644 index 000000000..ba7caa888 --- /dev/null +++ b/lib/plaid/models/update_entity_screening_request_search_terms.rb @@ -0,0 +1,315 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Search terms for editing an entity watchlist screening + class UpdateEntityScreeningRequestSearchTerms + # ID of the associated entity program. + attr_accessor :entity_watchlist_program_id + + attr_accessor :legal_name + + attr_accessor :document + + attr_accessor :email_address + + attr_accessor :country + + attr_accessor :phone_number + + 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. + 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 + { + :'entity_watchlist_program_id' => :'entity_watchlist_program_id', + :'legal_name' => :'legal_name', + :'document' => :'document', + :'email_address' => :'email_address', + :'country' => :'country', + :'phone_number' => :'phone_number', + :'url' => :'url', + :'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 + { + :'entity_watchlist_program_id' => :'String', + :'legal_name' => :'String', + :'document' => :'String', + :'email_address' => :'String', + :'country' => :'String', + :'phone_number' => :'String', + :'url' => :'String', + :'client_id' => :'String', + :'secret' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'legal_name', + :'document', + :'email_address', + :'country', + :'phone_number', + :'url', + ]) + 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::UpdateEntityScreeningRequestSearchTerms` 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::UpdateEntityScreeningRequestSearchTerms`. 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_program_id') + self.entity_watchlist_program_id = attributes[:'entity_watchlist_program_id'] + end + + if attributes.key?(:'legal_name') + self.legal_name = attributes[:'legal_name'] + end + + if attributes.key?(:'document') + self.document = attributes[:'document'] + end + + if attributes.key?(:'email_address') + self.email_address = attributes[:'email_address'] + end + + if attributes.key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.key?(:'phone_number') + self.phone_number = attributes[:'phone_number'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + 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 @entity_watchlist_program_id.nil? + invalid_properties.push('invalid value for "entity_watchlist_program_id", entity_watchlist_program_id cannot be nil.') + end + + 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 + + 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_program_id.nil? + return false if @client_id.nil? + return false if @secret.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_program_id == o.entity_watchlist_program_id && + legal_name == o.legal_name && + document == o.document && + email_address == o.email_address && + country == o.country && + phone_number == o.phone_number && + url == o.url && + 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 + [entity_watchlist_program_id, legal_name, document, email_address, country, phone_number, url, 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/update_individual_screening_request.rb b/lib/plaid/models/update_individual_screening_request.rb new file mode 100644 index 000000000..aa6831f79 --- /dev/null +++ b/lib/plaid/models/update_individual_screening_request.rb @@ -0,0 +1,285 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for editing an individual watchlist screening + class UpdateIndividualScreeningRequest + # ID of the associated screening. + attr_accessor :watchlist_screening_id + + attr_accessor :search_terms + + attr_accessor :assignee + + attr_accessor :status + + 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. + 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 + { + :'watchlist_screening_id' => :'watchlist_screening_id', + :'search_terms' => :'search_terms', + :'assignee' => :'assignee', + :'status' => :'status', + :'client_user_id' => :'client_user_id', + :'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 + { + :'watchlist_screening_id' => :'String', + :'search_terms' => :'UpdateIndividualScreeningRequestSearchTerms', + :'assignee' => :'String', + :'status' => :'WatchlistScreeningStatus', + :'client_user_id' => :'String', + :'client_id' => :'String', + :'secret' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'search_terms', + :'assignee', + :'status', + :'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::UpdateIndividualScreeningRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'watchlist_screening_id') + self.watchlist_screening_id = attributes[:'watchlist_screening_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?(:'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 @watchlist_screening_id.nil? + invalid_properties.push('invalid value for "watchlist_screening_id", watchlist_screening_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_screening_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_screening_id == o.watchlist_screening_id && + search_terms == o.search_terms && + assignee == o.assignee && + status == o.status && + client_user_id == o.client_user_id && + 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 + [watchlist_screening_id, search_terms, assignee, status, client_user_id, 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/update_individual_screening_request_search_terms.rb b/lib/plaid/models/update_individual_screening_request_search_terms.rb new file mode 100644 index 000000000..ae6f56174 --- /dev/null +++ b/lib/plaid/models/update_individual_screening_request_search_terms.rb @@ -0,0 +1,260 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Search terms for editing an individual watchlist screening + class UpdateIndividualScreeningRequestSearchTerms + attr_accessor :watchlist_program_id + + attr_accessor :legal_name + + attr_accessor :date_of_birth + + attr_accessor :document + + attr_accessor :country + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'watchlist_program_id' => :'watchlist_program_id', + :'legal_name' => :'legal_name', + :'date_of_birth' => :'date_of_birth', + :'document' => :'document', + :'country' => :'country' + } + 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_program_id' => :'String', + :'legal_name' => :'String', + :'date_of_birth' => :'Date', + :'document' => :'String', + :'country' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'watchlist_program_id', + :'legal_name', + :'date_of_birth', + :'document', + :'country' + ]) + 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::UpdateIndividualScreeningRequestSearchTerms` 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::UpdateIndividualScreeningRequestSearchTerms`. 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_program_id') + self.watchlist_program_id = attributes[:'watchlist_program_id'] + end + + if attributes.key?(:'legal_name') + self.legal_name = attributes[:'legal_name'] + end + + if attributes.key?(:'date_of_birth') + self.date_of_birth = attributes[:'date_of_birth'] + end + + if attributes.key?(:'document') + self.document = attributes[:'document'] + end + + if attributes.key?(:'country') + self.country = attributes[:'country'] + 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 && + watchlist_program_id == o.watchlist_program_id && + legal_name == o.legal_name && + date_of_birth == o.date_of_birth && + document == o.document && + country == o.country + 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_program_id, legal_name, date_of_birth, document, country].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/user_address.rb b/lib/plaid/models/user_address.rb new file mode 100644 index 000000000..d3d157949 --- /dev/null +++ b/lib/plaid/models/user_address.rb @@ -0,0 +1,328 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Home address for user supplied to `/identity_verification/create` + class UserAddress + # 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. + 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. + attr_accessor :country + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'street' => :'street', + :'street2' => :'street2', + :'city' => :'city', + :'region' => :'region', + :'postal_code' => :'postal_code', + :'country' => :'country' + } + 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 + { + :'street' => :'String', + :'street2' => :'String', + :'city' => :'String', + :'region' => :'String', + :'postal_code' => :'String', + :'country' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'street2', + ]) + 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::UserAddress` 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::UserAddress`. 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?(:'street') + self.street = attributes[:'street'] + end + + if attributes.key?(:'street2') + self.street2 = attributes[:'street2'] + end + + if attributes.key?(:'city') + self.city = attributes[:'city'] + 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') + self.country = attributes[:'country'] + 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 @street.nil? + invalid_properties.push('invalid value for "street", street cannot be nil.') + end + + if @city.nil? + invalid_properties.push('invalid value for "city", city cannot be nil.') + end + + if @region.nil? + invalid_properties.push('invalid value for "region", region cannot be nil.') + end + + if @postal_code.nil? + invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.') + end + + if @country.nil? + invalid_properties.push('invalid value for "country", country cannot be nil.') + 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 + + 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 + + # 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 @street.nil? + return false if @city.nil? + return false if @region.nil? + 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 + + # Custom attribute writer method with validation + # @param [Object] country Value to be assigned + def country=(country) + if country.nil? + fail ArgumentError, 'country cannot be nil' + end + + if country.to_s.length < 2 + 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 + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + street == o.street && + street2 == o.street2 && + city == o.city && + region == o.region && + postal_code == o.postal_code && + country == o.country + 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 + [street, street2, city, region, postal_code, country].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/user_create_request.rb b/lib/plaid/models/user_create_request.rb index 8fc207169..3bffc1776 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 0d76f7425..7ab095b50 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -19,6 +19,7 @@ class UserCreateResponse # The user token associated with the User data is being requested for. attr_accessor :user_token + # The Plaid `user_id` of the User associated with this webhook, warning, or error. attr_accessor :user_id # A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive. diff --git a/lib/plaid/models/user_custom_password.rb b/lib/plaid/models/user_custom_password.rb index c5dc85d25..4bc0392d2 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..ada483d40 --- /dev/null +++ b/lib/plaid/models/user_id_number.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # ID number submitted by the user, currently used only for the Identity Verification product. If the user has not submitted this data yet, this field will be `null`. Otherwise, both fields are guaranteed to be filled. + class UserIDNumber + # Value of identity document value typed in by user. Alpha-numeric, with all formatting characters stripped. + attr_accessor :value + + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'value' => :'value', + :'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 + { + :'value' => :'String', + :'type' => :'IDNumberType' + } + 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::UserIDNumber` 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::UserIDNumber`. 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?(:'value') + self.value = attributes[:'value'] + 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 @value.nil? + invalid_properties.push('invalid value for "value", value 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 @value.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 && + value == o.value && + 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 + [value, 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/user_name.rb b/lib/plaid/models/user_name.rb new file mode 100644 index 000000000..275aa33a6 --- /dev/null +++ b/lib/plaid/models/user_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # The first and last name provided by the user. If the user has not submitted their name, this field will be null. Otherwise, both fields are guaranteed to be filled. + class UserName + # A string with at least one non-whitespace character, with a max length of 100 characters. + attr_accessor :given_name + + # A string with at least one non-whitespace character, with a max length of 100 characters. + attr_accessor :family_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'given_name' => :'given_name', + :'family_name' => :'family_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 + { + :'given_name' => :'String', + :'family_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::UserName` 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::UserName`. 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 + 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 @given_name.nil? + invalid_properties.push('invalid value for "given_name", given_name cannot be nil.') + end + + if @family_name.nil? + invalid_properties.push('invalid value for "family_name", family_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 @given_name.nil? + return false if @family_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 && + given_name == o.given_name && + family_name == o.family_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 + [given_name, family_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/user_permission_revoked_webhook.rb b/lib/plaid/models/user_permission_revoked_webhook.rb index 8241fb297..0d31b60ee 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/verification_attribute.rb b/lib/plaid/models/verification_attribute.rb index 6f68c4481..2fabb7c50 100644 --- a/lib/plaid/models/verification_attribute.rb +++ b/lib/plaid/models/verification_attribute.rb @@ -3,7 +3,7 @@ #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/verification_expired_webhook.rb b/lib/plaid/models/verification_expired_webhook.rb index 631c15b28..b4b4e08af 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/verification_refresh_status.rb b/lib/plaid/models/verification_refresh_status.rb index 1d1da1e31..246cb9f58 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 b059ccc5f..73f3f9822 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 461abc557..c9e68977a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 d1575f34b..30571d6c0 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 9405b8ce1..8f65c220e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..4364194eb --- /dev/null +++ b/lib/plaid/models/wallet.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # An object representing the e-wallet + class Wallet + # A unique ID identifying the e-wallet + attr_accessor :wallet_id + + attr_accessor :balance + + attr_accessor :numbers + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'wallet_id' => :'wallet_id', + :'balance' => :'balance', + :'numbers' => :'numbers' + } + 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 + { + :'wallet_id' => :'String', + :'balance' => :'WalletBalance', + :'numbers' => :'WalletNumbers' + } + 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::Wallet` 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::Wallet`. 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?(:'wallet_id') + self.wallet_id = attributes[:'wallet_id'] + end + + if attributes.key?(:'balance') + self.balance = attributes[:'balance'] + end + + if attributes.key?(:'numbers') + self.numbers = attributes[:'numbers'] + 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 @wallet_id.nil? + invalid_properties.push('invalid value for "wallet_id", wallet_id cannot be nil.') + end + + if @balance.nil? + invalid_properties.push('invalid value for "balance", balance cannot be nil.') + end + + if @numbers.nil? + invalid_properties.push('invalid value for "numbers", numbers 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 @wallet_id.nil? + return false if @balance.nil? + return false if @numbers.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 && + wallet_id == o.wallet_id && + balance == o.balance && + numbers == o.numbers + 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 + [wallet_id, balance, numbers].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/wallet_balance.rb b/lib/plaid/models/wallet_balance.rb index 27cfe6714..125571f98 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..91a172b59 --- /dev/null +++ b/lib/plaid/models/wallet_create_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # WalletCreateRequest defines the request schema for `/wallet/create` + class WalletCreateRequest + # 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 :iso_currency_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_id' => :'client_id', + :'secret' => :'secret', + :'iso_currency_code' => :'iso_currency_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 + { + :'client_id' => :'String', + :'secret' => :'String', + :'iso_currency_code' => :'WalletISOCurrencyCode' + } + 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::WalletCreateRequest` 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::WalletCreateRequest`. 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?(:'iso_currency_code') + self.iso_currency_code = attributes[:'iso_currency_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 + if @iso_currency_code.nil? + invalid_properties.push('invalid value for "iso_currency_code", iso_currency_code 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 @iso_currency_code.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 && + iso_currency_code == o.iso_currency_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 + [client_id, secret, iso_currency_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/wallet_create_response.rb b/lib/plaid/models/wallet_create_response.rb new file mode 100644 index 000000000..c975cba66 --- /dev/null +++ b/lib/plaid/models/wallet_create_response.rb @@ -0,0 +1,276 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # WalletCreateResponse defines the response schema for `/wallet/create` + class WalletCreateResponse + # A unique ID identifying the e-wallet + attr_accessor :wallet_id + + attr_accessor :balance + + attr_accessor :numbers + + # 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 + { + :'wallet_id' => :'wallet_id', + :'balance' => :'balance', + :'numbers' => :'numbers', + :'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 + { + :'wallet_id' => :'String', + :'balance' => :'WalletBalance', + :'numbers' => :'WalletNumbers', + :'request_id' => :'String' + } + 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 + [ + :'PaymentInitiationRecipientGetResponseAllOf', + :'Wallet' + ] + 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::WalletCreateResponse` 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::WalletCreateResponse`. 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?(:'wallet_id') + self.wallet_id = attributes[:'wallet_id'] + end + + if attributes.key?(:'balance') + self.balance = attributes[:'balance'] + end + + if attributes.key?(:'numbers') + self.numbers = attributes[:'numbers'] + 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 @wallet_id.nil? + invalid_properties.push('invalid value for "wallet_id", wallet_id cannot be nil.') + end + + if @balance.nil? + invalid_properties.push('invalid value for "balance", balance cannot be nil.') + end + + if @numbers.nil? + invalid_properties.push('invalid value for "numbers", numbers 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 @wallet_id.nil? + return false if @balance.nil? + return false if @numbers.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 && + wallet_id == o.wallet_id && + balance == o.balance && + numbers == o.numbers && + 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 + [wallet_id, balance, numbers, 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/wallet_get_request.rb b/lib/plaid/models/wallet_get_request.rb index 6723b563e..082688305 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 6adca923e..bb5e42c74 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -21,18 +21,18 @@ class WalletGetResponse attr_accessor :balance + attr_accessor :numbers + # 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 - attr_accessor :numbers - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'wallet_id' => :'wallet_id', :'balance' => :'balance', - :'request_id' => :'request_id', - :'numbers' => :'numbers' + :'numbers' => :'numbers', + :'request_id' => :'request_id' } end @@ -46,18 +46,25 @@ def self.openapi_types { :'wallet_id' => :'String', :'balance' => :'WalletBalance', - :'request_id' => :'String', - :'numbers' => :'WalletNumbers' + :'numbers' => :'WalletNumbers', + :'request_id' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'balance', ]) end + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'PaymentInitiationRecipientGetResponseAllOf', + :'Wallet' + ] + end + # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) @@ -81,13 +88,13 @@ def initialize(attributes = {}) self.balance = attributes[:'balance'] end - if attributes.key?(:'request_id') - self.request_id = attributes[:'request_id'] - end - if attributes.key?(:'numbers') self.numbers = attributes[:'numbers'] 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? @@ -98,6 +105,14 @@ def list_invalid_properties invalid_properties.push('invalid value for "wallet_id", wallet_id cannot be nil.') end + if @balance.nil? + invalid_properties.push('invalid value for "balance", balance cannot be nil.') + end + + if @numbers.nil? + invalid_properties.push('invalid value for "numbers", numbers cannot be nil.') + end + if @request_id.nil? invalid_properties.push('invalid value for "request_id", request_id cannot be nil.') end @@ -109,6 +124,8 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @wallet_id.nil? + return false if @balance.nil? + return false if @numbers.nil? return false if @request_id.nil? true end @@ -120,8 +137,8 @@ def ==(o) self.class == o.class && wallet_id == o.wallet_id && balance == o.balance && - request_id == o.request_id && - numbers == o.numbers + numbers == o.numbers && + request_id == o.request_id end # @see the `==` method @@ -133,7 +150,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [wallet_id, balance, request_id, numbers].hash + [wallet_id, balance, numbers, 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 new file mode 100644 index 000000000..da705ea46 --- /dev/null +++ b/lib/plaid/models/wallet_iso_currency_code.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class WalletISOCurrencyCode + GBP = "GBP".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/wallet_numbers.rb b/lib/plaid/models/wallet_numbers.rb index 44fc470fb..fb4669a04 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 decd2c294..7bcd4ecad 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -22,7 +22,7 @@ class WalletTransaction # A reference for the transaction attr_accessor :reference - # The type of of the transaction. Currently, only `\"PAYOUT\"` is supported. + # The type of the transaction. The supported transaction types that are returned are: `BANK_TRANSFER:` a transaction which credits an e-wallet through an external bank transfer. `PAYOUT:` a transaction which debits an e-wallet by disbursing funds to a counterparty. `PIS_PAY_IN:` a payment which credits an e-wallet through Plaid's Payment Initiation Services (PIS) APIs. For more information see the [Payment Initiation endpoints](https://plaid.com/docs/api/products/payment-initiation/). `REFUND:` a transaction which debits an e-wallet by refunding a previously initated payment made through Plaid's [PIS APIs](https://plaid.com/docs/api/products/payment-initiation/). attr_accessor :type attr_accessor :amount @@ -178,7 +178,7 @@ def valid? return false if @transaction_id.nil? return false if @reference.nil? return false if @type.nil? - type_validator = EnumAttributeValidator.new('String', ["PAYOUT"]) + type_validator = EnumAttributeValidator.new('String', ["BANK_TRANSFER", "PAYOUT", "PIS_PAY_IN", "REFUND"]) return false unless type_validator.valid?(@type) return false if @amount.nil? return false if @counterparty.nil? @@ -190,7 +190,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["PAYOUT"]) + validator = EnumAttributeValidator.new('String', ["BANK_TRANSFER", "PAYOUT", "PIS_PAY_IN", "REFUND"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/lib/plaid/models/wallet_transaction_amount.rb b/lib/plaid/models/wallet_transaction_amount.rb index a88a5878e..5b9b5c78f 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -16,34 +16,11 @@ module Plaid # The amount and currency of a transaction class WalletTransactionAmount - # The ISO-4217 currency code of the transaction. Currently, only `\"GBP\"` is supported. attr_accessor :iso_currency_code # The amount of the transaction. Must contain at most two digits of precision e.g. `1.23`. attr_accessor :value - 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 { @@ -60,7 +37,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'iso_currency_code' => :'String', + :'iso_currency_code' => :'WalletISOCurrencyCode', :'value' => :'Float' } end @@ -103,15 +80,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "iso_currency_code", iso_currency_code cannot be nil.') end - if @iso_currency_code.to_s.length > 3 - invalid_properties.push('invalid value for "iso_currency_code", the character length must be smaller than or equal to 3.') - end - - if @iso_currency_code.to_s.length < 3 - invalid_properties.push('invalid value for "iso_currency_code", the character length must be great than or equal to 3.') - end - - if @value.nil? invalid_properties.push('invalid value for "value", value cannot be nil.') end @@ -128,25 +96,11 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @iso_currency_code.nil? - iso_currency_code_validator = EnumAttributeValidator.new('String', ["GBP"]) - return false unless iso_currency_code_validator.valid?(@iso_currency_code) - return false if @iso_currency_code.to_s.length > 3 - return false if @iso_currency_code.to_s.length < 3 return false if @value.nil? return false if @value < 1 true end - # Custom attribute writer method checking allowed values (enum). - # @param [Object] iso_currency_code Object to be assigned - def iso_currency_code=(iso_currency_code) - validator = EnumAttributeValidator.new('String', ["GBP"]) - unless validator.valid?(iso_currency_code) - fail ArgumentError, "invalid value for \"iso_currency_code\", must be one of #{validator.allowable_values}." - end - @iso_currency_code = iso_currency_code - end - # Custom attribute writer method with validation # @param [Object] value Value to be assigned def value=(value) diff --git a/lib/plaid/models/wallet_transaction_counterparty.rb b/lib/plaid/models/wallet_transaction_counterparty.rb index 1dd3642be..42be2a16d 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 1f402d5ff..cf742a473 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 86f053e55..65459766a 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 15c108c72..f7cc9252e 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_transaction_execute_response.rb b/lib/plaid/models/wallet_transaction_execute_response.rb index 0a7f437ab..1adf7cfb9 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..8677ae391 --- /dev/null +++ b/lib/plaid/models/wallet_transaction_get_request.rb @@ -0,0 +1,266 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # WalletTransactionGetRequest defines the request schema for `/wallet/transaction/get` + class WalletTransactionGetRequest + # 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 ID of the transaction to fetch + attr_accessor :transaction_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_id' => :'client_id', + :'secret' => :'secret', + :'transaction_id' => :'transaction_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', + :'transaction_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::WalletTransactionGetRequest` 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::WalletTransactionGetRequest`. 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?(:'transaction_id') + self.transaction_id = attributes[:'transaction_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 @transaction_id.nil? + invalid_properties.push('invalid value for "transaction_id", transaction_id cannot be nil.') + end + + if @transaction_id.to_s.length < 1 + invalid_properties.push('invalid value for "transaction_id", the character length must be great than or equal to 1.') + 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 @transaction_id.nil? + return false if @transaction_id.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] transaction_id Value to be assigned + def transaction_id=(transaction_id) + if transaction_id.nil? + fail ArgumentError, 'transaction_id cannot be nil' + end + + if transaction_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "transaction_id", the character length must be great than or equal to 1.' + end + + + @transaction_id = transaction_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 && + client_id == o.client_id && + secret == o.secret && + transaction_id == o.transaction_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, transaction_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/wallet_transaction_get_response.rb b/lib/plaid/models/wallet_transaction_get_response.rb new file mode 100644 index 000000000..9b9d0d771 --- /dev/null +++ b/lib/plaid/models/wallet_transaction_get_response.rb @@ -0,0 +1,369 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # WalletTransactionGetResponse defines the response schema for `/wallet/transaction/get` + class WalletTransactionGetResponse + # A unique ID identifying the transaction + attr_accessor :transaction_id + + # A reference for the transaction + attr_accessor :reference + + # The type of the transaction. The supported transaction types that are returned are: `BANK_TRANSFER:` a transaction which credits an e-wallet through an external bank transfer. `PAYOUT:` a transaction which debits an e-wallet by disbursing funds to a counterparty. `PIS_PAY_IN:` a payment which credits an e-wallet through Plaid's Payment Initiation Services (PIS) APIs. For more information see the [Payment Initiation endpoints](https://plaid.com/docs/api/products/payment-initiation/). `REFUND:` a transaction which debits an e-wallet by refunding a previously initated payment made through Plaid's [PIS APIs](https://plaid.com/docs/api/products/payment-initiation/). + attr_accessor :type + + attr_accessor :amount + + attr_accessor :counterparty + + attr_accessor :status + + # Timestamp when the transaction was created, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. + attr_accessor :created_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 + + 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 + { + :'transaction_id' => :'transaction_id', + :'reference' => :'reference', + :'type' => :'type', + :'amount' => :'amount', + :'counterparty' => :'counterparty', + :'status' => :'status', + :'created_at' => :'created_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 + { + :'transaction_id' => :'String', + :'reference' => :'String', + :'type' => :'String', + :'amount' => :'WalletTransactionAmount', + :'counterparty' => :'WalletTransactionCounterparty', + :'status' => :'WalletTransactionStatus', + :'created_at' => :'Time', + :'request_id' => :'String' + } + 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 + [ + :'PaymentInitiationRecipientGetResponseAllOf', + :'WalletTransaction' + ] + 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::WalletTransactionGetResponse` 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::WalletTransactionGetResponse`. 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?(:'transaction_id') + self.transaction_id = attributes[:'transaction_id'] + end + + if attributes.key?(:'reference') + self.reference = attributes[:'reference'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'amount') + self.amount = attributes[:'amount'] + end + + if attributes.key?(:'counterparty') + self.counterparty = attributes[:'counterparty'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_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 @transaction_id.nil? + invalid_properties.push('invalid value for "transaction_id", transaction_id cannot be nil.') + end + + if @reference.nil? + invalid_properties.push('invalid value for "reference", reference cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @amount.nil? + invalid_properties.push('invalid value for "amount", amount cannot be nil.') + end + + if @counterparty.nil? + invalid_properties.push('invalid value for "counterparty", counterparty cannot be nil.') + end + + 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 @transaction_id.nil? + return false if @reference.nil? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('String', ["BANK_TRANSFER", "PAYOUT", "PIS_PAY_IN", "REFUND"]) + return false unless type_validator.valid?(@type) + return false if @amount.nil? + return false if @counterparty.nil? + return false if @status.nil? + return false if @created_at.nil? + return false if @request_id.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', ["BANK_TRANSFER", "PAYOUT", "PIS_PAY_IN", "REFUND"]) + 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 && + transaction_id == o.transaction_id && + reference == o.reference && + type == o.type && + amount == o.amount && + counterparty == o.counterparty && + status == o.status && + created_at == o.created_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 + [transaction_id, reference, type, amount, counterparty, status, created_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/wallet_transaction_status.rb b/lib/plaid/models/wallet_transaction_status.rb index c7210370a..a71793327 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/wallet_transactions_list_request.rb b/lib/plaid/models/wallet_transactions_list_request.rb index d54824ee2..a22c0a4ed 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 902c58dc9..95a7507e0 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 2bfba0ae9..4dce48583 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 new file mode 100644 index 000000000..1f6a866fa --- /dev/null +++ b/lib/plaid/models/watchlist_screening_audit_trail.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Information about the last change made to the parent object specifying what caused the change as well as when it occurred. + class WatchlistScreeningAuditTrail + attr_accessor :source + + attr_accessor :dashboard_user_id + + # An ISO8601 formatted timestamp. + attr_accessor :timestamp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'source' => :'source', + :'dashboard_user_id' => :'dashboard_user_id', + :'timestamp' => :'timestamp' + } + 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 + { + :'source' => :'Source', + :'dashboard_user_id' => :'String', + :'timestamp' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'dashboard_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::WatchlistScreeningAuditTrail` 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::WatchlistScreeningAuditTrail`. 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?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'dashboard_user_id') + self.dashboard_user_id = attributes[:'dashboard_user_id'] + end + + if attributes.key?(:'timestamp') + self.timestamp = attributes[:'timestamp'] + 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 @source.nil? + invalid_properties.push('invalid value for "source", source cannot be nil.') + end + + if @timestamp.nil? + invalid_properties.push('invalid value for "timestamp", timestamp 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 @source.nil? + return false if @timestamp.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 && + source == o.source && + dashboard_user_id == o.dashboard_user_id && + timestamp == o.timestamp + 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 + [source, dashboard_user_id, timestamp].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_create_request.rb b/lib/plaid/models/watchlist_screening_create_request.rb new file mode 100644 index 000000000..14cdd271d --- /dev/null +++ b/lib/plaid/models/watchlist_screening_create_request.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Request input for creating an individual watchlist screening + class WatchlistScreeningCreateRequest + attr_accessor :search_terms + + 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. + 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 + { + :'search_terms' => :'search_terms', + :'client_user_id' => :'client_user_id', + :'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 + { + :'search_terms' => :'WatchlistScreeningRequestSearchTerms', + :'client_user_id' => :'String', + :'client_id' => :'String', + :'secret' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'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::WatchlistScreeningCreateRequest` 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'search_terms') + self.search_terms = attributes[:'search_terms'] + end + + if attributes.key?(:'client_user_id') + self.client_user_id = attributes[:'client_user_id'] + 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 @search_terms.nil? + invalid_properties.push('invalid value for "search_terms", search_terms 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 @search_terms.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 && + search_terms == o.search_terms && + client_user_id == o.client_user_id && + 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 + [search_terms, client_user_id, 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/watchlist_screening_document.rb b/lib/plaid/models/watchlist_screening_document.rb new file mode 100644 index 000000000..66d152cf8 --- /dev/null +++ b/lib/plaid/models/watchlist_screening_document.rb @@ -0,0 +1,271 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # An official document, usually issued by a governing body or institution, with an associated identifier. + class WatchlistScreeningDocument + attr_accessor :type + + # The numeric or alphanumeric identifier associated with this document. + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'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 + { + :'type' => :'WatchlistScreeningDocumentType', + :'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::WatchlistScreeningDocument` 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::WatchlistScreeningDocument`. 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'] + 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 + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @value.nil? + invalid_properties.push('invalid value for "value", value cannot be nil.') + end + + if @value.to_s.length < 4 + invalid_properties.push('invalid value for "value", the character length must be great than or equal to 4.') + end + + pattern = Regexp.new(/^\S+(\s+\S+)*$/) + if @value !~ pattern + invalid_properties.push("invalid value for \"value\", 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 @type.nil? + return false if @value.nil? + return false if @value.to_s.length < 4 + return false if @value !~ Regexp.new(/^\S+(\s+\S+)*$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] value Value to be assigned + def value=(value) + if value.nil? + fail ArgumentError, 'value cannot be nil' + end + + if value.to_s.length < 4 + fail ArgumentError, 'invalid value for "value", the character length must be great than or equal to 4.' + end + + pattern = Regexp.new(/^\S+(\s+\S+)*$/) + if value !~ pattern + fail ArgumentError, "invalid value for \"value\", must conform to the pattern #{pattern}." + end + + + @value = value + 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 && + 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 + [type, 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/watchlist_screening_document_type.rb b/lib/plaid/models/watchlist_screening_document_type.rb new file mode 100644 index 000000000..c09e58b61 --- /dev/null +++ b/lib/plaid/models/watchlist_screening_document_type.rb @@ -0,0 +1,50 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class WatchlistScreeningDocumentType + BIRTH_CERTIFICATE = "birth_certificate".freeze + DRIVERS_LICENSE = "drivers_license".freeze + IMMIGRATION_NUMBER = "immigration_number".freeze + MILITARY_ID = "military_id".freeze + OTHER = "other".freeze + PASSPORT = "passport".freeze + PERSONAL_IDENTIFICATION = "personal_identification".freeze + RATION_CARD = "ration_card".freeze + SSN = "ssn".freeze + STUDENT_ID = "student_id".freeze + TAX_ID = "tax_id".freeze + TRAVEL_DOCUMENT = "travel_document".freeze + VOTER_ID = "voter_id".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/watchlist_screening_entity_review_list.rb b/lib/plaid/models/watchlist_screening_entity_review_list.rb new file mode 100644 index 000000000..af8540ad7 --- /dev/null +++ b/lib/plaid/models/watchlist_screening_entity_review_list.rb @@ -0,0 +1,242 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # List of entity watchlist screening reviews + class WatchlistScreeningEntityReviewList + # List of entity watchlist screening reviews + attr_accessor :entity_watchlist_screening_reviews + + # 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_screening_reviews' => :'entity_watchlist_screening_reviews', + :'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_screening_reviews' => :'Array', + :'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::WatchlistScreeningEntityReviewList` 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::WatchlistScreeningEntityReviewList`. 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_screening_reviews') + if (value = attributes[:'entity_watchlist_screening_reviews']).is_a?(Array) + self.entity_watchlist_screening_reviews = value + end + 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_screening_reviews.nil? + invalid_properties.push('invalid value for "entity_watchlist_screening_reviews", entity_watchlist_screening_reviews 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_screening_reviews.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_screening_reviews == o.entity_watchlist_screening_reviews && + 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_screening_reviews, 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 new file mode 100644 index 000000000..248de5d31 --- /dev/null +++ b/lib/plaid/models/watchlist_screening_hit.rb @@ -0,0 +1,349 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Data from a government watchlist or PEP list that has been attached to the screening. + class WatchlistScreeningHit + # ID of the associated screening hit. + attr_accessor :id + + attr_accessor :review_status + + # An ISO8601 formatted timestamp. + attr_accessor :first_active + + attr_accessor :inactive_since + + attr_accessor :historical_since + + attr_accessor :list_code + + # A universal identifier for a watchlist individual that is stable across searches and updates. + attr_accessor :plaid_uid + + # The identifier provided by the source sanction or watchlist. When one is not provided by the source, this is `null`. + attr_accessor :source_uid + + attr_accessor :analysis + + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'review_status' => :'review_status', + :'first_active' => :'first_active', + :'inactive_since' => :'inactive_since', + :'historical_since' => :'historical_since', + :'list_code' => :'list_code', + :'plaid_uid' => :'plaid_uid', + :'source_uid' => :'source_uid', + :'analysis' => :'analysis', + :'data' => :'data' + } + 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', + :'review_status' => :'WatchlistScreeningHitStatus', + :'first_active' => :'Time', + :'inactive_since' => :'Time', + :'historical_since' => :'Time', + :'list_code' => :'IndividualWatchlistCode', + :'plaid_uid' => :'String', + :'source_uid' => :'String', + :'analysis' => :'ScreeningHitAnalysis', + :'data' => :'ScreeningHitData' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'inactive_since', + :'historical_since', + :'source_uid', + ]) + 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::WatchlistScreeningHit` 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::WatchlistScreeningHit`. 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?(:'review_status') + self.review_status = attributes[:'review_status'] + end + + if attributes.key?(:'first_active') + self.first_active = attributes[:'first_active'] + end + + if attributes.key?(:'inactive_since') + self.inactive_since = attributes[:'inactive_since'] + end + + if attributes.key?(:'historical_since') + self.historical_since = attributes[:'historical_since'] + end + + if attributes.key?(:'list_code') + self.list_code = attributes[:'list_code'] + end + + if attributes.key?(:'plaid_uid') + self.plaid_uid = attributes[:'plaid_uid'] + end + + if attributes.key?(:'source_uid') + self.source_uid = attributes[:'source_uid'] + end + + if attributes.key?(:'analysis') + self.analysis = attributes[:'analysis'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + 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 @review_status.nil? + invalid_properties.push('invalid value for "review_status", review_status cannot be nil.') + end + + if @first_active.nil? + invalid_properties.push('invalid value for "first_active", first_active cannot be nil.') + end + + if @list_code.nil? + invalid_properties.push('invalid value for "list_code", list_code cannot be nil.') + end + + if @plaid_uid.nil? + invalid_properties.push('invalid value for "plaid_uid", plaid_uid cannot be nil.') + end + + if @source_uid.to_s.length < 1 + invalid_properties.push('invalid value for "source_uid", the character length must be great than or equal to 1.') + 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 @review_status.nil? + return false if @first_active.nil? + return false if @list_code.nil? + return false if @plaid_uid.nil? + return false if @source_uid.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] source_uid Value to be assigned + def source_uid=(source_uid) + if source_uid.to_s.length < 1 + fail ArgumentError, 'invalid value for "source_uid", the character length must be great than or equal to 1.' + end + + + @source_uid = source_uid + 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 && + review_status == o.review_status && + first_active == o.first_active && + inactive_since == o.inactive_since && + historical_since == o.historical_since && + list_code == o.list_code && + plaid_uid == o.plaid_uid && + source_uid == o.source_uid && + analysis == o.analysis && + data == o.data + 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, review_status, first_active, inactive_since, historical_since, list_code, plaid_uid, source_uid, analysis, data].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_list.rb b/lib/plaid/models/watchlist_screening_hit_list.rb new file mode 100644 index 000000000..274e1c7b2 --- /dev/null +++ b/lib/plaid/models/watchlist_screening_hit_list.rb @@ -0,0 +1,242 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # List of individual watchlist screening hits + class WatchlistScreeningHitList + # List of individual watchlist screening hits + attr_accessor :watchlist_screening_hits + + # 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_screening_hits' => :'watchlist_screening_hits', + :'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_screening_hits' => :'Array', + :'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::WatchlistScreeningHitList` 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::WatchlistScreeningHitList`. 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_screening_hits') + if (value = attributes[:'watchlist_screening_hits']).is_a?(Array) + self.watchlist_screening_hits = value + end + 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_screening_hits.nil? + invalid_properties.push('invalid value for "watchlist_screening_hits", watchlist_screening_hits 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_screening_hits.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_screening_hits == o.watchlist_screening_hits && + 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_screening_hits, 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_locations.rb b/lib/plaid/models/watchlist_screening_hit_locations.rb new file mode 100644 index 000000000..840f59f78 --- /dev/null +++ b/lib/plaid/models/watchlist_screening_hit_locations.rb @@ -0,0 +1,272 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Location information for the associated individual watchlist hit + class WatchlistScreeningHitLocations + # The full location string, potentially including elements like street, city, postal codes and country codes. Note that this is not necessarily a complete or well-formatted address. + attr_accessor :full + + # 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. + def self.attribute_map + { + :'full' => :'full', + :'country' => :'country' + } + 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' => :'String', + :'country' => :'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::WatchlistScreeningHitLocations` 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::WatchlistScreeningHitLocations`. 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') + self.full = attributes[:'full'] + end + + if attributes.key?(:'country') + self.country = attributes[:'country'] + 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.nil? + invalid_properties.push('invalid value for "full", full cannot be nil.') + end + + if @country.nil? + invalid_properties.push('invalid value for "country", country cannot be nil.') + 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 + + 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 + + # 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.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 + + # Custom attribute writer method with validation + # @param [Object] country Value to be assigned + def country=(country) + if country.nil? + fail ArgumentError, 'country cannot be nil' + end + + if country.to_s.length < 2 + 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 + + # 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 == o.full && + country == o.country + 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, country].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_status.rb b/lib/plaid/models/watchlist_screening_hit_status.rb new file mode 100644 index 000000000..4a0a397dc --- /dev/null +++ b/lib/plaid/models/watchlist_screening_hit_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class WatchlistScreeningHitStatus + CONFIRMED = "confirmed".freeze + PENDING_REVIEW = "pending_review".freeze + DISMISSED = "dismissed".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/watchlist_screening_individual.rb b/lib/plaid/models/watchlist_screening_individual.rb new file mode 100644 index 000000000..222fd48e3 --- /dev/null +++ b/lib/plaid/models/watchlist_screening_individual.rb @@ -0,0 +1,287 @@ +=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.115.2 + +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 WatchlistScreeningIndividual + # ID of the associated screening. + attr_accessor :id + + attr_accessor :search_terms + + attr_accessor :assignee + + attr_accessor :status + + attr_accessor :client_user_id + + attr_accessor :audit_trail + + # 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' + } + 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' + } + 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::WatchlistScreeningIndividual` 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::WatchlistScreeningIndividual`. 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 + 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 @audit_trail.nil? + invalid_properties.push('invalid value for "audit_trail", audit_trail 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 @audit_trail.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 && + 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 + 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].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_list.rb b/lib/plaid/models/watchlist_screening_list.rb new file mode 100644 index 000000000..6f59fe69b --- /dev/null +++ b/lib/plaid/models/watchlist_screening_list.rb @@ -0,0 +1,242 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # List of individual watchlist screenings + class WatchlistScreeningList + # List of individual watchlist screenings + attr_accessor :watchlist_screenings + + # 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', + :'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', + :'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::WatchlistScreeningList` 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::WatchlistScreeningList`. 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?(:'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 && + 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, 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 new file mode 100644 index 000000000..9ce6846d6 --- /dev/null +++ b/lib/plaid/models/watchlist_screening_request_search_terms.rb @@ -0,0 +1,302 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Search inputs for creating a watchlist screening + class WatchlistScreeningRequestSearchTerms + # ID of the associated program. + attr_accessor :watchlist_program_id + + # The legal name of the individual being screened. + attr_accessor :legal_name + + attr_accessor :date_of_birth + + attr_accessor :document + + attr_accessor :country + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'watchlist_program_id' => :'watchlist_program_id', + :'legal_name' => :'legal_name', + :'date_of_birth' => :'date_of_birth', + :'document' => :'document', + :'country' => :'country' + } + 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_program_id' => :'String', + :'legal_name' => :'String', + :'date_of_birth' => :'Date', + :'document' => :'String', + :'country' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'date_of_birth', + :'document', + :'country' + ]) + 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::WatchlistScreeningRequestSearchTerms` 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::WatchlistScreeningRequestSearchTerms`. 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_program_id') + self.watchlist_program_id = attributes[:'watchlist_program_id'] + end + + if attributes.key?(:'legal_name') + self.legal_name = attributes[:'legal_name'] + end + + if attributes.key?(:'date_of_birth') + self.date_of_birth = attributes[:'date_of_birth'] + end + + if attributes.key?(:'document') + self.document = attributes[:'document'] + end + + if attributes.key?(:'country') + self.country = attributes[:'country'] + 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_program_id.nil? + invalid_properties.push('invalid value for "watchlist_program_id", watchlist_program_id cannot be nil.') + end + + if @legal_name.nil? + invalid_properties.push('invalid value for "legal_name", legal_name cannot be nil.') + end + + if @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 + + pattern = Regexp.new(/^\S+(\s+\S+)*$/) + if @legal_name !~ pattern + invalid_properties.push("invalid value for \"legal_name\", 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 @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+)*$/) + 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? + fail ArgumentError, 'legal_name cannot be nil' + end + + if 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 + + pattern = Regexp.new(/^\S+(\s+\S+)*$/) + if legal_name !~ pattern + fail ArgumentError, "invalid value for \"legal_name\", must conform to the pattern #{pattern}." + end + + + @legal_name = legal_name + 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_program_id == o.watchlist_program_id && + legal_name == o.legal_name && + date_of_birth == o.date_of_birth && + document == o.document && + country == o.country + 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_program_id, legal_name, date_of_birth, document, country].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_review.rb b/lib/plaid/models/watchlist_screening_review.rb new file mode 100644 index 000000000..d08a4242b --- /dev/null +++ b/lib/plaid/models/watchlist_screening_review.rb @@ -0,0 +1,301 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +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 WatchlistScreeningReview + # ID of the associated review. + attr_accessor :id + + # Hits marked 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 + + # Hits marked as a false positive after thorough manual review. These hits will never recur or be updated once dismissed. + attr_accessor :dismissed_hits + + # A comment submitted by a team member as part of reviewing a watchlist screening. + attr_accessor :comment + + attr_accessor :audit_trail + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'confirmed_hits' => :'confirmed_hits', + :'dismissed_hits' => :'dismissed_hits', + :'comment' => :'comment', + :'audit_trail' => :'audit_trail' + } + 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', + :'confirmed_hits' => :'Array', + :'dismissed_hits' => :'Array', + :'comment' => :'String', + :'audit_trail' => :'WatchlistScreeningAuditTrail' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'comment', + ]) + 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::WatchlistScreeningReview` 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::WatchlistScreeningReview`. 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?(:'confirmed_hits') + if (value = attributes[:'confirmed_hits']).is_a?(Array) + self.confirmed_hits = value + end + end + + if attributes.key?(:'dismissed_hits') + if (value = attributes[:'dismissed_hits']).is_a?(Array) + self.dismissed_hits = value + end + end + + if attributes.key?(:'comment') + self.comment = attributes[:'comment'] + end + + if attributes.key?(:'audit_trail') + self.audit_trail = attributes[:'audit_trail'] + 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 @confirmed_hits.nil? + invalid_properties.push('invalid value for "confirmed_hits", confirmed_hits cannot be nil.') + end + + if @dismissed_hits.nil? + invalid_properties.push('invalid value for "dismissed_hits", dismissed_hits cannot be nil.') + end + + if @comment.to_s.length < 1 + invalid_properties.push('invalid value for "comment", 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 + + 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 @confirmed_hits.nil? + return false if @dismissed_hits.nil? + return false if @comment.to_s.length < 1 + return false if @audit_trail.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] comment Value to be assigned + def comment=(comment) + if comment.to_s.length < 1 + fail ArgumentError, 'invalid value for "comment", the character length must be great than or equal to 1.' + end + + + @comment = comment + 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 && + confirmed_hits == o.confirmed_hits && + dismissed_hits == o.dismissed_hits && + comment == o.comment && + audit_trail == o.audit_trail + 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, confirmed_hits, dismissed_hits, comment, audit_trail].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_review_list.rb b/lib/plaid/models/watchlist_screening_review_list.rb new file mode 100644 index 000000000..56067cc45 --- /dev/null +++ b/lib/plaid/models/watchlist_screening_review_list.rb @@ -0,0 +1,242 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # List of screening reviews + class WatchlistScreeningReviewList + # List of screening reviews + attr_accessor :watchlist_screening_reviews + + # 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_screening_reviews' => :'watchlist_screening_reviews', + :'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_screening_reviews' => :'Array', + :'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::WatchlistScreeningReviewList` 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::WatchlistScreeningReviewList`. 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_screening_reviews') + if (value = attributes[:'watchlist_screening_reviews']).is_a?(Array) + self.watchlist_screening_reviews = value + end + 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_screening_reviews.nil? + invalid_properties.push('invalid value for "watchlist_screening_reviews", watchlist_screening_reviews 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_screening_reviews.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_screening_reviews == o.watchlist_screening_reviews && + 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_screening_reviews, 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_search_terms.rb b/lib/plaid/models/watchlist_screening_search_terms.rb new file mode 100644 index 000000000..c38413d86 --- /dev/null +++ b/lib/plaid/models/watchlist_screening_search_terms.rb @@ -0,0 +1,317 @@ +=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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + # Search terms for creating an individual watchlist screening + class WatchlistScreeningSearchTerms + # ID of the associated program. + attr_accessor :watchlist_program_id + + # The legal name of the individual being screened. + attr_accessor :legal_name + + attr_accessor :date_of_birth + + attr_accessor :document + + attr_accessor :country + + # The current version of the search terms. Starts at `1` and increments with each edit to `search_terms`. + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'watchlist_program_id' => :'watchlist_program_id', + :'legal_name' => :'legal_name', + :'date_of_birth' => :'date_of_birth', + :'document' => :'document', + :'country' => :'country', + :'version' => :'version' + } + 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_program_id' => :'String', + :'legal_name' => :'String', + :'date_of_birth' => :'Date', + :'document' => :'String', + :'country' => :'String', + :'version' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'date_of_birth', + :'document', + :'country', + ]) + 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::WatchlistScreeningSearchTerms` 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::WatchlistScreeningSearchTerms`. 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_program_id') + self.watchlist_program_id = attributes[:'watchlist_program_id'] + end + + if attributes.key?(:'legal_name') + self.legal_name = attributes[:'legal_name'] + end + + if attributes.key?(:'date_of_birth') + self.date_of_birth = attributes[:'date_of_birth'] + end + + if attributes.key?(:'document') + self.document = attributes[:'document'] + end + + if attributes.key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + 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_program_id.nil? + invalid_properties.push('invalid value for "watchlist_program_id", watchlist_program_id cannot be nil.') + end + + if @legal_name.nil? + invalid_properties.push('invalid value for "legal_name", legal_name cannot be nil.') + end + + if @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 + + pattern = Regexp.new(/^\S+(\s+\S+)*$/) + if @legal_name !~ pattern + invalid_properties.push("invalid value for \"legal_name\", must conform to the pattern #{pattern}.") + end + + + if @version.nil? + invalid_properties.push('invalid value for "version", version 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_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 @version.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? + fail ArgumentError, 'legal_name cannot be nil' + end + + if 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 + + pattern = Regexp.new(/^\S+(\s+\S+)*$/) + if legal_name !~ pattern + fail ArgumentError, "invalid value for \"legal_name\", must conform to the pattern #{pattern}." + end + + + @legal_name = legal_name + 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_program_id == o.watchlist_program_id && + legal_name == o.legal_name && + date_of_birth == o.date_of_birth && + document == o.document && + country == o.country && + version == o.version + 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_program_id, legal_name, date_of_birth, document, country, version].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_status.rb b/lib/plaid/models/watchlist_screening_status.rb new file mode 100644 index 000000000..da53373bb --- /dev/null +++ b/lib/plaid/models/watchlist_screening_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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class WatchlistScreeningStatus + REJECTED = "rejected".freeze + PENDING_REVIEW = "pending_review".freeze + CLEARED = "cleared".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/weak_alias_determination.rb b/lib/plaid/models/weak_alias_determination.rb new file mode 100644 index 000000000..d5f28ea34 --- /dev/null +++ b/lib/plaid/models/weak_alias_determination.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.115.2 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.1.1 + +=end + +require 'date' +require 'time' + +module Plaid + class WeakAliasDetermination + NONE = "none".freeze + SOURCE = "source".freeze + PLAID = "plaid".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 d5f7cbeee..a046d0531 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a44f67b47..0e65c300c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/lib/plaid/models/webhook_verification_key_get_request.rb b/lib/plaid/models/webhook_verification_key_get_request.rb index 2ae09793c..db4bac806 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 f22409616..6440ae9f4 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 67b19891f..43943295c 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 5eab57ad0..1a2a5e957 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 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 a1d0267be..88a124031 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 @@ -11,5 +11,5 @@ =end module Plaid - VERSION = '15.4.0' + VERSION = '15.5.0' end diff --git a/plaid.gemspec b/plaid.gemspec index 43357a522..7eaf44080 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.105.1 +The version of the OpenAPI document: 2020-09-14_1.115.2 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.1.1 diff --git a/templates/ruby/api_client.mustache b/templates/ruby/api_client.mustache index acdf48a75..b6af5a778 100644 --- a/templates/ruby/api_client.mustache +++ b/templates/ruby/api_client.mustache @@ -40,8 +40,8 @@ module {{moduleName}} end def create_connection - connection = Faraday.new(url: config.base_url) do |conn| - conn.adapter(Faraday.default_adapter) + @connection = Faraday.new(url: config.base_url) do |builder| + block_given? ? yield(builder) : builder.adapter(Faraday.default_adapter) end end