public function fetch($query, $ids) { $criteria = []; foreach ($query as $term) { $criteria[$term->name] = $term->toparam(); } $criteria["ids"] = CustomerSearch::ids()->in($ids)->toparam(); $path = $this->_config->merchantPath() . '/customers/advanced_search'; $response = $this->_http->post($path, ['search' => $criteria]); return Util::extractattributeasarray($response['customers'], 'customer'); }
public function test_throwsIfNoOperatorNodeGiven() { $this->setExpectedException('InvalidArgumentException', 'Operator must be provided'); Braintree\Customer::search(array(Braintree\CustomerSearch::creditCardExpirationDate())); }