invoiceninja / sdk-php

PHP wrapper for Invoice Ninja's REST API
https://www.invoiceninja.com
83 stars 41 forks source link

Cannot use custom_value1 in all() for Clients #88

Closed kpirbhai closed 2 years ago

kpirbhai commented 2 years ago

I've tested both my hosted setup and my self-hosted setup ( using fully updated v5-stable branch ).

$client = $ninja->clients->all(['custom_value1' => 'xxx']);

In my self-hosted setup, the above simply returns all clients even though there is a single client with "xxx" in custom_value1 which is verified by the actual content returned.

In the hosted setup, the above returns "Undefined array key 0"

turbo124 commented 2 years ago

try using 'filter' => 'xxx'

the filter parameter will search the custom value columns,

you'll see here the available filters you can use

https://github.com/invoiceninja/sdk-php#retrieving-models

kpirbhai commented 2 years ago

Thanks. I dug way down in the invoice ninja git about an hour ago. I was coming to that conclusion but hadn't tried yet as I needed to rest my brain. 😜

On Tue, Jul 26, 2022, 6:52 PM David Bomba @.***> wrote:

try using 'filter' => 'xxx'

the filter parameter will search the custom value columns,

you'll see here the available filters you can use

https://github.com/invoiceninja/sdk-php#retrieving-models

— Reply to this email directly, view it on GitHub https://github.com/invoiceninja/sdk-php/issues/88#issuecomment-1196107387, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJJV2DH24PP23IISWBY36DVWB24VANCNFSM54XHYMQA . You are receiving this because you authored the thread.Message ID: @.***>