stenjo / SbankenToYNAB

Importing data from Sbanken to YNAB using Sbanken API and python 3
25 stars 5 forks source link

Taking care of situation with Visa transfer that lacks transaction de… #3

Closed yonyonson closed 5 years ago

yonyonson commented 5 years ago

…tails

I have encounter situation with Visa transaction that lacks card details. Example is:

{
    'transactionId': '12396834866838654',
    'accountingDate': '2019-07-09T00:00:00+02:00',
    'interestDate': '2019-07-09T00:00:00+02:00',
    'otherAccountNumberSpecified': False,
    'amount': -190.9,
    'text': '*8341 08.07 NOK 190.90 MORGENLEVERING.NO Kurs: 1.0000',
    'transactionType': 'Visa',
    'transactionTypeCode': 714,
    'transactionTypeText': 'VISA  ',
    'isReservation': False,
    'reservationType': None,
    'source': 'AccountStatement',
    'cardDetailsSpecified': False,
    'hasTransactionDetail': False,
    'transactionDetail': None
}

Taking care of syncing of transaction itself (skipping it) and looking for matching transaction for transfers.

I hope that card details would arrive some time, then than it would be synced.

yonyonson commented 5 years ago

Added a commit that truncates payee_name to 50 symbols, since YNAB doesn't allows payee that is longer than 50 symbols.

yonyonson commented 5 years ago

Ref https://api.youneedabudget.com/v1 , model SaveTransaction