ZenEx.HelpCenter.Model.Section (zen_ex v0.8.0)
Provides functions to operate Zendesk HelpCenter Section.
Link to this section Summary
Functions
Create section.
Delete section specified by id.
List sections specified by bcp-47 code of locale (es-419, en-us, pr-br) or locale and category_id.
Show section specified by bcp-47 code of locale (es-419, en-us, pr-br) and id.
Update section specified by id.
Link to this section Functions
Link to this function
create(section)
@spec create(%ZenEx.HelpCenter.Entity.Section{ category_id: term(), 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.Section{ category_id: term(), 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 section.
examples
Examples
iex> ZenEx.HelpCenter.Model.Section.create(%ZenEx.HelpCenter.Entity.Section{name: xxx, locale: xxx, ...})
{:ok, %ZenEx.HelpCenter.Entity.Section{name: xxx, locale: xxx, ...}}
Link to this function
destroy(id)
Delete section specified by id.
examples
Examples
iex> ZenEx.HelpCenter.Model.Section.destroy(1)
:ok
Link to this function
list(locale, category_id_or_opts \\ [], opts \\ [])
List sections specified by bcp-47 code of locale (es-419, en-us, pr-br) or locale and category_id.
examples
Examples
iex> ZenEx.HelpCenter.Model.Section.list("en-us")
{:ok, %ZenEx.Collection{}}
iex> ZenEx.HelpCenter.Model.Section.list("en-us", 1)
{:ok, %ZenEx.Collection{}}
Link to this function
show(locale, id)
@spec show(String.t(), integer()) :: {:ok, %ZenEx.HelpCenter.Entity.Section{ category_id: term(), 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 section specified by bcp-47 code of locale (es-419, en-us, pr-br) and id.
examples
Examples
iex> ZenEx.HelpCenter.Model.Section.show("en-us", 1)
{:ok, %ZenEx.HelpCenter.Entity.Section{id: 1, name: xxx, locale: "en-us", ...}}
Link to this function
update(section)
@spec update(%ZenEx.HelpCenter.Entity.Section{ category_id: term(), 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.Section{ category_id: term(), 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 section specified by id.
examples
Examples
iex> ZenEx.HelpCenter.Model.Section.update(%ZenEx.HelpCenter.Entity.Section{id: 1, name: xxx, locale: xxx, ...})
{:ok, %ZenEx.HelpCenter.Entity.Section{id: 1, name: xxx, locale: xxx, ...}}