[boobank][americanexpress] Wrong Balances when supplementary cards
Provided balances from boobank americanexpress is not correct when account is having supplementary card(s).
Let's assume I have following setup: Amex account XXXXXX is having: main card ***00 with last month closing balance(23/12/2019)=-1000EUR current total balance=-2000EUR and total credit 1100EUR as payment date is on 17/01/2020 supp card ***01 with last month closing balance(23/12/2019)=-100EUR current total balance=-200EUR and total credit 0EUR
Current behavior is:
Account Balance Coming
---------------------------------------------------------+----------+----------
*************01@americanexpress Supp. card holder -0.00 -100.00
*************00@americanexpress American Express® Cathay -0.00 -2200.00
---------------------------------------------------------+----------+----------
Total (EUR) 0.00 -2300.00
-
Coming of main card is not correct because information related to main cards are taken from
'/account-data/v1/financials/balances'
URL which provides the overall view of the account aggregating all the cards (01 + 02) without breaking down per cards -
Coming of supplementary card is not correct because information is taken from
'/api/servicing/v1/financials/transaction_summary\?type=split_by_cardmember'
using period[1] which is the last closed period (at least on HK platform) and not the current open period so picking last cut-off balance
Expected behavior is:
Account Balance Coming
---------------------------------------------------------+----------+----------
*************01@americanexpress Supp. card holder -0.00 -200.00
*************00@americanexpress American Express® Cathay -0.00 -2000.00
---------------------------------------------------------+----------+----------
Total (EUR) 0.00 -2200.00
Edited by Romain Bignon