Braintree\CustomerGateway::fetch PHP Method

fetch() public method

public fetch ( $query, $ids )
    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');
    }