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

Convert BankAccount.BankAccountType to BankAccount.Type enum #2547

Merged
merged 1 commit into from
Jun 4, 2020

Conversation

mshafrir-stripe
Copy link
Collaborator

No description provided.

@mshafrir-stripe mshafrir-stripe added the breaking PR that makes a breaking change label Jun 4, 2020
Individual("individual");

internal companion object {
internal fun fromCode(code: String?) = values().firstOrNull { it.code == code }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this pattern but it would be nice if we could put it in an interface. However, I'm not sure how to make the type constraints work

@mshafrir-stripe mshafrir-stripe merged commit 6d2e72c into master Jun 4, 2020
@mshafrir-stripe mshafrir-stripe deleted the bank-account-type branch June 4, 2020 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking PR that makes a breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants