View Source ExPipedrive.Labels (ex_pipedrive v0.2.0)
Facade over Pipedrive label definitions for deals, persons, organizations, and leads.
Pipedrive models labels two different ways:
- Deals / Persons / Organizations — labels are option values on the
system
label_idsfield. There is no dedicateddealLabels/personLabels/organizationLabelsendpoint; label definitions are listed and managed via the API v2 field-options endpoints (ExPipedrive.DealLabels,ExPipedrive.PersonLabels,ExPipedrive.OrganizationLabels). - Leads — labels have a dedicated API v1
/leadLabelsendpoint (ExPipedrive.LeadLabels).
This module simply delegates to those per-entity modules so callers can reach for one place when working across entity types; prefer the entity-specific module directly when you only need one.
Assigning labels to an entity
Assigning or clearing labels on a deal, person, organization, or lead is
not a separate endpoint — set the label_ids attribute (a list of
label ids) when calling that entity's own update/3 (e.g.
ExPipedrive.Deals.update/3, ExPipedrive.Persons.update/3).
Summary
Functions
Creates a deal label. See ExPipedrive.DealLabels.create/2.
Creates a lead label. See ExPipedrive.LeadLabels.create/2.
Creates an organization label. See
ExPipedrive.OrganizationLabels.create/2.
Creates a person label. See ExPipedrive.PersonLabels.create/2.
Deletes a deal label. See ExPipedrive.DealLabels.delete/2.
Deletes a lead label. See ExPipedrive.LeadLabels.delete/2.
Deletes an organization label. See
ExPipedrive.OrganizationLabels.delete/2.
Deletes a person label. See ExPipedrive.PersonLabels.delete/2.
Lists deal label definitions. See ExPipedrive.DealLabels.list/1.
Lists lead label definitions. See ExPipedrive.LeadLabels.list/1.
Lists organization label definitions. See
ExPipedrive.OrganizationLabels.list/1.
Lists person label definitions. See ExPipedrive.PersonLabels.list/1.
Updates a deal label. See ExPipedrive.DealLabels.update/3.
Updates a lead label. See ExPipedrive.LeadLabels.update/3.
Updates an organization label. See
ExPipedrive.OrganizationLabels.update/3.
Updates a person label. See ExPipedrive.PersonLabels.update/3.
Functions
@spec create_deal_label(Tesla.Client.t(), term()) :: {:ok, ExPipedrive.Label.t()} | {:error, ExPipedrive.Error.t()}
Creates a deal label. See ExPipedrive.DealLabels.create/2.
@spec create_lead_label(Tesla.Client.t(), term()) :: {:ok, ExPipedrive.Label.t()} | {:error, ExPipedrive.Error.t()}
Creates a lead label. See ExPipedrive.LeadLabels.create/2.
@spec create_organization_label(Tesla.Client.t(), term()) :: {:ok, ExPipedrive.Label.t()} | {:error, ExPipedrive.Error.t()}
Creates an organization label. See
ExPipedrive.OrganizationLabels.create/2.
@spec create_person_label(Tesla.Client.t(), term()) :: {:ok, ExPipedrive.Label.t()} | {:error, ExPipedrive.Error.t()}
Creates a person label. See ExPipedrive.PersonLabels.create/2.
@spec delete_deal_label(Tesla.Client.t(), term()) :: {:ok, ExPipedrive.Label.t()} | {:error, ExPipedrive.Error.t()}
Deletes a deal label. See ExPipedrive.DealLabels.delete/2.
@spec delete_lead_label(Tesla.Client.t(), term()) :: {:ok, term()} | {:error, ExPipedrive.Error.t()}
Deletes a lead label. See ExPipedrive.LeadLabels.delete/2.
@spec delete_organization_label(Tesla.Client.t(), term()) :: {:ok, ExPipedrive.Label.t()} | {:error, ExPipedrive.Error.t()}
Deletes an organization label. See
ExPipedrive.OrganizationLabels.delete/2.
@spec delete_person_label(Tesla.Client.t(), term()) :: {:ok, ExPipedrive.Label.t()} | {:error, ExPipedrive.Error.t()}
Deletes a person label. See ExPipedrive.PersonLabels.delete/2.
@spec list_deal_labels(Tesla.Client.t()) :: {:ok, [ExPipedrive.Label.t()]} | {:error, ExPipedrive.Error.t()}
Lists deal label definitions. See ExPipedrive.DealLabels.list/1.
@spec list_lead_labels(Tesla.Client.t()) :: {:ok, [ExPipedrive.Label.t()]} | {:error, ExPipedrive.Error.t()}
Lists lead label definitions. See ExPipedrive.LeadLabels.list/1.
@spec list_organization_labels(Tesla.Client.t()) :: {:ok, [ExPipedrive.Label.t()]} | {:error, ExPipedrive.Error.t()}
Lists organization label definitions. See
ExPipedrive.OrganizationLabels.list/1.
@spec list_person_labels(Tesla.Client.t()) :: {:ok, [ExPipedrive.Label.t()]} | {:error, ExPipedrive.Error.t()}
Lists person label definitions. See ExPipedrive.PersonLabels.list/1.
@spec update_deal_label(Tesla.Client.t(), term(), term()) :: {:ok, ExPipedrive.Label.t()} | {:error, ExPipedrive.Error.t()}
Updates a deal label. See ExPipedrive.DealLabels.update/3.
@spec update_lead_label(Tesla.Client.t(), term(), term()) :: {:ok, ExPipedrive.Label.t()} | {:error, ExPipedrive.Error.t()}
Updates a lead label. See ExPipedrive.LeadLabels.update/3.
@spec update_organization_label(Tesla.Client.t(), term(), term()) :: {:ok, ExPipedrive.Label.t()} | {:error, ExPipedrive.Error.t()}
Updates an organization label. See
ExPipedrive.OrganizationLabels.update/3.
@spec update_person_label(Tesla.Client.t(), term(), term()) :: {:ok, ExPipedrive.Label.t()} | {:error, ExPipedrive.Error.t()}
Updates a person label. See ExPipedrive.PersonLabels.update/3.