Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use autoLoad to speed up loading code #454

Closed
bdewater opened this issue Jan 24, 2023 · 14 comments
Closed

Use autoLoad to speed up loading code #454

bdewater opened this issue Jan 24, 2023 · 14 comments

Comments

@bdewater
Copy link

The Plaid gem is quite heavy with over 1000 model files in lib/plaid/models. These are all forcibly loaded here:

plaid-ruby/lib/plaid.rb

Lines 20 to 1091 in 9143e24

require 'plaid/models/ach_class'
require 'plaid/models/apr'
require 'plaid/models/account_access'
require 'plaid/models/account_assets'
require 'plaid/models/account_assets_all_of'
require 'plaid/models/account_balance'
require 'plaid/models/account_base'
require 'plaid/models/account_filter'
require 'plaid/models/account_filters_response'
require 'plaid/models/account_identity'
require 'plaid/models/account_identity_all_of'
require 'plaid/models/account_identity_match_score'
require 'plaid/models/account_identity_match_score_all_of'
require 'plaid/models/account_product_access'
require 'plaid/models/account_product_access_nullable'
require 'plaid/models/account_selection_cardinality'
require 'plaid/models/account_subtype'
require 'plaid/models/account_type'
require 'plaid/models/accounts_balance_get_request'
require 'plaid/models/accounts_balance_get_request_options'
require 'plaid/models/accounts_get_request'
require 'plaid/models/accounts_get_request_options'
require 'plaid/models/accounts_get_response'
require 'plaid/models/action_state'
require 'plaid/models/activity'
require 'plaid/models/activity_type'
require 'plaid/models/address'
require 'plaid/models/address_data'
require 'plaid/models/address_data_nullable'
require 'plaid/models/address_match_score'
require 'plaid/models/address_nullable'
require 'plaid/models/address_purpose_label'
require 'plaid/models/application'
require 'plaid/models/application_get_request'
require 'plaid/models/application_get_response'
require 'plaid/models/asset'
require 'plaid/models/asset_detail'
require 'plaid/models/asset_holder'
require 'plaid/models/asset_holder_name'
require 'plaid/models/asset_owner'
require 'plaid/models/asset_owners'
require 'plaid/models/asset_report'
require 'plaid/models/asset_report_audit_copy_create_request'
require 'plaid/models/asset_report_audit_copy_create_response'
require 'plaid/models/asset_report_audit_copy_get_request'
require 'plaid/models/asset_report_audit_copy_remove_request'
require 'plaid/models/asset_report_audit_copy_remove_response'
require 'plaid/models/asset_report_create_request'
require 'plaid/models/asset_report_create_request_options'
require 'plaid/models/asset_report_create_response'
require 'plaid/models/asset_report_filter_request'
require 'plaid/models/asset_report_filter_response'
require 'plaid/models/asset_report_freddie'
require 'plaid/models/asset_report_freddie_get_request'
require 'plaid/models/asset_report_freddie_get_response'
require 'plaid/models/asset_report_get_request'
require 'plaid/models/asset_report_get_request_options'
require 'plaid/models/asset_report_get_response'
require 'plaid/models/asset_report_item'
require 'plaid/models/asset_report_pdf_get_request'
require 'plaid/models/asset_report_pdf_get_request_options'
require 'plaid/models/asset_report_refresh_request'
require 'plaid/models/asset_report_refresh_request_options'
require 'plaid/models/asset_report_refresh_response'
require 'plaid/models/asset_report_remove_request'
require 'plaid/models/asset_report_remove_response'
require 'plaid/models/asset_report_transaction'
require 'plaid/models/asset_report_transaction_all_of'
require 'plaid/models/asset_report_user'
require 'plaid/models/asset_transaction'
require 'plaid/models/asset_transaction_category_type'
require 'plaid/models/asset_transaction_description'
require 'plaid/models/asset_transaction_detail'
require 'plaid/models/asset_transaction_type'
require 'plaid/models/asset_transactions'
require 'plaid/models/asset_type'
require 'plaid/models/assets'
require 'plaid/models/assets_error_webhook'
require 'plaid/models/assets_product_ready_webhook'
require 'plaid/models/auth_get_numbers'
require 'plaid/models/auth_get_request'
require 'plaid/models/auth_get_request_options'
require 'plaid/models/auth_get_response'
require 'plaid/models/auth_metadata'
require 'plaid/models/auth_supported_methods'
require 'plaid/models/automatically_verified_webhook'
require 'plaid/models/bank_initiated_return_risk'
require 'plaid/models/bank_transfer'
require 'plaid/models/bank_transfer_balance'
require 'plaid/models/bank_transfer_balance_get_request'
require 'plaid/models/bank_transfer_balance_get_response'
require 'plaid/models/bank_transfer_cancel_request'
require 'plaid/models/bank_transfer_cancel_response'
require 'plaid/models/bank_transfer_create_request'
require 'plaid/models/bank_transfer_create_response'
require 'plaid/models/bank_transfer_direction'
require 'plaid/models/bank_transfer_event'
require 'plaid/models/bank_transfer_event_list_bank_transfer_type'
require 'plaid/models/bank_transfer_event_list_direction'
require 'plaid/models/bank_transfer_event_list_request'
require 'plaid/models/bank_transfer_event_list_response'
require 'plaid/models/bank_transfer_event_sync_request'
require 'plaid/models/bank_transfer_event_sync_response'
require 'plaid/models/bank_transfer_event_type'
require 'plaid/models/bank_transfer_failure'
require 'plaid/models/bank_transfer_get_request'
require 'plaid/models/bank_transfer_get_response'
require 'plaid/models/bank_transfer_list_request'
require 'plaid/models/bank_transfer_list_response'
require 'plaid/models/bank_transfer_migrate_account_request'
require 'plaid/models/bank_transfer_migrate_account_response'
require 'plaid/models/bank_transfer_network'
require 'plaid/models/bank_transfer_status'
require 'plaid/models/bank_transfer_sweep'
require 'plaid/models/bank_transfer_sweep_get_request'
require 'plaid/models/bank_transfer_sweep_get_response'
require 'plaid/models/bank_transfer_sweep_list_request'
require 'plaid/models/bank_transfer_sweep_list_response'
require 'plaid/models/bank_transfer_type'
require 'plaid/models/bank_transfer_user'
require 'plaid/models/bank_transfers_events_update_webhook'
require 'plaid/models/bank_transfers_events_update_webhook_for_auth'
require 'plaid/models/categories_get_response'
require 'plaid/models/category'
require 'plaid/models/cause'
require 'plaid/models/cause_all_of'
require 'plaid/models/client_provided_enhanced_transaction'
require 'plaid/models/client_provided_enriched_transaction'
require 'plaid/models/client_provided_raw_transaction'
require 'plaid/models/client_provided_transaction'
require 'plaid/models/client_provided_transaction_location'
require 'plaid/models/connected_application'
require 'plaid/models/counterparty'
require 'plaid/models/counterparty_type'
require 'plaid/models/country_code'
require 'plaid/models/credit1099'
require 'plaid/models/credit1099_filer'
require 'plaid/models/credit1099_payer'
require 'plaid/models/credit1099_recipient'
require 'plaid/models/credit_account_subtype'
require 'plaid/models/credit_amount_with_currency'
require 'plaid/models/credit_audit_copy_token_create_request'
require 'plaid/models/credit_audit_copy_token_create_response'
require 'plaid/models/credit_audit_copy_token_remove_request'
require 'plaid/models/credit_audit_copy_token_remove_response'
require 'plaid/models/credit_audit_copy_token_update_request'
require 'plaid/models/credit_audit_copy_token_update_response'
require 'plaid/models/credit_bank_income'
require 'plaid/models/credit_bank_income_account'
require 'plaid/models/credit_bank_income_account_type'
require 'plaid/models/credit_bank_income_category'
require 'plaid/models/credit_bank_income_cause'
require 'plaid/models/credit_bank_income_error_type'
require 'plaid/models/credit_bank_income_get_request'
require 'plaid/models/credit_bank_income_get_request_options'
require 'plaid/models/credit_bank_income_get_response'
require 'plaid/models/credit_bank_income_historical_summary'
require 'plaid/models/credit_bank_income_item'
require 'plaid/models/credit_bank_income_pdf_get_request'
require 'plaid/models/credit_bank_income_pay_frequency'
require 'plaid/models/credit_bank_income_refresh_request'
require 'plaid/models/credit_bank_income_refresh_request_options'
require 'plaid/models/credit_bank_income_refresh_response'
require 'plaid/models/credit_bank_income_source'
require 'plaid/models/credit_bank_income_summary'
require 'plaid/models/credit_bank_income_transaction'
require 'plaid/models/credit_bank_income_warning'
require 'plaid/models/credit_bank_income_warning_code'
require 'plaid/models/credit_bank_income_warning_type'
require 'plaid/models/credit_card_liability'
require 'plaid/models/credit_category'
require 'plaid/models/credit_document_metadata'
require 'plaid/models/credit_employer_verification'
require 'plaid/models/credit_employment_get_request'
require 'plaid/models/credit_employment_get_response'
require 'plaid/models/credit_employment_item'
require 'plaid/models/credit_employment_verification'
require 'plaid/models/credit_filter'
require 'plaid/models/credit_freddie_mac_asset_detail_voe25'
require 'plaid/models/credit_freddie_mac_asset_transaction_detail_voe25'
require 'plaid/models/credit_freddie_mac_asset_transaction_voa24'
require 'plaid/models/credit_freddie_mac_asset_transaction_voe25'
require 'plaid/models/credit_freddie_mac_asset_transactions_voa24'
require 'plaid/models/credit_freddie_mac_asset_transactions_voe25'
require 'plaid/models/credit_freddie_mac_asset_voa24'
require 'plaid/models/credit_freddie_mac_asset_voe25'
require 'plaid/models/credit_freddie_mac_assets_voa24'
require 'plaid/models/credit_freddie_mac_assets_voe25'
require 'plaid/models/credit_freddie_mac_individual_name_voa24'
require 'plaid/models/credit_freddie_mac_loan_identifiers_voa24'
require 'plaid/models/credit_freddie_mac_loan_voa24'
require 'plaid/models/credit_freddie_mac_loans_voa24'
require 'plaid/models/credit_freddie_mac_parties_voa24'
require 'plaid/models/credit_freddie_mac_party_individual_voa24'
require 'plaid/models/credit_freddie_mac_party_voa24'
require 'plaid/models/credit_freddie_mac_reporting_information_voa24'
require 'plaid/models/credit_freddie_mac_reports_get_request'
require 'plaid/models/credit_freddie_mac_reports_get_response'
require 'plaid/models/credit_freddie_mac_service_voa24'
require 'plaid/models/credit_freddie_mac_service_voe25'
require 'plaid/models/credit_freddie_mac_services_voa24'
require 'plaid/models/credit_freddie_mac_services_voe25'
require 'plaid/models/credit_freddie_mac_verification_of_asset_response_voa24'
require 'plaid/models/credit_freddie_mac_verification_of_asset_response_voe25'
require 'plaid/models/credit_freddie_mac_verification_of_asset_voa24'
require 'plaid/models/credit_freddie_mac_verification_of_asset_voe25'
require 'plaid/models/credit_freddie_mac_verification_of_assets_deal_voa24'
require 'plaid/models/credit_freddie_mac_verification_of_assets_voa24'
require 'plaid/models/credit_freddie_verification_of_employment_deal_voe25'
require 'plaid/models/credit_freddie_verification_of_employment_voe25'
require 'plaid/models/credit_pay_stub'
require 'plaid/models/credit_pay_stub_address'
require 'plaid/models/credit_pay_stub_deductions'
require 'plaid/models/credit_pay_stub_earnings'
require 'plaid/models/credit_pay_stub_employee'
require 'plaid/models/credit_pay_stub_employer'
require 'plaid/models/credit_pay_stub_net_pay'
require 'plaid/models/credit_pay_stub_pay_basis_type'
require 'plaid/models/credit_payroll_income_get_request'
require 'plaid/models/credit_payroll_income_get_response'
require 'plaid/models/credit_payroll_income_precheck_request'
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_relay_create_request'
require 'plaid/models/credit_relay_create_response'
require 'plaid/models/credit_relay_get_request'
require 'plaid/models/credit_relay_refresh_request'
require 'plaid/models/credit_relay_refresh_response'
require 'plaid/models/credit_relay_remove_request'
require 'plaid/models/credit_relay_remove_response'
require 'plaid/models/credit_session'
require 'plaid/models/credit_session_bank_income_result'
require 'plaid/models/credit_session_bank_income_status'
require 'plaid/models/credit_session_document_income_result'
require 'plaid/models/credit_session_error'
require 'plaid/models/credit_session_item_add_result'
require 'plaid/models/credit_session_payroll_income_result'
require 'plaid/models/credit_session_results'
require 'plaid/models/credit_sessions_get_request'
require 'plaid/models/credit_sessions_get_response'
require 'plaid/models/credit_w2'
require 'plaid/models/customer_initiated_return_risk'
require 'plaid/models/dashboard_user'
require 'plaid/models/dashboard_user_get_request'
require 'plaid/models/dashboard_user_get_response'
require 'plaid/models/dashboard_user_list_request'
require 'plaid/models/dashboard_user_list_response'
require 'plaid/models/dashboard_user_status'
require 'plaid/models/date_range'
require 'plaid/models/deductions'
require 'plaid/models/deductions_breakdown'
require 'plaid/models/deductions_total'
require 'plaid/models/default_update_webhook'
require 'plaid/models/deposit_switch_address_data'
require 'plaid/models/deposit_switch_alt_create_request'
require 'plaid/models/deposit_switch_alt_create_response'
require 'plaid/models/deposit_switch_create_request'
require 'plaid/models/deposit_switch_create_request_options'
require 'plaid/models/deposit_switch_create_response'
require 'plaid/models/deposit_switch_get_request'
require 'plaid/models/deposit_switch_get_response'
require 'plaid/models/deposit_switch_state_update_webhook'
require 'plaid/models/deposit_switch_target_account'
require 'plaid/models/deposit_switch_target_user'
require 'plaid/models/deposit_switch_token_create_request'
require 'plaid/models/deposit_switch_token_create_response'
require 'plaid/models/depository_account_subtype'
require 'plaid/models/depository_filter'
require 'plaid/models/detailed_originator'
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_risk_summary'
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'
require 'plaid/models/earnings_total'
require 'plaid/models/email'
require 'plaid/models/email_address_match_score'
require 'plaid/models/employee'
require 'plaid/models/employee_income_summary_field_string'
require 'plaid/models/employer'
require 'plaid/models/employer_income_summary_field_string'
require 'plaid/models/employer_verification'
require 'plaid/models/employers_search_request'
require 'plaid/models/employers_search_response'
require 'plaid/models/employment_details'
require 'plaid/models/employment_verification'
require 'plaid/models/employment_verification_get_request'
require 'plaid/models/employment_verification_get_response'
require 'plaid/models/employment_verification_status'
require 'plaid/models/enhancements'
require 'plaid/models/enrich_transaction_direction'
require 'plaid/models/enrichments'
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_review'
require 'plaid/models/entity_watchlist_screening_search_terms'
require 'plaid/models/entity_watchlist_search_terms'
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/fdx_content_types'
require 'plaid/models/fdxfi_attribute'
require 'plaid/models/fdx_hateoas_link'
require 'plaid/models/fdx_hateoas_link_action'
require 'plaid/models/fdx_notification'
require 'plaid/models/fdx_notification_category'
require 'plaid/models/fdx_notification_payload'
require 'plaid/models/fdx_notification_payload_id_type'
require 'plaid/models/fdx_notification_priority'
require 'plaid/models/fdx_notification_severity'
require 'plaid/models/fdx_notification_type'
require 'plaid/models/fdx_party'
require 'plaid/models/fdx_party_registry'
require 'plaid/models/fdx_party_type'
require 'plaid/models/form1099_type'
require 'plaid/models/freddie_report_type'
require 'plaid/models/generic_screening_hit_location_items'
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_match_request'
require 'plaid/models/identity_match_request_options'
require 'plaid/models/identity_match_response'
require 'plaid/models/identity_match_user'
require 'plaid/models/identity_update_types'
require 'plaid/models/identity_verification'
require 'plaid/models/identity_verification_create_request'
require 'plaid/models/identity_verification_create_response'
require 'plaid/models/identity_verification_get_request'
require 'plaid/models/identity_verification_get_response'
require 'plaid/models/identity_verification_list_request'
require 'plaid/models/identity_verification_list_response'
require 'plaid/models/identity_verification_request_user'
require 'plaid/models/identity_verification_retried_webhook'
require 'plaid/models/identity_verification_retry_request'
require 'plaid/models/identity_verification_retry_request_steps_object'
require 'plaid/models/identity_verification_retry_response'
require 'plaid/models/identity_verification_status'
require 'plaid/models/identity_verification_status_updated_webhook'
require 'plaid/models/identity_verification_step_status'
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'
require 'plaid/models/income_override'
require 'plaid/models/income_summary'
require 'plaid/models/income_summary_field_number'
require 'plaid/models/income_summary_field_string'
require 'plaid/models/income_verification_create_request'
require 'plaid/models/income_verification_create_request_options'
require 'plaid/models/income_verification_create_response'
require 'plaid/models/income_verification_documents_download_request'
require 'plaid/models/income_verification_payroll_flow_type'
require 'plaid/models/income_verification_paystubs_get_request'
require 'plaid/models/income_verification_paystubs_get_response'
require 'plaid/models/income_verification_precheck_confidence'
require 'plaid/models/income_verification_precheck_employer'
require 'plaid/models/income_verification_precheck_employer_address'
require 'plaid/models/income_verification_precheck_employer_address_data'
require 'plaid/models/income_verification_precheck_military_info'
require 'plaid/models/income_verification_precheck_payroll_institution'
require 'plaid/models/income_verification_precheck_request'
require 'plaid/models/income_verification_precheck_response'
require 'plaid/models/income_verification_precheck_user'
require 'plaid/models/income_verification_source_type'
require 'plaid/models/income_verification_status_webhook'
require 'plaid/models/income_verification_taxforms_get_request'
require 'plaid/models/income_verification_taxforms_get_response'
require 'plaid/models/income_verification_webhook_status'
require 'plaid/models/individual_name'
require 'plaid/models/individual_screening_hit_names'
require 'plaid/models/individual_watchlist_code'
require 'plaid/models/individual_watchlist_program'
require 'plaid/models/inflow_model'
require 'plaid/models/initial_update_webhook'
require 'plaid/models/institution'
require 'plaid/models/institution_status'
require 'plaid/models/institution_supported_networks'
require 'plaid/models/institutions_get_by_id_request'
require 'plaid/models/institutions_get_by_id_request_options'
require 'plaid/models/institutions_get_by_id_response'
require 'plaid/models/institutions_get_request'
require 'plaid/models/institutions_get_request_options'
require 'plaid/models/institutions_get_response'
require 'plaid/models/institutions_search_account_filter'
require 'plaid/models/institutions_search_payment_initiation_options'
require 'plaid/models/institutions_search_request'
require 'plaid/models/institutions_search_request_options'
require 'plaid/models/institutions_search_response'
require 'plaid/models/investment_account_subtype'
require 'plaid/models/investment_filter'
require 'plaid/models/investment_holdings_get_request_options'
require 'plaid/models/investment_transaction'
require 'plaid/models/investment_transaction_subtype'
require 'plaid/models/investment_transaction_type'
require 'plaid/models/investments_default_update_webhook'
require 'plaid/models/investments_holdings_get_request'
require 'plaid/models/investments_holdings_get_response'
require 'plaid/models/investments_transactions_get_request'
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'
require 'plaid/models/item_activity_list_request'
require 'plaid/models/item_activity_list_response'
require 'plaid/models/item_application_list_request'
require 'plaid/models/item_application_list_response'
require 'plaid/models/item_application_list_user_auth'
require 'plaid/models/item_application_scopes_update_request'
require 'plaid/models/item_application_scopes_update_response'
require 'plaid/models/item_error_webhook'
require 'plaid/models/item_get_request'
require 'plaid/models/item_get_response'
require 'plaid/models/item_import_request'
require 'plaid/models/item_import_request_options'
require 'plaid/models/item_import_request_user_auth'
require 'plaid/models/item_import_response'
require 'plaid/models/item_product_ready_webhook'
require 'plaid/models/item_public_token_create_request'
require 'plaid/models/item_public_token_create_response'
require 'plaid/models/item_public_token_exchange_request'
require 'plaid/models/item_public_token_exchange_response'
require 'plaid/models/item_remove_request'
require 'plaid/models/item_remove_response'
require 'plaid/models/item_status'
require 'plaid/models/item_status_investments'
require 'plaid/models/item_status_last_webhook'
require 'plaid/models/item_status_nullable'
require 'plaid/models/item_status_transactions'
require 'plaid/models/item_webhook_update_request'
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'
require 'plaid/models/liabilities_get_response'
require 'plaid/models/liabilities_object'
require 'plaid/models/liability_override'
require 'plaid/models/link_delivery_create_request'
require 'plaid/models/link_delivery_create_response'
require 'plaid/models/link_delivery_delivery_method'
require 'plaid/models/link_delivery_get_request'
require 'plaid/models/link_delivery_get_response'
require 'plaid/models/link_delivery_session_status'
require 'plaid/models/link_o_auth_correlation_id_exchange_request'
require 'plaid/models/link_o_auth_correlation_id_exchange_response'
require 'plaid/models/link_token_account_filters'
require 'plaid/models/link_token_create_credit_filter'
require 'plaid/models/link_token_create_depository_filter'
require 'plaid/models/link_token_create_institution_data'
require 'plaid/models/link_token_create_investment_filter'
require 'plaid/models/link_token_create_loan_filter'
require 'plaid/models/link_token_create_request'
require 'plaid/models/link_token_create_request_account_subtypes'
require 'plaid/models/link_token_create_request_auth'
require 'plaid/models/link_token_create_request_deposit_switch'
require 'plaid/models/link_token_create_request_identity_verification'
require 'plaid/models/link_token_create_request_income_verification'
require 'plaid/models/link_token_create_request_income_verification_bank_income'
require 'plaid/models/link_token_create_request_income_verification_payroll_income'
require 'plaid/models/link_token_create_request_payment_initiation'
require 'plaid/models/link_token_create_request_transfer'
require 'plaid/models/link_token_create_request_update'
require 'plaid/models/link_token_create_request_user'
require 'plaid/models/link_token_create_request_user_stated_income_source'
require 'plaid/models/link_token_create_response'
require 'plaid/models/link_token_eu_config'
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/link_token_investments'
require 'plaid/models/loan'
require 'plaid/models/loan_account_subtype'
require 'plaid/models/loan_filter'
require 'plaid/models/loan_identifier'
require 'plaid/models/loan_identifier_type'
require 'plaid/models/loan_identifiers'
require 'plaid/models/loans'
require 'plaid/models/location'
require 'plaid/models/mfa'
require 'plaid/models/match_summary'
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/name_match_score'
require 'plaid/models/net_pay'
require 'plaid/models/new_accounts_available_webhook'
require 'plaid/models/numbers'
require 'plaid/models/numbers_ach'
require 'plaid/models/numbers_ach_nullable'
require 'plaid/models/numbers_bacs'
require 'plaid/models/numbers_bacs_nullable'
require 'plaid/models/numbers_eft'
require 'plaid/models/numbers_eft_nullable'
require 'plaid/models/numbers_iban_nullable'
require 'plaid/models/numbers_international'
require 'plaid/models/numbers_international_iban'
require 'plaid/models/numbers_international_nullable'
require 'plaid/models/originator'
require 'plaid/models/override_account_type'
require 'plaid/models/override_accounts'
require 'plaid/models/owner'
require 'plaid/models/owner_override'
require 'plaid/models/ownership_type'
require 'plaid/models/po_box_status'
require 'plaid/models/pslf_status'
require 'plaid/models/parties'
require 'plaid/models/partner_customer_create_request'
require 'plaid/models/partner_customer_create_response'
require 'plaid/models/partner_customer_enable_request'
require 'plaid/models/partner_customer_enable_response'
require 'plaid/models/partner_customer_get_request'
require 'plaid/models/partner_customer_get_response'
require 'plaid/models/partner_customer_o_auth_institutions_get_request'
require 'plaid/models/partner_customer_o_auth_institutions_get_response'
require 'plaid/models/partner_customer_remove_request'
require 'plaid/models/partner_customer_remove_response'
require 'plaid/models/partner_end_customer'
require 'plaid/models/partner_end_customer_address'
require 'plaid/models/partner_end_customer_assets_under_management'
require 'plaid/models/partner_end_customer_billing_contact'
require 'plaid/models/partner_end_customer_customer_support_info'
require 'plaid/models/partner_end_customer_flowdown_status'
require 'plaid/models/partner_end_customer_o_auth_institution'
require 'plaid/models/partner_end_customer_o_auth_institution_application_status'
require 'plaid/models/partner_end_customer_o_auth_institution_environments'
require 'plaid/models/partner_end_customer_questionnaire_status'
require 'plaid/models/partner_end_customer_secrets'
require 'plaid/models/partner_end_customer_status'
require 'plaid/models/partner_end_customer_technical_contact'
require 'plaid/models/partner_end_customer_with_secrets'
require 'plaid/models/partner_end_customer_with_secrets_all_of'
require 'plaid/models/party'
require 'plaid/models/party_individual'
require 'plaid/models/party_role_type'
require 'plaid/models/pay'
require 'plaid/models/pay_frequency'
require 'plaid/models/pay_frequency_value'
require 'plaid/models/pay_period_details'
require 'plaid/models/pay_stub_deductions_breakdown'
require 'plaid/models/pay_stub_deductions_total'
require 'plaid/models/pay_stub_distribution_breakdown'
require 'plaid/models/pay_stub_earnings_breakdown'
require 'plaid/models/pay_stub_earnings_total'
require 'plaid/models/pay_stub_pay_period_details'
require 'plaid/models/pay_stub_taxpayer_id'
require 'plaid/models/payment_amount'
require 'plaid/models/payment_amount_currency'
require 'plaid/models/payment_amount_nullable'
require 'plaid/models/payment_amount_refunded'
require 'plaid/models/payment_amount_to_refund'
require 'plaid/models/payment_channel'
require 'plaid/models/payment_consent_max_payment_amount'
require 'plaid/models/payment_consent_periodic_alignment'
require 'plaid/models/payment_consent_periodic_amount'
require 'plaid/models/payment_consent_periodic_amount_amount'
require 'plaid/models/payment_consent_periodic_interval'
require 'plaid/models/payment_consent_valid_date_time'
require 'plaid/models/payment_initiation_address'
require 'plaid/models/payment_initiation_consent'
require 'plaid/models/payment_initiation_consent_constraints'
require 'plaid/models/payment_initiation_consent_create_request'
require 'plaid/models/payment_initiation_consent_create_response'
require 'plaid/models/payment_initiation_consent_get_request'
require 'plaid/models/payment_initiation_consent_get_response'
require 'plaid/models/payment_initiation_consent_payment_execute_request'
require 'plaid/models/payment_initiation_consent_payment_execute_response'
require 'plaid/models/payment_initiation_consent_revoke_request'
require 'plaid/models/payment_initiation_consent_revoke_response'
require 'plaid/models/payment_initiation_consent_scope'
require 'plaid/models/payment_initiation_consent_status'
require 'plaid/models/payment_initiation_metadata'
require 'plaid/models/payment_initiation_optional_restriction_bacs'
require 'plaid/models/payment_initiation_payment'
require 'plaid/models/payment_initiation_payment_create_request'
require 'plaid/models/payment_initiation_payment_create_response'
require 'plaid/models/payment_initiation_payment_create_status'
require 'plaid/models/payment_initiation_payment_get_request'
require 'plaid/models/payment_initiation_payment_get_response'
require 'plaid/models/payment_initiation_payment_list_request'
require 'plaid/models/payment_initiation_payment_list_response'
require 'plaid/models/payment_initiation_payment_reverse_request'
require 'plaid/models/payment_initiation_payment_reverse_response'
require 'plaid/models/payment_initiation_payment_status'
require 'plaid/models/payment_initiation_payment_token_create_request'
require 'plaid/models/payment_initiation_payment_token_create_response'
require 'plaid/models/payment_initiation_recipient'
require 'plaid/models/payment_initiation_recipient_create_request'
require 'plaid/models/payment_initiation_recipient_create_response'
require 'plaid/models/payment_initiation_recipient_get_request'
require 'plaid/models/payment_initiation_recipient_get_response'
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_standing_order_metadata'
require 'plaid/models/payment_meta'
require 'plaid/models/payment_profile_create_request'
require 'plaid/models/payment_profile_create_response'
require 'plaid/models/payment_profile_get_request'
require 'plaid/models/payment_profile_get_response'
require 'plaid/models/payment_profile_remove_request'
require 'plaid/models/payment_profile_remove_response'
require 'plaid/models/payment_profile_status'
require 'plaid/models/payment_schedule_interval'
require 'plaid/models/payment_scheme'
require 'plaid/models/payment_status_update_webhook'
require 'plaid/models/payroll_income_account_data'
require 'plaid/models/payroll_income_object'
require 'plaid/models/payroll_income_rate_of_pay'
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'
require 'plaid/models/paystub_details'
require 'plaid/models/paystub_employer'
require 'plaid/models/paystub_override'
require 'plaid/models/paystub_override_employee'
require 'plaid/models/paystub_override_employee_address'
require 'plaid/models/paystub_override_employer'
require 'plaid/models/paystub_pay_frequency'
require 'plaid/models/paystub_ytd_details'
require 'plaid/models/pending_expiration_webhook'
require 'plaid/models/personal_finance_category'
require 'plaid/models/phone_number'
require 'plaid/models/phone_number_match_score'
require 'plaid/models/phone_type'
require 'plaid/models/physical_document_category'
require 'plaid/models/physical_document_extracted_data'
require 'plaid/models/physical_document_extracted_data_analysis'
require 'plaid/models/physical_document_images'
require 'plaid/models/plaid_error'
require 'plaid/models/plaid_error_type'
require 'plaid/models/platform_ids'
require 'plaid/models/processor_apex_processor_token_create_request'
require 'plaid/models/processor_auth_get_request'
require 'plaid/models/processor_auth_get_response'
require 'plaid/models/processor_balance_get_request'
require 'plaid/models/processor_balance_get_request_options'
require 'plaid/models/processor_balance_get_response'
require 'plaid/models/processor_bank_transfer_create_request'
require 'plaid/models/processor_bank_transfer_create_response'
require 'plaid/models/processor_identity_get_request'
require 'plaid/models/processor_identity_get_response'
require 'plaid/models/processor_number'
require 'plaid/models/processor_stripe_bank_account_token_create_request'
require 'plaid/models/processor_stripe_bank_account_token_create_response'
require 'plaid/models/processor_token_create_request'
require 'plaid/models/processor_token_create_response'
require 'plaid/models/product_access'
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'
require 'plaid/models/recipient_bacs_nullable'
require 'plaid/models/recurring_cancelled_webhook'
require 'plaid/models/recurring_new_transfer_webhook'
require 'plaid/models/recurring_transaction_frequency'
require 'plaid/models/recurring_transactions_update_webhook'
require 'plaid/models/recurring_transfer'
require 'plaid/models/recurring_transfer_nullable'
require 'plaid/models/recurring_transfer_skipped_webhook'
require 'plaid/models/removed_transaction'
require 'plaid/models/report_type'
require 'plaid/models/reporting_information'
require 'plaid/models/risk_signal_document_reference'
require 'plaid/models/role'
require 'plaid/models/role_detail'
require 'plaid/models/roles'
require 'plaid/models/sandbox_bank_transfer_fire_webhook_request'
require 'plaid/models/sandbox_bank_transfer_fire_webhook_response'
require 'plaid/models/sandbox_bank_transfer_simulate_request'
require 'plaid/models/sandbox_bank_transfer_simulate_response'
require 'plaid/models/sandbox_income_fire_webhook_request'
require 'plaid/models/sandbox_income_fire_webhook_response'
require 'plaid/models/sandbox_item_fire_webhook_request'
require 'plaid/models/sandbox_item_fire_webhook_response'
require 'plaid/models/sandbox_item_reset_login_request'
require 'plaid/models/sandbox_item_reset_login_response'
require 'plaid/models/sandbox_item_set_verification_status_request'
require 'plaid/models/sandbox_item_set_verification_status_response'
require 'plaid/models/sandbox_oauth_select_accounts_request'
require 'plaid/models/sandbox_payment_profile_reset_login_request'
require 'plaid/models/sandbox_payment_profile_reset_login_response'
require 'plaid/models/sandbox_processor_token_create_request'
require 'plaid/models/sandbox_processor_token_create_request_options'
require 'plaid/models/sandbox_processor_token_create_response'
require 'plaid/models/sandbox_public_token_create_request'
require 'plaid/models/sandbox_public_token_create_request_income_verification_bank_income'
require 'plaid/models/sandbox_public_token_create_request_options'
require 'plaid/models/sandbox_public_token_create_request_options_income_verification'
require 'plaid/models/sandbox_public_token_create_request_options_transactions'
require 'plaid/models/sandbox_public_token_create_response'
require 'plaid/models/sandbox_transfer_fire_webhook_request'
require 'plaid/models/sandbox_transfer_fire_webhook_response'
require 'plaid/models/sandbox_transfer_repayment_simulate_request'
require 'plaid/models/sandbox_transfer_repayment_simulate_response'
require 'plaid/models/sandbox_transfer_simulate_request'
require 'plaid/models/sandbox_transfer_simulate_response'
require 'plaid/models/sandbox_transfer_sweep_simulate_request'
require 'plaid/models/sandbox_transfer_sweep_simulate_response'
require 'plaid/models/sandbox_transfer_test_clock_advance_request'
require 'plaid/models/sandbox_transfer_test_clock_advance_response'
require 'plaid/models/sandbox_transfer_test_clock_create_request'
require 'plaid/models/sandbox_transfer_test_clock_create_response'
require 'plaid/models/sandbox_transfer_test_clock_get_request'
require 'plaid/models/sandbox_transfer_test_clock_get_response'
require 'plaid/models/sandbox_transfer_test_clock_list_request'
require 'plaid/models/sandbox_transfer_test_clock_list_response'
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'
require 'plaid/models/service'
require 'plaid/models/service_product_fulfillment'
require 'plaid/models/service_product_fulfillment_detail'
require 'plaid/models/service_product_fulfillment_identifier'
require 'plaid/models/servicer_address_data'
require 'plaid/models/services'
require 'plaid/models/signal_address_data'
require 'plaid/models/signal_decision_outcome'
require 'plaid/models/signal_decision_report_request'
require 'plaid/models/signal_decision_report_response'
require 'plaid/models/signal_device'
require 'plaid/models/signal_evaluate_core_attributes'
require 'plaid/models/signal_evaluate_request'
require 'plaid/models/signal_evaluate_response'
require 'plaid/models/signal_payment_method'
require 'plaid/models/signal_person_name'
require 'plaid/models/signal_prepare_request'
require 'plaid/models/signal_prepare_response'
require 'plaid/models/signal_return_report_request'
require 'plaid/models/signal_return_report_response'
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/status'
require 'plaid/models/statuses'
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/taxpayer_identifier'
require 'plaid/models/taxpayer_identifier_type'
require 'plaid/models/taxpayer_identifiers'
require 'plaid/models/total'
require 'plaid/models/total_canonical_description'
require 'plaid/models/transaction'
require 'plaid/models/transaction_all_of'
require 'plaid/models/transaction_base'
require 'plaid/models/transaction_code'
require 'plaid/models/transaction_counterparty'
require 'plaid/models/transaction_data'
require 'plaid/models/transaction_override'
require 'plaid/models/transaction_stream'
require 'plaid/models/transaction_stream_amount'
require 'plaid/models/transaction_stream_status'
require 'plaid/models/transactions_category_rule'
require 'plaid/models/transactions_enhance_get_request'
require 'plaid/models/transactions_enhance_get_response'
require 'plaid/models/transactions_enrich_get_request'
require 'plaid/models/transactions_enrich_get_response'
require 'plaid/models/transactions_enrich_request_options'
require 'plaid/models/transactions_get_request'
require 'plaid/models/transactions_get_request_options'
require 'plaid/models/transactions_get_response'
require 'plaid/models/transactions_recurring_get_request'
require 'plaid/models/transactions_recurring_get_request_options'
require 'plaid/models/transactions_recurring_get_response'
require 'plaid/models/transactions_refresh_request'
require 'plaid/models/transactions_refresh_response'
require 'plaid/models/transactions_removed_webhook'
require 'plaid/models/transactions_rule_details'
require 'plaid/models/transactions_rule_field'
require 'plaid/models/transactions_rule_type'
require 'plaid/models/transactions_rules_create_request'
require 'plaid/models/transactions_rules_create_response'
require 'plaid/models/transactions_rules_list_request'
require 'plaid/models/transactions_rules_list_response'
require 'plaid/models/transactions_rules_remove_request'
require 'plaid/models/transactions_rules_remove_response'
require 'plaid/models/transactions_sync_request'
require 'plaid/models/transactions_sync_request_options'
require 'plaid/models/transactions_sync_response'
require 'plaid/models/transfer'
require 'plaid/models/transfer_authorization'
require 'plaid/models/transfer_authorization_create_request'
require 'plaid/models/transfer_authorization_create_response'
require 'plaid/models/transfer_authorization_decision'
require 'plaid/models/transfer_authorization_decision_rationale'
require 'plaid/models/transfer_authorization_decision_rationale_code'
require 'plaid/models/transfer_authorization_device'
require 'plaid/models/transfer_authorization_guarantee_decision'
require 'plaid/models/transfer_authorization_guarantee_decision_rationale'
require 'plaid/models/transfer_authorization_guarantee_decision_rationale_code'
require 'plaid/models/transfer_authorization_proposed_transfer'
require 'plaid/models/transfer_authorization_user_in_request'
require 'plaid/models/transfer_cancel_request'
require 'plaid/models/transfer_cancel_response'
require 'plaid/models/transfer_capabilities_get_rtp'
require 'plaid/models/transfer_capabilities_get_request'
require 'plaid/models/transfer_capabilities_get_response'
require 'plaid/models/transfer_create_request'
require 'plaid/models/transfer_create_response'
require 'plaid/models/transfer_device'
require 'plaid/models/transfer_diligence_status'
require 'plaid/models/transfer_event'
require 'plaid/models/transfer_event_list_request'
require 'plaid/models/transfer_event_list_response'
require 'plaid/models/transfer_event_list_transfer_type'
require 'plaid/models/transfer_event_sync_request'
require 'plaid/models/transfer_event_sync_response'
require 'plaid/models/transfer_event_type'
require 'plaid/models/transfer_events_update_webhook'
require 'plaid/models/transfer_failure'
require 'plaid/models/transfer_get_request'
require 'plaid/models/transfer_get_response'
require 'plaid/models/transfer_intent_authorization_decision'
require 'plaid/models/transfer_intent_create'
require 'plaid/models/transfer_intent_create_mode'
require 'plaid/models/transfer_intent_create_request'
require 'plaid/models/transfer_intent_create_response'
require 'plaid/models/transfer_intent_get'
require 'plaid/models/transfer_intent_get_failure_reason'
require 'plaid/models/transfer_intent_get_request'
require 'plaid/models/transfer_intent_get_response'
require 'plaid/models/transfer_intent_status'
require 'plaid/models/transfer_list_request'
require 'plaid/models/transfer_list_response'
require 'plaid/models/transfer_migrate_account_request'
require 'plaid/models/transfer_migrate_account_response'
require 'plaid/models/transfer_network'
require 'plaid/models/transfer_originator_create_request'
require 'plaid/models/transfer_originator_create_response'
require 'plaid/models/transfer_originator_get_request'
require 'plaid/models/transfer_originator_get_response'
require 'plaid/models/transfer_originator_list_request'
require 'plaid/models/transfer_originator_list_response'
require 'plaid/models/transfer_questionnaire_create_request'
require 'plaid/models/transfer_questionnaire_create_response'
require 'plaid/models/transfer_recurring_cancel_request'
require 'plaid/models/transfer_recurring_cancel_response'
require 'plaid/models/transfer_recurring_create_request'
require 'plaid/models/transfer_recurring_create_response'
require 'plaid/models/transfer_recurring_get_request'
require 'plaid/models/transfer_recurring_get_response'
require 'plaid/models/transfer_recurring_list_request'
require 'plaid/models/transfer_recurring_list_response'
require 'plaid/models/transfer_recurring_schedule'
require 'plaid/models/transfer_recurring_status'
require 'plaid/models/transfer_refund'
require 'plaid/models/transfer_refund_cancel_request'
require 'plaid/models/transfer_refund_cancel_response'
require 'plaid/models/transfer_refund_create_request'
require 'plaid/models/transfer_refund_create_response'
require 'plaid/models/transfer_refund_get_request'
require 'plaid/models/transfer_refund_get_response'
require 'plaid/models/transfer_refund_status'
require 'plaid/models/transfer_repayment'
require 'plaid/models/transfer_repayment_list_request'
require 'plaid/models/transfer_repayment_list_response'
require 'plaid/models/transfer_repayment_return'
require 'plaid/models/transfer_repayment_return_list_request'
require 'plaid/models/transfer_repayment_return_list_response'
require 'plaid/models/transfer_schedule_interval_unit'
require 'plaid/models/transfer_status'
require 'plaid/models/transfer_sweep'
require 'plaid/models/transfer_sweep_get_request'
require 'plaid/models/transfer_sweep_get_response'
require 'plaid/models/transfer_sweep_list_request'
require 'plaid/models/transfer_sweep_list_response'
require 'plaid/models/transfer_sweep_status'
require 'plaid/models/transfer_test_clock'
require 'plaid/models/transfer_type'
require 'plaid/models/transfer_user_address_in_request'
require 'plaid/models/transfer_user_address_in_response'
require 'plaid/models/transfer_user_in_request'
require 'plaid/models/transfer_user_in_request_deprecated'
require 'plaid/models/transfer_user_in_response'
require 'plaid/models/update_entity_screening_request_search_terms'
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/user_stated_income_source_category'
require 'plaid/models/user_stated_income_source_frequency'
require 'plaid/models/user_stated_income_source_pay_type'
require 'plaid/models/validation_source'
require 'plaid/models/validation_sources'
require 'plaid/models/verification_expired_webhook'
require 'plaid/models/verification_of_asset'
require 'plaid/models/verification_of_asset_response'
require 'plaid/models/verification_refresh_status'
require 'plaid/models/verification_status'
require 'plaid/models/w2'
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_list_request'
require 'plaid/models/wallet_list_response'
require 'plaid/models/wallet_numbers'
require 'plaid/models/wallet_transaction'
require 'plaid/models/wallet_transaction_amount'
require 'plaid/models/wallet_transaction_counterparty'
require 'plaid/models/wallet_transaction_counterparty_bacs'
require 'plaid/models/wallet_transaction_counterparty_international'
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_list_request'
require 'plaid/models/wallet_transaction_list_request_options'
require 'plaid/models/wallet_transaction_list_response'
require 'plaid/models/wallet_transaction_status'
require 'plaid/models/wallet_transaction_status_update_webhook'
require 'plaid/models/wallet_transactions_list_request'
require 'plaid/models/warning'
require 'plaid/models/watchlist_screening_audit_trail'
require 'plaid/models/watchlist_screening_document'
require 'plaid/models/watchlist_screening_document_type'
require 'plaid/models/watchlist_screening_entity_create_request'
require 'plaid/models/watchlist_screening_entity_create_response'
require 'plaid/models/watchlist_screening_entity_get_request'
require 'plaid/models/watchlist_screening_entity_get_response'
require 'plaid/models/watchlist_screening_entity_history_list_request'
require 'plaid/models/watchlist_screening_entity_history_list_response'
require 'plaid/models/watchlist_screening_entity_hit_list_request'
require 'plaid/models/watchlist_screening_entity_hit_list_response'
require 'plaid/models/watchlist_screening_entity_list_request'
require 'plaid/models/watchlist_screening_entity_list_response'
require 'plaid/models/watchlist_screening_entity_program_get_request'
require 'plaid/models/watchlist_screening_entity_program_get_response'
require 'plaid/models/watchlist_screening_entity_program_list_request'
require 'plaid/models/watchlist_screening_entity_program_list_response'
require 'plaid/models/watchlist_screening_entity_review_create_request'
require 'plaid/models/watchlist_screening_entity_review_create_response'
require 'plaid/models/watchlist_screening_entity_review_list_request'
require 'plaid/models/watchlist_screening_entity_review_list_response'
require 'plaid/models/watchlist_screening_entity_update_request'
require 'plaid/models/watchlist_screening_entity_update_request_resettable_field'
require 'plaid/models/watchlist_screening_entity_update_response'
require 'plaid/models/watchlist_screening_hit'
require 'plaid/models/watchlist_screening_hit_locations'
require 'plaid/models/watchlist_screening_hit_status'
require 'plaid/models/watchlist_screening_individual'
require 'plaid/models/watchlist_screening_individual_create_request'
require 'plaid/models/watchlist_screening_individual_create_response'
require 'plaid/models/watchlist_screening_individual_get_request'
require 'plaid/models/watchlist_screening_individual_get_response'
require 'plaid/models/watchlist_screening_individual_history_list_request'
require 'plaid/models/watchlist_screening_individual_history_list_response'
require 'plaid/models/watchlist_screening_individual_hit_list_request'
require 'plaid/models/watchlist_screening_individual_hit_list_response'
require 'plaid/models/watchlist_screening_individual_list_request'
require 'plaid/models/watchlist_screening_individual_list_response'
require 'plaid/models/watchlist_screening_individual_program_get_request'
require 'plaid/models/watchlist_screening_individual_program_get_response'
require 'plaid/models/watchlist_screening_individual_program_list_request'
require 'plaid/models/watchlist_screening_individual_program_list_response'
require 'plaid/models/watchlist_screening_individual_review_create_request'
require 'plaid/models/watchlist_screening_individual_review_create_response'
require 'plaid/models/watchlist_screening_individual_review_list_request'
require 'plaid/models/watchlist_screening_individual_review_list_response'
require 'plaid/models/watchlist_screening_individual_update_request'
require 'plaid/models/watchlist_screening_individual_update_request_resettable_field'
require 'plaid/models/watchlist_screening_individual_update_response'
require 'plaid/models/watchlist_screening_request_search_terms'
require 'plaid/models/watchlist_screening_review'
require 'plaid/models/watchlist_screening_search_terms'
require 'plaid/models/watchlist_screening_status'
require 'plaid/models/weak_alias_determination'
require 'plaid/models/webhook_environment_values'
require 'plaid/models/webhook_type'
require 'plaid/models/webhook_update_acknowledged_webhook'
require 'plaid/models/webhook_verification_key_get_request'
require 'plaid/models/webhook_verification_key_get_response'
require 'plaid/models/ytd_gross_income_summary_field_number'
require 'plaid/models/ytd_net_income_summary_field_number'

