Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to retrieve Transfer Reversal while expanding the transfer object #1393

Open
davidrichey opened this issue May 2, 2024 · 6 comments
Assignees
Labels

Comments

@davidrichey
Copy link

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

  1. 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_
@remi-stripe
Copy link
Contributor

@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.

@davidrichey
Copy link
Author

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!

@remi-stripe
Copy link
Contributor

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

@davidrichey
Copy link
Author

@remi-stripe in the meantime, do you know any workarounds until we would be able to get something like this implemented?

@remi-stripe
Copy link
Contributor

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!

@prathmesh-stripe
Copy link
Contributor

We've merged this in master and should be part of the next release tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants