Treat wise DIRECT_DEBIT_TRANSACTION as a TRANSFER
authorDave Page <dpage@pgadmin.org>
Thu, 31 Jul 2025 12:23:21 +0000 (14:23 +0200)
committerMagnus Hagander <magnus@hagander.net>
Thu, 31 Jul 2025 12:23:21 +0000 (14:23 +0200)
They seem to be similar except we don't have permissions to read the
details. But we shouldn't crash on it.

postgresqleu/transferwise/api.py

index 0f16ca386673638f71b59039337e4655a8c58923..621e97a4c6d9d62ce186e93288a353241c5bbbca 100644 (file)
@@ -125,6 +125,7 @@ class TransferwiseApi(object):
 
             for activity in r['activities']:
                 if activity['type'] == 'TRANSFER' or \
+                   activity['type'] == 'DIRECT_DEBIT_TRANSACTION' or \
                    (activity['type'] == 'BALANCE_DEPOSIT' and activity['resource']['type'] == 'TRANSFER'):
                     try:
                         details = self.get('transfers/{}'.format(activity['resource']['id']))