Closed petermcd closed 2 years ago
Describe the bug Deleting a receipt fails due to bad request
To Reproduce
from datetime import datetime, timedelta from monzo.handlers.filesystem import FileSystem from monzo.authentication import Authentication from monzo.endpoints.receipt import Receipt, ReceiptItem TWO_DAYS_AGO = datetime.now() - timedelta(days=2) handler = FileSystem(file='monzo.json') credentials = handler.fetch() auth = Authentication( client_id=credentials['client_id'], client_secret=credentials['client_secret'], redirect_url='', access_token=credentials['access_token'], access_token_expiry=credentials['expiry'], refresh_token=credentials['refresh_token'], ) TRANSACTION_ID = 'REPLACE WITH TRANSACTION ID' EXTERNAL_ID = 'ABC12345' auth.register_callback_handler(credentials) item = ReceiptItem( description='Test item', amount=1410, currency='GBP', ) receipt = Receipt( auth=auth, transaction_id=TRANSACTION_ID, external_id=EXTERNAL_ID, transaction_total=1410, transaction_currency='GBP', items=[item], ) Receipt.create(auth=auth, receipt=receipt) receipt.delete(receipt=receipt)
Expected behavior Receipt to be deleted
Environment (please complete the following information):
Additional context N/A
Closing as repeat of #38
Describe the bug Deleting a receipt fails due to bad request
To Reproduce
Expected behavior Receipt to be deleted
Environment (please complete the following information):
Additional context N/A