Skip to content
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

Constants for possible decline_codes #860

Open
eaglerainbow opened this issue Oct 16, 2019 · 4 comments
Open

Constants for possible decline_codes #860

eaglerainbow opened this issue Oct 16, 2019 · 4 comments
Labels

Comments

@eaglerainbow
Copy link

Is there a place with constants of all the possible decline_codes, such that a consumer is able to use them without specifying a literal?

@remi-stripe
Copy link
Contributor

@eaglerainbow At the moment all enums or enum-like properties are represented as String in the library. We would like to add support for enums in the future so that all possible values are in the library but it requires some design decision before moving in that direction.

Decline codes are not in the library for that reason and you would need to build your own list instead.

Tagging as future as this is definitely something we want to tackle at some point though.

@eaglerainbow
Copy link
Author

We would like to add support for enums in the future so that all possible values are in the library but it requires some design decision before moving in that direction.

Tagging as future as this is definitely something we want to tackle at some point though.

That's okay with me.
Thanks for letting me know!

@adrogon
Copy link

adrogon commented Nov 13, 2019

Upvoting since we would have the same request for Subscription.status, for example.

Reading the javadoc on the property:

Possible values are incomplete, incomplete_expired, trialing, active, past_due, canceled, or unpaid.

It would be easier to just have this gathered under an enum.

Not sure why you closed the issue though, if it's not resolved?

@remi-stripe remi-stripe reopened this Nov 13, 2019
@remi-stripe
Copy link
Contributor

Re-opened to make it easier to track in that case. We are definitely looking at how to support enums in our client libraries properly. This won't happen in the short term but it's on our roadmap!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants