fsb: Fix changes made to credit-card-account API.
authorFredrik Tolf <fredrik@dolda2000.com>
Sat, 5 Jun 2021 13:33:47 +0000 (15:33 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Sat, 5 Jun 2021 13:33:47 +0000 (15:33 +0200)
fulbank/fsb.py

index 9e059c1..166b5f5 100644 (file)
@@ -312,11 +312,12 @@ class session(object):
     @property
     def accounts(self):
         if self._accounts is None:
-            data = self._jreq("v5/engagement/overview")
+            txndata = self._jreq("v5/engagement/overview")
+            crddata = self._jreq("v5/card/creditcard")
             accounts = []
-            for acct in resolve(data, ("transactionAccounts",)):
+            for acct in resolve(txndata, ("transactionAccounts",)):
                 accounts.append(txnaccount(self, resolve(acct, ("id",)), acct))
-            for acct in resolve(data, ("cardAccounts",)):
+            for acct in resolve(crddata, ("cardAccounts",)):
                 accounts.append(cardaccount(self, resolve(acct, ("id",)), acct))
             self._accounts = accounts
         return self._accounts