If this were to use Ruby's autoload feature it would only load files on demand, speeding up the time it takes to start a Rake task or Rails app (and lowering memory usage). Fortunately the OpenAPI generator supports this, see:

Could this be implemented?

@phoenixy1
Copy link

@bdewater thank you for the suggestion! It looks like this functionality was added in OpenAPI generator 6.1 and we are currently on 5.1.1. I know the team has been looking into migrating our libraries to use version 6, but it's turned out to be a non-trivial project and not on the roadmap for H1. I've logged a task in our internal tracker so we can track this as both yet another reason to upgrade and to have it on the task list for when we do upgrade.

@maxwell
Copy link

maxwell commented Jun 28, 2023

To +1 this; the plaid gem is currently the number 1 largest gem in my mature 10 y/o application, surpassing even rails. It is almost 30% of the total memory on boot of my application.

TOP: 178.3906 MiB
  plaid: 55.8594 MiB
    plaid/api/plaid_api: 3.8125 MiB
  rails/all: 53.1094 MiB

@phoenixy1
Copy link

phoenixy1 commented Jul 20, 2023

Just to follow up on this, we've upgraded to auto-generator 6.1, for this release, which is a pre-requisite for enabling autoload. I'm going to try enabling it and run this by the team and if all goes well, autoload can be enabled in our next ruby client library release

