-
Notifications
You must be signed in to change notification settings - Fork 184
Description
I am trying to get the customer information with the address in 1 call/
The client.php getCustomer function only allows $id value. I thought about using the getCustomers function which allows filters:
/**
* The list of customers.
*
* @param array $filter
* @return array
*/
public static function getCustomers($filter = array())
{
$filter = Filter::create($filter);
return self::getCollection('/customers' . $filter->toQuery(), 'Customer');
}
When I call the function with an array with the id and the include addresses I get errors. I can't pass even the id in the filter:
"The field 'id' is not supported by this resource."
I tried setting the key in the array as 'id' and 'id:in', as shown in the query parameters in:
In the example of the documentation I can get the customer information and the addresses in 1 call using v3. I checked the customer v2 schema and I can't find any filter option.
How do I use the filter option in the function if it seems it is unavailable?
Am I using the right function or is it unavailable through the php client?
Thank you.