zen_ex v0.4.2 ZenEx.HelpCenter.Model.Category

Provides functions to operate Zendesk HelpCenter Category.

Link to this section Summary

Functions

Create category.

Delete category specified by id.

List categories specified by bcp-47 code of locale (es-419, en-us, pr-br).

Show category specified by bcp-47 code of locale (es-419, en-us, pr-br) and id.

Update category specified by id.

Link to this section Functions

Link to this function

create(category)

Specs

create(%ZenEx.HelpCenter.Entity.Category{
  created_at: term(),
  description: term(),
  html_url: term(),
  id: term(),
  locale: term(),
  name: term(),
  outdated: term(),
  position: term(),
  source_locale: term(),
  translation_ids: term(),
  updated_at: term(),
  url: term()
}) :: %ZenEx.HelpCenter.Entity.Category{
  created_at: term(),
  description: term(),
  html_url: term(),
  id: term(),
  locale: term(),
  name: term(),
  outdated: term(),
  position: term(),
  source_locale: term(),
  translation_ids: term(),
  updated_at: term(),
  url: term()
}

Create category.

Examples

iex> ZenEx.HelpCenter.Model.Category.create(%ZenEx.HelpCenter.Entity.Category{name: xxx, locale: xxx, ...})
%ZenEx.HelpCenter.Entity.Category{name: xxx, locale: xxx, ...}

Specs

destroy(integer()) :: :ok | :error

Delete category specified by id.

Examples

iex> ZenEx.HelpCenter.Model.Category.destroy(1)
:ok
Link to this function

list(locale, opts \\ [])

List categories specified by bcp-47 code of locale (es-419, en-us, pr-br).

Examples

iex> ZenEx.HelpCenter.Model.Category.list("en-us")
%ZenEx.Collection{}
Link to this function

show(locale, id)

Specs

show(String.t(), integer()) :: %ZenEx.HelpCenter.Entity.Category{
  created_at: term(),
  description: term(),
  html_url: term(),
  id: term(),
  locale: term(),
  name: term(),
  outdated: term(),
  position: term(),
  source_locale: term(),
  translation_ids: term(),
  updated_at: term(),
  url: term()
}

Show category specified by bcp-47 code of locale (es-419, en-us, pr-br) and id.

Examples

iex> ZenEx.HelpCenter.Model.Category.show("en-us", 1)
%ZenEx.HelpCenter.Entity.Category{id: 1, name: xxx, locale: "en-us", ...}
Link to this function

update(category)

Specs

update(%ZenEx.HelpCenter.Entity.Category{
  created_at: term(),
  description: term(),
  html_url: term(),
  id: term(),
  locale: term(),
  name: term(),
  outdated: term(),
  position: term(),
  source_locale: term(),
  translation_ids: term(),
  updated_at: term(),
  url: term()
}) :: %ZenEx.HelpCenter.Entity.Category{
  created_at: term(),
  description: term(),
  html_url: term(),
  id: term(),
  locale: term(),
  name: term(),
  outdated: term(),
  position: term(),
  source_locale: term(),
  translation_ids: term(),
  updated_at: term(),
  url: term()
}

Update category specified by id.

Examples

iex> ZenEx.HelpCenter.Model.Category.update(%ZenEx.HelpCenter.Entity.Category{id: 1, name: xxx, locale: xxx, ...})
%ZenEx.HelpCenter.Entity.Category{id: 1, name: xxx, locale: xxx, ...}