ZenEx.Model.UserIdentity (zen_ex v0.8.0)
Provides functions to operate Zendesk User Identities.
Link to this section Summary
Functions
Create user's identity.
Delete user's identity specified by id.
List user's identities.
Make primary user's identity specified by id.
Request user verification for user's identity specified by id.
Show user's identity specified by id.
Update user's identity specified by id.
Verify user's identity specified by id.
Link to this section Functions
create(user, identity)
@spec create( %ZenEx.Entity.User{ active: term(), alias: term(), created_at: term(), custom_role_id: term(), details: term(), email: term(), external_id: term(), id: term(), last_login_at: term(), locale: term(), locale_id: term(), moderator: term(), name: term(), notes: term(), only_private_comments: term(), organization_id: term(), phone: term(), restricted_agent: term(), role: term(), shared: term(), shared_agent: term(), signature: term(), suspended: term(), tags: term(), ticket_restriction: term(), time_zone: term(), updated_at: term(), url: term(), user_fields: term(), verified: term() }, %ZenEx.Entity.UserIdentity{ created_at: term(), deliverable_state: term(), id: term(), primary: term(), type: term(), undeliverable_count: term(), updated_at: term(), url: term(), user_id: term(), value: term(), verified: term() } ) :: {:ok, %ZenEx.Entity.UserIdentity{ created_at: term(), deliverable_state: term(), id: term(), primary: term(), type: term(), undeliverable_count: term(), updated_at: term(), url: term(), user_id: term(), value: term(), verified: term() }} | {:error, any()}
Create user's identity.
examples
Examples
iex> ZenEx.Model.UserIdentity.create(%ZenEx.Entity.User{id: xxx}, %ZenEx.Entity.UserIdentity{type: "xxx", value: "xxx"}) {:ok, %ZenEx.Entity.UserIdentity{id: xxx, value: "xxx", ...}}
destroy(user, id)
@spec destroy( %ZenEx.Entity.User{ active: term(), alias: term(), created_at: term(), custom_role_id: term(), details: term(), email: term(), external_id: term(), id: term(), last_login_at: term(), locale: term(), locale_id: term(), moderator: term(), name: term(), notes: term(), only_private_comments: term(), organization_id: term(), phone: term(), restricted_agent: term(), role: term(), shared: term(), shared_agent: term(), signature: term(), suspended: term(), tags: term(), ticket_restriction: term(), time_zone: term(), updated_at: term(), url: term(), user_fields: term(), verified: term() }, integer() ) :: :ok | {:error, any()}
Delete user's identity specified by id.
examples
Examples
iex> ZenEx.Model.UserIdentity.destroy(%ZenEx.Entity.User{id: 1}, 1) :ok
list(user, opts \\ [])
List user's identities.
examples
Examples
iex> ZenEx.Model.UserIdentity.list(%ZenEx.Entity.User{id: xxx})
{:ok, %ZenEx.Collection{}}
make_primary(user, id)
@spec make_primary( %ZenEx.Entity.User{ active: term(), alias: term(), created_at: term(), custom_role_id: term(), details: term(), email: term(), external_id: term(), id: term(), last_login_at: term(), locale: term(), locale_id: term(), moderator: term(), name: term(), notes: term(), only_private_comments: term(), organization_id: term(), phone: term(), restricted_agent: term(), role: term(), shared: term(), shared_agent: term(), signature: term(), suspended: term(), tags: term(), ticket_restriction: term(), time_zone: term(), updated_at: term(), url: term(), user_fields: term(), verified: term() }, integer() ) :: {:ok, %ZenEx.Collection{ count: term(), decode_as: term(), entities: term(), next_page: term(), previous_page: term() }} | {:error, any()}
Make primary user's identity specified by id.
examples
Examples
iex> ZenEx.Model.UserIdentity.make_primary(%ZenEx.Entity.User{id: 1}, 1) {:ok, %ZenEx.Collection{}}
request_user_verification(user, id)
@spec request_user_verification( %ZenEx.Entity.User{ active: term(), alias: term(), created_at: term(), custom_role_id: term(), details: term(), email: term(), external_id: term(), id: term(), last_login_at: term(), locale: term(), locale_id: term(), moderator: term(), name: term(), notes: term(), only_private_comments: term(), organization_id: term(), phone: term(), restricted_agent: term(), role: term(), shared: term(), shared_agent: term(), signature: term(), suspended: term(), tags: term(), ticket_restriction: term(), time_zone: term(), updated_at: term(), url: term(), user_fields: term(), verified: term() }, integer() ) :: :ok | {:error, any()}
Request user verification for user's identity specified by id.
examples
Examples
iex> ZenEx.Model.UserIdentity.request_user_verification(%ZenEx.Entity.User{id: 1}, 1) :ok
show(user, id)
@spec show( %ZenEx.Entity.User{ active: term(), alias: term(), created_at: term(), custom_role_id: term(), details: term(), email: term(), external_id: term(), id: term(), last_login_at: term(), locale: term(), locale_id: term(), moderator: term(), name: term(), notes: term(), only_private_comments: term(), organization_id: term(), phone: term(), restricted_agent: term(), role: term(), shared: term(), shared_agent: term(), signature: term(), suspended: term(), tags: term(), ticket_restriction: term(), time_zone: term(), updated_at: term(), url: term(), user_fields: term(), verified: term() }, integer() ) :: {:ok, %ZenEx.Entity.UserIdentity{ created_at: term(), deliverable_state: term(), id: term(), primary: term(), type: term(), undeliverable_count: term(), updated_at: term(), url: term(), user_id: term(), value: term(), verified: term() }} | {:error, any()}
Show user's identity specified by id.
examples
Examples
iex> ZenEx.Model.UserIdentity.show(%ZenEx.Entity.User{id: xxx}, 1) {:ok, %ZenEx.Entity.UserIdentity{id: 1, type: "xxx", ...}}
update(user, identity)
@spec update( %ZenEx.Entity.User{ active: term(), alias: term(), created_at: term(), custom_role_id: term(), details: term(), email: term(), external_id: term(), id: term(), last_login_at: term(), locale: term(), locale_id: term(), moderator: term(), name: term(), notes: term(), only_private_comments: term(), organization_id: term(), phone: term(), restricted_agent: term(), role: term(), shared: term(), shared_agent: term(), signature: term(), suspended: term(), tags: term(), ticket_restriction: term(), time_zone: term(), updated_at: term(), url: term(), user_fields: term(), verified: term() }, %ZenEx.Entity.UserIdentity{ created_at: term(), deliverable_state: term(), id: term(), primary: term(), type: term(), undeliverable_count: term(), updated_at: term(), url: term(), user_id: term(), value: term(), verified: term() } ) :: {:ok, %ZenEx.Entity.UserIdentity{ created_at: term(), deliverable_state: term(), id: term(), primary: term(), type: term(), undeliverable_count: term(), updated_at: term(), url: term(), user_id: term(), value: term(), verified: term() }} | {:error, any()}
Update user's identity specified by id.
examples
Examples
iex> ZenEx.Model.UserIdentity.update(%ZenEx.Entity.User{id: 1}, %ZenEx.Entity.UserIdentity{id: xxx, type: "xxx"}) {:ok, %ZenEx.Entity.UserIdentity{id: 1, type: "xxx", ...}}
verify(user, id)
@spec verify( %ZenEx.Entity.User{ active: term(), alias: term(), created_at: term(), custom_role_id: term(), details: term(), email: term(), external_id: term(), id: term(), last_login_at: term(), locale: term(), locale_id: term(), moderator: term(), name: term(), notes: term(), only_private_comments: term(), organization_id: term(), phone: term(), restricted_agent: term(), role: term(), shared: term(), shared_agent: term(), signature: term(), suspended: term(), tags: term(), ticket_restriction: term(), time_zone: term(), updated_at: term(), url: term(), user_fields: term(), verified: term() }, integer() ) :: :ok | {:error, any()}
Verify user's identity specified by id.
examples
Examples
iex> ZenEx.Model.UserIdentity.verify(%ZenEx.Entity.User{id: 1}, 1) :ok