Uh oh!
There was an error while loading. Please reload this page.
Adding example of string constants to pass parameters with ease - #36
Adding example of string constants to pass parameters with ease#36amhed wants to merge 1 commit into
Conversation
MatthewSteeples
commented
Aug 31, 2013
Hi Ahmed, I'm interested in this kind of patch, but I'm wondering why you chose string constants instead of creating this as an Enum? Regards, |
amhed
commented
Aug 31, 2013
Honestly, I don't know 😃 I can refactor it, and add all the cases where this happens that I can think of. Just wanted to check with you guys if it's a good idea before actually coding it! |
MatthewSteeples
commented
Aug 31, 2013
I should probably make it clear that I don't work for Xero or represent them in any way, we're just a heavy user of the API. I'm reasonably confident that the API can be modified to use Enums for these fields instead of strings and it still work with serializing for over-the-web communication. I think it would make use of the library easier. |
amhed
commented
Aug 31, 2013
Cool. I remember now why I went with the strings. Depending on your serializer provider and settings you're using it will either serialize as a string or as an int. So I thought using the strings was a sure way to never get any errors |
Mentioned on issue #35