public function getLeadByFilterType($filterType, $filterValue, $fields = array(), $returnRaw = false)
    {
        $args['filterType'] = $filterType;
        $args['filterValues'] = $filterValue;

        if (count($fields)) {
            $args['fields'] = implode(',', $fields);
        }

        return $this->getResult('getLeadByFilterType', $args, false, $returnRaw);
    }
public function getLeadByFilterType($filterType, $filterValue, $fields = array(), $returnRaw = false)
    {
        $args['filterType'] = $filterType;
        $args['filterValues'] = $filterValue;

        if (count($fields)) {
            $args['fields'] = implode(',', $fields);
        }

        return $this->getResult('getLeadByFilterType', $args, false, $returnRaw);
    }
public function getLeadByFilterType ( $ filterType , $ filterValue , $ fields = array ( ) , $ returnRaw = false ) { $ args [ 'filterType' ] = $ filterType ; $ args [ 'filterValues' ] = $ filterValue ; if ( count ( $ fields ) ) { $ args [ 'fields' ] = implode ( ',' , $ fields ) ; } return $ this -> getResult ( 'getLeadByFilterType' , $ args , false , $ returnRaw ) ; }
Get a lead by filter type.

Convenient method which uses {@link http://developers.marketo.com/documentation/rest/get-multiple-leads-by-filter-type/}
internally and just returns the first lead if there is one.

@param string $filterType  One of the supported filter types, e.g. id, cookie or email. See Marketo's documentation for all types.
@param string $filterValue The value to filter by
@param array  $fields      Array of field names to be returned in the response

@link http://developers.marketo.com/documentation/rest/get-multiple-leads-by-filter-type/

@return GetLeadResponse
Get a lead by filter type .