ZenEx.Model.DynamicContent.Variant (zen_ex v0.8.0)

Provides functions to operate variants of Zendesk Dynamic content.

Link to this section Summary

Functions

Create variant of the dynamic_content.

Create multiple variants of the dynamic_content.

Delete variant of the dynamic_content specified by id.

List variants of the dynamic_content.

Show variant of the dynamic_content specified by id.

Update variant of the dynamic_content specified by id.

Update multiple variants of the dynamic_content specified by id.

Link to this section Functions

Link to this function

create(dynamic_content_id, variant)

@spec create(integer(), %ZenEx.Entity.DynamicContent.Variant{
  active: term(),
  content: term(),
  created_at: term(),
  default: term(),
  id: term(),
  locale_id: term(),
  outdated: term(),
  updated_at: term(),
  url: term()
}) ::
  {:ok,
   %ZenEx.Entity.DynamicContent.Variant{
     active: term(),
     content: term(),
     created_at: term(),
     default: term(),
     id: term(),
     locale_id: term(),
     outdated: term(),
     updated_at: term(),
     url: term()
   }}
  | {:error, any()}

Create variant of the dynamic_content.

examples

Examples

iex> ZenEx.Model.DynamicContent.Variant.create(%ZenEx.Entity.DynamicContent.Variant{id: xxx, default: xxx, content: "xxx", ...})
{:ok, %ZenEx.Entity.DynamicContent.Variant{id: xxx, default: xxx, content: "xxx", ...}}
Link to this function

create_many(dynamic_content_id, variants)

@spec create_many(integer(), [
  %ZenEx.Entity.DynamicContent.Variant{
    active: term(),
    content: term(),
    created_at: term(),
    default: term(),
    id: term(),
    locale_id: term(),
    outdated: term(),
    updated_at: term(),
    url: term()
  }
]) ::
  {:ok,
   %ZenEx.Entity.JobStatus{
     id: term(),
     message: term(),
     progress: term(),
     results: term(),
     status: term(),
     total: term(),
     url: term()
   }}
  | {:error, any()}

Create multiple variants of the dynamic_content.

examples

Examples

iex> ZenEx.Model.DynamicContent.Variant.create_many([%ZenEx.Entity.DynamicContent.Variant{id: xxx, default: xxx, content: "xxx", ...}, ...])
{:ok, %ZenEx.Entity.JobStatus{id: "xxx"}}
Link to this function

destroy(dynamic_content_id, variant_id)

@spec destroy(integer(), integer()) :: :ok | {:error, any()}

Delete variant of the dynamic_content specified by id.

examples

Examples

iex> ZenEx.Model.DynamicContent.Variant.destroy(xxx, xxx)
:ok
Link to this function

list(dynamic_content_id, opts \\ [])

List variants of the dynamic_content.

examples

Examples

iex> ZenEx.Model.DynamicContent.Variant.list(xxx)
{:ok, %ZenEx.Collection{}}
Link to this function

show(dynamic_content_id, variant_id)

@spec show(integer(), integer()) ::
  {:ok,
   %ZenEx.Entity.DynamicContent.Variant{
     active: term(),
     content: term(),
     created_at: term(),
     default: term(),
     id: term(),
     locale_id: term(),
     outdated: term(),
     updated_at: term(),
     url: term()
   }}
  | {:error, any()}

Show variant of the dynamic_content specified by id.

examples

Examples

iex> ZenEx.Model.DynamicContent.Variant.show(xxx)
{:ok, %ZenEx.Entity.DynamicContent.Variant{id: xxx, default: xxx, content: "xxx", ...}}
Link to this function

update(dynamic_content_id, variant)

@spec update(integer(), %ZenEx.Entity.DynamicContent.Variant{
  active: term(),
  content: term(),
  created_at: term(),
  default: term(),
  id: term(),
  locale_id: term(),
  outdated: term(),
  updated_at: term(),
  url: term()
}) ::
  {:ok,
   %ZenEx.Entity.DynamicContent.Variant{
     active: term(),
     content: term(),
     created_at: term(),
     default: term(),
     id: term(),
     locale_id: term(),
     outdated: term(),
     updated_at: term(),
     url: term()
   }}
  | {:error, any()}

Update variant of the dynamic_content specified by id.

examples

Examples

iex> ZenEx.Model.DynamicContent.Variant.update(%ZenEx.Entity.DynamicContent.Variant{id: xxx, default: xxx, content: "xxx", ...})
{:ok, %ZenEx.Entity.DynamicContent.Variant{id: xxx, default: xxx, content: "xxx", ...}}
Link to this function

update_many(dynamic_content_id, variants)

@spec update_many(integer(), [
  %ZenEx.Entity.DynamicContent.Variant{
    active: term(),
    content: term(),
    created_at: term(),
    default: term(),
    id: term(),
    locale_id: term(),
    outdated: term(),
    updated_at: term(),
    url: term()
  }
]) ::
  {:ok,
   %ZenEx.Entity.JobStatus{
     id: term(),
     message: term(),
     progress: term(),
     results: term(),
     status: term(),
     total: term(),
     url: term()
   }}
  | {:error, any()}

Update multiple variants of the dynamic_content specified by id.

examples

Examples

iex> ZenEx.Model.DynamicContent.Variant.update_many([%ZenEx.Entity.DynamicContent.Variant{id: xxx, default: xxx, content: "xxx", ...}, ...])
{:ok, %ZenEx.Entity.JobStatus{id: "xxx"}}