You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The delete method on Source was deprecated back in 2017 in our 3.5.0version.
It was then removed entirely in our major version5.0.0 released in August 2019. We covered all the breaking changes in this migration guide.
Update to those that may face a similar issue --
it seems like calling Stripe::Customer#sources returns a collection that can contain multiple types (for example: it can contain a Stripe::Source or a Stripe::Card). When I posted this issue, I assumed it only returned a collection of source types.
Seems like I may have experienced it working before on v5 because in my prior use case, I was calling #delete on a Stripe::Card, which is still a supported method.
To be safe -- I'll just migrate over to the detach_source approach as that seems to work on both stripe cards and stripe sources.
Describe the bug
In the past, I recall being able to run
.delete
on an instance ofStripe::Source
. Currently, when I try it, I get the following error message:Was this removed from the API at some point?
To Reproduce
Stripe::Source
instance.delete
on itExpected behavior
We delete the source
Code snippets
No response
OS
macOS
Language version
Ruby 2.7.4p191
Library version
stripe (5.55.0)
API version
2020-03-02
Additional context
No response
The text was updated successfully, but these errors were encountered: