ZenEx.HelpCenter.Model.Category (zen_ex v0.8.0)
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)
@spec 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() }) :: {:ok, %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() }} | {:error, any()}
Create category.
examples
Examples
iex> ZenEx.HelpCenter.Model.Category.create(%ZenEx.HelpCenter.Entity.Category{name: xxx, locale: xxx, ...})
{:ok, %ZenEx.HelpCenter.Entity.Category{name: xxx, locale: xxx, ...}}
Link to this function
destroy(id)
Delete category specified by id.
examples
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
Examples
iex> ZenEx.HelpCenter.Model.Category.list("en-us")
{:ok, %ZenEx.Collection{}}
Link to this function
show(locale, id)
@spec show(String.t(), integer()) :: {:ok, %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() }} | {:error, any()}
Show category specified by bcp-47 code of locale (es-419, en-us, pr-br) and id.
examples
Examples
iex> ZenEx.HelpCenter.Model.Category.show("en-us", 1)
{:ok, %ZenEx.HelpCenter.Entity.Category{id: 1, name: xxx, locale: "en-us", ...}}
Link to this function
update(category)
@spec 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() }) :: {:ok, %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() }} | {:error, any()}
Update category specified by id.
examples
Examples
iex> ZenEx.HelpCenter.Model.Category.update(%ZenEx.HelpCenter.Entity.Category{id: 1, name: xxx, locale: xxx, ...})
{:ok, %ZenEx.HelpCenter.Entity.Category{id: 1, name: xxx, locale: xxx, ...}}