public static function search($query) { $criteria = array(); foreach ($query as $term) { $criteria[$term->name] = $term->toparam(); } $response = braintree_http::post('/verifications/advanced_search_ids', array('search' => $criteria)); $pager = array('className' => __CLASS__, 'classMethod' => 'fetch', 'methodArgs' => array($query)); return new Braintree_ResourceCollection($response, $pager); }
public static function fetch($ids) { $response = braintree_http::post('/customers/advanced_search', array('search' => array('ids' => $ids))); return braintree_util::extractattributeasarray($response['customers'], 'customer'); }
public static function fetch($query, $ids) { $criteria = array(); foreach ($query as $term) { $criteria[$term->name] = $term->toparam(); } $criteria["ids"] = Braintree_TransactionSearch::ids()->in($ids)->toparam(); $response = braintree_http::post('/transactions/advanced_search', array('search' => $criteria)); return braintree_util::extractattributeasarray($response['creditCardTransactions'], 'transaction'); }