mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-04 04:55:20 +02:00
EU only allows transactions Plaid product
This commit is contained in:
parent
2a338eb01b
commit
89027f1fbf
1 changed files with 9 additions and 1 deletions
|
@ -180,6 +180,8 @@ class Provider::Plaid
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_primary_product(accountable_type)
|
def get_primary_product(accountable_type)
|
||||||
|
return "transactions" if eu?
|
||||||
|
|
||||||
case accountable_type
|
case accountable_type
|
||||||
when "Investment"
|
when "Investment"
|
||||||
"investments"
|
"investments"
|
||||||
|
@ -191,11 +193,17 @@ class Provider::Plaid
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_additional_consented_products(accountable_type)
|
def get_additional_consented_products(accountable_type)
|
||||||
|
return [] if eu?
|
||||||
|
|
||||||
MAYBE_SUPPORTED_PLAID_PRODUCTS - [ get_primary_product(accountable_type) ]
|
MAYBE_SUPPORTED_PLAID_PRODUCTS - [ get_primary_product(accountable_type) ]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def eu?
|
||||||
|
region.to_sym == :eu
|
||||||
|
end
|
||||||
|
|
||||||
def country_codes
|
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 countries
|
[ "ES", "NL", "FR", "IE", "DE", "IT", "PL", "DK", "NO", "SE", "EE", "LT", "LV", "PT", "BE" ] # EU supported countries
|
||||||
else
|
else
|
||||||
[ "US", "CA" ] # US + CA only
|
[ "US", "CA" ] # US + CA only
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue