adrienverge / localstripe

A fake but stateful Stripe server that you can run locally, for testing purposes.
GNU General Public License v3.0
192 stars 59 forks source link

feat(customers): Find customers by email #202

Closed willbarre2 closed 2 years ago

willbarre2 commented 2 years ago

As described here https://stripe.com/docs/api/customers/list#list_customers-email, the Stripe API allows you to find one or more customers by their email addresses by adding the query param ?email=<something> to the /v1/customers route.

Stripe doesn't care about the format of the emails we send in the request, as long as they are strings. If we request with an unknown address, it returns an empty list. On the other hand, if we request with a known address, it returns a list of customers who have this address in their email field. So there can be several customers with the same email address.

Let's emulate this behavior.

Closes: https://github.com/adrienverge/localstripe/pull/154 https://github.com/adrienverge/localstripe/issues/153

willbarre2 commented 2 years ago

A new push is ready to be reviewed.

willbarre2 commented 2 years ago

A new push is ready to be reviewed.