zen_ex v0.4.2 ZenEx.Model.DynamicContent.Variant
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
create(dynamic_content_id, variant)
Specs
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() }) :: %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, String.t()}
Create variant of the dynamic_content.
Examples
iex> ZenEx.Model.DynamicContent.Variant.create(%ZenEx.Entity.DynamicContent.Variant{id: xxx, default: xxx, content: "xxx", ...})
%ZenEx.Entity.DynamicContent.Variant{id: xxx, default: xxx, content: "xxx", ...}
create_many(dynamic_content_id, variants)
Specs
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() } ]) :: %ZenEx.Entity.JobStatus{ id: term(), message: term(), progress: term(), results: term(), status: term(), total: term(), url: term() } | {:error, String.t()}
Create multiple variants of the dynamic_content.
Examples
iex> ZenEx.Model.DynamicContent.Variant.create_many([%ZenEx.Entity.DynamicContent.Variant{id: xxx, default: xxx, content: "xxx", ...}, ...])
%ZenEx.Entity.JobStatus{id: "xxx"}
destroy(dynamic_content_id, variant_id)
Specs
Delete variant of the dynamic_content specified by id.
Examples
iex> ZenEx.Model.DynamicContent.Variant.destroy(xxx, xxx)
:ok
list(dynamic_content_id, opts \\ [])
List variants of the dynamic_content.
Examples
iex> ZenEx.Model.DynamicContent.Variant.list(xxx)
%ZenEx.Collection{}
show(dynamic_content_id, variant_id)
Specs
show(integer(), 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() } | {:error, String.t()}
Show variant of the dynamic_content specified by id.
Examples
iex> ZenEx.Model.DynamicContent.Variant.show(xxx)
%ZenEx.Entity.DynamicContent.Variant{id: xxx, default: xxx, content: "xxx", ...}
update(dynamic_content_id, variant)
Specs
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() }) :: %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, String.t()}
Update variant of the dynamic_content specified by id.
Examples
iex> ZenEx.Model.DynamicContent.Variant.update(%ZenEx.Entity.DynamicContent.Variant{id: xxx, default: xxx, content: "xxx", ...})
%ZenEx.Entity.DynamicContent.Variant{id: xxx, default: xxx, content: "xxx", ...}
update_many(dynamic_content_id, variants)
Specs
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() } ]) :: %ZenEx.Entity.JobStatus{ id: term(), message: term(), progress: term(), results: term(), status: term(), total: term(), url: term() } | {:error, String.t()}
Update multiple variants of the dynamic_content specified by id.
Examples
iex> ZenEx.Model.DynamicContent.Variant.update_many([%ZenEx.Entity.DynamicContent.Variant{id: xxx, default: xxx, content: "xxx", ...}, ...])
%ZenEx.Entity.JobStatus{id: "xxx"}