mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-04 21:15:19 +02:00
Increase specificity of filter when fetching Plaid liabilities
This commit is contained in:
parent
03e0230e99
commit
43a403e431
2 changed files with 6 additions and 2 deletions
|
@ -92,7 +92,10 @@ class PlaidItem::AccountsSnapshot
|
|||
|
||||
def can_fetch_liabilities?
|
||||
plaid_item.supports_product?("liabilities") &&
|
||||
accounts.any? { |a| [ "credit", "loan" ].include?(a.type) }
|
||||
accounts.any? do |a|
|
||||
a.type == "credit" && a.subtype == "credit card" ||
|
||||
a.type == "loan" && (a.subtype == "mortgage" || a.subtype == "student")
|
||||
end
|
||||
end
|
||||
|
||||
def liabilities_data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue