Closed y0sh1 closed 6 years ago
@y0sh1 thanks for the suggestion!
The code is indeed generated and should be changed on our side :)
The reason we did not do it this way initially is that in Java it would require a lot of extra code to be generated. However, since this issue was raised already more than once, now we don't have any options but look into it š
I'll post updates to this issue!
This is related to bunq/sdk_python#55 and will be closed once the referenced issue is closed.
duplicate #55
Closing in favour of #55
Hey Guys!
Awesome work on the API. Been playing around with it for a while now and thought now was the time to get into automated payments.
When doing this I ran into to the problem of transfering money to myself. The only way I found that would work, is to transfer it to the iban of the account I wanted it in.
So i started with the payment requestmap, like the example:
This bounded when creating the payment, because the name field was not set. Now i thought this was an error on my end, but looking in the SDK code I came across the reason didn't see it coming in the first place. Note that the api docs state this is needed, so I could have used my eyes to start with š .
This is a piece of code from: https://github.com/bunq/sdk_python/blob/b905e97cde4acd5fa4c0e356c04af82b867481ca/bunq/sdk/model/generated/object_.py#L143
As can be seen the name object is None by default and not set-able on init, which would make sense to do if you'd like to enforce people to use it in some cases.
Since this code is in the "generated" directory i didn't start creating a PR already, because i would like to verify if that would be a 'good move' or this is something that had to be done on bunq's side for generating the code.
Anyway, the following code would make a good replacement:
This way name will be None by default, but at least set-able at creation š