View Source Zendesk.Ticket (zendesk v0.0.3)
Link to this section Summary
Functions
Returns the full ticket object as it would be after applying the macro to the ticket.
Create a Ticket
with the given parameters.
Create a Comment
for the given Ticket
.
Get Comment
s for the given Ticket
.
Get a list of Zendesk.Ticket
s.
Get a specific Zendesk.Ticket
.
Update a Ticket
with the given parameters.
Link to this section Types
@type t() :: %Zendesk.Ticket{ allow_attachments: term(), allow_channelback: term(), assignee_id: term(), brand_id: term(), collaborator_ids: term(), created_at: term(), custom_fields: term(), description: term(), due_at: term(), email_cc_ids: term(), external_id: term(), follower_ids: term(), followup_ids: term(), forum_topic_id: term(), group_id: term(), has_incidents: term(), id: term(), is_public: term(), organization_id: term(), priority: term(), problem_id: term(), raw_subject: term(), recipient: term(), requester_id: term(), satisfaction_rating: term(), sharing_agreement_ids: term(), status: term(), subject: term(), submitter_id: term(), tags: term(), type: term(), updated_at: term(), url: term(), via: term() }
Link to this section Functions
@spec after_changes(t(), Zendesk.Macro.t()) :: Zendesk.Client.Operation.t()
Returns the full ticket object as it would be after applying the macro to the ticket.
It doesn't actually change the ticket.
@spec create(map()) :: Zendesk.Client.Operation.t()
Create a Ticket
with the given parameters.
@spec create_comment(t(), map()) :: Zendesk.Client.Operation.t()
Create a Comment
for the given Ticket
.
@spec get_comments(t()) :: Zendesk.Client.Operation.t()
Get Comment
s for the given Ticket
.
@spec list() :: Zendesk.Client.Operation.t()
Get a list of Zendesk.Ticket
s.
If passed to Zendesk.request!/1
it will return only the first results from the list.
You can create a Stream
to paginate over all results by calling Zendesk.stream!/1
.
For instance:
# get 400 tickets
Zendesk.Ticket.list()
|> Zendesk.stream!()
|> Stream.take(400)
|> Enum.to_list()
|> IO.inspect()
@spec show(pos_integer()) :: Zendesk.Client.Operation.t()
Get a specific Zendesk.Ticket
.
@spec update(t() | integer(), map()) :: Zendesk.Client.Operation.t()
Update a Ticket
with the given parameters.