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