Skip to content

Commit

Permalink
Plaid: Remove auth
Browse files Browse the repository at this point in the history
  • Loading branch information
mluessi committed Nov 23, 2024
1 parent e9ea9ee commit bc7f2a6
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,7 @@ def get_link_token(self, update_mode=False):
else:
return response["link_token"]

def auth(self):
try:
self.client.Auth.get(self.access_token)
except ItemError as e:
if e.code == "ITEM_LOGIN_REQUIRED":
pass
except APIError as e:
if e.code == "PLANNED_MAINTENANCE":
pass
except requests.Timeout:
pass
except Exception as e:
frappe.log_error("Plaid: Authentication error")
frappe.throw(_(str(e)), title=_("Authentication Failed"))

def get_transactions(self, start_date, end_date, account_id=None):
self.auth()
kwargs = dict(access_token=self.access_token, start_date=start_date, end_date=end_date)
if account_id:
kwargs.update(dict(account_ids=[account_id]))
Expand Down

0 comments on commit bc7f2a6

Please sign in to comment.