View Source ExPipedrive.DealParticipants (ex_pipedrive v0.2.0)
API v1 shim for Pipedrive deal participants.
Deal participants have no /api/v2 equivalent yet; all functions here
explicitly route to /api/v1/deals/:id/participants.
Example
{:ok, %PagedResult{data: participants}} = ExPipedrive.DealParticipants.list(client, deal_id)
{:ok, participant} = ExPipedrive.DealParticipants.add(client, deal_id, person_id)
{:ok, :ok} = ExPipedrive.DealParticipants.delete(client, deal_id, participant.id)
Summary
Functions
Adds a participant via POST /api/v1/deals/:id/participants.
Removes a participant via DELETE /api/v1/deals/:id/participants/:deal_participant_id.
Lists participants via GET /api/v1/deals/:id/participants.
Functions
@spec add(Tesla.Client.t(), term(), pos_integer()) :: {:ok, ExPipedrive.DealParticipant.t()} | {:error, ExPipedrive.Error.t()}
Adds a participant via POST /api/v1/deals/:id/participants.
@spec delete(Tesla.Client.t(), term(), term()) :: {:ok, :ok} | {:error, ExPipedrive.Error.t()}
Removes a participant via DELETE /api/v1/deals/:id/participants/:deal_participant_id.
Returns {:ok, :ok}.
@spec list(Tesla.Client.t(), term(), keyword()) :: {:ok, ExPipedrive.PagedResult.t()} | {:error, ExPipedrive.Error.t()}
Lists participants via GET /api/v1/deals/:id/participants.
Options: :start (default 0), :limit.