Issue
When they get the settlement with the bank reference , an error is thrown.
What happens
settlement = mollie_client.settlements.get("02893031.2309.10")
File "/home/erik/.local/share/virtualenvs/oakk_ordering-0m3EknA8/lib/python3.10/site-packages/mollie/api/resources/settlements.py", line 35, in get
self.validate_settlement_id(settlement_id)
File "/home/erik/.local/share/virtualenvs/oakk_ordering-0m3EknA8/lib/python3.10/site-packages/mollie/api/resources/settlements.py", line 28, in validate_settlement_id
raise IdentifierError(
mollie.api.error.IdentifierError: Invalid settlement ID: '02893031.2309.10'. A settlement ID should start with 'stl_' , be 'next' or 'open' or contain a valid bank reference.
What should happen
The function should retrieve the settlement, instead of throwing that error.
Steps to reproduce
- Get an API key of a merchant with a settlement.
- Get a settlement reference number.
- Run this snippet of code
#Import Mollie API client for python
from mollie.api.client import Client
#Initialize client and set API key
mollie_client = Client()
mollie_client.set_api_key(API_KEY)
settlement = mollie_client.settlements.get(SETTLEMENT_REF) #THIS LINE THROWS ERROR
Hypothesis
Looking at the code it seems like although they implemented the settlement.py so that they allow settlement reference numbers, it seems like they are still using a function found in base.py (line 82) which still (regex) checks for a prefix in the reference number and throws an “identifier error”.
Issue
When they get the settlement with the bank reference , an error is thrown.
What happens
What should happen
The function should retrieve the settlement, instead of throwing that error.
Steps to reproduce
Hypothesis
Looking at the code it seems like although they implemented the settlement.py so that they allow settlement reference numbers, it seems like they are still using a function found in base.py (line 82) which still (regex) checks for a prefix in the reference number and throws an “identifier error”.