Skip to content

Commit

Permalink
Reformat file
Browse files Browse the repository at this point in the history
  • Loading branch information
carposio committed Mar 7, 2024
1 parent b4907ba commit d9a545d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/tariochbctools/importers/nordigen/nordigen_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,18 @@ def create_link(token, reference, bank):

def list_accounts(token):
headers = build_header(token)
r = requests.get("https://bankaccountdata.gocardless.com/api/v2/requisitions/", headers=headers)
r = requests.get(
"https://bankaccountdata.gocardless.com/api/v2/requisitions/", headers=headers
)
print(r.json()) # noqa: T201
check_result(r)
for req in r.json()["results"]:
reference = req["reference"]
print(f"Reference: {reference}") # noqa: T201
for account in req["accounts"]:
ra = requests.get(
f"https://bankaccountdata.gocardless.com/api/v2/accounts/{account}", headers=headers
f"https://bankaccountdata.gocardless.com/api/v2/accounts/{account}",
headers=headers,
)
check_result(ra)
acc = ra.json()
Expand Down Expand Up @@ -102,7 +105,9 @@ def delete_link(token, reference):

def _find_requisition_id(token, userId):
headers = build_header(token)
r = requests.get("https://bankaccountdata.gocardless.com/api/v2/requisitions/", headers=headers)
r = requests.get(
"https://bankaccountdata.gocardless.com/api/v2/requisitions/", headers=headers
)
check_result(r)
for req in r.json()["results"]:
if req["reference"] == userId:
Expand Down

0 comments on commit d9a545d

Please sign in to comment.