Add lots of Account / Account link features#67
Merged
confact merged 16 commits intoconfact:masterfrom Nov 9, 2025
Merged
Conversation
The Capabilities object is too complex and has no vanilla constructor - just use array of strings for now
Not terribly happy with the to_h stuff - but the alternative of allowing a freeform hashes in Account::create seems error prone, since we already have Company/Individual objects with proper structure?
Don't like it, but get `Unknown enum Stripe::Account::Individual::Requirements::Error::Code value: "detailed_code" at line 125, column 24 (JSON::ParseException)` otherwise
…rt detailed_code Previous `detailed_code` error was a red herring... it's up to 79 enum values now. I do wonder if this just needs to be a string moving forward so it's not so brittle and will break whenever Stripe adds another enum value?
Sooo painful... there must be a better way!
Owner
|
Sorry for late response. I do think this looks good. I will merge. Thank you for the help! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Creating and updating Accounts
Generate Account Links
Add lots of enum values
OK so this is more of opening a conversation than a full-on pull request: I'm not terribly happy with the to_h method of generating params for Account.create etc. There is probably a much cleaner way to do that, but it seemed silly to allow a generic hash in Account.create etc when we already have models with all the available fields defined, so for now I just made those classes capable of initialization directly (rather than through JSON only) and added to_h methods.
Anyway let me know what you think!