bunq / sdk_python

Python SDK for bunq API
MIT License
106 stars 25 forks source link

Setting the Status of ShareInviteBankInquiry to ACCEPTED causes error at reciver #105

Closed WouterLok closed 5 years ago

WouterLok commented 6 years ago

Steps to reproduce:

  1. Connect to the API with the Tinker Python Lib and send a request for a shared read-only shared account with status ACCEPTED, i.e. call

endpoint.ShareInviteBankInquiry.create( Pointer(self._POINTER_TYPE_EMAIL, recipient), ShareDetail(read_only=ShareDetailReadOnly(view_balance=True, view_old_events=True, view_new_events=True)), "ACCEPTED", monetary_account_id )

What should happen:

  1. Not defined by Documentation, but i would expect the server to reject the request since the inquirer should not be the one that is accepting the request.

What happens:

  1. The server accepts the inquiry and returns the following result: BunqResponseInt with ID of the inquiry.

  2. When the Addressee of the inquiry makes a request for his ShareInviteBankResponse by using the SDK, a errormessage is returned: Error message: The item you requested could not be found.

Traceback

Traceback (most recent call last): File "/home/lokw/projects/bunq/api/tinker/user_overview.py", line 49, in main() File "/home/lokw/projects/bunq/api/tinker/user_overview.py", line 37, in main print(bunq.get_share_requests()); File "/home/lokw/projects/bunq/api/tinker/libs/bunq_lib.py", line 172, in get_share_requests return endpoint.ShareInviteBankResponse.list().value File "/home/lokw/projects/bunq/api/.venv/lib/python3.6/site-packages/bunq/sdk/model/generated/endpoint.py", line 7130, in list response_raw = api_client.get(endpoint_url, params, custom_headers) File "/home/lokw/projects/bunq/api/.venv/lib/python3.6/site-packages/bunq/sdk/client.py", line 320, in get custom_headers File "/home/lokw/projects/bunq/api/.venv/lib/python3.6/site-packages/bunq/sdk/client.py", line 133, in _request self._assert_response_success(response) File "/home/lokw/projects/bunq/api/.venv/lib/python3.6/site-packages/bunq/sdk/client.py", line 228, in _assert_response_success self._fetch_response_id(response) bunq.sdk.exception.NotFoundException: HTTP Response Code: 404 The response id to help bunq debug: a32511cb-81df-43f1-9bf4-4267ad98bb64 Error message: The item you requested could not be found.

SDK version and environment

Response id

Extra info:

The Sandbox Bunq App shows the inquiry under events with status, while no events are shown for the adressee.

OGKevin commented 5 years ago

This is an API ACL error and not really SDK error 🤔. I would advice you to post this on together and see what the issue is.

If it turns out to be SDK related, feel free to reopen but I doubt it is.