View Source ExPipedrive.Leads (ex_pipedrive v0.1.0)

API v1 shim for Pipedrive leads.

All functions in this module explicitly route to /api/v1/leads. Prefer the get/2, create/2, update/3, and list/2 aliases for new code; the original *_lead names remain supported for compatibility. A v2 Leads resource can replace this shim without changing callers that use those aliases.

Summary

Functions

Creates a lead through POST /api/v1/leads.

Creates a lead through POST /api/v1/leads.

Fetches a lead by id through GET /api/v1/leads/:id.

Fetches a lead by id through GET /api/v1/leads/:id.

Lists leads through GET /api/v1/leads.

Lists leads through GET /api/v1/leads.

Updates a lead through PATCH /api/v1/leads/:id.

Updates a lead through PATCH /api/v1/leads/:id.

Functions

Creates a lead through POST /api/v1/leads.

Accepts a map (preferred) or %Lead{} and returns {:ok, %Lead{}}.

Link to this function

create_lead(client, attrs)

View Source

Creates a lead through POST /api/v1/leads.

Fetches a lead by id through GET /api/v1/leads/:id.

Link to this function

get_lead(client, lead_id)

View Source

Fetches a lead by id through GET /api/v1/leads/:id.

Link to this function

list(client, opts \\ [])

View Source

Lists leads through GET /api/v1/leads.

Supports :start, :limit, :owner_id, :person_id, :organization_id, :filter_id, and :sort.

Link to this function

list_leads(client, opts \\ [])

View Source

Lists leads through GET /api/v1/leads.

Link to this function

search_leads(client, term, opts \\ [])

View Source
Link to this function

update(client, lead_id, attrs)

View Source

Updates a lead through PATCH /api/v1/leads/:id.

Accepts a map (preferred) or %Lead{} and returns {:ok, %Lead{}}.

Link to this function

update_lead(client, lead_id, attrs)

View Source

Updates a lead through PATCH /api/v1/leads/:id.