Show account details for payees
This commit is contained in:
14
starling
14
starling
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user