@phoenixy1
Copy link

phoenixy1 commented Jul 21, 2023

Following up again, I'm currently at the stage of vetting this proposal with our internal ruby expert, and he asked if you could let us know what kind of load time you're seeing on the Plaid gem? Any further memory profiling data that would have would also be really useful. Getting this info will help us understand the impact of not using autoload and the risk/reward payoff of enabling it.

@phoenixy1
Copy link

@maxwell @bdewater I just wanted to follow up on the questions above? If you could provide this information, that would really help us get this change reviewed and approved. Thanks!

@maxwell
Copy link

maxwell commented Jul 31, 2023

@phoenixy1 thank you for following up.

That's what I have right now given my time constraints. What I can say is that my app uses over 170 gems, (including Rails) and Plaid represents 30% of memory of my app on boot, so it feels like maybe the gem is not doing some sort of best practice, as I also use a fair amount of involved clients of 3rd party services. Given I only use the Gem in a few places, I guess my alternative is to just NOT use it and roll my own, but it feels like maybe a smell that autoloading would resolve. I'm not an expert in Gem packaging, but I do know many gems follow a pattern where including the gem does not immediately pull in EVERY file into memory, and follow more of the lazy autoload pattern.

@bdewater
Copy link
Author

bdewater commented Aug 5, 2023

