The personal finance app for everyone
EU only allows transactions Plaid product
Zach Gollwitzer89027f1fbfdd
diff --git a/app/models/provider/plaid.rb b/app/models/provider/plaid.rbindex 877a955f..f12a077d 100644--- a/app/models/provider/plaid.rb+++ b/app/models/provider/plaid.rb@@ -180,6 +180,8 @@ class Provider::Plaidenddef get_primary_product(accountable_type)+ return "transactions" if eu?+case accountable_typewhen "Investment""investments"@@ -191,11 +193,17 @@ class Provider::Plaidenddef get_additional_consented_products(accountable_type)+ return [] if eu?+MAYBE_SUPPORTED_PLAID_PRODUCTS - [ get_primary_product(accountable_type) ]end+ def eu?+ region.to_sym == :eu+ end+def country_codes- if region.to_sym == :eu+ if eu?[ "ES", "NL", "FR", "IE", "DE", "IT", "PL", "DK", "NO", "SE", "EE", "LT", "LV", "PT", "BE" ] # EU supported countrieselse[ "US", "CA" ] # US + CA only