zen_ex v0.3.1 ZenEx.HelpCenter.Model.Category

Provides functions to operate Zendesk HelpCenter Category.

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

Functions

create(category)
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, ...}
destroy(id)
destroy(integer) :: :ok | :error

Delete category specified by id.

Examples

iex> ZenEx.HelpCenter.Model.Category.destroy(1)
:ok
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{}
show(locale, id)
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", ...}
update(category)
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, ...}