Show account details for payees

This commit is contained in:
2023-08-28 22:49:38 +00:00
parent 946e7318d7
commit 92269f9cb0

View File

@@ -189,7 +189,19 @@ class StarlingClient:
else: else:
print(f'There are {count} payees for this customer:') print(f'There are {count} payees for this customer:')
for payee in payees: for payee in payees:
print(f' {payee.payeeName} ({payee.payeeType})') sys.stdout.write(f' {payee.payeeName} ({payee.payeeType}) - ')
count = len(payee.accounts)
if count == 0:
print('no accounts.')
else:
if count == 1:
print('one account:')
else:
print(f'{count} accounts:')
for account in payee.accounts:
sort_code = f'{account.bankIdentifier[0:2]}-{account.bankIdentifier[2:4]}-{account.bankIdentifier[4:6]}'
account_number = account.accountIdentifier
print(f' {account.payeeAccountUid}: {sort_code} {account_number} {account.description}')
def add_payee(self): def add_payee(self):
details = self.new_payee_form.complete() details = self.new_payee_form.complete()