Hello,
We're getting the following error when attempting to pay:
Stripe::Invoice.pay(id: stripe_subscription.latest_invoice, expand: ['payment_intent'])
an invoice:
TypeError - no implicit conversion of Hash into String:
/Users/andrei/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/stripe-4.21.0/lib/stripe/api_resource.rb:73:in `escape'
/Users/andrei/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/stripe-4.21.0/lib/stripe/api_resource.rb:73:in `block in custom_method'
I would assume this doesn't work because Stripe::Invoice.pay expects a positional argument for the ID, while that way, it cannot accept optional arguments, such as expand.
This works when retrieving a subscription, for example:
Stripe::Subscription.retrieve(id: 'whatever', expand: ['latest_invoice.payment_intent'])