@phoenixy1 I'm currently on leave, but IIRC after adding the Plaid gem I saw ~1s increase in app cold boot in our Rails app in development environment.

@phoenixy1
Copy link

BTW, this didn't make today's release, but I did get approval and plan to get it out for next month.

@seanbjornsson
Copy link

Hey @phoenixy1 , did this make it into a release?

@phoenixy1
Copy link

@seanbjornsson sorry for the delay and thank you for the reminder! I got super busy right around then with some other projects, but I'm making another stab at adding this and currently have a PR awaiting review that I think should fix it.

@bdewater
Copy link
Author

bdewater commented Nov 2, 2023

I forgot to circle back. Quick benchmark script, store as benchmark.rb:

require "bundler/inline"

gemfile(true) do
  source "https://rubygems.org"

  gem "memory_profiler"
  gem "rails", "7.1.0", require: false
  gem "plaid", "23.0.0", require: false
end

report = MemoryProfiler.report do
  require "rails/all"
  require "plaid"
end

report.pretty_print

Run with ruby benchmark.rb. Some results that stand out:

Memory and objects allocated by Plaid are an order of magnitude more than any other gem, and ~50% of total:

allocated memory by gem
-----------------------------------
  62921889  plaid-23.0.0
   5845889  mail-2.8.1
   4659426  activesupport-7.1.0
   3172977  concurrent-ruby-1.2.2
   2349455  activerecord-7.1.0
   2324454  nokogiri-1.15.4-arm64-darwin
   1453437  tzinfo-2.0.6
   1409491  actionpack-7.1.0
   1312433  marcel-1.0.2
   1064948  rubygems
