-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
ReceiptBugs related to the Receipt endpointBugs related to the Receipt endpointbugSomething isn't workingSomething isn't working
Description
Describe the bug
When trying to delete a receipt the response received is a 400 bad requerst.
To Reproduce
from monzo.handlers.filesystem import FileSystem
from monzo.endpoints.receipt import Receipt, ReceiptItem
from monzo.authentication import Authentication
EXTERNAL_ID = 'ABC123'
TRANSACTION_ID = 'REPLACE WITH TRANSACTION ID'
handler = FileSystem(file='monzo.json')
creds = handler.fetch()
redirect_url = ''
auth = Authentication(
access_token=creds['access_token'],
access_token_expiry=creds['expiry'],
client_id=creds['client_id'],
client_secret=creds['client_secret'],
redirect_url=redirect_url,
refresh_token=creds['refresh_token'],
)
auth.register_callback_handler(handler=handler)
item = ReceiptItem(
description = 'Test 123',
amount= 1234,
currency = 'GBP',
tax=123
)
receipt = Receipt(
auth = auth,
transaction_id = TRANSACTION_ID,
external_id = EXTERNAL_ID,
transaction_total = 1234,
transaction_currency = 'GBP',
items=[item]
)
Receipt.create(auth=auth, receipt=receipt)
Receipt.delete(auth=auth, receipt=receipt)
Expected behavior
Receipt to be deleted
Environment (please complete the following information):
- Package Version = 0.1.1
- Python version = 3.8
Additional context
N/A
Metadata
Metadata
Assignees
Labels
ReceiptBugs related to the Receipt endpointBugs related to the Receipt endpointbugSomething isn't workingSomething isn't working