|
|
|
@ -8,6 +8,7 @@ import sinks.fidor
|
|
|
|
|
import sinks.nordigen
|
|
|
|
|
import sinks.truelayer
|
|
|
|
|
import util
|
|
|
|
|
from db import r
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Sinks(util.Base):
|
|
|
|
@ -24,3 +25,16 @@ class Sinks(util.Base):
|
|
|
|
|
|
|
|
|
|
def got_transactions(self, bank, account_id, transactions):
|
|
|
|
|
print("GOT transactions", bank, account_id, transactions)
|
|
|
|
|
transaction_ids = [x["transaction_id"] for x in transactions]
|
|
|
|
|
print("IDS", transaction_ids)
|
|
|
|
|
new_key_name = f"new.transactions.{bank}.{account_id}"
|
|
|
|
|
old_key_name = f"transactions.{bank}.{account_id}"
|
|
|
|
|
r.sset(new_key_name, transaction_ids)
|
|
|
|
|
|
|
|
|
|
difference = r.sdiff(new_key_name, old_key_name)
|
|
|
|
|
print("difference", difference)
|
|
|
|
|
|
|
|
|
|
# Rename the new key to the old key so we can run the diff again
|
|
|
|
|
r.rename(new_key_name, old_key_name)
|
|
|
|
|
|
|
|
|
|
# self.transactions.transaction(transactions)
|
|
|
|
|