[omitted rest of list - sum of all non-Plaid gems: 32187121]

allocated objects by gem
-----------------------------------
    692895  plaid-23.0.0
     53900  mail-2.8.1
     42565  activesupport-7.1.0
     28782  concurrent-ruby-1.2.2
     22197  nokogiri-1.15.4-arm64-darwin
     21635  activerecord-7.1.0
     19408  marcel-1.0.2
     13801  actionpack-7.1.0
     12044  tzinfo-2.0.6
     10062  rack-3.0.8
[omitted rest of list - sum of all non-Plaid gems: 305308]

Similar picture for retained:

retained memory by gem
-----------------------------------
   6112398  plaid-23.0.0
    484035  activesupport-7.1.0
    483754  marcel-1.0.2
    432669  rubygems
    310861  nokogiri-1.15.4-arm64-darwin
    299503  activerecord-7.1.0
    255463  concurrent-ruby-1.2.2
    239713  mail-2.8.1
    233470  actionpack-7.1.0
    205381  rack-3.0.8
    139993  railties-7.1.0
    108081  tzinfo-2.0.6
[omitted rest of list]

retained objects by gem
-----------------------------------
     31283  plaid-23.0.0
      8387  marcel-1.0.2
      4557  activesupport-7.1.0
      2737  activerecord-7.1.0
      2594  nokogiri-1.15.4-arm64-darwin
      2210  concurrent-ruby-1.2.2
      2082  rack-3.0.8
      2035  rubygems
      1840  actionpack-7.1.0
      1790  mail-2.8.1
      1347  railties-7.1.0
[omitted rest of list]

Removing the memory_profiler reporting and calling time ruby benchmark.rb:

  • with require "plaid": 1.87s average on my machine (Apple M1 Pro 14")
  • without require "plaid": 1.31s average

Note that Rails 7.1 and it's dependencies comprise 64 gems, so half a second for Plaid alone is a lot.

@phoenixy1
Copy link

Just following up, the PR that builds the library with useAutoload=true has just been merged, so this should be incorporated into the next client library release

@javierjulio
Copy link

@bdewater thanks for sharing that script. I ran that first with Plaid 22.0.0, then with Plaid 24.2.0 and noticed a significant decrease in allocated and retained memory for the gem.

@phoenixy1
Copy link

This has now been shipped in 24.0.0, so I'm going to close this out. Thanks all who helped report and profile this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants