ZenEx.Model.DynamicContent (zen_ex v0.8.0)
Provides functions to operate Zendesk Dynamic content.
Link to this section Summary
Functions
Create dynamic_content.
Delete dynamic_content specified by id.
List dynamic_contents.
Show dynamic_content specified by id.
Update dynamic_content specified by id. This function won't change variants.
Link to this section Functions
Link to this function
create(dynamic_content)
@spec create(%ZenEx.Entity.DynamicContent{ created_at: term(), default_locale_id: term(), id: term(), name: term(), outdated: term(), placeholder: term(), updated_at: term(), url: term(), variants: term() }) :: {:ok, %ZenEx.Entity.DynamicContent{ created_at: term(), default_locale_id: term(), id: term(), name: term(), outdated: term(), placeholder: term(), updated_at: term(), url: term(), variants: term() }} | {:error, any()}
Create dynamic_content.
examples
Examples
iex> ZenEx.Model.DynamicContent.create(%ZenEx.Entity.DynamicContent{default_locale_id: xxx, variants: [%ZenEx.Entity.DynamicContent.Variant{...}, ...], ...})
{:ok, %ZenEx.Entity.DynamicContent{id: xxx, default_locale_id: xxx, ...}}
Link to this function
destroy(id)
Delete dynamic_content specified by id.
examples
Examples
iex> ZenEx.Model.DynamicContent.destroy(1)
:ok
Link to this function
list(opts \\ [])
List dynamic_contents.
examples
Examples
iex> ZenEx.Model.DynamicContent.list
{:ok, %ZenEx.Collection{}}
Link to this function
show(id)
@spec show(integer()) :: {:ok, %ZenEx.Entity.DynamicContent{ created_at: term(), default_locale_id: term(), id: term(), name: term(), outdated: term(), placeholder: term(), updated_at: term(), url: term(), variants: term() }} | {:error, any()}
Show dynamic_content specified by id.
examples
Examples
iex> ZenEx.Model.DynamicContent.show(xxx)
{:ok, %ZenEx.Entity.DynamicContent{id: xxx, default_locale_id: xxx, variants: [%ZenEx.Entity.DynamicContent.Variant{...}, ...], ...}}
Link to this function
update(dynamic_content)
@spec update(%ZenEx.Entity.DynamicContent{ created_at: term(), default_locale_id: term(), id: term(), name: term(), outdated: term(), placeholder: term(), updated_at: term(), url: term(), variants: term() }) :: {:ok, %ZenEx.Entity.DynamicContent{ created_at: term(), default_locale_id: term(), id: term(), name: term(), outdated: term(), placeholder: term(), updated_at: term(), url: term(), variants: term() }} | {:error, any()}
Update dynamic_content specified by id. This function won't change variants.
examples
Examples
iex> ZenEx.Model.DynamicContent.update(%ZenEx.Entity.DynamicContent{id: xxx, default_locale_id: xxx, ...})
{:ok, %ZenEx.Entity.DynamicContent{id: xxx, default_locale_id: xxx, ...}}