async-stripe icon indicating copy to clipboard operation
async-stripe copied to clipboard

Search customer API

Open phungleson opened this issue 2 years ago • 1 comments

Hey peeps,

I am looking at stripe API, and it looks like they have a way to search for customers.

https://stripe.com/docs/api/customers/search

I couldn't find anything similar to that API in async-stripe I wonder if async-stripe has a way add that API into the library?

Cheers,

phungleson avatar Aug 12 '22 10:08 phungleson

Currently no, we only support list, which only allows filtering on a single email address. My suggestion is to add a customer_ext.rs with custom code to allow for this. I will note, we have an outstanding issue (#246) which means pagination with borrowed params doesn't compile, as it is dependent on GATs since the type system isn't powerful enough to ensure that the lifetime of some borrowed param for a future outlives it. This can be solved simply by using the owned version (ie String). Let me know if you need pointers! :)

arlyon avatar Aug 15 '22 14:08 arlyon

I am closing in favour of the tracking issue.

arlyon avatar Nov 17 '22 11:11 arlyon