Receipt functionality
As per discussion in #27 with @TomAFrench I have been working on implementation for the new receipt endpoint(s).
Specifically:
New functions are:
- create_receipt
- retrieve_receipt
- delete_receipt.
create_receipt
The :params: for create_receipt consist of all possible parameters to create a receipt. Specifically, the parameters transaction_id, total, currency and items are required. Whereas, taxes, payments and merchant can be provided but are not required. The function accounts for this by checking wheather they are supplied and are of correct type.
The :rtype: for create_receipt is a tuple which consists of the the ... information you provided, repeated back to you. as well as the external_id which is randomly generated. This allows the end user to be able to store the external_id for later use, to query the endpoints retrieve_receipt and delete_receipt which require the external_id of the created receipt.
Update This branch is most likely going to be idle until the devs fix the API issue.
Checking in, I haven't forgotten about this. Chasing up to see if this issue has been fixed yet...