Unable to retrieve Transfer Reversal while expanding the transfer object
Describe the bug
Unable to retrieve Transfer Reversal while expanding the transfer object as the API Docs state. The expected expand addition to the Stripe Transfer retrieve_reversal raises a NoMethodError.
I noticed the NestedResource retrieve_ does not account for params as the update, delete & list methods do.
To Reproduce
- Retrieve a transfer reversal with the expand key.
Note: The code snippet is generated from the Stripe Shell
Expected behavior
Retrieves the Transfer Reversal Object with the transfer expanded
Code snippets
Stripe::Transfer.retrieve_reversal(
'tr_xxx',
'trr_xxx',
{ expand: ['transfer'] }
)
NoMethodError: undefined method `strip' for ["transfer"]:Array
### OS
macOS
### Language version
Ruby 3.0.1
### Library version
stripe-ruby v11.2.0
### API version
2024-04-10
### Additional context
_No response_
@davidrichey Thanks for the report and sorry for the trouble. We have a bug in the code here I think where we don't pass params properly. We'll look into this and work on a fix but it might take a bit of time to get this fully tested and ready to roll out to avoid breaking existing calls.
Thanks @remi-stripe, that's what I was thinking too. I played around with it a bit and added a PR, as well as, an additional test. If there is anything additional to add, let me know!
Ah neat, I missed your PR 🤦 The main risk for us is figuring out if this change could break anyone's code (this logic has been broken for ~4 years) so if we changed it and someone's code would now fail it'd be a problem
@remi-stripe in the meantime, do you know any workarounds until we would be able to get something like this implemented?
Unfortunately no I can't think of a viable one but we are working on getting your change integrated in a non-breaking way which should hopefully unblock you soon!
We've merged this in master and should be part of the next release tomorrow.