bunq / sdk_java

Java SDK for bunq API
MIT License
47 stars 23 forks source link

This replaces the redundant if statements with OOP best practices #128

Open farsene opened 4 years ago

farsene commented 4 years ago

[//]: # (Thanks for opening this pull request! Before you proceed please make sure that you have an issue that explains what this pull request will do. Make sure that all your commits link to this issue e.g. "My commit. (bunq/sdk_java#)". If this pull request is changing files that are located in "com.bunq.sdk.model.generated" then this pull request will be closed as these files must/can only be changed on bunq's side.)

This does not require tests because it only adds a good practice of OOP. I created an abstract method in BunqModel and that can easily be called from the SessionContext. Now there is no need to check the type of the user, since it is done automatically by the inheritance. Hope you find it useful!