Skip to content

Add lots of Account / Account link features#67

Merged
confact merged 16 commits intoconfact:masterfrom
atlantis:master
Nov 9, 2025
Merged

Add lots of Account / Account link features#67
confact merged 16 commits intoconfact:masterfrom
atlantis:master

Conversation

@atlantis
Copy link
Contributor

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!

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!
@confact
Copy link
Owner

confact commented Nov 9, 2025

Sorry for late response. I do think this looks good. I will merge.

Thank you for the help!

@confact confact merged commit d90e69d into confact:master Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants