-
Couldn't load subscription status.
- Fork 590
Description
Describe the bug
I was excited to use the new Stripe rbi types with Sorbet and Tapioca. Currently it's quite difficult to use because of various issues 1, 2
Anyway, I've tried copying the rbi/stripe.rbi over the top of the tapioca-generated sorbet/rbi/gems/stripe@15.0.0.rbi just to see what would happen.
I notice that retrieve is missing in many types, e.g.
Stripe::Price.retrieveStripe::PaymentIntent.retrieveStripe::Invoice.retrieve
Also Stripe::Customer.list_tax_ids and lots of others.
I don't really get it, because I've also read something about a v2 API syntax where retrieve is done differently:
client = Stripe::StripeClient.new("sk_test_123")
client.v1.prices.retrieve("xxx")
Which is confusing to me, as I had no idea about that, so I can't tell if that's why retrieve is deliberately removed or not.
But Stripe::StripeClient isn't in the stripe.rbi either, so it doesn't resolve
So it's bit odd. All of the code still works, as the methods still actually exist. It's just the rbi definitions that are missing various things. The v15 version dynamically generated by tapioca still has .retrieve and other methods - but it's missing all sorts of other things too, like data and has_more props on Stripe::ListObject.
To Reproduce
install latest version of gem, and copy the rbi/stripe.rbi over the tapioca generated one.
# typed: true
price = Stripe::Price.retrieve(price_id)
Expected behavior
.retrieve should be recognised by sorbet since it's still a real method on the object, but it's not recognised.
Code snippets
OS
OSX 15.3.2
Language version
Ruby 3.3.x
Library version
stripe-ruby 15.0.0
API version
2025-03-31.basil
Additional context
No response