-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement interfaces/inheritance #151
Comments
This is indeed a good suggestion. I will see if its possible to generate these as well. However, this will be hard for the anchor objects. As these will have almost nothing in common. I can only think of this working for the user endpoint tbh 🤔 As en example see
|
Oh - darn. No, I don't think that's useful indeed. Maybe I'll see a way when working some more with the SDK, but currently the user would be useful. |
I see the same for the Monetary accounts. I'm currently making a connection with bunq where it does not matter if it is an Light, Company or Personal monetary or user. So general things like getId() in both monetary and user would be useful to implement. |
@Wouter0100 why could the user not use a simple |
My code expects a user - it does not really matter which user. Introducing if-statements indicates a code smell and is against a wide variety of design patterns/modularity principles. |
fair enough. If you can create an MR that does the following than I'm happy to merge it.
The reason i dont want to add this to the generator is because it will increase its complexity as i explained above, not all |
This isn't a real issue - rather a suggestion or discussion. Would it be an idea to more implement inheritance or general interfaces?
For example currently the
getReferencedObject
inUser
returns a Model (according to the php docblock), which does not the describe the methods that all the User models has in common. This would ease up implementation a lot.The scenario is for example that the
getDisplayName
is implemented by all models (UserCompany, UserLight, UserPerson) but no general interface which describes the implementation.The text was updated successfully, but these errors were encountered: