View Source ExPipedrive.Deals (ex_pipedrive v0.1.0)
Pipedrive deals resource.
v2-first helpers (get/2, create/2, update/3, delete/2, list_page/2,
stream/2) talk to /api/v2/deals. Prefer ExPipedrive.Search.search_deals/3
(or search_v2/3 here) for v2 itemSearch. Legacy get_deal/2, list_deals/2,
and search_deals/3 remain on API v1 for compatibility.
Summary
Functions
Creates a deal via POST /api/v2/deals.
Deletes a deal via DELETE /api/v2/deals/:id.
Fetches a deal by id via GET /api/v2/deals/:id.
Lists one page of deals via API v2 cursor pagination.
Searches deals via API v2 itemSearch. See ExPipedrive.Search.search_deals/3.
Lazily streams deals across all v2 cursor pages until next_cursor is nil.
Updates a deal via PATCH /api/v2/deals/:id.
Functions
Creates a deal via POST /api/v2/deals.
Accepts a map (preferred) or %Deal{}. Returns {:ok, %Deal{}}.
Deletes a deal via DELETE /api/v2/deals/:id.
Fetches a deal by id via GET /api/v2/deals/:id.
Lists one page of deals via API v2 cursor pagination.
Options: :cursor, :limit (clamped to 500), :status, and other filters.
Searches deals via API v2 itemSearch. See ExPipedrive.Search.search_deals/3.
Lazily streams deals across all v2 cursor pages until next_cursor is nil.
Example
client
|> ExPipedrive.Deals.stream(status: "open", limit: 500)
|> Enum.to_list()
Updates a deal via PATCH /api/v2/deals/:id.