Skip to content
This repository was archived by the owner on Nov 10, 2020. It is now read-only.

Conversation

@amhed
Copy link

@amhed amhed commented Jul 18, 2013

Mentioned on issue #35

@MatthewSteeples
Copy link
Contributor

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,
Matthew

@amhed
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants