#Nyxi
1 messages · Page 1 of 1 (latest)
and I get no matches with number:<myvalue>, which seems to support substring?
maybe I'm doing something wrong
Hm can you share the request ID?
Yeah hold on
I'm doing this:
/** @var Invoice[] $invoices */
$invoices = $stripe->invoices->search(
['query' => 'number:"RKM" AND created>' . (time() - 3600 * 24 * 60)]
)
->autoPagingIterator();
And I want to match invoices that start with RKM. If I do number:"RKM160-0033", I get the one invoice, but obviously I want all of them
req_5C7vDPNtnI9Ioe
Gotcha. I think substring just isn't allowed for invoice number, but let me see if I can find confirmation
Not really reflected in the docs that
I tried with number~"RKM" but that gave the original error I posted
What version of the PHP library are you using?
9.x
Oh you shared the request ID. Looking
9.8
Yeah looks like substring isn't supported on Invoice number. We need to do a better job calling that out in the docs though, so I'll let the team know
Alright cool
Unfortunate, cause I have to loop so many other invoices since I can't filter on number
I suppose I could put some metadata on them though
Yeah sorry about that. The metadata workaround seems like a good plan to me
I'll provide this feedback to the team though
No problem
While you're at it; being able to search on invoice status would help a alot
for some bizzare reason you cannot provide that in the search language, and the regular list API endpoint only supports 1 status as a parameter, not an array
I want uncollectible and open invoices, for instance
so I have to loop all of them and filter out on status post-API
Yeah I don't have a clear cut answer on why we do that