lib/LeadsService.php
public function create(array $lead, array $options = array())
  {
    $attributes = array_intersect_key($lead, array_flip(self::$keysToPersist));
    if (isset($attributes['custom_fields']) && empty($attributes['custom_fields'])) unset($attributes['custom_fields']);

    list($code, $createdLead) = $this->httpClient->post("/leads", $attributes, $options);
    return $createdLead;
  }
public function create(array $lead, array $options = array())
  {
    $attributes = array_intersect_key($lead, array_flip(self::$keysToPersist));
    if (isset($attributes['custom_fields']) && empty($attributes['custom_fields'])) unset($attributes['custom_fields']);

    list($code, $createdLead) = $this->httpClient->post("/leads", $attributes, $options);
    return $createdLead;
  }
public function create ( array $ lead , array $ options = array ( ) ) { $ attributes = array_intersect_key ( $ lead , array_flip ( self :: $ keysToPersist ) ) ; if ( isset ( $ attributes [ 'custom_fields' ] ) && empty ( $ attributes [ 'custom_fields' ] ) ) unset ( $ attributes [ 'custom_fields' ] ) ; list ( $ code , $ createdLead ) = $ this -> httpClient -> post ( "/leads" , $ attributes , $ options ) ; return $ createdLead ; }
Create a lead

post '/leads'

Creates a new lead
A lead may represent a single individual or an organization

@param array $lead This array's attributes describe the object to be created.
@param array $options Additional request's options.

@return array The resulting object representing created resource.
Create a lead