Closed raldred closed 11 months ago
~Hello @raldred. This is expected. stripe-mock
is intended only for very basic sanity checks and always returns hardcoded responses. It does not mirror the input of requests on responses.~
~See the README: https://github.com/stripe/stripe-mock/blob/master/README.md~
~If you need more sophisticated behavior, we recommend you define your own mocks.~
(I am just wrong, I did not realize stripe-mock had this behavior. I am investigating.)
Hello @raldred. I don't think changing this is something we will prioritize. Needing metadata to be mirrored on the response seems like it is exiting the realm of the "basic sanity check" use case that stripe-mock serves, and resembles more of a real test case, which I think you should define your own mocks for, or else use test mode and hit the stripe servers.
Although we won't prioritize it, I'll leave this issue open. I'm not against generalizing the mirroring behavior to support map[string]string and would accept a well-tested pull request.
Hey @richardm-stripe, thanks for the prompt response. Yeh I appreciate that, as you say, if you start supporting more than just basic responses, it's growing the scope of what is intended by this tool.
I guess I hoped it would be a simple one.
It's not super important, so feel free to close as wontfix
.
When creating products, the metadata passed is not retained and returned in the create response, other attributes are.
Request
Response