View Source Zendesk.Macro (zendesk v0.0.3)

Link to this section Summary

Functions

Get a list of Zendesk.Macros.

Get a specific Zendesk.Macro.

Returns the changes the macro would make to a ticket. It doesn't actually change a ticket.

Link to this section Types

@type t() :: %Zendesk.Macro{
  actions: term(),
  active: term(),
  created_at: term(),
  description: term(),
  id: term(),
  position: term(),
  raw_title: term(),
  restriction: term(),
  title: term(),
  updated_at: term(),
  url: term()
}

Link to this section Functions

@spec list() :: Zendesk.Client.Operation.t()

Get a list of Zendesk.Macros.

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 macros
 Zendesk.Macro.list()
 |> Zendesk.stream!()
 |> Stream.take(400)
 |> Enum.to_list()
 |> IO.inspect()

Get a specific Zendesk.Macro.

@spec ticket_changes(t()) :: Zendesk.Client.Operation.t()

Returns the changes the macro would make to a ticket. It doesn't actually change a ticket.