mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +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
|
||||
|
||||
def get_primary_product(accountable_type)
|
||||
return "transactions" if eu?
|
||||
|
||||
case accountable_type
|
||||
when "Investment"
|
||||
"investments"
|
||||
|
@ -191,11 +193,17 @@ class Provider::Plaid
|
|||
end
|
||||
|
||||
def 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 countries
|
||||
else
|
||||
[ "US", "CA" ] # US + CA only
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue