beam-community/stripity-stripe

`Stripe.Account.retrieve` does not allow for account id

d3mcfadden opened this issue · 4 comments

Package Version

3.1.1

Are you using the latest version?

  • Yes, I verified the issue is still present in the latest version.

Steps to Reproduce

Our app makes use of Stripe.Account.retrieve("acct_abc123") to fetch a connect account under our main account. Prior to the 3.x release this call worked and would return the details of a connected account based on the passed id.

It looks like since 3.x the code is being auto-generated based off the OpenAPI spec and this function no longer works. The function signature now accepts a map of params, not a binary account id.

Happy to fix this with some guidance on the code generation. Thanks for taking a look!

Expected Result

What is expected is to be able to get an account by a id.

Stripe.Account.retrieve("acct_abc123")

{:ok,
 %Stripe.Account{
   business_profile: nil,
   business_type: nil,
   capabilities: %{
     acss_debit_payments: "active",
     affirm_payments: "active",
 ...
}}

Actual Result

Stripe.Account.retrieve("account_foo")
** (BadMapError) expected a map, got: "account_foo"
yordis commented

I believe this is related to #786 I can support you if you continue the work here!

Thanks for the response @yordis. This definitely looks related. Sorry for the dip, I checked the open issue list and didn't see anything.

yordis commented

Good catch! Let me update the template!

yordis commented

Gonna close it in favor of #786 Reopen it if you feel I made a mistake! I encourage you to take the PR to the finish line. Let me know if I can help you with it!