beam-community / stripity-stripe

An Elixir Library for Stripe
Other
965 stars 346 forks source link

`Stripe.Account.retrive/1` not working in OpenAPI build #777

Closed marmor157 closed 11 months ago

marmor157 commented 1 year ago

I was testing out the new OpenAPI build and wanted to use Stripe.Account.retrieve passing an account id and it failed with the following error.

** (BadMapError) expected a map, got: "***"
    (stdlib 4.1.1) :maps.merge(%{}, "***")
    (stripity_stripe 2.17.3) lib/stripe/request.ex:98: Stripe.Request.put_params/2
    (stripity_stripe 2.17.3) lib/openapi/phases/compile.ex:199: Stripe.Account.retrieve/2
    iex:3: (file)

Code to reproduce:

Stripe.Account.retrieve("***")

Where "***" is a Stripe account id.

The test responsible for this is commented out https://github.com/beam-community/stripity-stripe/blob/0d9e435c606067abca4314112e5940395d665c50/test/stripe/connect/account_test.exs#L10

snewcomer commented 1 year ago

@marmor157 Yep you are correct. We have to fix that. There are two ways to get it according to their api spec, but the first must be the only one that ends up in the codemod! I'll have to find some time to fix it 👍

Screen Shot 2023-01-14 at 2 32 34 PM
nkezhaya commented 1 year ago

@snewcomer This is affecting some other endpoints as well, like Stripe.Card.retrieve/*.

snewcomer commented 1 year ago

@nkezhaya Thanks. Let me take a look this weekend 🙇‍♂️ and hopefully get this resolved.

github-actions[bot] commented 11 months ago

This issue has been automatically marked as "stale:discard". If this issue still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment.

github-actions[bot] commented 11 months ago

Closing this issue after a prolonged period of inactivity. If this issue is still relevant, feel free to re-open the issue. Thank you!