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:

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

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.

Functions

Link to this function

create_deal_label(client, attrs)

View Source
@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.

Link to this function

create_lead_label(client, attrs)

View Source
@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.

Link to this function

create_organization_label(client, attrs)

View Source
@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.

Link to this function

create_person_label(client, attrs)

View Source
@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.

Link to this function

delete_deal_label(client, id)

View Source
@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.

Link to this function

delete_lead_label(client, id)

View Source
@spec delete_lead_label(Tesla.Client.t(), term()) ::
  {:ok, term()} | {:error, ExPipedrive.Error.t()}

Deletes a lead label. See ExPipedrive.LeadLabels.delete/2.

Link to this function

delete_organization_label(client, id)

View Source
@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.

Link to this function

delete_person_label(client, id)

View Source
@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.

Link to this function

list_deal_labels(client)

View Source
@spec list_deal_labels(Tesla.Client.t()) ::
  {:ok, [ExPipedrive.Label.t()]} | {:error, ExPipedrive.Error.t()}

Lists deal label definitions. See ExPipedrive.DealLabels.list/1.

Link to this function

list_lead_labels(client)

View Source
@spec list_lead_labels(Tesla.Client.t()) ::
  {:ok, [ExPipedrive.Label.t()]} | {:error, ExPipedrive.Error.t()}

Lists lead label definitions. See ExPipedrive.LeadLabels.list/1.

Link to this function

list_organization_labels(client)

View Source
@spec list_organization_labels(Tesla.Client.t()) ::
  {:ok, [ExPipedrive.Label.t()]} | {:error, ExPipedrive.Error.t()}

Lists organization label definitions. See ExPipedrive.OrganizationLabels.list/1.

Link to this function

list_person_labels(client)

View Source
@spec list_person_labels(Tesla.Client.t()) ::
  {:ok, [ExPipedrive.Label.t()]} | {:error, ExPipedrive.Error.t()}

Lists person label definitions. See ExPipedrive.PersonLabels.list/1.

Link to this function

update_deal_label(client, id, attrs)

View Source
@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.

Link to this function

update_lead_label(client, id, attrs)

View Source
@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.

Link to this function

update_organization_label(client, id, attrs)

View Source
@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.

Link to this function

update_person_label(client, id, attrs)

View Source
@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.